Bug in internal netcdf for mac  [SOLVED]

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
ldamewood
Posts: 14
Joined: Tue Mar 09, 2010 11:39 pm

Bug in internal netcdf for mac  [SOLVED]

Post by ldamewood » Thu May 15, 2014 8:16 am

There is a small bug in netcdf that makes it not compile on Mac OS X 10.9 using the Xcode compiler. It requires adding a single line of code to netcdf. I haven't seen any other post about this bug so I don't know if it's been addressed before. Since the abinit build system tries to build netcdf, I attached a patch for abinit v7.6.4 (it's a patch within a patch!) that fixed it for me. The abinit build system will apply the netcdf patch automatically.

Code: Select all

mv 0001-Fic-NetCDF-bug.log 0001-Fic-NetCDF-bug.patch
cd abinit-7.6.4
patch -p1 < ../0001-Fix-NetCDF-bug.patch
make clean && ./configure --with-trio-flavor="netcdf+etsf_io" && make
Attachments
0001-Fix-NetCDF-bug.log
NetCDF patch
(3.27 KiB) Downloaded 370 times

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: Bug in internal netcdf for mac

Post by jbeuken » Thu May 22, 2014 10:51 pm

Hi,

I use the ports

netcdf +gcc48 +gfortran
netcdf-fortran
mpich-gcc48

from MacPorts under MacOS X 10.8

and use

with_netcdf_incs="-I/opt/local/include"
with_netcdf_libs="-L/opt/local/lib -lnetcdf -lnetcdff"

in my ac file and

everything works… without patch...

my 5¢

jmb
------
Jean-Michel Beuken
Computer Scientist

ldamewood
Posts: 14
Joined: Tue Mar 09, 2010 11:39 pm

Re: Bug in internal netcdf for mac

Post by ldamewood » Sat Jun 14, 2014 3:11 am

I hope the patch will be useful for people who do not wish to use macports and useful for the build system maintainers in the next versions of abinit.

Locked