Skip to content

Commit

Permalink
Merge pull request #141 from marbl/enable-MUMi-only
Browse files Browse the repository at this point in the history
Make time optional
  • Loading branch information
bkille authored Jan 16, 2024
2 parents 467f5f0 + fcb912d commit f80a15a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion parsnp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ def parallelPhiWrapper(params):

def run_logged_command(command, outputDir, label, **kwargs):
with open(f"{outputDir}/log/{label}.out", 'w') as stdout_f, open(f"{outputDir}/log/{label}.err", 'w') as stderr_f:
return run_command(command="time " + command, stdout=stdout_f, stderr=stderr_f, **kwargs)
if shutil.which("time") is not None:
command = "time " + command
return run_command(command=command, stdout=stdout_f, stderr=stderr_f, **kwargs)

def run_command(command, ignorerc=0, stdout=subprocess.PIPE, stderr=subprocess.PIPE):
global SIGINT
Expand Down

0 comments on commit f80a15a

Please sign in to comment.