Open mr-j-s opened 4 years ago
Hi
The default length of np.int on a 64-bit machine is 8 bytes, which is the same as that of np.int64. And I think it is large enough to hold the recl.
Did you use the code on a 32-bit machine?
Hi
The default length of np.int on a 64-bit machine is 8 bytes, which is the same as that of np.int64. And I think it is large enough to hold the recl.
Did you use the code on a 32-bit machine?
64bit machine (checked with systeminfo).
Hmmm... It is strange that your numpy outputs and mine show a difference.
Anyway, I think it is wise to specifically assign np.int64 to recl in the code, which I have added to the code.
Thank you!
Method readWFHeader in vaspwfc.py uses this code (currently lines 157-160):
It seems that for large WAVECARs dtype=int is not enough. I was getting overflow errors (don't remember all the details, I can try to reproduce the behaviour if needed). Changing from
dtype=int
todtype=np.int64
fixed the issue.