Re: [AMBER] [AMBER} NetCDF installation problem on mac OS X El Capitan

From: Jason Swails <jason.swails.gmail.com>
Date: Mon, 15 Aug 2016 21:56:04 -0400

On Mon, Aug 15, 2016 at 4:32 PM, David A Case <david.case.rutgers.edu>
wrote:

> On Mon, Aug 15, 2016, mirko hennig wrote:
>
> > and passing the "--with-netcdf=/opt/local/lib" flag to
> > configure yields:Checking NetCDF... Using external NetCDF in
> > '/opt/local/lib'Error: '/opt/local/lib/include/netcdf.mod' not
>
> Sorry: it should have been "--with-netcdf=/opt/local". But I'm pretty
> sure this can't work: even if you have a /opt/local/include/netcdf.mod file
> coming from macports, it won't have been compiled with gfortran 4.9, which
> is the compiler you are using.
>
> cc-ing Jason: do you know a how to specify --with-netcdf on a Mac that
> is using macports?
>

​You need to specify the appropriate variant for the netcdf-fortran package
on a Mac to make sure it is built with the desired compiler.

For instance, if you use gfortran 4.9, then you will need to do something
like this:

sudo port install netcdf
sudo port install netcdf-fortran +gcc49

(you can change +gcc49 to be whatever MacPorts gfortran compiler you plan
to use). You can also do +gcc49 on the netcdf install, but that's not as
necessary since no F90 module is being built.

All the best,
Jason


-- 
Jason M. Swails
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Aug 15 2016 - 19:00:03 PDT
Custom Search