molmod / yaff

Yaff is yet another force-field code
http://molmod.github.io/yaff
GNU General Public License v3.0
31 stars 18 forks source link

yaff 1.6.0 tests fail #72

Open robert-mijakovic opened 3 years ago

robert-mijakovic commented 3 years ago

I'm trying to build yaff 1.6.0 using Python 3.8.6, GCC 10.2.0, h5py 3.1.0. I believe the error has to do something with my system but wanted to confirm with you and hear your opinion on what might have gone wrong.

I have many tests failing with:

======================================================================
ERROR: yaff.analysis.test.test_basic.test_plot_energies_nve
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/apps/USE/easybuild/staging/2021.1/software/Python/3.8.6-GCCcore-10.2.0/lib/python3.8/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/test/test_basic.py", line 35, in test_plot_energies_nve
    with run_nve_water32(__name__, 'test_plot_energies_nve') as (dn_tmp, nve, f):
  File "/home/apps/USE/easybuild/staging/2021.1/software/Python/3.8.6-GCCcore-10.2.0/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/test/common.py", line 43, in run_nve_water32
    with h5.File('%s/output.h5' % dn_tmp) as f:
  File "/home/apps/USE/easybuild/staging/2021.1/software/h5py/3.1.0-foss-2020b/lib/python3.8/site-packages/h5py/_hl/files.py", line 424, in __init__
    fid = make_fid(name, mode, userblock_size,
  File "/home/apps/USE/easybuild/staging/2021.1/software/h5py/3.1.0-foss-2020b/lib/python3.8/site-packages/h5py/_hl/files.py", line 190, in make_fid
    fid = h5f.open(name, flags, fapl=fapl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5f.pyx", line 96, in h5py.h5f.open
OSError: Unable to open file (unable to open file: name = '/dev/shm/build/eb-8sh04g0l/test_plot_energies_nveujdetjpqyaff.analysis.test.test_basic/output.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

and the final error:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Standard error
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
analysis.py:79: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  a, b = np.linalg.lstsq(dm, ev)[0]
analysis.py:97: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  a, b, c = np.linalg.lstsq(dm, ev)[0]
/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/blav.py:93: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  error, b = np.linalg.lstsq(dm, ev)[0]
Traceback (most recent call last):
  File "analysis.py", line 68, in <module>
    spectrum = Spectrum(f, start=nskip, path='trajectory/press', bsize=len(press)-nskip)
  File "/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/spectrum.py", line 126, in __init__
    AnalysisHook.__init__(self, f, start, end, None, step, analysis_inputs, outpath, True)
  File "/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/hook.py", line 104, in __init__
    self.compute_offline()
  File "/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/hook.py", line 138, in compute_offline
    self.init_first()
  File "/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/spectrum.py", line 179, in init_first
    AnalysisHook.init_first(self)
  File "/dev/shm/build/yaff/1.6.0/foss-2020b/yaff-1.6.0/yaff/analysis/hook.py", line 150, in init_first
    self.outg = self.f.create_group(self.outpath)
  File "/home/apps/USE/easybuild/staging/2021.1/software/h5py/3.1.0-foss-2020b/lib/python3.8/site-packages/h5py/_hl/group.py", line 65, in create_group
    gid = h5g.create(self.id, name, lcpl=lcpl, gcpl=gcpl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5g.pyx", line 162, in h5py.h5g.create
ValueError: Unable to create group (no write intent on file)
Traceback (most recent call last):
  File "runall.py", line 32, in <module>
    subprocess.check_call(["python", "analysis.py", "300", "310", "10"], cwd='nvt')
  File "/home/apps/USE/easybuild/staging/2021.1/software/Python/3.8.6-GCCcore-10.2.0/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python', 'analysis.py', '300', '310', '10']' returned non-zero exit status 1.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tovrstra commented 3 years ago

Good that you mention the h5py version. This is due to a change in the default behavior of h5py, as of version 3, which we did not address yet.

rarensu commented 3 years ago

I am also interested in an update to yaff for compatibility with h5py 3+

maxim-masterov commented 2 years ago

I'm also interested. Any estimates when yaff will become compatible with h5py-v3+?