I looked at your command when you run your script from checkpoint

 

./build/X86/gem5.opt --debug-flags=FaultInjection ./configs/example/fs.py
--cpu-clock=250MHz --caches -r 1 --script=./configs/boot/dijkstra.py

 

I did not see some options such as "checkpoint" location via
"--checkpoint-dir" option of fs.py. Also, I suppose that DTB file
(--dtb-filename), machine type (--machine-type) and disk-images
(--disk-image) are properly setup and the benchmark executable file is added
into disk image.

 

Finally, I do not know the content of  "./configs/boot/dijkstra.py", in my
case that is another .rcS file which enters the location of benchmark
executable file in disk image then execute.

 

It's better if you can post commands for two steps and py script then people
can help

 

/Tung

From: Woo L.L. [mailto:[email protected]] 
Sent: Friday, August 3, 2018 1:53 PM
To: TungHoang_GMail <[email protected]>; gem5 users mailing list
<[email protected]>
Subject: Re: [gem5-users] Unable to run script upon restoring from
checkpoint

 

Thanks for the steps outlined. I have no issue with Step 1, because that's
exactly what I did. I just have problem with Step 2 because although it can
restore from the checkpoint, it can't read the new script file.

 

Best regards,

Elena

 

From: TungHoang_GMail <[email protected]
<mailto:[email protected]> >
Date: Friday, 3 August 2018 at 9:27 PM
To: Elena Woo <[email protected] <mailto:[email protected]> >, gem5
users mailing list <[email protected] <mailto:[email protected]> >
Subject: Re: [gem5-users] Unable to run script upon restoring from
checkpoint

 

Oh, I was misunderstand your flow but here is what I am using and it works
well

1) Create checkpoint using hack_back script, REMEMBER: not turning on
m5_term when checkpoint is created because it can take terminal control
which is supposed to release to your simulation when restoring. In the other
word, let checkpoing is created without any interaction.

2) Restore from checkpoint as usual. 

I though you may have problem with the step 1

Best,
/T

On 08/03/2018 01:14 PM, Woo L.L. wrote:

Hi,

 

I don't think the script has any problem because as you can see from the
result below, without any checkpointing, the program was able to execute
till the end after booting. So, I am pretty sure the "bash" is being
supported and the script works fine. I just couldn't get it to load after
restoring from checkpoint. 

 

 ./build/X86/gem5.opt -r -d sim_out --debug-flags=FaultInjection
./configs/example/fs.py --script=./configs/boot/dijkstra.rcS
--cpu-clock=250MHz -caches

 

Linux version 2.6.22.9 (gblack@fajita) (gcc version 4.1.2 (Gentoo 4.1.2
p1.1)) #12 SMP Fri Feb 27 22:10:33 PST 2009

Command line: earlyprintk=ttyS0 console=ttyS0 lpj=7999923 root=/dev/hda1

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

 BIOS-e820: 000000000009fc00 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 0000000020000000 (usable)

 BIOS-e820: 0000000020000000 - 00000000c0000000 (reserved)

 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)

end_pfn_map = 1048576

kernel direct mapping tables up to 100000000 @ 8000-d000

DMI 2.5 present.

Zone PFN ranges:

  DMA             0 ->     4096

  DMA32        4096 ->  1048576

  Normal    1048576 ->  1048576

early_node_map[2] active PFN ranges

    0:        0 ->      159

    0:      256 ->   131072

Intel MultiProcessor Specification v1.4

MPTABLE: OEM ID:  MPTABLE: Product ID:  MPTABLE: APIC at: 0xFEE00000

Processor #0 (Bootup-CPU)

I/O APIC #1 at 0xFEC00000.

Setting APIC routing to flat

Processors: 1

Allocating PCI resources starting at c4000000 (gap: c0000000:3fff0000)

PERCPU: Allocating 34160 bytes of per cpu data

Built 1 zonelists.  Total pages: 127573

Kernel command line: earlyprintk=ttyS0 console=ttyS0 lpj=7999923
root=/dev/hda1

Initializing CPU#0

PID hash table entries: 2048 (order: 11, 16384 bytes)

time.c: Detected 250.000 MHz processor.

Console: colour dummy device 80x25

console handover: boot [earlyser0] -> real [ttyS0]

Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)

Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)

Checking aperture...

Memory: 509268k/524288k available (3699k kernel code, 14464k reserved, 1767k
data, 248k init)

Calibrating delay loop (skipped)... 3999.96 BogoMIPS preset

Mount-cache hash table entries: 256

CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)

CPU: L2 Cache: 1024K (64 bytes/line)

using mwait in idle threads.

SMP alternatives: switching to UP code

Freeing SMP alternatives: 34k freed

Using local APIC timer interrupts.

result 976564

Detected 0.976 MHz APIC timer.

Brought up 1 CPUs

NET: Registered protocol family 16

PCI: Using configuration type 1

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

PCI: Probing PCI hardware

PCI->APIC IRQ transform: 0000:00:04.0[A] -> IRQ 16

PCI-GART: No AMD northbridge found.

Time: tsc clocksource has been installed.

NET: Registered protocol family 2

IP route cache hash table entries: 16384 (order: 5, 131072 bytes)

TCP established hash table entries: 65536 (order: 8, 1572864 bytes)

TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)

TCP: Hash tables configured (established 65536 bind 65536)

TCP reno registered

Total HugeTLB memory allocated, 0

Installing knfsd (copyright (C) 1996 [email protected]
<mailto:[email protected]> ).

io scheduler noop registered

io scheduler deadline registered

io scheduler cfq registered (default)

Real Time Clock Driver v1.12ac

Linux agpgart interface v0.102 (c) Dave Jones

Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled

serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 8250

floppy0: no floppy controllers found

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

loop: module loaded

Intel(R) PRO/1000 Network Driver - version 7.3.20-k2

Copyright (c) 1999-2006 Intel Corporation.

e100: Intel(R) PRO/100 Network Driver, 3.5.17-k4-NAPI

e100: Copyright(c) 1999-2006 Intel Corporation

forcedeth.c: Reverse Engineered nForce ethernet driver. Version 0.60.

tun: Universal TUN/TAP device driver, 1.6

tun: (C) 1999-2004 Max Krasnyansky  <mailto:[email protected]>
<[email protected]>

netconsole: not configured, aborting

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

PIIX4: IDE controller at PCI slot 0000:00:04.0

PCI: Enabling device 0000:00:04.0 (0000 -> 0001)

PIIX4: chipset revision 0

PIIX4: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0x1000-0x1007, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0x1008-0x100f, BIOS settings: hdc:DMA, hdd:DMA

hda: M5 IDE Disk, ATA DISK drive

hdb: M5 IDE Disk, ATA DISK drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

hda: max request size: 128KiB

hda: 4194288 sectors (2147 MB), CHS=4161/16/63, UDMA(33)

 hda: hda1

hdb: max request size: 128KiB

hdb: 4177920 sectors (2139 MB), CHS=4144/16/63, UDMA(33)

 hdb: unknown partition table

megaraid cmm: 2.20.2.7 (Release Date: Sun Jul 16 00:01:03 EST 2006)

megaraid: 2.20.5.1 (Release Date: Thu Nov 16 15:32:35 EST 2006)

megasas: 00.00.03.10-rc5 Thu May 17 10:09:32 PDT 2007

Fusion MPT base driver 3.04.04

Copyright (c) 1999-2007 LSI Logic Corporation

Fusion MPT SPI Host driver 3.04.04

Fusion MPT SAS Host driver 3.04.04

ieee1394: raw1394: /dev/raw1394 device initialized

USB Universal Host Controller Interface driver v3.0

usbcore: registered new interface driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

serio: i8042 KBD port at 0x60,0x64 irq 1

serio: i8042 AUX port at 0x60,0x64 irq 12

mice: PS/2 mouse device common for all mice

input: AT Translated Set 2 keyboard as /class/input/input0

device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised:
[email protected] <mailto:[email protected]> 

input: PS/2 Generic Mouse as /class/input/input1

usbcore: registered new interface driver usbhid

drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver

oprofile: using timer interrupt.

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 10

IPv6 over IPv4 tunneling driver

NET: Registered protocol family 17

EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended

VFS: Mounted root (ext2 filesystem).

Freeing unused kernel memory: 248k freed

mounting filesystems...

loading script...

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 

Running Dijkstra benchmark now

Shortest path is 0 in cost. Path is:  0 50

Finishing now....

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 

 

Thanks.

 

Regards,

Elena

 

From: TungHoang_GMail <[email protected]
<mailto:[email protected]> >
Date: Friday, 3 August 2018 at 6:37 PM
To: gem5 users mailing list <[email protected]
<mailto:[email protected]> >, Elena Woo <[email protected]
<mailto:[email protected]> >
Subject: Re: [gem5-users] Unable to run script upon restoring from
checkpoint

 

You should check if your image file support "bash" or "sh". Just mount your
image in specific folder, find bash or sh in /bin then adapt your script.

/T
On 08/03/2018 12:47 AM, Woo L.L. wrote:

Dear all,

 

I am having a problem trying to run the second script file after restoring
from checkpoint. 

I have used used hack_back_ckpt.rcS to create 1st checkpoint after booting
from Linux. Here is the command I have used to run the checkpointing:

./build/X86/gem5.opt ./configs/example/fs.py
--script=./configs/boot/hack_back_ckpt.rcS

 

And here is the result after checkpointing:

DMTCP:: !!!! SIMULATION IS NOT ATTACHED WITH DMTCP !!!

gem5 Simulator System.  http://gem5.org

gem5 is copyrighted software; use the --copyright option for details.

 

gem5 compiled Apr 12 2018 21:57:22

gem5 started Aug  3 2018 08:24:00

gem5 executing on elena-VirtualBox, pid 2854

command line: ./build/X86/gem5.opt ./configs/example/fs.py
--script=./configs/boot/hack_back_ckpt.rcS

 

Global frequency set at 1000000000000 ticks per second

warn: DRAM device capacity (8192 Mbytes) does not match the address range
assigned (512 Mbytes)

Setting Entry Point

info: kernel located at: /home/elena/RTS/gemfi/x86/binaries/vmlinux

Listening for com_1 connection on port 3456

      0: rtc: Real-time clock set to Sun Jan  1 00:00:00 2012

0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000

warn: Reading current count from inactive timer.

**** REAL SIMULATION ****

info: Entering event queue @ 0.  Starting simulation...

warn: Don't know what interrupt to clear for console.

warn: x86 cpuid: unknown family 0x8086

warn: instruction 'wbinvd' unimplemented

warn: Tried to clear PCI interrupt 14

warn: Unknown mouse command 0xe1.

Writing checkpoint

info: Entering event queue @ 5131049520000.  Starting simulation...

Exiting @ tick 5132244233500 because m5_exit instruction encountered

 

To run the second script file, this was what I used:

./build/X86/gem5.opt --debug-flags=FaultInjection ./configs/example/fs.py
--cpu-clock=250MHz --caches -r 1 --script=./configs/boot/dijkstra.py

 

The result is shown as below:

DMTCP:: !!!! SIMULATION IS NOT ATTACHED WITH DMTCP !!!

gem5 Simulator System.  http://gem5.org

gem5 is copyrighted software; use the --copyright option for details.

 

gem5 compiled Apr 12 2018 21:57:22

gem5 started Aug  3 2018 08:33:33

gem5 executing on elena-VirtualBox, pid 2878

command line: ./build/X86/gem5.opt --debug-flags=FaultInjection
./configs/example/fs.py --cpu-clock=250MHz --caches -r 1
--script=./configs/boot/dijkstra.py

 

Global frequency set at 1000000000000 ticks per second

warn: DRAM device capacity (8192 Mbytes) does not match the address range
assigned (512 Mbytes)

Setting Entry Point

info: kernel located at: /home/elena/RTS/gemfi/x86/binaries/vmlinux

Listening for com_1 connection on port 3456

      0: rtc: Real-time clock set to Sun Jan  1 00:00:00 2012

0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000

      0: system.fi_system: Initialized FI_System

warn: Reading current count from inactive timer.

**** REAL SIMULATION ****

5131049520000: system.fi_system: Starting FI

info: Entering event queue @ 5131049520000.  Starting simulation...

warn: Don't know what interrupt to clear for console.

 

On the terminal, all it showed was:

Loading new script.

 

This is the content of the 2nd script file:

#!/bin/bash

echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"

echo "Running Dijkstra benchmark now"

/sbin/m5 dumpresetstats [100, 100000]

./dijkstra_1_FI input_dijkstra10.dat

echo "Finishing now...."

echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"

/sbin/m5 exit

 

Without running checkpointing, the entire program was able to terminate and
provide proper result. However, with checkpointing, it seems to be stuck at
trying to read a new script. 

I am not sure if I have missed any steps in between. I followed through the
discussions about this issue - I didn't connect my terminal during the 1st
checkpointing, I view the result by tracing the terminal file. I didn't make
any changes to the hack_back_ckpt.rcS file. I also tried after loading the
checkpoint and leaving the -script empty, I brought up the terminal to try
and input the script file but only Ctrl+C made a difference. Anything other
than that showed no difference. So, I am not sure where I have gone wrong.
Appreciate all the help and guidance please.

 

Thanks.

 

Regards,

Elena






_______________________________________________
gem5-users mailing list
[email protected] <mailto:[email protected]>
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

 

 

_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to