-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpostprocess.sh
executable file
·39 lines (32 loc) · 1.44 KB
/
postprocess.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
#!/usr/bin/env bash
#SBATCH --partition=broadwl
#SBATCH --job-name=takeup_pp # create a short name for your job
#SBATCH --nodes=1 # node count
#SBATCH --ntasks=1 # total number of tasks across all nodes
#SBATCH --cpus-per-task=1 # cpu-cores per task (>1 if multi-threaded tasks)
#SBATCH --mem-per-cpu=40G # memory per cpu-core (4G is default)
#SBATCH --time=0-04:00:00 # maximum time needed (HH:MM:SS)
#SBATCH --mail-type=begin # send email when job begins
#SBATCH --mail-type=end # send email when job ends
#SBATCH [email protected]
#SBATCH --output=temp/log/takeup_postprocess-%j.log
#SBATCH --error=temp/log/takeup_postprocess-%j.log
#SBATCH --export=IN_SLURM=1
LATEST_VERSION=62
VERSION=${1:-$LATEST_VERSION} # Get version from command line if provided
CMDSTAN_ARGS="--cmdstanr"
SLURM_INOUT_DIR=~/scratch-midway2
if [[ -v IN_SLURM ]]; then
echo "Running in SLURM..."
module load midway2 gdal/2.4.1 udunits cmake R/4.2.0
OUTPUT_ARGS="--output-path=${SLURM_INOUT_DIR}"
POSTPROCESS_INOUT_ARGS="--input-path=${SLURM_INOUT_DIR} --output-path=${SLURM_INOUT_DIR}"
CORES=$SLURM_CPUS_PER_TASK
echo "Running with ${CORES} cores."
echo "INOUT ARGS: ${POSTPROCESS_INOUT_ARGS}."
else
OUTPUT_ARGS="--output-path=data/stan_analysis_data"
POSTPROCESS_INOUT_ARGS=
CORES=12
fi
Rscript ./postprocess_dist_fit.R ${VERSION} ${POSTPROCESS_INOUT_ARGS} --cores=1 --load-from-csv