Skip to content
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

alienv fails when launched simultaneously from several terminals #538

Open
Barthelemy opened this issue May 3, 2018 · 5 comments
Open

Comments

@Barthelemy
Copy link
Collaborator

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
@ktf
Copy link
Member

ktf commented May 3, 2018

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?

@Barthelemy
Copy link
Collaborator Author

@ktf even if I load first in a single terminal I get these errors.

@dberzano
Copy link
Contributor

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.

@Barthelemy
Copy link
Collaborator Author

ok thank you for assessing the situation.

@olantwin
Copy link

olantwin commented Nov 6, 2019

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants