➜ ~ brew uninstall gcc
Uninstalling /usr/local/Cellar/gcc/5.2.0... (1353 files, 248M)
➜ ~ brew uninstall openmpi
Uninstalling /usr/local/Cellar/open-mpi/1.10.1... (765 files, 21M)
➜ ~ brew install openmpi
==> Downloading https://homebrew.bintray.com/bottles/open-mpi-1.10.1.el_capitan.bottle.tar
Already downloaded: /Library/Caches/Homebrew/open-mpi-1.10.1.el_capitan.bottle.tar.gz
==> Pouring open-mpi-1.10.1.el_capitan.bottle.tar.gz
🍺 /usr/local/Cellar/open-mpi/1.10.1: 765 files, 21M
➜ ~ mpif90 -show
--------------------------------------------------------------------------
No underlying compiler was specified in the wrapper compiler data file
(e.g., mpicc-wrapper-data.txt)
--------------------------------------------------------------------------
➜ ~ mpif90
--------------------------------------------------------------------------
No underlying compiler was specified in the wrapper compiler data file
(e.g., mpicc-wrapper-data.txt)
--------------------------------------------------------------------------
➜ ~ brew install gcc
==> Downloading https://homebrew.bintray.com/bottles/gcc-5.2.0.el_capitan.bottle.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/gcc-5.2.0.el_capitan.bottle.3.tar.gz
==> Pouring gcc-5.2.0.el_capitan.bottle.3.tar.gz
==> Caveats
GCC has been built with multilib support. Notably, OpenMP may not work:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670
If you need OpenMP support you may want to
brew reinstall gcc --without-multilib
==> Summary
🍺 /usr/local/Cellar/gcc/5.2.0: 1353 files, 248M
➜ ~ mpif90 -show
--------------------------------------------------------------------------
No underlying compiler was specified in the wrapper compiler data file
(e.g., mpicc-wrapper-data.txt)
--------------------------------------------------------------------------
➜ ~ mpif90
--------------------------------------------------------------------------
No underlying compiler was specified in the wrapper compiler data file
(e.g., mpicc-wrapper-data.txt)
--------------------------------------------------------------------------
➜ ~ brew uninstall gcc
Uninstalling /usr/local/Cellar/gcc/5.2.0... (1353 files, 248M)
➜ ~ brew uninstall openmpi
Uninstalling /usr/local/Cellar/open-mpi/1.10.1... (765 files, 21M)
➜ ~ brew install openmpi
==> Downloading https://homebrew.bintray.com/bottles/open-mpi-1.10.1.el_capitan.bottle.tar
Already downloaded: /Library/Caches/Homebrew/open-mpi-1.10.1.el_capitan.bottle.tar.gz
==> Pouring open-mpi-1.10.1.el_capitan.bottle.tar.gz
🍺 /usr/local/Cellar/open-mpi/1.10.1: 765 files, 21M
➜ ~ mpif90 -show
--------------------------------------------------------------------------
No underlying compiler was specified in the wrapper compiler data file
(e.g., mpicc-wrapper-data.txt)
--------------------------------------------------------------------------
➜ ~ mpif90
--------------------------------------------------------------------------
No underlying compiler was specified in the wrapper compiler data file
(e.g., mpicc-wrapper-data.txt)
--------------------------------------------------------------------------
➜ ~ brew install gcc
==> Downloading https://homebrew.bintray.com/bottles/gcc-5.2.0.el_capitan.bottle.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/gcc-5.2.0.el_capitan.bottle.3.tar.gz
==> Pouring gcc-5.2.0.el_capitan.bottle.3.tar.gz
==> Caveats
GCC has been built with multilib support. Notably, OpenMP may not work:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670
If you need OpenMP support you may want to
brew reinstall gcc --without-multilib
==> Summary
🍺 /usr/local/Cellar/gcc/5.2.0: 1353 files, 248M
➜ ~ mpif90 -show
--------------------------------------------------------------------------
No underlying compiler was specified in the wrapper compiler data file
(e.g., mpicc-wrapper-data.txt)
--------------------------------------------------------------------------
➜ ~ mpif90
--------------------------------------------------------------------------
No underlying compiler was specified in the wrapper compiler data file
(e.g., mpicc-wrapper-data.txt)
--------------------------------------------------------------------------
➜ ~ vi ~/.profile
➜ ~ . ~/.profile
➜ ~ brew uninstall gcc
Uninstalling /usr/local/Cellar/gcc/5.2.0... (1353 files, 248M)
➜ ~ brew uninstall openmpi
Uninstalling /usr/local/Cellar/open-mpi/1.10.1... (765 files, 21M)
➜ ~ brew install openmpi
==> Downloading https://homebrew.bintray.com/bottles/open-mpi-1.10.1.el_capitan.bottle.tar
Already downloaded: /Library/Caches/Homebrew/open-mpi-1.10.1.el_capitan.bottle.tar.gz
==> Pouring open-mpi-1.10.1.el_capitan.bottle.tar.gz
🍺 /usr/local/Cellar/open-mpi/1.10.1: 765 files, 21M
➜ ~ mpif90 -show
gfortran -I/usr/local/Cellar/open-mpi/1.10.1/include -L/usr/local/opt/libevent/lib -L/usr/local/Cellar/open-mpi/1.10.1/lib -lmpi_mpifh -lmpi
➜ ~ which gfortran
gfortran not found
➜ ~ mpif90 --version
--------------------------------------------------------------------------
The Open MPI wrapper compiler was unable to find the specified compiler
gfortran in your PATH.
Note that this compiler was either specified at configure time or in
one of several possible environment variables.
--------------------------------------------------------------------------
➜ ~ brew install openmpi
Warning: open-mpi-1.10.1 already installed
➜ ~ brew install gcc
==> Downloading https://homebrew.bintray.com/bottles/gcc-5.2.0.el_capitan.bottle.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/gcc-5.2.0.el_capitan.bottle.3.tar.gz
==> Pouring gcc-5.2.0.el_capitan.bottle.3.tar.gz
==> Caveats
GCC has been built with multilib support. Notably, OpenMP may not work:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670
If you need OpenMP support you may want to
brew reinstall gcc --without-multilib
==> Summary
🍺 /usr/local/Cellar/gcc/5.2.0: 1353 files, 248M
➜ ~ mpif90 --version
GNU Fortran (Homebrew gcc 5.2.0) 5.2.0
Copyright (C) 2015 Free Software Foundation, Inc.
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
mpif90 hello.f90 -o hello
hello.f90:2:4:
use mpi
1
Fatal Error: Can't open module file 'mpi.mod' for reading at (1): No such file or directory
compilation terminated.
> On 1 Dec 2015, at 12:05, Justin Chang <jychang48@gmail.com> wrote:
>
> Okay, so mpif90-wrapper-data.txt is located in
>
> /usr/local/Cellar/open-mpi/1.10.1/share/openmpi/mpif90-wrapper-data.txt
>
> and in the row that says "compiler=", the RHS is blank. Simply adding gfortran-5 now gives:
>
> mpif90 --show
> gfortran-5 -I/usr/local/Cellar/open-mpi/1.10.1/include -L/usr/local/opt/libevent/lib -L/usr/local/Cellar/open-mpi/1.10.1/lib -lmpi_mpifh -lmpi
>
> so this is definitely the much better alternative
A better way to do this is to set the environment variable OMPI_FC to the name of the fortran compiler you want mpif90 to use.
Lawrence
_______________________________________________
firedrake mailing list
firedrake@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/firedrake