RoryAtBar / Abaqus_bayesian_matflow

A bayesian inference workflow using matflow
0 stars 0 forks source link

Make workflow task to create abaqus input file #6

Closed gcapes closed 5 months ago

gcapes commented 6 months ago

I've sent the error and workflow to Adam - waiting to hear back.

$ matflow-dev go workflow.yaml 
Traceback (most recent call last):
  File "matflow/cli.py", line 4, in <module>
  File "click/core.py", line 1157, in call
  File "click/core.py", line 1078, in main
  File "click/core.py", line 1688, in invoke
  File "click/core.py", line 1434, in invoke
  File "click/core.py", line 783, in invoke
  File "hpcflow/sdk/cli.py", line 139, in make_and_submit_workflow
  File "hpcflow/sdk/app.py", line 236, in <lambda>
  File "hpcflow/sdk/app.py", line 1274, in _make_and_submit_workflow
  File "hpcflow/sdk/app.py", line 236, in <lambda>
  File "hpcflow/sdk/app.py", line 1178, in _make_workflow
  File "hpcflow/sdk/core/workflow.py", line 763, in from_file
  File "hpcflow/sdk/core/workflow.py", line 294, in from_file
  File "hpcflow/sdk/core/workflow.py", line 244, in from_YAML_file
  File "hpcflow/sdk/core/workflow.py", line 201, in _from_data
  File "hpcflow/sdk/core/json_like.py", line 352, in from_json_like
  File "hpcflow/sdk/core/json_like.py", line 311, in _from_json_like_item
  File "hpcflow/sdk/core/json_like.py", line 352, in from_json_like
  File "hpcflow/sdk/core/json_like.py", line 311, in _from_json_like_item
  File "hpcflow/sdk/core/json_like.py", line 352, in from_json_like
  File "hpcflow/sdk/core/json_like.py", line 311, in _from_json_like_item
  File "hpcflow/sdk/core/parameters.py", line 1280, in from_json_like
KeyError: 'parameter'
[11553] Failed to execute script 'cli' due to unhandled exception!
gcapes commented 5 months ago

Some errors fixed in 7249799, but I got a python syntax error. Now I'm using a newer version locally to debug faster, and I'm running into more 'new version' errors, some of which are now fixed, but I've not been able to copy the friction_conductance.inp file to the execute directory. Have asked Adam how command_files are supposed to work and what I'm doing wrong.

gcapes commented 5 months ago

This workflow is now working fine locally, but I'm having trouble getting the latest matflow installed and working correctly in my user space.

I get this, which I've sent to Adam for help

$ matflow go workflow.yaml 
ERROR matflow.persistence: batch update exception!
Traceback (most recent call last):
  File "/net/scratch2/mbexegc2/matflow-venv/bin/matflow", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/hpcflow/sdk/cli.py", line 156, in make_and_submit_workflow
    out = app.make_and_submit_workflow(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/hpcflow/sdk/app.py", line 280, in <lambda>
    return lambda *args, **kwargs: func(*args, **kwargs)
                                   ^^^^^^^^^^^^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/hpcflow/sdk/app.py", line 1403, in _make_and_submit_workflow
    submitted_js = wk.submit(
                   ^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/hpcflow/sdk/core/workflow.py", line 2209, in submit
    exceptions, submitted_js = self._submit(
                               ^^^^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/hpcflow/sdk/log.py", line 25, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/hpcflow/sdk/core/workflow.py", line 2131, in _submit
    self._store._pending.commit_all()
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/hpcflow/sdk/log.py", line 25, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/hpcflow/sdk/persistence/pending.py", line 133, in commit_all
    getattr(self, meth)()
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/hpcflow/sdk/log.py", line 25, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/hpcflow/sdk/persistence/pending.py", line 304, in commit_EAR_submission_indices
    self.store._update_EAR_submission_indices(self.set_EAR_submission_indices)
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/hpcflow/sdk/log.py", line 25, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/hpcflow/sdk/persistence/zarr.py", line 615, in _update_EAR_submission_indices
    arr[EAR_ID_i] = new_EAR_i.encode(attrs, self.ts_fmt)
    ~~~^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/zarr/core.py", line 1452, in __setitem__
    self.set_basic_selection(pure_selection, value, fields=fields)
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/zarr/core.py", line 1548, in set_basic_selection
    return self._set_basic_selection_nd(selection, value, fields=fields)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/zarr/core.py", line 1938, in _set_basic_selection_nd
    self._set_selection(indexer, value, fields=fields)
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/zarr/core.py", line 2011, in _set_selection
    self._chunk_setitems(lchunk_coords, lchunk_selection, chunk_values, fields=fields)
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/zarr/core.py", line 2202, in _chunk_setitems
    cdatas = {
             ^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/zarr/core.py", line 2203, in <dictcomp>
    key: self._process_for_setitem(key, sel, val, fields=fields)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/net/scratch2/mbexegc2/matflow-venv/lib/python3.11/site-packages/zarr/core.py", line 2285, in _process_for_setitem
    chunk = value.astype(self._dtype, order=self._order, copy=False)
            ^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'astype'