Skip to content

Commit

Permalink
check if gfortran is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
wkliao committed May 18, 2024
1 parent 49b6541 commit 28e0677
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 38 deletions.
21 changes: 2 additions & 19 deletions .github/workflows/mac_mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,12 @@ jobs:
- uses: actions/checkout@v4
- name: Set up dependencies
run: |
echo "PATH=$PATH"
brew install gcc
echo "PATH=$PATH"
which gcc
gcc --version
ls -l /usr/local/bin/gfortran*
version=12
ln -fs /usr/local/bin/gfortran-${version} /usr/local/bin/gfortran
ln -fs /usr/local/bin/gcc-${version} /usr/local/bin/gcc
ln -fs /usr/local/bin/g++-${version} /usr/local/bin/g++
# link lib dir for previous GCC versions to avoid missing .dylib issues
for (( i=12; i>4; i-- ))
do
gcc_lib_path="/usr/local/opt/gcc/lib/gcc/$i"
if [ -d $gcc_lib_path ]; then
echo "found $gcc_lib_path"
for (( j=$i; j>4; j-- ))
do
ln -fs /usr/local/opt/gcc/lib/gcc/$i /usr/local/opt/gcc/lib/gcc/$j
done
break
fi
done
which gfortran
gfortran --version
brew install automake autoconf libtool m4
- name: Build MPICH
run: |
Expand Down
21 changes: 2 additions & 19 deletions .github/workflows/mac_openmpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,12 @@ jobs:
- uses: actions/checkout@v4
- name: Set up dependencies
run: |
echo "PATH=$PATH"
brew install gcc
echo "PATH=$PATH"
which gcc
gcc --version
ls -l /usr/local/bin/gfortran*
version=12
ln -fs /usr/local/bin/gfortran-${version} /usr/local/bin/gfortran
ln -fs /usr/local/bin/gcc-${version} /usr/local/bin/gcc
ln -fs /usr/local/bin/g++-${version} /usr/local/bin/g++
# link lib dir for previous GCC versions to avoid missing .dylib issues
for (( i=12; i>4; i-- ))
do
gcc_lib_path="/usr/local/opt/gcc/lib/gcc/$i"
if [ -d $gcc_lib_path ]; then
echo "found $gcc_lib_path"
for (( j=$i; j>4; j-- ))
do
ln -fs /usr/local/opt/gcc/lib/gcc/$i /usr/local/opt/gcc/lib/gcc/$j
done
break
fi
done
which gfortran
gfortran --version
brew install automake autoconf libtool m4
- name: Build OPENMPI
run: |
Expand Down

0 comments on commit 28e0677

Please sign in to comment.