Skip to content

Commit e237145

Browse files
committed
[CI] Smart append LD_LIBRARY_PATH in shell when nounset
1 parent 93b6137 commit e237145

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/install_deps/install_openmpi.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ ldconfig
6262
cat >bashrc.txt <<'EOF'
6363
export OPENMPI_HOME=/opt/openmpi
6464
export PATH="${OPENMPI_HOME}/bin:${PATH}"
65-
export LD_LIBRARY_PATH="${OPENMPI_HOME}/lib:${LD_LIBRARY_PATH}"
65+
export LD_LIBRARY_PATH="${OPENMPI_HOME}/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
6666
EOF
6767
cat bashrc.txt >>/root/.bashrc
6868

6969
export OPENMPI_HOME=/opt/openmpi
7070
export PATH="${OPENMPI_HOME}/bin:${PATH}"
71-
export LD_LIBRARY_PATH="${OPENMPI_HOME}/lib:${LD_LIBRARY_PATH}"
71+
export LD_LIBRARY_PATH="${OPENMPI_HOME}/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
7272

7373
mpirun --version &&
7474
rm -rf ${BUILD_DIR}

0 commit comments

Comments
 (0)