-
Notifications
You must be signed in to change notification settings - Fork 94
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
Nosetests fail kpoint test #27
Comments
Dear All, I also got some issues during the tests ( _warning_: UserWarning: Kpoint weights should sum up to one while sum_weights is 14.000 _warning_: .abinit/abipy/abipyrc does not exist! _failure_: FAIL: Test the reading of Kpoints from netcdf files (si_scf_GSR.nc) I wonder about the severity of this problems, i.e. whether I can use safely abipy. With regards, ####################### OSX Dependencies (automatically) installed using: cat nosetests.log
|
A follow up: |
Hi Bruno,
Yes, the problem is that many ETSF-IO files produced by abinit contain I guess that the problematic part is in the test: # This trick is needed because in many cases we define the netcdf variable
# but we don't write its value.
return value if not isinstance(value, MaskedArray) else None could you add The best solution would be to change the code in Abinit so that the netcdf file |
Yep, it's normal. nodecounter.lock is an empty file used to prevent other processes
I will try to find another implementation of FileLock that is more portable |
Could you from lockfile import FileLock in order to redefine the class Let me know it this solves the timeout issue |
Thanks Matteo, I installed lockfile Then ran the test example Then I added Typing I am appending the two outputs I got, ####################### Error in atexit._run_exitfuncs: #######################
|
Remove def save_lastnode_id():
"""Save the id of the last node created."""
with open(_COUNTER_FILE, "w") as fh:
fh.write("%d" % _COUNTER) This change is OK if you are using abipy just for post-processing the results of the |
Hello Matteo,
I indeed get numpy.ndarrays, as you predicted. The numbers I get in the undefined variables are -2147483647 (int32) 9.96920997e+36 (float64) Could we use these numbers as a signal of an unset variable, or will this also not be portable? Cheers, Bruno On Mon, Apr 21, 2014 at 11:50 AM, gmatteo notifications@github.com wrote:
|
Thanks Matteo, |
It won't be portable. In the bug tracker of netcdf4 I found a post that may which version of netcdf4 do you have? import netCDF4
netCDF4.__version__ mine is 1.0.6 |
Hi, I have version 1.0.8... cheers, On Mon, Apr 21, 2014 at 4:10 PM, gmatteo notifications@github.com wrote:
|
Hello,
I find that nosetests fail to execute a kpoint test, as you can see below.
Cheers!
Analysis:
My limited understanding of ABIPY leads me to think that the error is due to the fact that the decorator @returns_None_onfail on the reading routines in class KpointsReaderMixin isn't catching undefined variables in the netcdf file.
ABIPY tries to determine if a file contains a PATH or an IRR. BZ, but assumes an IRR. BZ by default. All variables are defined in the netcdf file, but when a PATH is present, the variables monkhorst_pack_folding, kpoint_grid_shift and kpoint_grid_vectors are not set.
ABIPY fails to catch that these variables are not set, reads their values on disk, which I guess are a set of binary zeros (for signed int32, - 1/2 (2**32)+1 = -2147483647, a value that appears below). ABIPY then fails to realize it is dealing with a PATH, which crashes the nosetest!
Failure output:
====================================================================FAIL: Test the reading of Kpoints from netcdf files.
Traceback (most recent call last):
File ".../abipy/abipy/core/tests/test_kpoints.py", line 167, in test_reading
self.assertTrue(kpoints.is_path)
AssertionError: False is not true
-------------------- >> begin captured stdout << ---------------------
About to read file: .../abipy/abipy/data/runs/data_si_ebands/outdata/si_scf_GSR.nc
ksampling {'kptopt': None, 'shifts': array([ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36]), 'kptrlatt': array([[ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36],
[ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36],
[ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36]]), 'mpdivs': array([8, 8, 8], dtype=int32)}
About to read file: .../abipy/abipy/data/runs/data_si_ebands/outdata/si_nscf_GSR.nc
ksampling {'kptopt': None, 'shifts': array([ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36]), 'kptrlatt': array([[ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36],
[ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36],
[ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36]]), 'mpdivs': array([-2147483647, -2147483647, -2147483647], dtype=int32)}
The text was updated successfully, but these errors were encountered: