mfherbst / AiidaDFTK.jl

Julia-side implementation of the Aiida plugin of DFTK
https://mfherbst.github.io/AiidaDFTK.jl/
MIT License
2 stars 2 forks source link

LocalPreferences.toml got reset #16

Open Technici4n opened 3 days ago

Technici4n commented 3 days ago

At some point my local preferences got reset from

[DFTK]
DFTK_threads = 1

[HDF5]
libhdf5 = "/usr/lib/x86_64-linux-gnu/hdf5/openmpi/libhdf5.so"
libhdf5_hl = "/usr/lib/x86_64-linux-gnu/hdf5/openmpi/libhdf5_hl.so"

[MPIPreferences]
__clear__ = ["preloads_env_switch"]
_format = "1.0"
abi = "OpenMPI"
binary = "system"
cclibs = []
libmpi = "libmpi"
mpiexec = "mpiexec"
preloads = []

to just

[DFTK]
DFTK_threads = 1

I am not sure what exactly happened. I might have killed a julia process that was precompiling something, but that might not be related. I suspect at least that AiidaDFTK modifies the local preferences during precompilation. (EDIT: This is indeed the case when precompiling with MPI. That is already a bad idea because it tends to deadlock, but it can happen.)

It's worth investigating.

mfherbst commented 2 days ago

The fact that you have DFTK_threads = 1 is weird. Should not happen unless you start Julia with more threads than you want to use in DFTK. Not sure this is such a good idea. In fact this could potentially trigger a rewrite of the properties file. Can you not do that (i.e. disable_threading without specifying DFTK threads explicitly and with using exactly one Julia thread) and see if the problem persists.

But yes we should investigate this and figure out what we can do.