1
0
Fork 0
riscv64-cartesi
server 2021-11-16 20:37:49 -07:00
parent 122e1226e9
commit 9906cc4d2c
1 changed files with 40 additions and 0 deletions

View File

@ -106,6 +106,7 @@ the image and runs until the 3142947347th cycle (when above terminates,
could be earlier), then halts the machine, saving the state of RAM to
a directory.
```
cartesi-machine \
--max-mcycle=3142947347 \
@ -116,6 +117,14 @@ cartesi-machine \
-- /mnt/stockfish/stockfish.sh
```
Note, it won't overwrite the the directory, so you may need to delete
the above directory if you re-run the above command:
```
# Only run if you re-run above:
rm -rf cartesi/stockfish-ram
```
# Load Machine State
This loads the above machine state and starts it at the begining,
running until the end. Basically, finishes at the end.
@ -158,6 +167,37 @@ cartesi-machine \
-- /mnt/stockfish/stockfish.sh
```
# Store/Load Machine State 95% Run
This stores the machine state 95% through normal completion.
This is like a "fast boot" to the application.
```
cartesi-machine \
--max-mcycle=2985799980 \
--store=cartesi/stockfish-ram-95 \
--ram-length=256Mi \
--flash-drive=label:stockfish,filename:cartesi/stockfish.ext2 \
--flash-drive=label:root,filename:/opt/cartesi/share/images/rootfs.ext2 \
-- /mnt/stockfish/stockfish.sh
```
This loads the above, and should finish relatively fast.
Doing a full run takes around 3 minutes to get the full test
output from stockfish. Running below takes 18 seconds to get the the
identical output. It could be made much faster by finding the exact
cycle where the output begins.
```
cartesi-machine \
--load=cartesi/stockfish-ram-95 \
--initial-hash \
--final-hash \
--ram-length=256Mi \
--flash-drive=label:stockfish,filename:cartesi/stockfish.ext2 \
--flash-drive=label:root,filename:/opt/cartesi/share/images/rootfs.ext2 \
-- /mnt/stockfish/stockfish.sh
```
# TODO