Skip to content

Commit b162643

Browse files
committed
Adding specific libraries to inject
1 parent a4662b3 commit b162643

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

scripts/mpi_support/install_openmpi_host_injection.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ inject_mpi() {
115115

116116
local host_injection_mpi_path
117117

118+
# To avoid ldd warnings
119+
exec 3>&2
120+
exec 2>/dev/null
121+
118122
host_injection_mpi_path=${EESSI_SOFTWARE_PATH/versions/host_injections}
119123
host_injection_mpi_path+="/rpath_overrides/OpenMPI/system/lib"
120124

@@ -136,11 +140,18 @@ inject_mpi() {
136140
local temp_inject_path="${tmpdir}/mpi_inject"
137141
mkdir ${temp_inject_path}
138142

139-
# Get all library files from openmpi dir
140-
find ${MPI_PATH} -type f -name "*.so*" -exec cp {} ${temp_inject_path} \;
143+
# Array for MPI libs
144+
mpi_libs=("libmpi.so*" "libmpi_mpifh.so*" "libmpi_usempi_tkr.so*" \
145+
"libmpi_usempi_ignore_tkr.so*" "libmpi_usempif08.so*" \
146+
"libmpi_cxx.so*" "libmpi_java.so*" "liboshmem.so*" \
147+
"libmca*.so*" "mca_*.so*")
141148

149+
# Get all library files from MPI array
150+
for lib in "${mpi_libs[@]}"; do
151+
find ${MPI_PATH} -type f -name "$lib" -exec cp {} ${temp_inject_path} \;
142152
# Copy library links to host injection path
143-
find ${MPI_PATH} -type l -name "*.so*" -exec cp -P {} ${host_injection_mpi_path} \;
153+
find ${MPI_PATH} -type l -name "$lib" -exec cp -P {} ${host_injection_mpi_path} \;
154+
done
144155

145156
# Get MPI libs dependencies from system ldd
146157
local libname libpath pmixpath
@@ -229,6 +240,8 @@ inject_mpi() {
229240

230241
done < <(find ${temp_inject_path} -type f)
231242

243+
exec 2>&3
244+
232245
# Sanity check MPI injection
233246
local sanity=1
234247
if ${eessi_ldd} ${temp_inject_path}/* &> /dev/null; then

0 commit comments

Comments
 (0)