#!/bin/bash # #PBS -N BuildHTUs_IP # #PBS -j oe #PBS -l nodes=1:ppn=64 #PBS -l walltime=128:00:00 #PBS -l mem=160gb #PBS -l vmem=160gb # cd ${PBS_O_WORKDIR} export NSLOTS=$(($PBS_NUM_NODES*$PBS_NUM_PPN)) # # Set the right Python 3 Anaconda environment # source ../../Environment # # Clean-up. Weights are kept for future runs. # /bin/rm -f DocumentationInterface *graph.nc *.txt # # If weights file does not exist, then compute it quickly # if [ ! -e Weights.nc ] ; then mpirun -n ${NSLOTS} python ../../WeightsOnly.py if [ $? -gt 0 ] ; then exit else echo "=============================================" echo "= Weight calculations successful =" echo "=============================================" fi fi # # Run the Python code to generate the HTUs and write them into a netCDF file. # mpirun -n ${NSLOTS} python ../../RoutingPreProc.py if [ $? -gt 0 ] ; then echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" echo "X Run on Iberian Peninsula failed X" echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" else echo "=======================================" echo "= Run on Iberian Peninsula successful =" echo "=======================================" fi # ls -l