Skip to content

Commit d1f7aed

Browse files
committed
services - add note about pterm command handling, track all SLURM + PRTE environment variables
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
1 parent 91ba45d commit d1f7aed

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

‎ipsframework/services.py‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3400,14 +3400,8 @@ def setup(self, worker: Worker):
34003400
working_dir=os.getcwd(),
34013401
environment={
34023402
key: os.environ[key]
3403-
for key in (
3404-
'SLURM_JOB_ID',
3405-
'SLURM_JOB_NODELIST',
3406-
'SLURM_JOB_NUM_NODES',
3407-
'PRTE_MCA_ras_slurm_use_entire_allocation',
3408-
'PRTE_MCA_rmaps_default_mapping_policy',
3409-
)
3410-
if key in os.environ
3403+
for key in os.environ
3404+
if key.startswith('SLURM_') or key.startswith('PRTE_')
34113405
},
34123406
)
34133407
try:
@@ -3456,6 +3450,7 @@ def teardown(self, worker: Worker):
34563450
diagnostics.record('shutdown_command', command=command)
34573451
with (diagnostics.directory / 'shutdown.log').open('a') as output:
34583452
try:
3453+
# TODO - if we want to handle pterm failures differently from successes, explicitly use check=True
34593454
result = subprocess.run(
34603455
command,
34613456
stdout=output,

0 commit comments

Comments
 (0)