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

Load LLVM for clang containers. #85

Open
mdavis36 opened this issue Mar 14, 2022 · 13 comments
Open

Load LLVM for clang containers. #85

mdavis36 opened this issue Mar 14, 2022 · 13 comments

Comments

@mdavis36
Copy link

When using clang compilers you need to load LLVM before running codes built with omp support. It would be nice if LLVM pre-loaded in the containers.

@vsoch
Copy link
Contributor

vsoch commented Mar 14, 2022

We could definitely try that! @trws @davidbeckingsale what would that look like w.r.t spack?

@davidbeckingsale
Copy link
Collaborator

I think we could do it in the base images making sure LD_LIBRARY_PATH is set up correctly to pick up what's added to the view, extending what's done here: https://github.com/rse-ops/docker-images/blob/main/ubuntu/22.04/Dockerfile#L11

@trws
Copy link
Collaborator

trws commented Mar 15, 2022

Yeah, I had intended that to work based on those changes, must be something missing.

@trws
Copy link
Collaborator

trws commented Mar 15, 2022

Rather these changes:

echo /opt/view/lib > /etc/ld.so.conf.d/spack_view.conf

What directory is missing from the library search? We should add something to the clang file that adds it to the load cache, that'll be more robust than the environment variable or loading would be.

@trws
Copy link
Collaborator

trws commented Mar 16, 2022

Found the bug, we were only getting lib64 in the search path instead of both lib and lib64, fix is coming shortly.

@mdavis36
Copy link
Author

@vsoch @trws This issue has popped up for us again, we are having to manually add /opt/view/lib to LD_LIBRARY_PATH for our clang image builds.

@trws
Copy link
Collaborator

trws commented Aug 16, 2022

In what image/context? The path should always be there now, it's still added to ld.so.conf and reconfigured, so something funny must be happening.

@vsoch
Copy link
Contributor

vsoch commented Aug 16, 2022

Could you link the image? it could be an old one - I was perusing this weekend and we still have some old images in the UI (and perhaps we should remove).

@mdavis36
Copy link
Author

We were seeing this using the below images as our base image:

ghcr.io/rse-ops/clang-ubuntu-20.04:llvm-11.0.0
ghcr.io/rse-ops/clang-ubuntu-22.04:llvm-13.0.0

I fixed it in this PR LLNL/RAJA#1301

@vsoch
Copy link
Contributor

vsoch commented Aug 16, 2022

@trws it looks like we do ldconfig in our base image, should we try adding it in the images referenced as a final command?

https://github.com/rse-ops/docker-images/blob/cd590b3e95b0489eef14fe14069f601497607323/scripts/set-up-spack.sh

@trws
Copy link
Collaborator

trws commented Aug 17, 2022

We could, but if ldconfig has run, it shouldn't need to be run again unless the new file is removed and ldconfig is run again. Not sure what would be causing a problem with it.

@vsoch
Copy link
Contributor

vsoch commented Aug 17, 2022

Could we just add to LD_LIBRARY_PATH too then?

@trws
Copy link
Collaborator

trws commented Aug 17, 2022 via email

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