Adding script launcher migale

This commit is contained in:
Louis Lacoste 2024-05-24 16:03:38 +02:00
parent 5dea254bb2
commit 0fabbed30a

View file

@ -0,0 +1,31 @@
#!/usr/bin/env bash
#$ -V
#$ -cwd
#$ -N weboflife_app
#$ -m besa
#$ -t 1:4
#$ -q long.q
#$ -pe thread 64
#$ -M louis.lacoste+migale@agroparistech.fr
#$ -o logs/$JOB_NAME.$TASK_ID
#$ -e logs/$JOB_NAME.$TASK_ID
# Creating log directory if it doesn't exists
BASE_DIR="/home/$USER/work/mia-stage-2024"
LOG_DIR=$(echo "$BASE_DIR/logs")
if [ ! -d "$LOG_DIR" ]; then
mkdir -p $LOG_DIR
fi
# Constant data
MODELARRAY=("iid" "pi" "rho" "pirho")
MODEL=${MODELARRAY[$(($((SGE_TASK_ID - 1)) % 4))]}
# Finding directory
APPLICATIONS_DIR=$(echo "$BASE_DIR/code/applications")
echo $APPLICATIONS_DIR
Rscript "${APPLICATIONS_DIR}/weboflife/01_weboflife_clusterize.R" --model $MODEL