Skip to content

Commit

Permalink
README: Make sure to use module purge
Browse files Browse the repository at this point in the history
To avoid `sh_to_modulefile` to pick up current `LD_LIBRARY_PATH`, make sure to use `module purge` first.
  • Loading branch information
HenrikBengtsson committed Dec 17, 2021
1 parent 31a6781 commit dfa169d
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions CBI/scl-devtoolset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,13 @@ export PKG_CONFIG_PATH=/opt/rh/devtoolset-9/root/usr/lib64/pkgconfig${PKG_CONFIG
This script can be transpiled to Lmod commands as:

```lua
$ "${LMOD_DIR}/sh_to_modulefile" /opt/rh/devtoolset-9/enable
prepend_path("INFOPATH","/opt/rh/devtoolset-9/root/usr/share/info")
prepend_path("LD_LIBRARY_PATH","/opt/rh/devtoolset-9/root/usr/lib/dyninst")
prepend_path("LD_LIBRARY_PATH","/opt/rh/devtoolset-9/root/usr/lib64/dyninst")
prepend_path("LD_LIBRARY_PATH","/opt/rh/devtoolset-9/root/usr/lib")
prepend_path("LD_LIBRARY_PATH","/opt/rh/devtoolset-9/root/usr/lib64")
append_path("LD_LIBRARY_PATH","/usr/lib64/openmpi/lib")
append_path("LD_LIBRARY_PATH","/opt/rh/devtoolset-8/root/usr/lib")
$ (module purge; "${LMOD_DIR}/sh_to_modulefile" /opt/rh/devtoolset-9/enable)
setenv("INFOPATH","/opt/rh/devtoolset-9/root/usr/share/info")
setenv("LD_LIBRARY_PATH","/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib:/opt/rh/devtoolset-9/root/usr/lib64/dyninst:/opt/rh/devtoolset-9/root/usr/lib/dyninst:/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib")
prepend_path("MANPATH","/opt/rh/devtoolset-9/root/usr/share/man")
prepend_path("PATH","/opt/rh/devtoolset-9/root/usr/bin")
setenv("PCP_DIR","/opt/rh/devtoolset-9/root")
prepend_path("PKG_CONFIG_PATH","/opt/rh/devtoolset-9/root/usr/lib64/pkgconfig")
setenv("PKG_CONFIG_PATH","/opt/rh/devtoolset-9/root/usr/lib64/pkgconfig")
```

With these commands, we can create an module environment file. See [CBI/scl-devtoolset/9.lua](9.lua) for an example.
Expand Down

0 comments on commit dfa169d

Please sign in to comment.