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

Python: Openning adios v1 file in read-only mode gives error #3574

Closed
liangwang0734 opened this issue Apr 1, 2023 · 7 comments
Closed

Python: Openning adios v1 file in read-only mode gives error #3574

liangwang0734 opened this issue Apr 1, 2023 · 7 comments

Comments

@liangwang0734
Copy link

liangwang0734 commented Apr 1, 2023

Why does the code try to modify some signatures?

# test.py

filename = "test.bp"

print("======================================= adios v1")
import adios
print(adios.__version__)
f1 = adios.File(filename)
print(f1.attrs.keys())

print("======================================= adios v2")
import adios2
print(adios2.__version__)
f2 = adios2.open(filename, "r")

Output:

$ python test.py 
======================================= adios v1
1.13.1
dict_keys(['inputfile'])
======================================= adios v2
2.8.3
Traceback (most recent call last):
  File "test.py", line 12, in <module>
    f2 = adios2.open(filename, "r")
ValueError: [Sat Apr  1 11:08:18 2023] [ADIOS2 EXCEPTION] <Core> <Attribute> <Modify> : Attribute /__adios__/create_time_epoch being modified is not modifiable

Link to the test.bp.

@eisenhauer
Copy link
Member

Hmm. I don't have adios1 installed, so I cut that part out of the python code and the adios2 part runs without error. Maybe this is some kind of odd interaction that comes from having both those versions loaded at the same time?

@liangwang0734
Copy link
Author

liangwang0734 commented Apr 2, 2023

Thank you, @eisenhauer

I created an empty conda env and installed adios2 only (along with the dependencies). I still get the error.

I do have other bp files that are OK to load.

$ python test.py 
======================================= adios v2
2.8.3
Traceback (most recent call last):
  File "test.py", line 12, in <module>
    f2 = adios2.open(filename, "r")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: [Sun Apr  2 11:57:42 2023] [ADIOS2 EXCEPTION] <Core> <Attribute> <Modify> : Attribute /__adios__/create_time_epoch being modified is not modifiable

$ conda list | grep adios
adios2                    2.8.3           nompi_py311hc31d2c9_105    conda-forge
libadios2                 2.8.3           nompi_h008eccf_105    conda-forge
$ python --version
Python 3.11.2

I'm using Pop!_OS 22.04 LTS, a variant of Ubuntu 22.04 LTS.

PS: I did try to use adios v1packages from conda, but got errors that asscalar is deprecated in numpy when I tried to read some scalar attributes. It was strange because I think that has been fixed in the Github repo. Anyway, that is a separate issue.

@eisenhauer
Copy link
Member

Well, current master sets the "modifiable" flag in attributes created created by the BP3 deserializer to true, but that change was made 8 months ago. The 2.8.3 release was cut 9 months ago. Might you be using the release directly? Wondering if this might have been inadvertently fixed...

@liangwang0734
Copy link
Author

Do you mean compiling ADIOS2 with Python support? I might try later.

Does the Conda version update with the GitHub HEAD? The Conda version I use (nompi_py311hc31d2c9_105) was released about three months ago.

@eisenhauer
Copy link
Member

I'm not completely sure about conda, but at a quick glance it looks like it might be only building the 2.8.3 release and not master. That would perhaps explain things...

@eisenhauer
Copy link
Member

Yeah, it looks like the recipe in conda-feedstock specifically pulls and builds the 2.8.3 release:
https://github.com/conda-forge/adios2-feedstock/blob/main/recipe/meta.yaml

@eisenhauer eisenhauer mentioned this issue Apr 3, 2023
11 tasks
@liangwang0734
Copy link
Author

@eisenhauer Thank you for following up. I did a quick test with the master and the error was gone. So, I'm closing this.

It would be great if the conda version gets updated soon.

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