Skip to content
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

summarize function complains about missing variables in exodus class #541

Open
adigc opened this issue Nov 12, 2024 · 2 comments
Open

summarize function complains about missing variables in exodus class #541

adigc opened this issue Nov 12, 2024 · 2 comments

Comments

@adigc
Copy link

adigc commented Nov 12, 2024

Hello all

I am compiling and using version : v2024-11-07
and using the python wrappers to create an exodus file.

I have the following python script doing the same

#!/usr/bin/env python3
import sys
import exodus

ex_pars = exodus.ex_init_params(num_dim=2, num_nodes=9,num_elem=4, num_elem_blk=1, num_assembly=0)
file = exodus.exodus("newexodusfile.e", mode='w+', title=title, array_type='numpy', init_params=ex_pars)
file.summarize()
file.close()

The above script produces the follwing error :

You are using exodus.py v 1.21.3 (seacas-py3), a python wrapper of some of the exodus library.

Copyright (c) 2013-2023 National Technology &
Engineering Solutions of Sandia, LLC (NTESS).  Under the terms of
Contract DE-NA0003525 with NTESS, the U.S. Government retains certain
rights in this software.

Opening exodus file: newexodusfile.e
/home/user/seacas/2024-11-07/lib/exodus.py:1960: RuntimeWarning: A builtin ctypes object gave a PEP3118 format string that does not match its itemsize, so a best-guess will be made of the data type. Newer versions of python may behave correctly.
  ids = self.np.array(ids)
Traceback (most recent call last):
  File "/home/user/test_exo.py", line 20, in <module>
    file.summarize()
  File "/home/user/seacas/2024-11-07/lib/exodus.py", line 825, in summarize
    self.num_blob(), num_blob_vars))
  File "/home/user/seacas/2024-11-07/lib/exodus.py", line 2559, in num_blob
    return self.numBlob.value

I had a look at the exodus3.py and the member variable numBlob is never initialized.

NOTE: Explicitly initializing this variable in the constructor of installed exodus3.py solved the issue. But this should be solved in the repository aswell.

@gsjaardema
Copy link
Member

Thanks, I will take a look

@gsjaardema
Copy link
Member

This should be fixed. #543

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

No branches or pull requests

2 participants