/GabeditSrc240/utils/Molpro/LoadLeveler/submitMolpro
Korn Shell | 116 lines | 89 code | 8 blank | 19 comment | 3 complexity | 07bff03034785a276e964298f24c4021 MD5 | raw file
- #!/bin/ksh
- ###################################################################
- # #
- # Script ksh pour lancer un calcul Molpro en batch #
- # Auteur: A-R Allouche allouche@lasim.univ-lyon1.fr #
- # LASIM, Villeurbanne #
- # Ecriture : Avril 2004 #
- # #
- ###################################################################
- jobtime=$1 ; [ 0 = $# ] || shift
- filename=$1 ; [ 0 = $# ] || shift
- if [ -z "$filename" ] || [ -z "$jobtime" ]
- then
- clear
- echo " "
- echo "==========================================="
- echo " submitMolpro "
- echo " Pour toutes questions contacter : "
- echo " A.R. Allouche allouche@lasim.univ-lyon1.fr"
- echo "==========================================="
- echo "vous devez fournir :"
- echo " - le temps de calcul( hh:mm:ss)"
- echo " - le nom du fichier(y compris l'extension .com)"
- echo "-------------------------------------------"
- echo "Exemple:"
- echo " submitMolpro 2:00:00 h2.com "
- echo " fichier de donnees : h2.com"
- echo " Temps de calcul(maximum) : 2 heurs"
- echo "==========================================="
- echo " "
- exit 1
- fi
- filecom=$filename
- filename=${filecom%.com}
- if test ! -s "$filecom"
- then
- echo " "
- echo "============================================"
- echo "le fichier $filecom est introuvable(ou vide)"
- echo "============================================"
- echo " "
- exit 2
- fi
- molproScr=/tmpp/$NAME
- endof=EOF
- cat > $filename.cmd <<EOF
- #!/bin/ksh
- #--------------------------------------------------------------------
- # fichier script genere par submitMolpro
- #--------------------------------------------------------------------
- #
- # @ SET=$filename
- #
- # @ restart=no
- #
- # @ output=\$(SET).output
- # @ error=\$(SET).error
- #
- # @ initialdir = `pwd`
- # @ wall_clock_limit = $jobtime
- # @ environment = COPY_ALL; SET=\$(SET);
- # @ checkpoint = no
- # @ restart = no
- # @ queue
- PREFIX=molpro
- util=\`whoami\`
- #-------------------------------------------------------------
- # operations a realiser avant l'execution de Molpro
- #-------------------------------------------------------------
- if test ! -d $gscr
- then
- mkdir $gscr
- fi
- # creation du scratch dir s'il n'existe pas
- #-------------------------------------------------------------
- # demarrage de Molpro
- #-------------------------------------------------------------
- echo "demarrage de Molpro"
- molproBin=/home/NFS_1/sim2340/allouche/molpro/bin/molpro
- timex \$molproBin \$SET.com
- #
- #-------------------------------------------------------------
- # operations a realiser apres l'execution de Molpro
- #-------------------------------------------------------------
- # destruction du scratch dir s'il a ete cree durant le run
- EOF
- llsubmit $filename.cmd
- echo " "
- echo "==================================================================="
- echo " "
- echo "Un fichier $filename.cmd a ete cree pour lancer le calcul"
- echo "Ne pas effacer ce fichier avant la fin du calcul"
- echo " "
- echo "-------------------------------------------------------------------"
- echo " "
- echo "pour avoir des informations sur vos job taper : llq -u $NAME"
- echo " "
- echo "pour detruire un job taper : llcancel host.cluster.proc"
- echo " host.cluster.proc est fourni par llq"
- echo " "
- echo "pour avoir plus d'informations taper : llq -x -l -u $NAME"
- echo " "
- echo "==================================================================="
- echo " "