You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add util/check_libirc.sh to check for libirc.so used in spack-stack environments (#1639)
This PR adds a utility util/check_libirc.so that checks shared libraries and executables in a spack-stack environment for links to libirc.so. The documentation adds more details on why this is needed and when/how to use it, and I added the tool to the existing GitHub actions tests. The purpose of this utility is to catch issues with spack-stack environments only.
I also created a wiki page that will provide details on how to avoid linking to libirc.so in downstream applications: https://github.com/JCSDA/spack-stack/wiki/Intel-oneAPI-compilers-and-libirc.so
The newly added check found libirc.so in several met binaries. I fixed that and improved the existing fix for parallel-netcdf in JCSDA/spack#543.
Copy file name to clipboardExpand all lines: doc/source/Utilities.rst
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,22 +24,36 @@ In any case, the identification of any duplicates will yield a return code of 1.
24
24
check_permissions.sh
25
25
------------------------------
26
26
27
-
The utility located at util/check_permissions.sh can be run inside any spack-stack environment directory intended for multiple users (i.e., on an HPC or cloud platform). It will return errors if the environment directory is inaccessible to non-owning users and groups (i.e., if o+rx not set), as well as if any directories or files have permissions that make them inaccessible to other users.
27
+
The utility located at ``util/check_permissions.sh`` can be run inside any spack-stack environment directory intended for multiple users (i.e., on an HPC or cloud platform). It will return errors if the environment directory is inaccessible to non-owning users and groups (i.e., if o+rx not set), as well as if any directories or files have permissions that make them inaccessible to other users.
28
28
29
29
.. _LDD_Checker:
30
30
31
31
------------------------------
32
32
ldd_check.py (Linux only)
33
33
------------------------------
34
34
35
-
The util/ldd_check.py utility should be run for new installations to ensure that no shared library or executable that uses shared libraries is missing a shared library dependency. If the script returns a warning for a given file, this may indicate that Spack's RPATH substitution has not been properly applied. In some instances, missing library dependencies may not indicate a problem, such as a library that is intended to be found through $LD_LIBRARY_PATH after, say, a compiler or MPI environment module is loaded. Though these paths should probably also be RPATH-ified, such instances of harmless missing dependencies may be ignored with ldd_check.py's ``--ignore`` option by specifying a Python regular expression to be excluded from consideration (see example below), or can be permanently whitelisted by modifying the ``whitelist`` variable at the top of the ldd_check.py script itself (in which case please submit a PR). The script searches the 'install/' subdirectory of a given path and runs ``ldd`` on all shared objects. The base path to be search can be specified as a lone positional argument, and by default is the current directory. In practice, this should be ``$SPACK_ENV`` for the environment in question. This utility is available for Linux only.
35
+
The ``util/ldd_check.py`` utility should be run for new installations to ensure that no shared library or executable that uses shared libraries is missing a shared library dependency. If the script returns a warning for a given file, this may indicate that Spack's RPATH substitution has not been properly applied. In some instances, missing library dependencies may not indicate a problem, such as a library that is intended to be found through $LD_LIBRARY_PATH after, say, a compiler or MPI environment module is loaded. Though these paths should probably also be RPATH-ified, such instances of harmless missing dependencies may be ignored with ldd_check.py's ``--ignore`` option by specifying a Python regular expression to be excluded from consideration (see example below), or can be permanently whitelisted by modifying the ``whitelist`` variable at the top of the ldd_check.py script itself (in which case please submit a PR). The script searches the 'install/' subdirectory of a given path and runs ``ldd`` on all shared objects. The base path to be search can be specified as a lone positional argument, and by default is the current directory. In practice, this should be ``$SPACK_ENV`` for the environment in question. This utility is available for Linux only.
36
36
37
37
.. code-block:: console
38
38
39
-
cd $SPACK_ENV && ../../util/ldd_check.py
39
+
cd ${SPACK_ENV} && ../../util/ldd_check.py
40
40
# - OR -
41
41
util/ldd_check.py $SPACK_ENV --ignore '^libfoo.+' # check for missing shared dependencies, but ignore missing libfoo*
42
42
43
+
.. _Libirc_Checker:
44
+
45
+
------------------------------
46
+
check_libirc.sh (Linux only)
47
+
------------------------------
48
+
49
+
The ``util/check_libirc.sh`` utility should be run for new installations with Intel oneAPI (``icx``, ``icpx``, ``ifort`` or ``ifx``). In an active environment after a successful ``spack install``, execute the following command to check if any of the shared libraries or executables is linked to ``libirc.so``. See https://github.com/JCSDA/spack-stack/issues/1436 for some background context and why we want need to avoid ``libirc.so``. If ``libirc.so`` is linked to a shared library or executable in a spack-stack environment, please create an issue in the spack-stack GitHub repository (https://github.com/JCSDA/spack-stack/issues). For downstream applications, see the spack-stack wiki (https://github.com/JCSDA/spack-stack/wiki/Intel-oneAPI-compilers-and-libirc.so).
0 commit comments