CoEPP RC
 

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
cloud:example-3-2 [2013/02/28 16:35]
neilds
cloud:example-3-2 [2013/02/28 18:17]
neilds
Line 3: Line 3:
 This is a mostly useless example of a complicated job script involving staging a few directories. Create a directory ''​complex''​ under your home directory (''​$HOME/​complex''​). In here we will create three directories,​ ''​one'',​ ''​two''​ and ''​program''​. Under ''​complex/​program''​ we will create the executable script ''​product.sh'':​ This is a mostly useless example of a complicated job script involving staging a few directories. Create a directory ''​complex''​ under your home directory (''​$HOME/​complex''​). In here we will create three directories,​ ''​one'',​ ''​two''​ and ''​program''​. Under ''​complex/​program''​ we will create the executable script ''​product.sh'':​
  
-<code bash>+<code bash product.sh>
 #!/bin/bash #!/bin/bash
 # -- product.sh -- # -- product.sh --
Line 22: Line 22:
 This script could be described as calculating the cartesian product of two directories,​ producing a "​set"​ [directory] containing each pair [concatenation] of an element from the first set [directory] and an element from the second set [directory]. Next, fill ''​one''​ and ''​two''​ with a few text files, then create the following job script: This script could be described as calculating the cartesian product of two directories,​ producing a "​set"​ [directory] containing each pair [concatenation] of an element from the first set [directory] and an element from the second set [directory]. Next, fill ''​one''​ and ''​two''​ with a few text files, then create the following job script:
  
-<​code>​+<​code ​bash job.sh>
 #!/bin/bash #!/bin/bash
 # -- job.sh -- # -- job.sh --
Line 48: Line 48:
 #PBS -W stageout=$TMPDIR/​two-one@cxin01.cloud.coepp.org.au:​$HOME/​complex/​two-one #PBS -W stageout=$TMPDIR/​two-one@cxin01.cloud.coepp.org.au:​$HOME/​complex/​two-one
  
-program/​product.sh one two one-two +cd $TMPDIR 
-program/​product.sh two one two-one+./program/​product.sh one two one-two 
 +./program/​product.sh two one two-one
 </​code>​ </​code>​
  
 In a nutshell, we stage in our source directories,​ ''​one''​ and ''​two'',​ as well as our program (which is really just one file, but we'll leave it as a directory to simulate a more realistic case of a complex program). ''​product.sh''​ produces as output directories ''​$TMPDIR/​one-two'',​ and then ''​$TMPDIR/​two-one''​. These two output directories are staged back out to ''​$HOME/​complex''​ on the interactive node. In a nutshell, we stage in our source directories,​ ''​one''​ and ''​two'',​ as well as our program (which is really just one file, but we'll leave it as a directory to simulate a more realistic case of a complex program). ''​product.sh''​ produces as output directories ''​$TMPDIR/​one-two'',​ and then ''​$TMPDIR/​two-one''​. These two output directories are staged back out to ''​$HOME/​complex''​ on the interactive node.
cloud/example-3-2.txt · Last modified: 2013/02/28 18:17 by neilds
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki