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 17, 2024
1 parent 2289e23 commit d6eb1b1
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 @@ -783,7 +783,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 @@ -990,7 +991,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

submission_env['SOURCE_FILE'] = options.hpc_pre_source
Expand Down

0 comments on commit d6eb1b1

Please sign in to comment.