Commit 65f703f9 authored by fwinkler's avatar fwinkler

Added partition name in redis script.

parent 82f7d648
...@@ -105,6 +105,7 @@ def save_job_env(env_file, slurm_env, connection, debug_file): ...@@ -105,6 +105,7 @@ def save_job_env(env_file, slurm_env, connection, debug_file):
job_name = "'n/a'" job_name = "'n/a'"
walltime = 0 walltime = 0
account = "'n/a'" account = "'n/a'"
partition = "'n/a'"
# get selected job information # get selected job information
...@@ -139,6 +140,9 @@ def save_job_env(env_file, slurm_env, connection, debug_file): ...@@ -139,6 +140,9 @@ def save_job_env(env_file, slurm_env, connection, debug_file):
#determine account #determine account
account = str(slurm_env['JOB_RECORD__ACCOUNT']) account = str(slurm_env['JOB_RECORD__ACCOUNT'])
#determine partition
partition = str(slurm_env['JOB_RECORD__PARTITION'])
if env_file: if env_file:
f = open(env_file,'w') f = open(env_file,'w')
...@@ -149,6 +153,7 @@ def save_job_env(env_file, slurm_env, connection, debug_file): ...@@ -149,6 +153,7 @@ def save_job_env(env_file, slurm_env, connection, debug_file):
print( "export PIKA_JOB_NAME='" + job_name + "'", file=f ) print( "export PIKA_JOB_NAME='" + job_name + "'", file=f )
print( "export PIKA_JOB_WALLTIME=" + str(walltime), file=f ) print( "export PIKA_JOB_WALLTIME=" + str(walltime), file=f )
print( "export PIKA_JOB_ACCOUNT=" + str(account), file=f ) print( "export PIKA_JOB_ACCOUNT=" + str(account), file=f )
print( "export PIKA_JOB_PARTITION=" + str(partition), file=f )
f.close() f.close()
if debug_file: if debug_file:
......
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