Re: [netcdfgroup] Compiling netcdf parallel on Mac

  • To: "Thiago V. dos Santos" <dossa013@xxxxxxx>
  • Subject: Re: [netcdfgroup] Compiling netcdf parallel on Mac
  • From: Ted Mansell <ted.mansell@xxxxxxxx>
  • Date: Mon, 22 Dec 2014 18:11:12 -0600
Note from 'configure --help'

`configure' configures netCDF 4.1.3 to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.
....

So please try putting the environment flags in the configure command. For 
example:

./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 
LDFLAGS=-L/Users/dossa013/software/cesm-software/hdf5-1.8.14/lib 
CPPFLAGS=-I/Users/dossa013/software/cesm-software/hdf5-1.8.14/include

You can probably use the ${H5DIR} as a shortcut since it is set:

./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 
LDFLAGS=-L/${H5DIR}/lib CPPFLAGS=-I/${H5DIR}/include

Cheers,

-- Ted

__________________________________________________________
| Edward Mansell <ted.mansell@xxxxxxxx>
| National Severe Storms Laboratory
|--------------------------------------------------------------
| "The contents of this message are mine personally and
| do not reflect any position of the U.S. Government or NOAA."
|--------------------------------------------------------------


On Dec 22, 2014, at 4:51 PM, Thiago V. dos Santos <dossa013@xxxxxxx> 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: