Skip to content

Commit 7f6e653

Browse files
committed
macos: Silence brew warnings
1 parent 7447f39 commit 7f6e653

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

setup-mpi.sh

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,16 @@ 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
137+
brew list $MPI
139138
;;
140139
*)
141140
echo "Unknown MPI implementation:" $MPI

0 commit comments

Comments
 (0)