Index: submit/crystal/sub_prop14.csh
===================================================================
--- submit/crystal/sub_prop14.csh	(revision 0)
+++ submit/crystal/sub_prop14.csh	(revision 9)
@@ -0,0 +1,32 @@
+#!/bin/tcsh
+
+#$ -S /bin/tcsh
+#$ -N LTaBND11
+#$ -pe openmp12 12
+#$ -q x5650lin24ibA,x5650lin24ibB,x5650lin24ibC
+
+# version: $Id$
+
+source /usr/share/modules/init/tcsh
+module use /applis/PSMN/Modules
+module load Base/psmn
+module load openmpi/1.6.4-intel-14.0.1
+
+setenv HOMEDIR $SGE_O_WORKDIR
+cd $HOMEDIR
+
+set INPUT=MgO.d12
+setenv CRY14_SCRDIR `echo $HOMEDIR | awk -F "/" '{$2="scratch"; for(j=2;j<=NF;j++) {printf("/%s",$j);} print ""} ' `/`basename $INPUT .d12`
+/bin/mkdir -p $CRY14_SCRDIR
+
+setenv PREFIX /softs/openmpi-1.6.4-intel-14.0.1-debian7
+setenv MPIRUN mpirun
+setenv HOSTFILE $TMPDIR/machines
+/bin/cat $TMPDIR/machines > $HOMEDIR/tmp
+
+#setenv OMP_NUM_THREADS 1
+#setenv MKL_NUM_THREADS 1
+/home/ssteinma/softs/crystal14/bin/runmpi14 $NSLOTS $INPUT
+/home/ssteinma/softs/crystal14/bin/runprop14 MgO MgO
+
+rm -fr $CRY14_SCRDIR

Property changes on: submit/crystal/sub_prop14.csh
___________________________________________________________________
Added: svn:keywords
   + Id

Index: submit/crystal/README.txt
===================================================================
--- submit/crystal/README.txt	(revision 0)
+++ submit/crystal/README.txt	(revision 9)
@@ -0,0 +1,29 @@
+# README.txt
+# version: $Id$
+
+According to Sigi (Sigismund MELISSEN) :
+TODO/FIXME: when translation OK, erase french version ?
+
+CRYSTAL14: je nomme mes fichiers input "input.d12" (instructions") et "input.gui" 
+(la structure chimique dans les cas particuliers ou je interroge une structure déjà étudiée avec Crystal) 
+et donc dans ce cas la il s'agit de calcul "LTaCHI1DS" (le "nom" du calcul)
+
+FIXME: english translation
+I name my inputs "input.d12" (instructions") and "input.gui" (chemical 
+structure in the case of an "already studied with crystal" structure).
+Computation named "LTaCHI1DS" (-N sge instruction).
+
+=> use sub_crystal14.csh
+
+PROPERTIES: Il faut faire attention a "MgO", moi je nomme mes fichiers input "MgO.d3" 
+(instructions) et "MgO.f9" (fonction d'onde) pour que ça tourne et donc 
+"LTaBND11" c'est le nom de calcul particulier.
+
+FIXME: english translation
+Pay attention to "MgO". I name my input file "MgO.d3" (instructions) and
+"MgO.f9" (~fonction d'onde~) for properties to compute.
+Computation named "LTaBND11" (-N sge instruction).
+
+
+=> use sub_prop14.csh
+

Property changes on: submit/crystal/README.txt
___________________________________________________________________
Added: svn:keywords
   + Id

Index: submit/crystal/sub_crystal14.csh
===================================================================
--- submit/crystal/sub_crystal14.csh	(revision 0)
+++ submit/crystal/sub_crystal14.csh	(revision 9)
@@ -0,0 +1,34 @@
+#!/bin/tcsh
+
+#$ -S /bin/tcsh
+#$ -N LTaCH1DS
+#$ -q E5-2670deb64*,E5-2670deb128,E5-2670deb256B
+#$ -pe mpi16_debian 16
+
+# version: $Id$
+
+source /usr/share/modules/init/tcsh
+module use /applis/PSMN/Modules
+module load Base/psmn
+module load openmpi/1.6.4-intel-14.0.1
+
+setenv HOMEDIR $SGE_O_WORKDIR
+cd $HOMEDIR
+
+set INPUT=input.d12
+setenv CRY14_SCRDIR `echo $HOMEDIR | awk -F "/" '{$2="scratch"; for(j=2;j<=NF;j++) {printf("/%s",$j);} print ""} ' `/`basename $INPUT .d12`
+/bin/mkdir -p $CRY14_SCRDIR
+
+setenv PREFIX /softs/openmpi-1.6.4-intel-14.0.1-debian7
+setenv MPIRUN mpirun
+setenv HOSTFILE $TMPDIR/machines
+setenv hosts $HOMEDIR/hosts_`basename $INPUT .d12`
+#Too lazy to do a test, but the file needs to be refreshed!
+rm -f $hosts
+/bin/cat $TMPDIR/machines > $hosts
+setenv OMP_NUM_THREADS 1
+setenv MKL_NUM_THREADS 1
+/home/ssteinma/softs/crystal14/bin/runmpi14.t $NSLOTS $INPUT
+rm -fr $CRY14_SCRDIR
+rm $HOMEDIR/hosts_`basename $INPUT .d12
+

Property changes on: submit/crystal/sub_crystal14.csh
___________________________________________________________________
Added: svn:keywords
   + Id

Index: submit/adf/run_adf.sh
===================================================================
--- submit/adf/run_adf.sh	(revision 0)
+++ submit/adf/run_adf.sh	(revision 9)
@@ -0,0 +1,31 @@
+#!/bin/bash
+#$ -S /bin/bash
+#$ -N TO_CHANGE
+#$ -q E5-2670deb64*
+#$ -pe mpi16_debian 16
+#$ -m be
+#$ -cwd
+#$ -V
+
+# Version: $Id$
+
+# env first
+source /usr/share/modules/init/bash
+module use /applis/PSMN/Modules
+module load Base/psmn
+module load ADF/2014.10
+# also add the SCMLICENCE line to ~/.cshrc or ~/.bashrc
+export SCMLICENCE=/applis/PSMN/generic/adf/license.2016.txt
+export SCM_TMPDIR=/scratch/LOGIN
+
+DATADIR="/home/LOGIN/path/to"
+
+# Declaration used by the batch system
+HOSTFILE=${TMPDIR}/machines
+export SCM_MACHINEFILE=${TMPDIR}/machines
+export NSCM=${NSLOTS}
+#
+cd ${DATADIR}
+#
+${ADFBIN}/adf < ${DATADIR}/input_adf.run
+#

Property changes on: submit/adf/run_adf.sh
___________________________________________________________________
Added: svn:keywords
   + Id

Index: submit/gaussian/run_g09d01.sh
===================================================================
--- submit/gaussian/run_g09d01.sh	(revision 0)
+++ submit/gaussian/run_g09d01.sh	(revision 9)
@@ -0,0 +1,125 @@
+#!/bin/bash
+#$ -S /bin/bash
+#$ -N TO_CHANGE
+#$ -o $JOB_NAME.batch-log
+#$ -j y
+#$ -cwd
+#$ -V
+#$ -q x5570deb24* 
+#$ -pe gaussian8 8 
+
+# Version: $Id$
+
+# trace script (debug purpose, not mandatory)
+set -x
+# set globals
+job=${JOB_NAME}
+ExtIn=com
+ExtOut=log
+
+## Environment (to find VASP, Ifort, MPI...)
+source /usr/share/modules/init/bash
+module use /applis/PSMN/Modules
+module load Base/psmn
+module load Gaussian/g09d01-chimie
+# g09root is set by the modulefile
+source $g09root/g09/bsd/g09.profile
+export Gaussian=$g09root/g09/g09
+
+cd ${SGE_O_WORKDIR}
+
+echo "########## debut env##################"
+env
+echo "########## fin env ##################"
+
+echo "########## Hostname ##################"
+hostname
+
+HOMEDIR=${SGE_O_WORKDIR}
+cd ${HOMEDIR}
+
+# Replace 'home' by 'scratch', from SGE_O_WORKDIR, store to SCRATCHDIR
+SCRATCHDIR=${SGE_O_WORKDIR/home/scratch}
+# check if scratch exist, create or complain
+if [[ -d "/scratch" ]]
+then
+    mkdir -p ${SCRATCHDIR}
+else
+    echo "/scratch not found, cannot create ${SCRATCHDIR}"
+fi
+
+# check if scratchdir is OK
+echo "ok" >  ${SCRATCHDIR}/toto
+Ok=$(cat  ${SCRATCHDIR}/toto)
+if [[ "${Ok}" != "ok" ]]
+then
+    # if scratch is unavailable, fallback to home
+    CalcDir="${SGE_O_WORKDIR}/scratch"_${job}
+else
+    CalcDir=${SCRATCHDIR}_${job}
+fi
+mkdir -p ${CalcDir}
+
+# Gaussian specific ScratchDir
+export GAUSS_SCRDIR=${CalcDir}"/"${job}_$(date +%s)
+mkdir -p ${GAUSS_SCRDIR}
+
+Machine=$(hostname)
+
+# check if there is a chk or chk.gz
+# TODO/FIXME there's a problem here, watching the trace: if no chk, it create a .chk.chk
+NChk=$(grep -i "chk" ${job}.${ExtIn} | head -1 | sed 's/=/ /g' | awk '{print $2}')
+NChk=$(basename ${NChk:-none} .chk).chk
+if [[ -s ${HOMEDIR}/${NChk} ]]
+then
+    cp ${HOMEDIR}/${NChk} ${CalcDir}/${NChk}
+fi
+if [[ -s ${HOMEDIR}/${NChk}.gz ]]
+then
+    cp ${HOMEDIR}/${NChk}.gz ${CalcDir}/${NChk}.gz
+    gunzip ${CalcDir}/${NChk}.gz
+fi
+
+cp ${HOMEDIR}/${job}.${ExtIn} ${CalcDir}/
+
+# prepare postprocess script
+# TODO/FIXME is this still usefull ?
+# - compress .chk
+# - copy chk from $SCRATCHDIR to $HOMEDIR
+# - cleanup $SCRATCHDIR
+# add exec mode on script
+echo "ssh ${SGE_O_LOGNAME}@${Machine} gzip ${CalcDir}/*.chk " > ${HOMEDIR}/${job}_${Machine}_CLEAN.${ExtOut}
+echo "scp ${SGE_O_LOGNAME}@${Machine}:${CalcDir}/* ." > ${HOMEDIR}/${job}_${Machine}_CLEAN.${ExtOut}
+echo "ssh ${SGE_O_LOGNAME}@${Machine} rm -fr ${CalcDir}" >> ${HOMEDIR}/${job}_${Machine}_CLEAN.${ExtOut}
+echo "rm ${job}_${Machine}_CLEAN.${ExtOut}" >> ${HOMEDIR}/${job}_${Machine}_CLEAN.${ExtOut}
+chmod u+x ${HOMEDIR}/${job}_${Machine}_CLEAN.${ExtOut}
+
+# logrotate old logs
+if [[ -s ${HOMEDIR}/${job}.${ExtOut} ]]
+then
+    Ext=1
+    while [[ -s ${HOMEDIR}/${job}.${ExtOut}_${Ext} ]]
+    do 
+        let Ext=Ext+1
+    done
+    mv ${HOMEDIR}/${job}.${ExtOut} ${HOMEDIR}/${job}.${ExtOut}_${Ext}
+fi
+
+cd ${CalcDir}
+ls -al
+
+echo "time ${Gaussian} < ${job}.${ExtIn} > ${HOMEDIR}/${job}.${ExtOut}"
+
+/usr/bin/time ${Gaussian} < ${job}.${ExtIn} > ${HOMEDIR}/${job}.${ExtOut}
+
+cp *.wfn ${HOMEDIR}/
+
+if [[ -s ${NChk} ]]
+then
+    gzip -9 ${NChk}
+    cp ${NChk}.gz ${HOMEDIR}/
+fi
+
+# final cleanup (commented during debug)
+#rm -r ${GAUSS_SCRDIR}
+#rm -r ${CalcDir}

Property changes on: submit/gaussian/run_g09d01.sh
___________________________________________________________________
Added: svn:keywords
   + Id

Index: submit/gaussian/old/run_g09d-PFL.sh
===================================================================
--- submit/gaussian/old/run_g09d-PFL.sh	(revision 0)
+++ submit/gaussian/old/run_g09d-PFL.sh	(revision 9)
@@ -0,0 +1,103 @@
+#!/bin/bash
+# $Id$
+#$ -S /bin/bash
+#$ -N A_CHANGER
+#$ -o A_CHANGER.batch-log
+#$ -j y
+#$ -q E5-2670deb*
+#$ -pe mpi8_debian 8
+#$ -cwd 
+#$ -V
+
+set -x
+job=A_CHANGER
+ExtIn=com
+ExtOut=log
+
+HOMEDIR=$SGE_O_WORKDIR
+export g09root=/softs/gaussian/g09d01
+source $g09root/g09/bsd/g09.profile
+export Gaussian=$g09root/g09/g09
+
+cd $SGE_O_WORKDIR
+
+echo "########## debut env##################"
+env
+echo "########## fin env ##################"
+
+echo "########## Hostname ##################"
+hostname
+
+# Files definitions
+SCRATCHDIR=`echo $SGE_O_WORKDIR | awk -F "/" '{$2="scratch"; for(j=2;j<=NF;j++) {printf("/%s",$j);} print ""} ' `
+
+mkdir -p $SCRATCHDIR
+
+echo "ok" >  $SCRATCHDIR/toto
+Ok=`cat  $SCRATCHDIR/toto `
+if [ "$Ok" != "ok" ]; then
+# should not do that, should exit with error
+CalcDir=$SGE_O_WORKDIR
+export  GAUSS_SCRDIR=$SGE_O_WORKDIR"/Scratch_"${job}_`date +%s`
+else
+CalcDir=$SCRATCHDIR
+export  GAUSS_SCRDIR=$SCRATCHDIR"/"${job}_`date +%s`
+fi
+
+# Gaussian Scratch Dir
+mkdir -p $CalcDir
+mkdir -p $GAUSS_SCRDIR
+
+Machine=`hostname`
+
+
+HDir=$PWD # !! we are using SGE_O_WORKDIR/HOMEDIR, why new one ?
+#we check if there is a chk 
+NChk=` grep -i "chk" ${job}.${ExtIn} | head -1 | sed 's/=/ /g' | awk '{print $2}' `
+NChk=` basename $NChk .chk`.chk
+if [ -s $HDir/$NChk ]; then
+ cp $HDir/$NChk $CalcDir/$NChk
+fi
+if [ -s $HDir/$NChk.gz ]; then
+ cp $HDir/$NChk.gz $CalcDir/$NChk.gz
+ gunzip $CalcDir/$NChk.gz
+fi
+
+cp $HDir/${job}.${ExtIn} $CalcDir/.
+
+# must simplify
+echo "ssh ${SGE_O_LOGNAME}@${Machine} gzip $CalcDir/*.chk " > $HDir/${job}_${Machine}.${ExtOut}
+echo "scp ${SGE_O_LOGNAME}@${Machine}:$CalcDir/* ." > $HDir/${job}_${Machine}.${ExtOut}
+echo "ssh ${SGE_O_LOGNAME}@${Machine} rm -fr $CalcDir" >> $HDir/${job}_${Machine}.${ExtOut}
+echo "rm ${job}_${Machine}.${ExtOut}" >> $HDir/${job}_${Machine}.${ExtOut}
+chmod u+x $HDir/${job}_${Machine}.${ExtOut}
+
+# why ?
+cd $CalcDir
+ls -al
+
+if [ -s $HDir/${job}.${ExtOut} ]; then
+ Ext=1
+ while [ -s $HDir/${job}.${ExtOut}_${Ext} ]
+  do 
+    let Ext=Ext+1
+  done
+ mv $HDir/${job}.${ExtOut} $HDir/${job}.${ExtOut}_${Ext}
+fi
+echo "time ${Gaussian} < ${job}.${ExtIn} > ${HDir}/${job}.${ExtOut}"
+
+
+/usr/bin/time ${Gaussian} < ${job}.${ExtIn} > ${HDir}/${job}.${ExtOut}
+
+sleep 120
+
+cp *.wfn $HDir/.
+
+if [ -s $NChk ]; then
+ gzip -9 $NChk
+ cp $NChk.gz $HDir/.
+fi
+
+rm -r $GAUSS_SCRDIR # not usefull
+rm -r $CalcDir
+rm $HDir/${job}_${Machine}.${ExtOut}

Property changes on: submit/gaussian/old/run_g09d-PFL.sh
___________________________________________________________________
Added: svn:keywords
   + Id

Index: submit/gaussian/old/run_g09d-TLB.sh
===================================================================
--- submit/gaussian/old/run_g09d-TLB.sh	(revision 0)
+++ submit/gaussian/old/run_g09d-TLB.sh	(revision 9)
@@ -0,0 +1,134 @@
+#!/bin/bash
+# PSMN: $Id$
+#$ -S /bin/bash
+#$ -N c0a-a0scan.com
+#$ -cwd
+#$ -j y
+#$ -o c0a-a0.batch-log
+#$ -q r815lin128ib  
+#$ -pe gaussian8 8
+
+set -x
+job1=c0a-a0
+ExtIn=com
+ExtOut=log
+
+HOMEDIR=$SGE_O_WORKDIR
+echo $HOMEDIR
+export g09root=/softs/gaussian/g09d01
+export GAUSS_SCRDIR=/scratch/$SGE_O_LOGNAME
+source $g09root/g09/bsd/g09.profile
+export Gaussian=$g09root/g09/g09
+
+#mettre en commentaire la ligne suivante sur le nouveau cluster, la laisser sur l'ancien
+#export LD_ASSUME_KERNEL=2.4.1
+#export Gaussian=$g03root/g03a02/g09
+
+cd $SGE_O_WORKDIR
+
+export RSHCOMMAND=ssh
+export P4_RSHCOMMAND=ssh
+
+export LD_LIBRARY_PATH=/softs/acml/acml2.7.0/pathscale64/lib:/softs/fftw/2.1.5/ps-ib/lib:$LD_LIBRARY_PATH:/usr/lib
+
+echo "########## debut env##################"
+env
+echo "########## fin env ##################"
+
+echo "########## Hostname ##################"
+hostname
+
+WKDIR=/scratch
+
+DirT=$PWD
+CalcDir=""
+for i in `echo $PWD | sed 's/\// /g'`
+  do
+   Rep=$i
+   if [ $Rep = "home" -o $Rep = "maestro" ]; then
+      Rep=$WKDIR
+   fi
+#  echo $Rep "  ---  " $i " ---- " $CalcDir
+   CalcDir=$CalcDir"/"$Rep
+#  echo $Rep "  ---  " $i " ---- " $CalcDir
+   if [ ! \( -s $CalcDir \) ]; then
+     echo "Creating $CalcDir"
+     mkdir $CalcDir
+   fi
+  done
+
+#### On rajoute le nom du calcul a la fin de CalcDir (Paul -> Mika)
+ CalcDir=$CalcDir"/"${job1}_`date +%s`
+#  echo $Rep "  ---  " $i " ---- " $CalcDir
+ if [ ! \( -s $CalcDir \) ]; then
+   echo "Creating $CalcDir"
+   mkdir $CalcDir
+ fi
+#### Fin de l'ajout
+
+echo "CalcDir="$CalcDir
+
+#### We add GScratch as the Gaussian Scratch Dir (Paul -> Mika)
+export  GAUSS_SCRDIR=$CalcDir"/GScratchDir"
+ if [ ! \( -s $GAUSS_SCRDIR \) ]; then
+   echo "Creating $GAUSS_SCRDIR"
+   mkdir $GAUSS_SCRDIR
+ fi
+#### Fin de l'ajout
+
+Machine=`hostname`
+HDir=$PWD
+
+#### We check if there is a chk
+NChk=` grep -i "chk" ${job1}.${ExtIn} | head -1 | sed 's/=/ /g' | \awk  '{print $2}' `
+NChk=` basename $NChk .chk`.chk
+if [ -s $HDir/$NChk ]; then
+  cp $HDir/$NChk $CalcDir/$NChk
+fi
+#### Eventuellement on ajoute avant fi: gunzip $HDir/$NChk.gz
+
+#### We check if there is a cube file
+NCube=` grep -i "cube" ${job1}.${ExtIn} | head -1 | sed 's/=/ /g' | \awk  '{print $2}' `
+NCube=` basename $NChk .cube`.cube
+if [ -s $HDir/$NCube ]; then
+  cp $HDir/$NCube $CalcDir/$NCube
+fi
+#### Eventuellement on ajoute avant fi: gunzip $HDir/$NChk.gz
+
+#### Si le calcul plante, regarde ce qu'il y a dans le scratch, recupere et vide
+echo "ssh ${SGE_O_LOGNAME}@${Machine} gzip $CalcDir/*.chk " > $HDir/${job1}_${Machine}.${ExtOut}
+echo "scp ${SGE_O_LOGNAME}@${Machine}:$CalcDir/* ." >> $HDir/${job1}_${Machine}.${ExtOut}
+echo "ssh ${SGE_O_LOGNAME}@${Machine} rm -r $CalcDir" >> $HDir/${job1}_${Machine}.${ExtOut}
+echo "rm ${job1}_${Machine}.${ExtOut}" >> $HDir/${job1}_${Machine}.${ExtOut}
+chmod u+x $HDir/${job1}_${Machine}.${ExtOut}
+
+cp $HDir/${job1}.${ExtIn} $CalcDir/.
+touch $HDir/${job1}_${Machine}.${ExtOut}
+cd $CalcDir
+ls -al
+
+#### S'il y a deja un .log, le copie en .log._X+1 pour sauvegarde s'il y avait deja .log_X
+if [ -s $HDir/${job1}.${ExtOut} ]; then
+ Ext=1
+ while [ -s $HDir/${job1}.${ExtOut}_${Ext} ]
+ do
+   let Ext=Ext+1
+ done
+ mv $HDir/${job1}.${ExtOut} $HDir/${job1}.${ExtOut}_${Ext}
+fi
+
+echo "time ${Gaussian} < ${job1}.${ExtIn} > ${HDir}/${job1}.${ExtOut}"
+
+/usr/bin/time ${Gaussian} < ${job1}.${ExtIn} > ${HDir}/${job1}.${ExtOut}
+
+cp ${job1}.${ExtOut} $HDir/${job1}.${ExtOut}
+
+rm -r $GAUSS_SCRDIR
+if [ -s $NChk ]; then
+  cp $NChk $HDir/$NChk
+fi
+
+cp $CalcDir/*.cube $HDir/.
+
+rm -r $CalcDir
+rm $HDir/${job1}_${Machine}.${ExtOut}

Property changes on: submit/gaussian/old/run_g09d-TLB.sh
___________________________________________________________________
Added: svn:keywords
   + Id

