Onno, that's strange. Are you sure you followed my instructions correctly? Because simply reinstalling Homebrew is not going to fix the fortran issue. You need to manually reconfigure openmpi to use the latest gcc compilers. First ensure you have the latest gcc via Homebrew (I think it should be gcc-5). Then you "install" openmpi initially (via brew install openmpi). Finally you need to rebuild openmpi via

brew reinstall openmpi --build-from-source

Because by default, the openmpi links to the apple compilers, and for some reason mpif90 is not hooked up to any gfortran. Hence you need those environment variables I stated.

They do something similar here http://stackoverflow.com/questions/26812780/linking-homebrew-compiled-openmpi-or-mpich2-to-homebrews-gcc

This should fix that fortran problem within the PETSc build process.

Spatialindex needs to be rebuilt the same way.

Thanks,
Justin

On Monday, November 30, 2015, Onno Bokhove <O.Bokhove@leeds.ac.uk> wrote:

I get this:

ls -l $(which gfortran)

lrwxr-xr-x  1 root  admin  32 24 Mar  2014 /usr/local/bin/gfortran -> /usr/local/gfortran/bin/gfortran


gfortran works fine; hello.f90 works fine;
it is the openmpi bit
when I add "use mpi"

use mpi

    1

Fatal Error: Can't open module file 'mpi.mod' for reading at (1): No such file or directory


mpif90 hello.f90 -o hello

command does not work.



From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of David Ham <David.Ham@imperial.ac.uk>
Sent: Monday, November 30, 2015 6:43 PM
To: firedrake
Subject: Re: [firedrake] FD on mac
 


On Mon, 30 Nov 2015 at 18:26 Mitchell, Lawrence <lawrence.mitchell@imperial.ac.uk> wrote:

> On 30 Nov 2015, at 18:01, David Ham <David.Ham@imperial.ac.uk> wrote:
>
> This is quite possible. Unfortunately we have no access to Mavericks machines which makes it difficult to work fix this problem.
>
> The script does currently work for me on El Capitan!

The proximate cause of Onno's problem appears to be the lack of fortran compiler. In the past, this came via the brew package "gfortran" is this still the case? Those of us for whom everything works have had it all in place for a while, no?

gfortran is currently provided by the plain gcc package.

ls -l $(which gfortran)

lrwxr-xr-x  1 dham  admin  32 23 Jul 12:44 /usr/local/bin/gfortran -> ../Cellar/gcc/5.2.0/bin/gfortran


 

Lawrence
_______________________________________________
firedrake mailing list
firedrake@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/firedrake