IOOS:CH3D sample

From Grid-Appliance Wiki

Jump to: navigation, search

Running a sample CH3D job

In this example you will see how to use the Grid appliance to submit a simple model execution. Follow these steps within an appliance terminal:

  • Download and expand the CH3D demonstration package:
sudo wget http://www.acis.ufl.edu/~ipop/files/apps/ch3dgtm.tgz
tar -xzf ch3dgtm.tgz
  • Run the following script to submit the job:
cd ch3dgtm
./condor_run.sh
  • This will take about 15-30 minutes to run. While this is running, open another terminal (click on the terminal icon at the bottom left of the screen). Check the following files:
    • condor_ch3dgtm.cmd: this is the condor submit file. It specifies it is a vanilla job, the executable is a script (run_ch3d.Linux.sh); the files to transfer are several fort.* files. Note that the model binary ch3d.Linux is also transfered as an input file.
universe = vanilla
executable = run_ch3d.Linux.sh
requirements = Memory >= 300
output = condor_ch3dgtm.out
error = condor_ch3dgtm.err
log = condor_ch3dgtm.log
transfer_input_files = fort.4, fort.14, fort.15, fort.3, fort.17, fort.1301, ch3d.Linux
should_transfer_files = ALWAYS
when_to_transfer_output = ON_EXIT
queue
  • run_ch3d.Linux.sh: this is the script that executes on the remote node. It changes the ch3d.Linux model to become executable, runs it, and zips the output files before transfering them back:
#!/bin/sh

/bin/chmod u+x ./ch3d.Linux 

./ch3d.Linux

/bin/bzip2 fort.24
/bin/bzip2 fort.424
/bin/bzip2 fort.422
/bin/bzip2 fort.1000
  • condor_run.sh: this is the script that condor-submits the job. It also polls the job status every 30 seconds to check its completion. Note that it also uncompresses the output files after they are transfered back:
#!/bin/sh

/opt/condor/bin/condor_submit condor_ch3dgtm.cmd

sleep 3

/opt/condor/bin/condor_wait -wait 1 condor_ch3dgtm.log > /dev/null

while [ $? -gt 0 ]
do
echo ""
echo "Current job status (updated every 30 seconds):"
/opt/condor/bin/condor_q
/opt/condor/bin/condor_wait -wait 30 condor_ch3dgtm.log > /dev/null
done

bunzip2 -f fort.424.bz2
bunzip2 -f fort.24.bz2
bunzip2 -f fort.422.bz2
bunzip2 -f fort.1000.bz2
  • Once the job finishes running, check that the fort.424, fort.24, fort.422 and fort.1000 output files have been successfully transfered back.
Personal tools