Obelix at IP2CT
===============

# Setup environment
```bash
module load Libraries/IntelPython/2019 
module load Libraries/impi/2019 
module load Libraries/plumed/Intel/2.5.1/2019
module load Libraries/mkl/2019
```

# Config file
```bash
# Compilation options
F90 := mpiifort
F90STDFLAGS := -g -fPIC
F90OPTFLAGS := -O2 -xCORE-AVX512 -align array64byte
F90REPORTFLAGS :=
F90FLAGS := $(F90STDFLAGS) $(F90OPTFLAGS) $(F90REPORTFLAGS) -DMW_USE_PLUMED
FPPFLAGS := -fpp
LDFLAGS := -mkl=cluster
F2PY := f2py
F90WRAP := f90wrap
FCOMPILER := intelem
J := -module
# Path to pFUnit (Unit testing Framework)
PFUNIT := $(PFUNIT)
```

The option `-no-wrap-margin` is essential for Intel Compilers to avoid problems with printing output files.


# Job example
```bash
#!/bin/bash

# temps CPU a ajuster au calcul
#PBS -l walltime=HOURS:MIN:00
# memoire a ajuster au calcul
##PBS -l vmem=1gb
# nb procs a ajuster au calcul, voir OMP_NUM_THREADS plus bas
#PBS -l nodes=NODES:ppn=PPN
# a changer, nom du job (qstat)
#PBS -N JOBNAME
#Request that regular output and terminal output go to the same file
#PBS -j oe
#  Request that your login shell variables be available to the job
#PBS -V

# Load the good modules
module load Libraries/impi/2019 Core/Gnu/6.3.0 Libraries/mkl/2019 Libraries/plumed/Intel/2.5.1/2019 Core/Intel/2019

export OMPI_MCA_btl_base_warn_component_unused=0
#export OMPI_MCA_rmaps_base_oversubscribe=1

# Pour savoir sur quel noeud on est
echo "Job lance sur: $HOSTNAME"
echo "StartDir : $PBS_O_WORKDIR"
#echo "(sinon par defaut ceut ete $HOMEDIR)"

# A changer, Startdir = ou sont les fichiers, par defaut HOMEDIR
StartDir=$PBS_O_WORKDIR

# Ne pas modifier, SCRATCHDIR = espace temporaire (local au noeud et a vider apres le calcul)
#SCRATCHDIR=/scratch/$USER/$PBS_JOBID

# Copy everything from submission directory here
SCRATCHDIR=/scratch/$USER/$PBS_JOBID
/bin/mkdir $SCRATCHDIR
/bin/cp -f $StartDir/* $SCRATCHDIR
cd $SCRATCHDIR

ulimit -s unlimited

date

mpirun /home/user/mw2/mw

date

/bin/cp $SCRATCHDIR/* $StartDir
/bin/rm -rf $SCRATCHDIR
exit
```
