Skip to content

Commit

Permalink
Merge pull request #337 from amnp95/master
Browse files Browse the repository at this point in the history
small modifications to M9 and shakermaker
  • Loading branch information
fmckenna authored Oct 2, 2024
2 parents 75c1bd0 + 518e974 commit b4aac0a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/createEVENT/M9/M9App2.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def Submit_tapis_job(username, password):
status =t.jobs.getJobStatus(jobUuid=mjobUuid).status
previous = status
while True:
if status in ["FINISHED","FAILED","STOPPED"]:
if status in ["FINISHED","FAILED","STOPPED","STAGING_INPUTS"]:
break
status = t.jobs.getJobStatus(jobUuid=mjobUuid).status
if status == previous:
Expand Down
2 changes: 1 addition & 1 deletion modules/createEVENT/M9/M9Run.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
information['number_of_realizations'] = int(args.number)
if args.gridType:
information['grid_type'] = args.gridType
if args.API == 'true':
if args.API in ['true', 1, 'True', 'TRUE']:
information['APIFLAG'] = True


Expand Down
17 changes: 15 additions & 2 deletions modules/tools/ShakerMaker/ShakerMakersubmitjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
parser.add_argument('--tapisfolder', type=str, help='folder to upload the files to')
parser.add_argument('--username', type=str, help='username for DesignSafe')
parser.add_argument('--password', type=str, help='password for DesignSafe')
parser.add_argument('--allocation', type=str, help='allocation for DesignSafe')


args = parser.parse_args()
Expand All @@ -39,6 +40,7 @@


systemcodepath = args.tapisfolder
allocation = f"-A {args.allocation}"
faultinfo = metadata['faultdata']
faultfiles = faultinfo['Faultfilenames']

Expand Down Expand Up @@ -155,7 +157,7 @@
'archiveOnAppError': False,
'fileInputArrays': [{'sourceUrls': urls, 'targetDir': '*'}],
'parameterSet': {
'schedulerOptions': [{'arg': '-A DesignSafe-SimCenter'}],
'schedulerOptions': [{'arg': allocation}],
'envVariables': [
{'key': 'inputFile', 'value': 'ShakerMakermodel.py'},
{'key': 'numProcessors', 'value': totalcores},
Expand All @@ -178,9 +180,10 @@
'FINISHED',
'FAILED',
'CANCELLED',
'CANCELLED',
'STAGING_INPUTS',
'QUEUED',
'RUNNING',
'BLOCKED',
]:
job_info = t.jobs.getJob(jobUuid=uuid)
if job_info.status != previous_status:
Expand All @@ -200,9 +203,19 @@
print('This can take several days according to the queue') # noqa: T201
print('please wait for the job to finish') # noqa: T201
print('you can check the job status through the designsafe portal') # noqa: T201
if job_info.status == 'STAGING_INPUTS':
print('Job is staging inputs')
print('This can take several hours')
print('please wait for the job to finish')
print('you can check the job status through the designsafe portal')
if job_info.status == 'RUNNING':
print('Job is running') # noqa: T201
print('This can take several hours') # noqa: T201
print('please wait for the job to finish') # noqa: T201
print('you can check the job status through the designsafe portal') # noqa: T201
if job_info.status == 'BLOCKED':
print('Job is blocked for now')
print('Please wait for the job to be staged')
print('This can take several hours')
print('you can check the job status through the designsafe portal')
# %%

0 comments on commit b4aac0a

Please sign in to comment.