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

No energy_tot in the output of the sphinx job #535

Closed
max-hassani opened this issue Feb 13, 2022 · 10 comments
Closed

No energy_tot in the output of the sphinx job #535

max-hassani opened this issue Feb 13, 2022 · 10 comments
Labels
bug Something isn't working

Comments

@max-hassani
Copy link
Member

During the test of our latest docker images, the notebooks tests_sphinx_sphinx_check_all.ipynb fails with the following error:

if pr.inspect('spx_Fe_ferro')['output/generic/energy_tot'][0]-pr.inspect('spx_Fe_nonmag')['output/generic/energy_tot'][0]>0:
    raise ValueError('BCC Fe erromagnetic state has lower energy than nonmagnetic state')

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Input In [12], in <module>
----> 1 if pr.inspect('spx_Fe_ferro')['output/generic/energy_tot'][0]-pr.inspect('spx_Fe_nonmag')['output/generic/energy_tot'][0]>0:
      2     raise ValueError('BCC Fe erromagnetic state has lower energy than nonmagnetic state')

File /opt/conda/lib/python3.9/site-packages/pyiron_base/job/path.py:377, in JobPathBase.__getitem__(self, item)
    375     with open(file_name) as f:
    376         return f.readlines()
--> 377 return self.project_hdf5.__getitem__(item)

File /opt/conda/lib/python3.9/site-packages/pyiron_base/generic/hdfio.py:196, in FileHDFio.__getitem__(self, item)
    194 hdf_object = self.copy()
    195 hdf_object.h5_path = "/".join(item_abs_lst[:-1])
--> 196 return hdf_object[item_abs_lst[-1]]

File /opt/conda/lib/python3.9/site-packages/pyiron_base/generic/hdfio.py:166, in FileHDFio.__getitem__(self, item)
    164                 obj = self._convert_dtype_obj_array(obj)
    165             return obj
--> 166     raise ValueError(
    167         "Unknown item: {} {} {}".format(item, self.file_name, self.h5_path)
    168     )
    169 else:
    170     if (
    171         item_lst[0] == ""
    172     ):  # item starting with '/', thus we have an absoute HDF5 path

ValueError: Unknown item: energy_tot /home/pyiron/SPX_CHECK_ALL/spx_Fe_ferro.h5 /spx_Fe_ferro/output/generic

In the image, the latest pyiron packages are installed:

pyiron_atomistics         0.2.37             pyhd8ed1ab_0    conda-forge
pyiron_base               0.5.4              pyhd8ed1ab_1    conda-forge
sphinxdft                 3.0.3                h1bc63a5_4    conda-forge
@max-hassani max-hassani added the bug Something isn't working label Feb 13, 2022
@max-hassani
Copy link
Member Author

max-hassani commented Feb 13, 2022

@samwaseda, is this related to #533?

@samwaseda
Copy link
Member

Oh yes it totally is. I’ll fix it today

@niklassiemer
Copy link
Member

@samwaseda is this fixed?

@max-hassani
Copy link
Member Author

max-hassani commented Feb 24, 2022

@niklassiemer, @samwaseda, the problem still persists. The environment includes:

pyiron_atomistics         0.2.38
pyiron_base               0.5.6
sphinxdft                 3.0.3 

You can check the log of the test here

@max-hassani
Copy link
Member Author

I wonder how our notebook test in pyiron_atomistics does not capture this error? Don't we run the same notebooks?

@niklassiemer
Copy link
Member

That was the reason I asked for the notebooks used in pyiron in pyiron/pyiron#1397
If we use the same notebooks in different places we should think about fetching them in other places dynamically...

@samwaseda
Copy link
Member

At least on the GitHub version the problem has been fixed.

@jan-janssen
Copy link
Member

Somehow the tests still fail pyiron/pyiron#1397 and pyiron/docker-stacks#101

@samwaseda
Copy link
Member

You just have to replace inspect by load.

@jan-janssen
Copy link
Member

Thanks - it finally worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants