Skip to content

Commit

Permalink
base version sge
Browse files Browse the repository at this point in the history
  • Loading branch information
mmiladi committed Mar 17, 2017
1 parent bab8b67 commit 2787e56
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions submit_to_cluster.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash
#$ -cwd
#$ -l h_vmem=1G
# -l nice_cpu=1
# -m ea


# -l h_cpu=2:0:0
# -l h_rt=3:0:0



export PATH=/home/miladim/miniconda2/bin:$PATH
export PYTHONNOUSERSITE=True
source activate mutarna

# all parameters for the shell script
script=$1
shift

## after shifting perscript is invoked for each parameter set


if [ -z "$SGE_TASK_ID" ]; then
echo "No SGE environment found! Set SGE_TASK_ID to 0!"
let SGE_TASK_ID=0
fi

if [ -z "$JOB_ID" ]; then
echo "No SGE environment found! Set JOB_ID to 1!"
let JOB_ID=1
fi

if ! [ -z "$PBS_JOBID" ]; then
echo "PBS environment found instead of SGE! Set JOB_ID to PBS_JOBID!"
let JOB_ID=$PBS_JOBID
fi


params=$@;
$script $params $(expr $SGE_TASK_ID - 1)

0 comments on commit 2787e56

Please sign in to comment.