Skip to content

Commit

Permalink
Resolve issues with kill
Browse files Browse the repository at this point in the history
  • Loading branch information
loganharbour committed Nov 18, 2024
1 parent 9292153 commit 3c842e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/TestHarness/schedulers/RunHPC.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,8 @@ def killHPCJobs(self, functor):

def killRemaining(self, keyboard=False):
"""Kills all currently running HPC jobs"""
functor = lambda hpc_job: hpc_job.state not in [hpc_job.State.killed, hpc_job.State.done]
running_states = [HPCJob.State.killed, HPCJob.State.done]
functor = lambda hpc_job: hpc_job is not None and hpc_job.state not in running_states
killed_jobs = self.killHPCJobs(functor)
if keyboard and killed_jobs:
print(f'\nAttempted to kill remaining {killed_jobs} HPC jobs...')
Expand Down Expand Up @@ -996,7 +997,7 @@ def setupRunEnvironment(self, harness):

# --hpc-pre-source contents
if self.options.hpc_pre_source:
submission_env['PRE_SOURCE_FILE'] = options.hpc_pre_source
submission_env['PRE_SOURCE_FILE'] = self.options.hpc_pre_source
submission_env['PRE_SOURCE_CONTENTS'] = self.source_contents

# If running on INL HPC, minimize the bindpath; this is a configuration
Expand Down

0 comments on commit 3c842e5

Please sign in to comment.