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
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.


<nowiki>#!/usr/local/bin/ksh</nowiki>
It creates a submision script nameinput.cmd, and an executable nameinput.lsf, and submits the nameinput.smd to the queue large.


<nowiki>echo '#!/bin/ksh' >$1.cmd</nowiki>
To use it just type:


<nowiki>echo '#BSUB -J '$1'.com' >>$1.cmd</nowiki>
adf08_large.sh nameinput


<nowiki>echo '#BSUB -q parallel4' >>$1.cmd</nowiki>
the input file should be called nameinput.in


<nowiki>echo '#BSUB -o '$1'.log' >>$1.cmd</nowiki>
---
#!/usr/local/bin/ksh


<nowiki>echo '#BSUB -e '$1'.err' >>$1.cmd</nowiki>
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


<nowiki>echo '#BSUB -B -N -u mbesora@iciq.es' >>$1.cmd</nowiki>
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


<nowiki>echo '#BSUB -n 4' >>$1.cmd</nowiki>
echo 'adf2008.01 ./'$1'.lsf>'$1'.out' >>$1.cmd
 
echo ' ' >>$1.cmd
<nowiki>echo '#BSUB -R select[adf0801&&prades] span[hosts=1]' >>$1.cmd</nowiki>
echo 'cp '$1'.* '$PWD'/' >>$1.cmd
 
echo 'rm -f TAPE21 *.t21' >>$1.cmd
<nowiki>echo ' ' >>$1.cmd</nowiki>
bsub < $1.cmd
 
<nowiki>echo 'date' >>$1.cmd</nowiki>
 
<nowiki>echo 'cd '$PWD' ' >>$1.cmd</nowiki>
 
<nowiki>echo ' ' >>$1.cmd</nowiki>
 
<nowiki>echo 'adf2008.01 '$1'.com '$1'.log ' >>$1.cmd</nowiki>
 
<nowiki>bsub < $1.cmd</nowiki>

Revision as of 16:14, 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

---

  1. !/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