And your aforementioned solution didn't work on the new version.
Please find below the error.
+
Traceback (most recent call last):
File "hdf5.py", line 10, in <module>
nlsave(new_file, data)
File "zipdir/NL/IO/NLSaveUtilities.py", line 474, in nlsave
File "zipdir/NL/IO/HDF5.py", line 850, in writeHDF5Group
File "zipdir/NL/IO/HDF5.py", line 932, in writeHDF5Group
File "zipdir/NL/IO/HDF5.py", line 976, in writeHDF5Dict
File "zipdir/NL/IO/HDF5.py", line 865, in writeHDF5Group
File "zipdir/NL/Study/Study.py", line 163, in _toHDF5Group
NL.ComputerScienceUtilities.Exceptions.NLIOError: Study objects cannot be saved manually; continuous saving on disk is managed by the object directly.
Dear Anders,
For your information, I have obtained the version of 2022.12 and this bug still exists. If there is anything you need to check the bug or fix it, please do not hesitate to contact me. Thank you.
Best regards,
Well, that *should* not be needed, but I guess due to this bug, then currently yes. Or, you could just not store them at all (NoStorage), which of course lowers performance.
Could you get access to a new version and try that? We don't fix bugs in old versions anyway, and maybe it actually has been fixed; I was able to save a DeviceConfiguration in the latest version with a StoreOnDisk that used a non-existent directory, and read it back, although it was not a converged calculation.
As a workaround, which I think will work, my first suggestion is to re-save the quantities you want to analyze in the GUI into a separate new HDF5 file, except for the geometry. You could always easily add that, using your original script. You are anyway not going to perform any post-processing calculations on the laptop! (Btw, if the laptop also is Linux, you could also simply create the directory /var/tmp/pbs.6846470.pbs - the error is because that directory doesn't exist, but NanoLab is not trying to read any data from it.)
So, if your laptop is Windows, then try this on the HPC machine:
from NL.IO.NLSaveUtilities import nlinspect
current_file = "current.hdf5"
new_file = "new.hdf5"
file_contents = nlinspect(current_file)
for x in file_contents:
if x.cls == DeviceConfiguration:
pass
else:
data = nlread(current_file, object_id=x.object_id)[0]
nlsave(new_file, data)
The new file should be possible to open on the laptop, I hope! You could also (still on the HPC machine) make a copy of your original script, and before the calculator is attached, add
nlsave("new.hdf5", device_configuration)
and then stop execution of the script when it starts the calculation (or insert a bogus statement like "ffffff" right after this nlsave line). That way, the new.hdf5 file will have the geometry in it, albeit with a different fingerprint than the analysis data. We could fix that with a few more lines of code, if needed; let me know if you have problems in the further analysis.