User Tools

Site Tools


cluster:147

Warning: Undefined array key -1 in /usr/share/dokuwiki/inc/html.php on line 1458

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cluster:147 [2016/03/18 14:28]
hmeij07
cluster:147 [2020/02/27 13:06] (current)
hmeij07
Line 3: Line 3:
  
 ==== BLCR Checkpoint in OL3 ==== ==== BLCR Checkpoint in OL3 ====
 +
 +**Deprecated since we did OS upgrades [[cluster:185|OS Update]]\\
 +We will install DMTCP as a replacement...[[cluster:190|DMTCP]]** \\
 + --- //[[hmeij@wesleyan.edu|Henk]] 2020/01/14 14:28//
 +
 +  * This page concerns SERIAL jobs only; SERIAL jobs can restart on any node
  
   * Installation and what it does [[cluster:124|BLCR]]   * Installation and what it does [[cluster:124|BLCR]]
Line 8: Line 14:
   * Users Guide [[https://upc-bugs.lbl.gov/blcr/doc/html/BLCR_Users_Guide.html]]   * Users Guide [[https://upc-bugs.lbl.gov/blcr/doc/html/BLCR_Users_Guide.html]]
  
-When we move to Openlava 3.x all queues will support checkpointing, which means you can run your job in a "wrapper" and if the job or cluster crashes you can restart your job from last checkpoint file.+All queues will support checkpointing, which means you can run your job in a "wrapper" and if the job or cluster crashes you can restart your job from last checkpoint file.
  
-Checkpointing is an expensive operation so do not checkpoint under 6 hours. For example, if your job runs for a month checkpoint once a day, if your job runs for a week checkpoint every 12 hours. From this point on I expect all users to checkpoint. Some software does this internally (Amber, Gaussian). For applications or home grown code you can use BLCR. (Too bad it does not work out of box within Openlava).+Checkpointing is an expensive operation so do not checkpoint under 6 hours. For example, if your job runs for a month checkpoint once a day, if your job runs for a week checkpoint every 12 hours. From this point on I expect all users to checkpoint. Some software does this internally (Amber, Gaussian). For applications or home grown code you can use BLCR.
  
-You need to test out checkpointing before you rely on it. I've notice that some local code, when opening files for output, BLCR does not notice it. The code below has such an example (file fid.txt). Hopefully future versions of BLCR will fix this. Or maybe we shuold open files differently, this needs investigating further.+You need to test out checkpointing before you rely on it. I've notice that some local code, when opening files for output, BLCR does not notice it. The code below has such an example (file fid.txt). Hopefully future versions of BLCR will fix this. Or maybe we should open files differently, this needs investigating further.
  
-BLCR, Berkely Lab Checkpoint and Restart, remembers file paths and process ids. The code stages the necessary STDOUT and STDERR files Openlava generates and invokes the relocation feature while ignore old process ids. If an application is large, and static, it is advisable to not save the application inside the checkpoint file.+BLCR, Berkely Lab Checkpoint and Restart, remembers file paths and process ids. The code stages the necessary STDOUT and STDERR files scheduler generates and invokes the relocation feature while ignore old process ids. If an application is large, and static, it is advisable to not save the application inside the checkpoint file.
  
-At the bottom of this page is the current version of ''blcr_wrapper'' program which will hide the complexity for you. ''blcr_watcher'' is a program that is in your PATH already and will terminate the wrapper if the application done inside of a check point time interval. I will work with any group interested to customize your ''blcr_wrapper'' for your lab/group.+At the bottom of this page is the current version of ''blcr_wrapper'' program which will hide the complexity for you. ''blcr_watcher'' is a program that is in your PATH already and will terminate the wrapper if the application finishes inside of a check point time interval. I will work with any group interested to customize your ''blcr_wrapper'' for your lab/group.
  
    * Here is an interactive simple sample run.    * Here is an interactive simple sample run.
Line 43: Line 49:
 Connection to petaltail lost. Connection to petaltail lost.
  
-# that was not too clever, log back in, restart application in another directory+ooops, that was not too clever, log back in, restart application in another directory
 [hmeij@petaltail 187]$ cd .. [hmeij@petaltail 187]$ cd ..
 [hmeij@petaltail sanscratch]$ mkdir 188 [hmeij@petaltail sanscratch]$ mkdir 188
Line 96: Line 102:
 <code> <code>
  
-[hmeij@cottontail ~/ynam]$ bsub < blcr_wrapper+[hmeij@cottontail ~/ynam]$ bsub < blcr_wrapper_serial
  
 </code> </code>
Line 103: Line 109:
 ==== Files v0.2 ==== ==== Files v0.2 ====
  
-  * ''blcr_wrapper'' at v01/home/hmeij/jobs/blcr/blcr_wrapper+  * ''blcr_wrapper_serial'' at /home/hmeij/jobs/blcr/ for non MPI jobs
  
 <code> <code>
Line 118: Line 124:
 # SCHEDULER  # SCHEDULER 
 #BSUB -q test #BSUB -q test
 +#BSUB -n 1
 #BSUB -J test #BSUB -J test
-#BSUB -n 6 
 #BSUB -o out #BSUB -o out
 #BSUB -e err #BSUB -e err
-#BSUB -R "span[hosts=1]" 
- 
  
 # CHECK POINT TIME INTERVAL: 10m (debug) 6h 12h 18h 1d  # CHECK POINT TIME INTERVAL: 10m (debug) 6h 12h 18h 1d 
Line 131: Line 135:
 # always stage the application (and data if needed) # always stage the application (and data if needed)
 # if application is large and static save_exec="n" # if application is large and static save_exec="n"
-save_exec="y+save_exec="n
-#pre_cmd=" scp $HOME/ynam/a.out . " +pre_cmd=" scp $HOME/ynam/a.out . " 
-#post_cmd=" scp $MYSANSCRATCH/fid.txt $HOME/ynam +post_cmd=" scp $MYSANSCRATCH/fid.txt $HOME/ynam "
-pre_cmd=" scp -r \ +
-$HOME/python/kflaherty/data/HD163296.CO32.regridded.cen15.vis \ +
-$HOME/python/kflaherty/data/HD163296.CO32.regridded.cen15.vis.fits \ +
-$HOME/python/kflaherty/data/lowres_ALMA_weights_calc.sav \ +
-$HOME/python/kflaherty/co.dat \  +
-$HOME/python/kflaherty/disk_other.py \  +
-$HOME/python/kflaherty/disk.py \  +
-$HOME/python/kflaherty/mol_dat.py \  +
-$HOME/python/kflaherty/mpi_run_models.py \  +
-$HOME/python/kflaherty/sample_co32.sh \  +
-$HOME/python/kflaherty/single_model.py . " +
-post_cmd=" scp $MYSANSCRATCH/chain*.dat $HOME/python/kflaherty/"+
  
 # IF START OF JOB, UNCOMMENT # IF START OF JOB, UNCOMMENT
 # its either start or restart block # its either start or restart block
-#mode=start +mode=start 
-#queue=test +queue=test 
-#cmd="./a.out" +cmd="./a.out"
-#cmd="lava.openmpi.wrapper python mpi_run_models.py $MYSANSCRATCH > $MYSANSCRATCH/test.out"+
  
 # IF RESTART OF JOB, UNCOMMENT # IF RESTART OF JOB, UNCOMMENT
 # you must have pwd.JOBPID and chk.JOBPID in $orgjobpid/ # you must have pwd.JOBPID and chk.JOBPID in $orgjobpid/
-mode=restart +#mode=restart 
-queue=test +#queue=test 
-orgjobpid=254+#orgjobpid=250
  
 # buglines: if your group/lab is mentioned set value to "y", else "n" # buglines: if your group/lab is mentioned set value to "y", else "n"
 # "y" for rblumel/ynam # "y" for rblumel/ynam
-do_bug1a_cmd="n+do_bug1a_cmd="y
-do_bug1b_cmd="n +do_bug1b_cmd="y
- +
-# environment mhughes/kflaherty +
-export PYTHONHOME=/home/apps/python/2.6.1 +
-export PYTHONPATH=/home/apps/python/2.6.1/site-packages +
-export PATH=$PYTHONHOME/bin:$PATH +
-. /home/apps/miriad/MIRRC.sh +
-export PATH=$MIRBIN:$PATH +
-export PATH=/share/apps/openmpi/1.2+intel-10/bin:$PATH +
-export LD_LIBRARY_PATH=/share/apps/openmpi/1.2+intel-10/lib:$LD_LIBRARY_PATH +
- +
  
  
Line 193: Line 173:
 if [ $mods -ne 2 ]; then if [ $mods -ne 2 ]; then
         echo "Error: BLCR modules not loaded on `hostname`"         echo "Error: BLCR modules not loaded on `hostname`"
-        exit+        kill $$
 fi fi
  
Line 211: Line 191:
 else else
         echo "Error: $checkpoints/$LSB_JOBID already exists, exciting"         echo "Error: $checkpoints/$LSB_JOBID already exists, exciting"
-        exit+        kill $$
 fi fi
  
Line 231: Line 211:
         #if [ "X$orgpid" == "X" -o "X$orgpwd" == "X" ]; then         #if [ "X$orgpid" == "X" -o "X$orgpwd" == "X" ]; then
         #       echo "Error: problem with missing orgpid or orgpwd values"         #       echo "Error: problem with missing orgpid or orgpwd values"
-        #       exit+        #       kill $$
         #fi         #fi
         scp $checkpoints/$orgjobpid/*.$orgjobpid.err $checkpoints/$orgjobpid/*.$orgjobpid.out $HOME/.lsbatch/         scp $checkpoints/$orgjobpid/*.$orgjobpid.err $checkpoints/$orgjobpid/*.$orgjobpid.out $HOME/.lsbatch/
Line 247: Line 227:
 else else
         echo "Error: startup mode not defined correctly"         echo "Error: startup mode not defined correctly"
-        exit+        kill $$
 fi fi
  
Line 265: Line 245:
         fi         fi
 done done
- 
  
 </code> </code>
Line 302: Line 281:
  
 </code> </code>
 +
 +
 +==== Matlab ====
 +
 +  * https://www.bu.edu/tech/support/research/software-and-programming/common-languages/matlab/matlab-batch/checkpointing/
 +
  
  
cluster/147.1458325692.txt.gz · Last modified: 2016/03/18 14:28 by hmeij07