Load/store machine cycles
parent
ebec9825c7
commit
122e1226e9
50
README.md
50
README.md
|
@ -101,7 +101,10 @@ Cycles: 3142947347
|
||||||
|
|
||||||
# Store Machine State
|
# Store Machine State
|
||||||
Instead of fully booting, a RAM image can be loaded and the
|
Instead of fully booting, a RAM image can be loaded and the
|
||||||
CPU set to a cycle, such as 3142947347.
|
CPU set to a cycle, such as 3142947347. The below command boots
|
||||||
|
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 \
|
cartesi-machine \
|
||||||
|
@ -113,6 +116,49 @@ cartesi-machine \
|
||||||
-- /mnt/stockfish/stockfish.sh
|
-- /mnt/stockfish/stockfish.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Load Machine State
|
||||||
|
This loads the above machine state and starts it at the begining,
|
||||||
|
running until the end. Basically, finishes at the end.
|
||||||
|
|
||||||
|
```
|
||||||
|
cartesi-machine \
|
||||||
|
--load=cartesi/stockfish-ram \
|
||||||
|
--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
|
||||||
|
```
|
||||||
|
|
||||||
|
# Store/Load Machine State Mid-Run
|
||||||
|
This stores the machine state halfway through normal completion.
|
||||||
|
|
||||||
|
```
|
||||||
|
cartesi-machine \
|
||||||
|
--max-mcycle=1571473674 \
|
||||||
|
--store=cartesi/stockfish-ram-mid \
|
||||||
|
--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 starts it in the middle cycle.
|
||||||
|
Load and run it from halfway:
|
||||||
|
```
|
||||||
|
cartesi-machine \
|
||||||
|
--load=cartesi/stockfish-ram-mid \
|
||||||
|
--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
|
# TODO
|
||||||
|
|
||||||
* Make image of RAM with stockfish already run once and loaded.
|
* Make image of RAM with stockfish already run once and loaded.
|
||||||
|
@ -140,7 +186,7 @@ Same as upstream Stockfish, GPL v3.
|
||||||
|
|
||||||
# Contact
|
# Contact
|
||||||
```
|
```
|
||||||
# y@deepcrayon.fish or jebba in Cartesi/Stockfish discord
|
# y@deepcrayon.fish or jebba in Cartesi/Stockfish/lichess discord
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue