Commit 95b7c2e5 authored by fwinkler's avatar fwinkler

Fixed bug for walltime.

We converted walltime from minutes to seconds.
parent f77289cb
......@@ -61,11 +61,6 @@ if [ ${PIKA_HOSTNAME} = ${MASTER_NODE} ]; then
PIKA_JOB_NAME="${PIKA_JOB_NAME:0:252}..."
fi
# convert walltime from minutes to seconds
if [[ ! -z "${PIKA_JOB_WALLTIME}" ]]; then
PIKA_JOB_WALLTIME=$((PIKA_JOB_WALLTIME * 60))
fi
# save all nodes for exclusive jobs (node number > 1) in cpu list in order to search jobs by a specific node
if [ $PIKA_JOB_EXCLUSIVE -eq 1 ] && [ $JOB_NUM_NODES -gt 1 ]; then
PIKA_JOB_CPUS_ALLOCATED=`echo ${PIKA_JOB_NODELIST} | nodeset -e`
......
......@@ -146,8 +146,15 @@ def save_job_env(env_file, slurm_env, connection, debug_file):
#determine job user
if not job_user:
job_user = pwd.getpwuid(slurm_env['user_id']).pw_name
try:
walltime = slurm_env['time_limit']
except:
walltime = 0
#convert walltime from minutes to seconds
walltime *= 60
walltime = slurm_env['time_limit']
walltime_formatted = slurm_env['time_limit_str']
job_array_id = slurm_env['array_job_id']
......
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