Commit 0a4a9668 authored by John Tourtellott's avatar John Tourtellott

Merge branch 'slac-cw18-updates' into 'master'

ACE3P bug fixes

See merge request cmb/simulation-workflows!62
parents ef9619ad ad435d3c
......@@ -99,7 +99,7 @@ def ExportCMB(operator_spec, log):
scope = ExportScope()
scope.logger = log
scope.export_atts = operator_spec
scope.export_att = operator_spec
scope.sim_atts = smtk.attribute.Resource.CastTo(operator_spec.find('attributes').value())
if scope.sim_atts is None:
msg = 'ERROR - No simlation attributes'
......@@ -185,6 +185,9 @@ def ExportCMB(operator_spec, log):
# Loop over all solvers and write corresponding files
for solver in scope.solver_list:
if solver == 'acdtool':
completed = True
break
# Hack/workaround for typo in export template
if solver == 'temp3p-thermal-nonlinear':
solver = 'tem3p-thermal-nonlinear'
......
......@@ -68,6 +68,8 @@
<Value Enum="Acdtool">acdtool</Value>
<Items>
<Item>AcdtoolTask</Item>
<Item>OutputFolder</Item>
<Item>OutputFilePrefix</Item>
</Items>
</Structure>
<Structure>
......
......@@ -18,6 +18,7 @@ import time
import uuid
import requests
import girder_client
from girder_client import GirderClient, HttpError
class CumulusClient():
......@@ -67,8 +68,13 @@ class CumulusClient():
#print 'user', user
user_id = user['_id']
r = self._client.listFolder(user_id, 'user', name='Private')
#self._private_folder_id = r.next()['_id']
self._private_folder_id = r[0]['_id']
# Getting mixed signals on what listFolder returns
# I *think* it is a generator
try:
self._private_folder_id = r.next()['_id']
except Exception as ex:
# But just in case
self._private_folder_id = r[0]['_id']
print 'private_folder_id', self._private_folder_id
# ---------------------------------------------------------------------
......
......@@ -21,13 +21,11 @@ import time
import traceback
import shutil
from girder_client import HttpError
import girder_client
print 'girder_client', girder_client.__version__
import requests
import smtk
if 'pybind11' == smtk.wrappingProtocol():
#print 'Using pybind11 bindings'
import smtk.attribute
import smtk.attribute
import cumulusclient
reload(cumulusclient) # for dev
......@@ -92,7 +90,7 @@ def submit_ace3p(scope, sim_item):
# Submit job
submit_job(scope, sim_item)
print 'Submitted %s job, id %s' % (solver, scope.cumulus.job_id())
except HttpError as err:
except girder_client.HttpError as err:
print 'ERROR', err.responseText
raise
except Exception as ex:
......@@ -305,9 +303,7 @@ def get_acdtool_args(scope):
Returns a string with the formatted arguments
'''
# Need the Analysis attribute item
att_list = scope.export_atts.findAttributes('ExportSpec')
export_spec_att = att_list[0]
solver_item = export_spec_att.findString('Analysis')
solver_item = scope.export_att.findString('Analysis')
task_item = solver_item.findChild('AcdtoolTask', smtk.attribute.ACTIVE_CHILDREN)
task = task_item.value(0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment