Skip to content

Commit 8b82338

Browse files
committed
macos: Silence brew warnings
1 parent 7447f39 commit 8b82338

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

setup-mpi.sh

+8-10
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,15 @@ case $(uname) in
125125
Darwin)
126126
MPI="${MPI:-mpich}"
127127
echo "::group::Installing $MPI with brew"
128-
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
128+
brew unlink mpich > /dev/null 2>&1 || true
129+
brew unlink openmpi > /dev/null 2>&1 || true
129130
case $MPI in
130-
mpich)
131-
brew unlink openmpi > /dev/null 2>&1 || true
132-
brew install mpich
133-
brew link mpich
134-
;;
135-
openmpi)
136-
brew unlink mpich > /dev/null 2>&1 || true
137-
brew install openmpi
138-
brew link openmpi
131+
mpich|openmpi)
132+
if brew list $MPI > /dev/null 2>&1; then
133+
brew link $MPI
134+
else
135+
brew install $MPI
136+
fi
139137
;;
140138
*)
141139
echo "Unknown MPI implementation:" $MPI

0 commit comments

Comments
 (0)