[firedrake] FD on mac

Justin Chang jychang48 at gmail.com
Mon Nov 30 23:59:48 GMT 2015


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 at 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 at imperial.ac.uk
> <javascript:_e(%7B%7D,'cvml','firedrake-bounces at imperial.ac.uk');> <
> firedrake-bounces at imperial.ac.uk
> <javascript:_e(%7B%7D,'cvml','firedrake-bounces at imperial.ac.uk');>> on
> behalf of David Ham <David.Ham at imperial.ac.uk
> <javascript:_e(%7B%7D,'cvml','David.Ham at 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 at imperial.ac.uk
> <javascript:_e(%7B%7D,'cvml','lawrence.mitchell at imperial.ac.uk');>> wrote:
>
>>
>> > On 30 Nov 2015, at 18:01, David Ham <David.Ham at imperial.ac.uk
>> <javascript:_e(%7B%7D,'cvml','David.Ham at 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 at imperial.ac.uk
>> <javascript:_e(%7B%7D,'cvml','firedrake at imperial.ac.uk');>
>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>>
>
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the firedrake mailing list