Adf08 large.sh: Difference between revisions
No edit summary |
No edit summary |
||
| Line 12: | Line 12: | ||
--- | --- | ||
#!/usr/local/bin/ksh | <nowiki>#!/usr/local/bin/ksh</nowiki> | ||
echo '#!/bin/ksh' >$1.cmd | <nowiki>echo '#!/bin/ksh' >$1.cmd</nowiki> | ||
echo '# | <nowiki>echo '#BSUB -J '$1'.in' >>$1.cmd</nowiki> | ||
echo 'adf2008.01 ./'$1'.lsf>'$1'.out' >>$1.cmd | <nowiki>echo '#BSUB -q large' >>$1.cmd</nowiki> | ||
echo ' ' >>$1.cmd | |||
echo 'cp '$1'.* '$PWD'/' >>$1.cmd | <nowiki>echo '#BSUB -o '$1'.log' >>$1.cmd</nowiki> | ||
echo 'rm -f TAPE21 *.t21' >>$1.cmd | |||
bsub < $1.cmd | <nowiki>echo '#BSUB -e '$1'.err' >>$1.cmd</nowiki> | ||
<nowiki>echo '#BSUB -B -N -u mbesora@iciq.es' >>$1.cmd</nowiki> | |||
<nowiki>echo '#BSUB -n 1' >>$1.cmd</nowiki> | |||
<nowiki>echo '#BSUB -R "select[adf0801] span[hosts=1]"' >>$1.cmd</nowiki> | |||
<nowiki>echo ' ' >>$1.cmd</nowiki> | |||
<nowiki>echo 'date' >>$1.cmd</nowiki> | |||
<nowiki>echo 'cd '$TMPDIR/mbesora' ' >>$1.cmd</nowiki> | |||
<nowiki>echo 'cp '$PWD'/'$1'.lsf .' >>$1.cmd</nowiki> | |||
<nowiki>echo ' ' >>$1.cmd</nowiki> | |||
<nowiki>echo '#! /bin/sh' >>$1.lsf</nowiki> | |||
<nowiki>echo 'if test -z "$SCM_TESTOUTPUT" ; then SCM_TESTOUTPUT='$1'.out; fi'>>$1.lsf</nowiki> | |||
<nowiki>echo ' ' >>$1.lsf</nowiki> | |||
<nowiki>echo '$ADFBIN/adf << eor >> $SCM_TESTOUTPUT' >>$1.lsf</nowiki> | |||
<nowiki>echo ' ' >>$1.lsf</nowiki> | |||
<nowiki>cat $1.in >>$1.lsf</nowiki> | |||
<nowiki>chmod 755 $1.lsf</nowiki> | |||
<nowiki>echo 'adf2008.01 ./'$1'.lsf>'$1'.out' >>$1.cmd</nowiki> | |||
<nowiki>echo ' ' >>$1.cmd</nowiki> | |||
<nowiki>echo 'cp '$1'.* '$PWD'/' >>$1.cmd</nowiki> | |||
<nowiki>echo 'rm -f TAPE21 *.t21' >>$1.cmd</nowiki> | |||
<nowiki>bsub < $1.cmd</nowiki> | |||
Revision as of 16:16, 4 August 2010
go back to Main Page, Computational Resources, Clusters, External Resources, Cesca
It maybe a simpler script able to submit the calculations and get the results, but that works.
It creates a submision script nameinput.cmd, and an executable nameinput.lsf, and submits the nameinput.smd to the queue large.
To use it just type:
adf08_large.sh nameinput
the input file should be called nameinput.in
--- #!/usr/local/bin/ksh
echo '#!/bin/ksh' >$1.cmd
echo '#BSUB -J '$1'.in' >>$1.cmd
echo '#BSUB -q large' >>$1.cmd
echo '#BSUB -o '$1'.log' >>$1.cmd
echo '#BSUB -e '$1'.err' >>$1.cmd
echo '#BSUB -B -N -u mbesora@iciq.es' >>$1.cmd
echo '#BSUB -n 1' >>$1.cmd
echo '#BSUB -R "select[adf0801] span[hosts=1]"' >>$1.cmd
echo ' ' >>$1.cmd
echo 'date' >>$1.cmd
echo 'cd '$TMPDIR/mbesora' ' >>$1.cmd
echo 'cp '$PWD'/'$1'.lsf .' >>$1.cmd
echo ' ' >>$1.cmd
echo '#! /bin/sh' >>$1.lsf
echo 'if test -z "$SCM_TESTOUTPUT" ; then SCM_TESTOUTPUT='$1'.out; fi'>>$1.lsf
echo ' ' >>$1.lsf
echo '$ADFBIN/adf << eor >> $SCM_TESTOUTPUT' >>$1.lsf
echo ' ' >>$1.lsf
cat $1.in >>$1.lsf
chmod 755 $1.lsf
echo 'adf2008.01 ./'$1'.lsf>'$1'.out' >>$1.cmd
echo ' ' >>$1.cmd
echo 'cp '$1'.* '$PWD'/' >>$1.cmd
echo 'rm -f TAPE21 *.t21' >>$1.cmd
bsub < $1.cmd