BuildHTUs_Mallorca.pbs 1.34 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/bash
#
#PBS -N BuildHTUs_Mallorca
#
#PBS -j oe
#PBS -l nodes=1:ppn=2
#PBS -l walltime=4:00:00
#PBS -l mem=80gb
#PBS -l vmem=80gb
#
cd ${PBS_O_WORKDIR}
export NSLOTS=$(($PBS_NUM_NODES*$PBS_NUM_PPN))
#
# Set the right Python 3 Anaconda environment
#
source ../../Environment
#
POLCHER Jan's avatar
POLCHER Jan committed
18 19 20 21 22 23 24 25
# Clean-up
#
/bin/rm -f DocumentationInterface *.nc *.txt
#
# Force RoutingPreProc to recompute the weights.
#
/bin/rm -rf Weights
#
26 27 28
# 1 Proc
#
mpirun -n 1 python ../../RoutingPreProc.py
POLCHER Jan's avatar
POLCHER Jan committed
29 30 31 32
if [ $? -gt 0 ] ; then
    echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    echo "X    Run on 1 Proc failed    X"
    echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
Anthony Schrapffer's avatar
Anthony Schrapffer committed
33
    exit
POLCHER Jan's avatar
POLCHER Jan committed
34 35 36 37 38 39 40 41
else
    echo "============================"
    echo "= Run on 1 Proc successful ="
    echo "============================"
    mv MEDCORDEX_test_graph.nc MEDCORDEX_test_graph_n1.nc
    mv MEDCORDEX_test_graph_HydroSuper.nc MEDCORDEX_test_graph_HydroSuper_n1.nc
fi
#
42 43 44 45
#
# 2 Proc
#
mpirun -n 2 python ../../RoutingPreProc.py
POLCHER Jan's avatar
POLCHER Jan committed
46 47 48 49 50 51 52 53 54 55 56 57
if [ $? -gt 0 ] ; then
    echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    echo "X    Run on 2 Proc failed    X"
    echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
else
    echo "============================"
    echo "= Run on 2 Proc successful ="
    echo "============================"
    mv MEDCORDEX_test_graph.nc MEDCORDEX_test_graph_n2.nc
    mv MEDCORDEX_test_graph_HydroSuper.nc MEDCORDEX_test_graph_HydroSuper_n2.nc
fi

58
ls -l