Adf08 large.sh: Difference between revisions

From Wiki
Jump to navigation Jump to search
New page: go back to Main Page, Computational Resources, Clusters, External Resources, Cesca <nowiki>#!/usr/local/bin/ksh</nowiki> <nowiki>echo '#!/bin/ksh' >$1.cmd</nowiki> <nowiki>echo '#BSUB ...
 
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
go back to Main Page, Computational Resources, Clusters, External Resources, Cesca
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
---


<nowiki>#!/usr/local/bin/ksh</nowiki>
<nowiki>#!/usr/local/bin/ksh</nowiki>
Line 6: Line 17:
<nowiki>echo '#!/bin/ksh' >$1.cmd</nowiki>
<nowiki>echo '#!/bin/ksh' >$1.cmd</nowiki>


<nowiki>echo '#BSUB -J '$1'.com' >>$1.cmd</nowiki>
<nowiki>echo '#BSUB -J '$1'.in' >>$1.cmd</nowiki>


<nowiki>echo '#BSUB -q parallel4' >>$1.cmd</nowiki>
<nowiki>echo '#BSUB -q large' >>$1.cmd</nowiki>


<nowiki>echo '#BSUB -o '$1'.log' >>$1.cmd</nowiki>
<nowiki>echo '#BSUB -o '$1'.log' >>$1.cmd</nowiki>
Line 16: Line 27:
<nowiki>echo '#BSUB -B -N -u mbesora@iciq.es' >>$1.cmd</nowiki>
<nowiki>echo '#BSUB -B -N -u mbesora@iciq.es' >>$1.cmd</nowiki>


<nowiki>echo '#BSUB -n 4' >>$1.cmd</nowiki>
<nowiki>echo '#BSUB -n 1' >>$1.cmd</nowiki>


<nowiki>echo '#BSUB -R select[adf0801&&prades] span[hosts=1]' >>$1.cmd</nowiki>
<nowiki>echo '#BSUB -R "select[adf0801] span[hosts=1]"' >>$1.cmd</nowiki>


<nowiki>echo ' ' >>$1.cmd</nowiki>
<nowiki>echo ' ' >>$1.cmd</nowiki>
Line 24: Line 35:
<nowiki>echo 'date' >>$1.cmd</nowiki>
<nowiki>echo 'date' >>$1.cmd</nowiki>


<nowiki>echo 'cd '$PWD' ' >>$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 ' ' >>$1.cmd</nowiki>


<nowiki>echo 'adf2008.01 '$1'.com '$1'.log ' >>$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>
<nowiki>bsub < $1.cmd</nowiki>

Latest revision as of 17:13, 29 December 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