Commit 17895f2f by Riccardo Vicedomini

job set to 1 for local run, -j will be used only for --sge

parent e90ce415
......@@ -35,8 +35,8 @@ MCLADE_USESGE=false
MCLADE_WORKDIR=${PWD}
MCLADE_OUTFILE=""
MCLADE_RMTMP=false
NTHREADS=1
NJOBS=16
NTHREADS=4
NJOBS=1
function print_usage() {
echo -en "\n USAGE: ${CMD_NAME} -i <input_fasta> -N <name> [options]\n"
......@@ -71,13 +71,14 @@ function print_usage() {
" | column -t -s $'\t'
echo -en "\n"
echo -en " OTHER OPTIONS:\n
-j, --jobs <num>\tNumber of jobs to be created (default:${NJOBS})\n
-t, --threads <num>\tNumber of threads for each job (default:${NTHREADS})\n
-t, --threads <num>\tNumber of threads (default:${NTHREADS})\n
-h, --help\tPrint this help message\n
-V, --version\tPrint version\n" | column -t -s $'\t'
echo -en "\n"
echo -en " SGE OPTIONS:\n
--sge\tRun MetaCLADE jobs on a SGE HPC environment\n
-j, --jobs <num>\tNumber of jobs to be created/submitted (default:${NJOBS})\n
\tUse -t|--threads to define the number of threads for each job\n
--pe <name>\tParallel environment to use (mandatory)\n
--queue <name>\tName of a specific queue where jobs are submitted\n
--time-limit <hh:mm:ss>\tTime limit for submitted jobs formatted as hh:mm:ss\n
......@@ -231,7 +232,7 @@ if ! [[ "${NTHREADS}" =~ ^[0-9]+$ ]] || [ ${NTHREADS} -lt 1 ] ; then
fi
if ! [[ "${NJOBS}" =~ ^[0-9]+$ ]] || [ ${NJOBS} -lt 1 ] ; then
print_warning "-j|--max-jobs parameter should be a positive integer"
print_error "-j|--max-jobs parameter should be a positive integer"
exit 1
fi
......@@ -251,6 +252,9 @@ if [ "${MCLADE_USESGE}" = true ] ; then
fi
fi
# set number of job to 1 if run on a single computer
if [ "${MCLADE_USESGE}" = false ]; then NJOBS=1; fi
# Create Working directory
MCLADE_WORKDIR=${MCLADE_WORKDIR}"/"${MCLADE_JOBNAME}
mkdir -p "${MCLADE_WORKDIR}" "${MCLADE_WORKDIR}/log"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment