diff --git a/.gitignore b/.gitignore index a5f895c..e077508 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,8 @@ .LSOverride # Icon must end with two \r -Icon +Icon + # Thumbnails ._* @@ -37,3 +38,23 @@ Temporary Items # Local History for Visual Studio Code .history/ +# local files + +spool/qmaster/jobs +spool/qmaster/job_scripts +spool/qmaster/messages* +spool/qmaster/qmaster.pid +spool/qmaster/heartbeat +spool/qmaster/arseqnum +spool/qmaster/advance_reservations +spool/qmaster/jobseqnum +spool/qmaster/zombies +spool/gaia +spool/minos11 +spool/minos12 +spool/minos13 +spool/minos14 +spool/minos15 +spool/minos26 +spool/minos27 +spool/qmaster/users diff --git a/local/bin/suspend.sh b/local/bin/suspend.sh index 80647c0..b433534 100755 --- a/local/bin/suspend.sh +++ b/local/bin/suspend.sh @@ -1,5 +1,5 @@ #!/usr/bin/ksh -# $Id: suspend.sh 365 2013-11-18 09:58:17Z kasper $ + # This script should be added as the SUSPEND_METHOD in the # queue definition with a $job_pid, $job_id, and $job_owner arguments. # e.g. script.sh $job_pid $job_id $job_owner diff --git a/local/bin/term.sh b/local/bin/term.sh index bb19e72..244faa6 100755 --- a/local/bin/term.sh +++ b/local/bin/term.sh @@ -1,5 +1,5 @@ #!/usr/bin/ksh -# $Id: term.sh 364 2013-11-18 09:55:05Z kasper $ + # This script should be added as the TERMINATE_METHOD in the # queue definition with $job_pid, $job_id, $job_owner, and interval arguments. # e.g. script.sh $job_pid $job_id $job_owner 90 @@ -10,16 +10,16 @@ then exit 1 fi -#echo "Term script Running on: $USER $1 $2 $3 $4" >> ~$3/qdel_log.log -#echo `pgrep -g $1` >> ~$3/qdel_log.log +#echo "Term script Running on $(hostname): $USER $1 $2 $3 $4" >> ~$3/qdel_log.log +#echo $(pgrep -g $1) >> ~$3/qdel_log.log -for sig in 2 15 9 +for sig in INT TERM KILL do - stat=`pgrep -g $1 -u $3` - if [ ! -z "$stat" ] + stat=$(pgrep -g $1 -u $3) + if [ ! -z "${stat}" ] then - #echo "Sending $sig to $1" >> ~$3/qdel_log.log - /usr/bin/pkill --signal $sig -g $1 + #echo "Sending SIG${sig} to $1" >> ~$3/qdel_log.log + /usr/bin/pkill --signal ${sig} -g $1 sleep $4 else break diff --git a/local/examples/jobs/periodic_sleeper.sh b/local/examples/jobs/periodic_sleeper.sh index 3a86e1c..3b2ba66 100755 --- a/local/examples/jobs/periodic_sleeper.sh +++ b/local/examples/jobs/periodic_sleeper.sh @@ -47,7 +47,7 @@ esac # set other variables next=$(date -d "${T} minutes" +%Y%m%d%H%M) -script=/opt/SGE/examples/jobs/periodic_sleeper.sh +script=$0 # output some informations if [ ${debug} -eq 1 ]; then @@ -58,7 +58,7 @@ if [ ${debug} -eq 1 ]; then fi # commands to run in Grid Engine -/opt/SGE/examples/jobs/sleeper.sh ${nap} ${do_echo} +${script} ${nap} ${do_echo} # re-submit script to execute in T minutes jobid=$(qsub ${terse} -a ${next} ${script} ${debug_flag} ${T} ${nap}) diff --git a/local/examples/jobs/simple_conda_test.sh b/local/examples/jobs/simple_conda_test.sh index 4f5c9a9..e78e20f 100755 --- a/local/examples/jobs/simple_conda_test.sh +++ b/local/examples/jobs/simple_conda_test.sh @@ -16,6 +16,14 @@ # Name the job 'Conda-Test' #$ -N Conda-Test +# send e-mail after job has finished +# use the -M option to define your e-mail address +# #$ -M my-email@example.org +#$ -m e + +# join stdout and stderr in one file +#$ -j y + ############################################################# # initialize conda # ############################################################# diff --git a/local/examples/jobsbin/.gitkeep b/local/examples/jobsbin/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/local/examples/src/.gitkeep b/local/examples/src/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/local/pe_epilog.d/00_bin-true b/local/pe_epilog.d/00_bin-true new file mode 120000 index 0000000..63b10de --- /dev/null +++ b/local/pe_epilog.d/00_bin-true @@ -0,0 +1 @@ +/bin/true \ No newline at end of file diff --git a/local/pe_prolog.d/00_bin-true b/local/pe_prolog.d/00_bin-true new file mode 120000 index 0000000..63b10de --- /dev/null +++ b/local/pe_prolog.d/00_bin-true @@ -0,0 +1 @@ +/bin/true \ No newline at end of file diff --git a/local/prolog.d/00_bin-true b/local/prolog.d/00_bin-true new file mode 120000 index 0000000..63b10de --- /dev/null +++ b/local/prolog.d/00_bin-true @@ -0,0 +1 @@ +/bin/true \ No newline at end of file diff --git a/local/scripts/SGESuspend.sh b/local/scripts/SGESuspend.sh new file mode 100755 index 0000000..44094c7 --- /dev/null +++ b/local/scripts/SGESuspend.sh @@ -0,0 +1,25 @@ +#!/usr/bin/ksh +# $Id: SGESuspend.sh 365 2013-11-18 09:58:17Z kasper $ +# This script should be added as the SUSPEND_METHOD in the +# queue definition with a $job_pid, $job_id, and $job_owner arguments. +# e.g. script.sh $job_pid $job_id $job_owner + +if [ -z "$3" ] +then + echo "Usage: $0 \$job_pid \$job_id \$job_owner" + exit 1 +fi + +stat=`pgrep -g $1` +if [ ! -z "$stat" ] +then + #echo "Sending $sig to $1" >> ~$3/qdel_log.log + /usr/bin/pkill --signal SIGTSTP -g $1 +else + echo "Process $1 not found for job $2" >> ~$3/qdel_log.log + echo "Unable to suspend." >> ~$3/qdel_log.log + exit 1 +fi + +#uncomment the following for debugging +#echo "Suspending Job $2 " >> ~$3/qdel_log.log diff --git a/local/scripts/SGETerm.sh b/local/scripts/SGETerm.sh new file mode 100755 index 0000000..657e989 --- /dev/null +++ b/local/scripts/SGETerm.sh @@ -0,0 +1,30 @@ +#!/usr/bin/ksh +# $Id: SGETerm.sh 364 2013-11-18 09:55:05Z kasper $ +# This script should be added as the TERMINATE_METHOD in the +# queue definition with $job_pid, $job_id, $job_owner, and interval arguments. +# e.g. script.sh $job_pid $job_id $job_owner 90 + +if [ -z "$4" ] +then + echo "Usage: $0 \$job_pid \$job_id \$job_owner interval" + exit 1 +fi + +#echo "Term script Running on: $USER $1 $2 $3 $4" >> ~$3/qdel_log.log +#echo `pgrep -g $1` >> ~$3/qdel_log.log + +for sig in 2 15 9 +do + stat=`pgrep -g $1 -u $3` + if [ ! -z "$stat" ] + then + #echo "Sending $sig to $1" >> ~$3/qdel_log.log + /usr/bin/pkill --signal $sig -g $1 + sleep $4 + else + break + fi +done + +#uncomment the following for debugging +#echo "Job $2 killed." >> ~$3/qdel_log.log diff --git a/local/scripts/epilog b/local/scripts/epilog new file mode 100755 index 0000000..0e636dc --- /dev/null +++ b/local/scripts/epilog @@ -0,0 +1,11 @@ +#! /bin/bash +# $Id: epilog 181 2010-09-17 15:55:28Z kasper $ + +## Delete the STDOUT and STDERR files (.o and .e) if they are empty +## ( we do not want to delete non-empty files, they may contain useful +## troubleshooting or debug information ... ) +## +[ -r $SGE_STDOUT_PATH -a -f $SGE_STDOUT_PATH ] && [ ! -s $SGE_STDOUT_PATH ] && rm -f $SGE_STDOUT_PATH +[ -r $SGE_STDERR_PATH -a -f $SGE_STDERR_PATH ] && [ ! -s $SGE_STDERR_PATH ] && rm -f $SGE_STDERR_PATH + +exit 0 diff --git a/local/scripts/pe_epilog b/local/scripts/pe_epilog new file mode 120000 index 0000000..63b10de --- /dev/null +++ b/local/scripts/pe_epilog @@ -0,0 +1 @@ +/bin/true \ No newline at end of file diff --git a/local/scripts/pe_prolog b/local/scripts/pe_prolog new file mode 120000 index 0000000..63b10de --- /dev/null +++ b/local/scripts/pe_prolog @@ -0,0 +1 @@ +/bin/true \ No newline at end of file diff --git a/local/scripts/prolog b/local/scripts/prolog new file mode 120000 index 0000000..63b10de --- /dev/null +++ b/local/scripts/prolog @@ -0,0 +1 @@ +/bin/true \ No newline at end of file diff --git a/local/scripts/qlogin_wrapper b/local/scripts/qlogin_wrapper new file mode 100755 index 0000000..8d91e4f --- /dev/null +++ b/local/scripts/qlogin_wrapper @@ -0,0 +1,5 @@ +#!/bin/sh +# $Id: qlogin_wrapper 175 2010-09-15 15:34:28Z kasper $ +HOST=$1 +PORT=$2 +/usr/bin/ssh -XAq -p $PORT $USER@$HOST diff --git a/local/patch/fix_euid_set_bug.patch b/patch/fix_euid_set_bug.patch similarity index 100% rename from local/patch/fix_euid_set_bug.patch rename to patch/fix_euid_set_bug.patch