-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_ms_hr_mult_CapB.pbs
50 lines (43 loc) · 1.68 KB
/
run_ms_hr_mult_CapB.pbs
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
46
47
48
49
50
#!/bin/sh
## job name
#PBS -N HR_lngth_mult_rnd
## maximum runtime
#PBS -l walltime=10:00:00
## select number of nodes, cpus (per node) and memory (per node)
#PBS -l select=1:ncpus=24:mem=124gb
## standard output standard error
#PBS -o reports
#PBS -e reports
## request disk space for temporary directory
###PBS -l tmpspace=10gb
## array job
#PBS -J 1-29
## start job after another job finished?
###PBS -W depend=afterany:1624711.pbs
### print details about job
echo ""
echo "This is job $PBS_JOBID index $PBS_ARRAY_INDEX"
echo "The following ressources have been allocated"
cat $PBS_NODEFILE
echo ""
### set working directory
cd $HOME/git/wklife9_GA-harvest_rate
## load modules
## anaconda includes R and OpenMPI
module purge
module load mpi/intel-2018.1.163 anaconda3/personal
### activate MPI environment
source activate R_2020
echo "starting the simulations..."
### run job
### when running with MPI, worker count is one less than selected cores
R CMD BATCH --vanilla --quiet "--args n_workers=20 n_blocks=1 stock_id=$PBS_ARRAY_INDEX n_iter=500 n_yrs=100 fhist='random' hr='length' multiplier=seq(from=0,to=1,length.out=101) comp_b=TRUE interval=1 idxB_lag=1 idxB_range_3=1 upper_constraint=1.2 lower_constraint=0.7 cap_below_b=FALSE scenario='length_cap_b' saveMP=FALSE stats=TRUE collate=TRUE stat_yrs='more'" $HOME/git/wklife9_GA-harvest_rate/run_ms_hr.R $HOME/reports/$PBS_JOBID.$PBS_ARRAY_INDEX.Rout
## $PBS_ARRAY_INDEX
echo ""
echo "R job finished!"
echo ""
## print details about job
echo "job details from PBS:"
echo "==============================================================================="
qstat -f
echo "==============================================================================="