alibuild
alibuild copied to clipboard
alienv fails when launched simultaneously from several terminals
In Terminator I can send commands to all terminals at once. If I do "alienv load QualityControl/latest" it will succeed in one but fail in the others with errors such as :
cp: cannot create regular file ‘/afs/cern.ch/user/b/bvonhall/dev/alice/sw/MODULES/slc7_x86-64/Vc/1.3.2_O2_DAQ-1’: No such file or directory
cp: cannot create regular file ‘/afs/cern.ch/user/b/bvonhall/dev/alice/sw/MODULES/slc7_x86-64/Vc/1.3.2_O2_DAQ-1’: File exists
I think this is due to the fact that we need to copy modulefiles in a specific place in order to be picked up by module
. If you do that in parallel, it's probably exposing a race condition. @dberzano what do you think? A possible solution could be to do a first alienv load
in a single terminal, and then redo all the others in parallel. Can you check if that works?
@ktf even if I load first in a single terminal I get these errors.
So in the release validation we actually work it around by using lockfiles. One can use --no-refresh
to avoid this, but the problem is that you are not sure you're getting the latest modulefiles. IMHO this should be fixed upstream by us.
ok thank you for assessing the situation.
We've also recently discovered this issue when using alienv with the CERN HTCondor batch system and the sw directory on a shared file-system.
Until the underlying problem can be fixed, a workaround that works well for us is to evaluate the environment once (e.g. alienv printenv [Package] >> config.sh
) and then source this in all processes which need the environment.
I would be happy to help fix the underlying issue, but it might take a while to familiarise myself with the internals of alienv...