Re: [netcdfgroup] Compiling netcdf parallel on Mac

Hi Thiago

For what it is worth, here is what I used to build NetCDF 4.1.3:

export CPPFLAGS="-I${HDF5DIR}/include -I${ZLIBDIR}/include"
export LDFLAGS="-L${HDF5DIR}/lib -L${ZLIBDIR}/lib"
export LIBS="-lmfhdf -ldf"

This was a while ago.
My vague/faded recollection is that
without LIBS configure wouldn't find the HDF5 libraries.
Also, --with-zlib=/bla/bla wouldn't work either;
configure picked up the system zlib, not the one I installed,
if I still remember it correctly.

I built with the NetCDF4 interface enabled (--enable-netcdf4 ).
However, I didn't compile NetCDF parallel (i.e., NO --enable-parallel),
and it was on Linux, not on a Mac.

**

Having said that, you can build and run CESM with serial NetCDF.
You don't need parallel NetCDF.

**

I am not trying to discourage you, but on the other hand,
I wonder if 4 cores, and specially the amount of RAM,
will restrict you to the smaller CESM "compsets" ("F" perhaps?),
maybe at standard resolution, although this may be what you
are trying to accomplish.

**

I hope this helps,
Gus Correa

On 12/22/2014 05:51 PM, Thiago V. dos Santos wrote:
Hi all,

I am trying to get netcdf 4.1.3 with parallel IO compiled to be able to
run CESM on my Mac desktop (quadcore and 12GB).

As a preparation for building netcdf, I have:

1) installed Xcode on my system;


2) installed f77, f90, c and cxx compilers using macports;


3) compiled udunits on my system;


4) compiled MPI from source explicitally pointing the above compilers
when running configure, by using this command:

./configure CC=/opt/local/bin/gcc-mp-4.9 CXX=/opt/local/bin/c++-mp-4.9
F77=/opt/local/bin/gfortran-mp-4.9 FC=/opt/local/bin/gfortran-mp-4.9
--prefix=/Users/dossa013/software/cesm-software/mpich-3.1.3


5) compiled latest HDF5 (1.8.14) enabling zlib and parallel IO by using
this command (did a make check and all tests PASSED):

FC=mpif90 CC=mpicc ./configure
--prefix=/Users/dossa013/software/cesm-software/hdf5-1.8.14
--enable-parallel --with-zlib=/Users/dossa013/software
--with-szlib=/Users/dossa013/software


However, I am having a really hard time trying to compile NetCDF 4.1.3.
This is what I am trying:

H5DIR=/Users/dossa013/software/cesm-software/hdf5-1.8.14
CPPFLAGS="–I${H5DIR}/include"
CXXFLAGS="-I${H5DIR}include"
FFFLAGS="-I${H5DIR}/include"
FCFLAGS="-I${H5DIR}/include"
LDFLAGS="-L${H5DIR}/lib"

./configure FC=mpif90 CC=mpicc CXX=mpicxx
--prefix=/Users/dossa013/software/cesm-software/netcdf-4.1.3
--enable-netcdf4 --enable-parallel --disable-shared
--with-udunits=/Users/dossa013/software
--with-zlib=/Users/dossa013/software --with-szlib=/Users/dossa013/software

Then everything seems to work ok but at a certain point it throws out
this error message:

checking for library containing H5Fflush... no

configure: error: Can't find or link to the hdf5 library. Use
--disable-netcdf-4, or see config.log for errors.


I took a look at the config.log file, but I failed to find the reason
why the script stopped. Has anyone ever seen this? Is there any better
way to show netcdf where my HDF5 libraries ae located?


Thank you all in advance and happy hollidays!


--
/Thiago Veloso dos Santos/
/PhD student/
/Land and Atmospheric Science/
/University of Minnesota/
/http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm
/


_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe,  visit: 
http://www.unidata.ucar.edu/mailing_lists/




  • 2014 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: