#!/bin/tcsh # ### variables SGE ### shell du job #$ -S /bin/tcsh ### nom du job (a changer) #$ -N SommeVecVecSEQ ### file d'attente (a changer) #$ -q E5-2670_test ### charger l'environnement utilisateur pour SGE #$ -cwd ### exporter les variables d'environnement sur tous les noeuds d'execution #$ -V ### mails en debut et fin d'execution #$ -m be # aller dans le repertoire de travail/soumission # important, sinon, le programme est lancé depuis ~/ cd ${SGE_O_WORKDIR} ### configurer l'environnement ### source /usr/local/modeles/set_debian7-clean.sh ### source /usr/share/modules/init/bash ### module use /applis/PSMN/Modules ### module load Base/psmn module load IntelComp/2017.4 set SCRATCHDIR = `echo $SGE_O_WORKDIR | awk -F "/" '{$2="scratch"; for(j=2;j<=NF;j++) {printf("/%s",$j);} print ""} ' ` /bin/mkdir -p $SCRATCHDIR /bin/cp -rf SommeVecVecSEQ.f90.exe $SCRATCHDIR/ ###/bin/cp -rf $INPUT $SCRATCHDIR/ # go to scratch (instead of workdir) before running binary cd ${SCRATCHDIR} ### execution du programme ######EXECDIR=/scratch/cicaluga/tempo set EXECDIR=${SCRATCHDIR} ${EXECDIR}/SommeVecVecSEQ.f90.exe > output ####./SommeVecVecSEQ.f90.exe # copy results from scratch to home /bin/cp -r $SCRATCHDIR/output $SGE_O_WORKDIR/ rm -fr ${SCRATCHDIR}/* # fin