User Tools

Site Tools


cluster:124

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
Next revision Both sides next revision
cluster:124 [2013/10/31 17:50]
hmeij
cluster:124 [2013/10/31 18:21]
hmeij
Line 12: Line 12:
   * [[https://upc-bugs.lbl.gov/blcr/doc/html/BLCR_Admin_Guide.html|BLCR_Admin_Guide.html]]   * [[https://upc-bugs.lbl.gov/blcr/doc/html/BLCR_Admin_Guide.html|BLCR_Admin_Guide.html]]
   * [[https://upc-bugs.lbl.gov/blcr/doc/html/BLCR_Users_Guide.html|BLCR_Users_Guide.html]]    * [[https://upc-bugs.lbl.gov/blcr/doc/html/BLCR_Users_Guide.html|BLCR_Users_Guide.html]] 
 +
 +First lets test on a node to grasp the concept.
  
 <code> <code>
Line 35: Line 37:
   -?, --help             print this message and exit.                 -?, --help             print this message and exit.              
       --version          print version information and exit.         --version          print version information and exit.  
 +...
 +
 +# and here is our application and output (one extra character per second)
 +[hmeij@n33 blcr]$ ./t-20001030-01
 +*
 +**
 +***
 +****
 +*****
 +******
 ... ...
 </code> </code>
  
 +So now lets run this under BLCR and observe what happens.  After we define the proper environment, we use ''cr_run'' to launch our application. Standard output and error are written into the output file ''context''. We then observe the PID of our process and use ''cr_checkpoint'' to write a checkpoint file and immediately terminate the process.
 +
 +<code>
 +
 +# start application
 [hmeij@n33 blcr]$ cr_run ./t-20001030-01 > context 2>&1 & [hmeij@n33 blcr]$ cr_run ./t-20001030-01 > context 2>&1 &
 [1] 12789 [1] 12789
  
 +# observe PID
 [hmeij@n33 blcr]$ ps [hmeij@n33 blcr]$ ps
   PID TTY          TIME CMD   PID TTY          TIME CMD
Line 47: Line 65:
 28257 pts/29   00:00:00 bash 28257 pts/29   00:00:00 bash
  
 +# wait, then checkpoint and terminate process
 [hmeij@n33 blcr]$ sleep 30 [hmeij@n33 blcr]$ sleep 30
 [hmeij@n33 blcr]$ cr_checkpoint --term 12789 [hmeij@n33 blcr]$ cr_checkpoint --term 12789
 [1]+  Terminated              cr_run ./t-20001030-01 > context 2>&1 [1]+  Terminated              cr_run ./t-20001030-01 > context 2>&1
  
 +# save the output
 [hmeij@n33 blcr]$ mv context context.save [hmeij@n33 blcr]$ mv context context.save
  
 +</code>
 +
 +Ok.  Next we use ''cr_restart'' to restart our application by pointing it to the checkpoint file generated.  Then we'll wait a bit and terminate the restart.
 +
 +<code>
 +
 +# restart in background
 [hmeij@n33 blcr]$ cr_restart ./context.12789 > context 2>&1 & [hmeij@n33 blcr]$ cr_restart ./context.12789 > context 2>&1 &
 [1] 13579 [1] 13579
 +
 +# wait and terminate the restart
 [hmeij@n33 blcr]$ sleep 30 [hmeij@n33 blcr]$ sleep 30
 [hmeij@n33 blcr]$ kill %1 [hmeij@n33 blcr]$ kill %1
 [1]+  Terminated              cr_restart ./context.12789 > context 2>&1 [1]+  Terminated              cr_restart ./context.12789 > context 2>&1
  
 +</code>
 +
 +So what we're interested in is the boundary between first termination and subsequent restart.  It alooks like this:
 +
 +<code>
  
 [hmeij@n33 blcr]$ tail context.save [hmeij@n33 blcr]$ tail context.save
Line 83: Line 117:
 ************************************************************ ************************************************************
  
-^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ +# pretty nifty! 
-^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ +# but be forewarned that there are binary characters lurking at this boundary 
-^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ +# you can strip them out with ''sed'' or ''tr''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