#!/bin/csh

#BSUB -J  OPA       # nom de la requete NQS
#BSUB -o  OPA.out   # fichier d'output
#BSUB -e  OPA.err   # fichier d'erreur
#BSUB -W 0:30
#BSUB -M 24000000
#BSUB -n 8

setenv NB_CPU_CLIENT 4
setenv NB_CPU_SERVER 1

@ NB_CPU = $NB_CPU_CLIENT + $NB_CPU_SERVER
setenv NB_CPU_CLIENT $NB_CPU_CLIENT

setenv BASE_PATH ../../../bin
setenv SERVER_NAME ${BASE_PATH}/ioserver
setenv CLIENT_NAME ${BASE_PATH}/opa
setenv JOB_REQUEST NEMO


echo "NB_CPU->${NB_CPU}  NB_CPU_SERVER->${NB_CPU_SERVER} NB_CPU_CLIENT->${NB_CPU_CLIENT}"

cd $LS_SUBCWD

rm -f OPA.out
rm -f OPA.err
rm -f ORCA2_00000015_restart_ice_*.nc
rm -f ORCA2_00000015_restart_*.nc
rm -f  damping.coeff_*.nc

tar -xvf /dmnfs10/cont003/p48ethe/FORCINGS/ORCA_R2/NEMO/ORCA2_LIM_nemo_v3.1.tar 

unsetenv MPIBULL2_USE_POSTAL


srun -c 1 -n $NB_CPU /bin/bash ./launcher_platine

#totalview srun -a -c 1 -n $NB_CPU /bin/bash ./launcher_platine
