Skip to content

Install latest matflow on CSF, and configure correctly #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gcapes opened this issue May 10, 2024 · 2 comments
Closed

Install latest matflow on CSF, and configure correctly #16

gcapes opened this issue May 10, 2024 · 2 comments
Assignees

Comments

@gcapes
Copy link
Contributor

gcapes commented May 10, 2024

After installation, I get this when submitting a job

$ 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'
@gcapes gcapes self-assigned this May 10, 2024
@gcapes
Copy link
Contributor Author

gcapes commented May 14, 2024

Latest matflow fixes this - it's a bug in the latest version of zarr.
zarr-developers/zarr-python#1874

However, I get an error on CSF3 that I don't get locally. I have separate python venvs for matflow and the actual workflow on CSF, whereas they're combined locally, however previously I've just used a matflow 'central' installation that's on my PATH so I don't think having matflow installed in your venv is a requirement.

$ cat js_0.sh.e4951658 
Traceback (most recent call last):
  File "/net/scratch2/mbexegc2/Abaqus_bayesian_matflow/temp/execute/task_0_generate_input_file/e_0/r_0/generate_input_file.py", line 74, in <module>
    import matflow as app
ModuleNotFoundError: No module named 'matflow'

@aplowman
Copy link

Currently, you do need matflow in the task environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants