Description Usage Arguments Details Examples
View source: R/write_batch_funs.R
This function makes a shell script to defining experiment runs for MSU's High Performance Computing Cluster (HPCC). This bash script copies the files needed to run SALUS (salus_gnu, gdb, cdb, sdb, xdb, and wdb files) to the current directory. Then the bash script will run SALUS. Then the bash script will remove the SALUS files from the current directories.Then the bash script will copy the SALUS results to your scratch directory. Modified from python writeTorque function by Brian Baer and Lydia Rill.
1 2 | write_HPC_shell(shDir, hpcHomeDir, hpcXdbDir, hpcOutDir, Nflag, xdb, sdb,
wdbZip, DayVars, SeaVars, walltime, memory, cdb)
|
shDir |
Directory in which to save the output shell sh file. the sh filename is pulled from xdb filename |
hpcHomeDir |
Directory on HPCC in which source files reside for this run (sdb, xdb, zipped weather, etc). Should end in a forward slash |
hpcOutDir |
Directory on HPCC to write results to, Should end in a forward slash |
Nflag |
'-w' or '-wn'. -w runs SALUS without considerations of N stress |
xdb |
filename of the experiment file, without extension. sh name will be pulled from this. |
sdb |
filename of the soil file (no path, no .sdb.xml extension) |
wdbZip |
filename of the zipped weather file. Script will unzip on the node |
DayVars |
CSV string of SALUS daily variables to return |
SeaVars |
CSV string of SALUS seasonal variables to return |
walltime |
For HPCC - how long you expect the job to run. Format HH:MM:SS |
memory |
For HPCC - how much memory the job will need. ie, '2gb' or '2000mb' |
cdb |
filename of the crop cdb.xml file, without the extension |
Recommended to follow this with the 'write_HPCC_bat' function in order to generate the batch bat file that will submit multiple shell files to the HPCC queue.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #set variables
shDir <- 'C:/Users/deinesji/Dropbox/1PhdJill/hpa/LEMAs/SALUS/testHPCCrun'
hpcHomeDir <- '/mnt/home/deinesji/Example_SALUS_wheat/'
hpcOutDir <- '/mnt/home/deinesji/Example_SALUS_wheat/results/'
xdb <- 'lema_wheat_continuous'
sdb <- "KS"
wdbZip <- 'testHPCCrun.tar.gz'
DayVars <- 'ExpID,Title,SpeciesID,GWAD,IRRC,CWAD,DRNC,PREC,LAI'
SeaVars <- 'ExpID,Title,SpeciesID,GWAD,IRRC,CWAD,DRNC,PREC'
walltime <- '01:00:00'
memory <- '2000mb'
write_HPC_shell(shDir, hpcHomeDir, hpcOutDir, xdb, sdb, wdbZip, DayVars,
SeaVars, walltime, memory)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.