Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision |
condor:submit:checkpointing [2011/08/05 15:54] – garrettheath4 | condor:submit:checkpointing [2011/08/05 16:02] (current) – [Save a Checkpoint without Exiting] garrettheath4 |
---|
to compile your ''HellowOrld'' program, simply stick ''condor_compile'' in front of this command to compile your program to include the extra Condor features: | to compile your ''HellowOrld'' program, simply stick ''condor_compile'' in front of this command to compile your program to include the extra Condor features: |
<code bash>condor_compile gcc -o HellowOrld HellowOrld.c</code> | <code bash>condor_compile gcc -o HellowOrld HellowOrld.c</code> |
**Note** that this will overwrite any existing non-Condor compilation called "''HellowOrld''". It may be a good idea to compile your program normally first and then compile it again with ''condor_compile'' but with a different name, such as ''condor_compile gcc -o HellowOrldCondor HellowOrld.c'', although a program compiled with ''condor_compile'' should still have the same non-Condor features and functionality as one compiled normally. | **Note** that this will overwrite any existing non-Condor compilation called "''HellowOrld''". It may be a good idea to compile your program normally first and then compile it again with ''condor_compile'' but with a different name, such as ''condor_compile gcc -o HellowOrldCondor HellowOrld.c''. Although a program compiled with ''condor_compile'' should still have the same non-Condor features and functionality as one compiled normally, it may help with debugging to still have a copy of your program that was compiled normally. |
| |
=====Standalone Checkpointing===== | =====Standalone Checkpointing===== |
<code bash>setarch x86_64 -R -L ./HellowOrld arg1 arg2 ...</code> | <code bash>setarch x86_64 -R -L ./HellowOrld arg1 arg2 ...</code> |
| |
**Note**: This page assumes you have a 64-bit processor. If you have an older 32-bit processor architecture, use ''setarch i386'' instead of ''setarch x86_64'' when running your ''condor_compile''d program on your own 32-bit computer. | :!: **Note**: This page assumes you have a 64-bit processor. If you have an older 32-bit processor architecture, use ''setarch i386'' instead of ''setarch x86_64'' when running your ''condor_compile''d program on your own 32-bit computer. To find out what kind of processor you have, run ''uname -p'' and use whatever is printed as the argument for ''setarch'' commands. |
| |
Your program will run normally on your computer. To kill it, press ''Ctrl-C'' like you normally do. This sends the ''SIGINT'' signal to your program which causes programs to die immediately. | Your program will run normally on your computer. To kill it, press ''Ctrl-C'' like you normally do. This sends the ''SIGINT'' signal to your program which causes programs to die immediately. |
To make your program save a checkpoint but not exit, run your ''condor_compile''d program with checkpointing enabled. With your program running in one terminal window, open up a separate terminal window and run the ''killall'' command with the ''-s USR2'' argument to send your program the ''SIGUSR2'' signal, like so: | To make your program save a checkpoint but not exit, run your ''condor_compile''d program with checkpointing enabled. With your program running in one terminal window, open up a separate terminal window and run the ''killall'' command with the ''-s USR2'' argument to send your program the ''SIGUSR2'' signal, like so: |
<code bash>killall -s USR2 HellowOrld</code> | <code bash>killall -s USR2 HellowOrld</code> |
| Your program will receive the command and create a checkpoint but will continue running. That way, if the program is killed later and not given the chance to make a new checkpoint, you can start the program from where it left off at the checkpoint instead of completely starting over. |
| |
====Start from Checkpoint==== | ====Start from Checkpoint==== |