Skip to content

Commit

Permalink
added command line arguments for output.
Browse files Browse the repository at this point in the history
  • Loading branch information
ledm committed Nov 27, 2023
2 parents 1825a3b + 431b54d commit 489475b
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions bgcval2/batch_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ def submits_lotus(compare_yml, config_user, dry_run=False):
suites = suites.split(' ')

# prepare the command
command_txt = ['sbatch', '-J', job, 'lotus_timeseries.sh', job]
command_txt = ['sbatch',
'-J', job,
''.join(['--error=logs/', job,'.err']),
''.join(['--output=logs/', job,'.out']),
'lotus_timeseries.sh', job]
for suite in suites:
command_txt.append(suite)

Expand All @@ -112,9 +116,13 @@ def submits_lotus(compare_yml, config_user, dry_run=False):
else:
# Submit job:
print('Submitting:', ' '.join(command_txt))
command1 = subprocess.Popen(command_txt)


#command1 = subprocess.Popen(command_txt)
command1 = subprocess.Popen(
command_txt,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
)


def main():

Expand Down

0 comments on commit 489475b

Please sign in to comment.