#!/bin/bash


# Detect and handle running under SALOME YACS module.
YACS_ARG=
if test "$SALOME_CONTAINERNAME" != "" -a "$CFDRUN_ROOT_DIR" != "" ; then
  YACS_ARG="--yacs-module=${CFDRUN_ROOT_DIR}"/lib/salome/libCFD_RunExelib.so
fi

# Export paths here if necessary or recommended.

# Boot MPI daemons.
mpdtrace > /dev/null 2>&1
if test $? != 0 ; then mpdboot ; fi || exit $?

cd /home/alexandreguilloux/TENSYL/08-Cas_test_CS_2.1.4_V3/01-CAS_TEST/CASE1/RESU/20120223-1730

# Run solver.
mpiexec.mpich2 -n 16 /home/alexandreguilloux/TENSYL/08-Cas_test_CS_2.1.4_V3/01-CAS_TEST/CASE1/RESU/20120223-1730/cs_solver --param case3.xml --mpi $YACS_ARGS $@

CS_RET=$?

# Halt MPI daemons.
listjobs=`mpdlistjobs | wc -l`
if test $listjobs = 0 ; then mpdallexit ; fi


exit $CS_RET

