-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjob1_mpi.sh
executable file
·45 lines (33 loc) · 1.47 KB
/
job1_mpi.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash --login
#$ -cwd # Job will run from the current directory
#$ -N moea1_mpi
#$ -V
#$ -pe mpi-24-ib.pe 144
#$ -M tomasz.k.janus@gmail.com
#$ -m be
#$ -t 1-2 # A job-array with 2 seeds
# Initialise proxy before making any downloads/uploads
module load tools/env/proxy
# Load Anaconda Python
module load apps/binapps/anaconda3/2019.03 # Python 3.7.3
# Try also a newer version
# module load apps/binapps/anaconda3/2019.07 # Python 3.7.3
module load compilers/gcc/8.2.
export HDF5_USE_FILE_LOCKING=FALSE
export PARFLOW_PYWR=/mnt/iusers01/mace01/w79846tj/parflow-pywr-moea/
export PARFLOW_DIR=/mnt/iusers01/mace01/w79846tj/parflow/install
# A bash array of seeds
SEED_PARAM=( 10 20 30 40 50 60 70 80 90 100 )
# Job index for each of the run in the job-array
INDEX=$((SGE_TASK_ID-1))
# Activate conda environment
conda activate parflow_pywr
# Inform the Python script how many cores to use - $NSLOTS is automatically set to the number given above.
# export OMP_NUM_THREADS=$NSLOTS
#set NUMEXPR_MAX_THREADS=144
#export OMPI_MCA_btl=openib,self,vader
#export OMPI_MCA_pml=ob1
# To run a new job (use 100000 function evaluations and NSGAIII algorithm and custom index defined by the simulation run index)
mpirun -n $NSLOTS parflow-pywr search optim_seed_$SGE_TASK_ID -h file://optim_results_seed_$SGE_TASK_ID -d \
optim_$SGE_TASK_ID -w parflow_tmp_$SGE_TASK_ID --mpi -a NSGAIII -ne 140000 -p $NSLOTS -i pywr-1-reservoir-model_profile1.json \
--seed=${SEED_PARAM[$INDEX]}