human-microbiome-compendium/sge_scripts/benchmark_lbm_seq.sh

48 lines
No EOL
920 B
Bash
Executable file

#!/usr/bin/env bash
#$ -V
#$ -cwd
#$ -N benchlbmseq
#$ -m besa
#$ -q long.q
#$ -t 1-12
#$ -pe thread 64
#$ -M louis.lacoste+migale@agroparistech.fr
#$ -o logs/$JOB_NAME
#$ -e logs/$JOB_NAME
# Creating log directory if it doesn't exists
BASE_DIR="/home/$USER/work/human-microbiome-compendium"
LOG_DIR=$(echo "$BASE_DIR/logs")
if [ ! -d "$LOG_DIR" ]; then
mkdir -p $LOG_DIR
fi
# Finding directory
APPLICATIONS_DIR=$(echo "$BASE_DIR")
echo $APPLICATIONS_DIR
ARGID=$(($SGE_TASK_ID % 3))
case $ARGID in
0)
echo -n "Model will be NOTRANS"
MODE="notrans"
;;
1)
echo -n "Model will be SEQ"
MODE="seq"
;;
2)
echo -n "Model will be PARA"
MODE="para"
;;
esac
readonly NB_CORES=$(sed -n 's/^#\$ -pe thread \(.*\)/\1/p' -- "$0")
echo -n "Model will be $MODE with $NB_CORES"
Rscript "${APPLICATIONS_DIR}/benchmark_lbm_seq.R" $MODE $NB_CORES &>> logs/$JOB_NAME.$SGE_TASK_ID