[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #XCV-291469]: NetCDF 4.1.3 build on Mac OS X 10.7 (Lion)



Great news! I'm glad it worked. The C++ and Fortran netCDF libs have been split 
into separate packages (as of today - you got lucky and hit that exact daily 
snapshot!). I've included the announcement that was sent through the netCDF 
users list this morning.

Sean

==============================================
Date: Fri, 12 Aug 2011 06:39:09 -0600
From: Ed Hartnett <address@hidden>
To: address@hidden
Subject: [netcdfgroup] time for fortran and C++ libraries to move out of
    their parents' basement!

Howdy all!

For the upcoming netcdf-4.2 release, there will be a change in the
packaging of the netCDF libraries. Until now, the Fortran 77, Fortran
90, C++, and the new C++ (a.k.a. CXX4) have all been packaged together.

This will no longer be the case. Instead, the C library (with tools
ncgen/ncdump/nccopy) will be released separately from the Fortran and
C++ libraries.

The netCDF daily snapshot
(ftp://ftp.unidata.ucar.edu/pub/netcdf/snapshot/netcdf-4-daily.tar.gz)
reflects this change. It now only builds the C library and
ncgen/ncdump/nccopy. It no longer includes the C++ or Fortran libraries.

The F77 and F90 libraries will continue to be released as one package,
now called netcdf-fortran. A beta release can be found here:
ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-4.2-beta1.tar.gz

A beta of the new C++ library (netcdf-cxx4) can be found here:
ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-cxx4-4.2-beta1.tar.gz

For backward compatibility, a distribution of the old C++ library
(netcdf-cxx) is also available. It should not be used for new projects,
as it does not include many important netCDF-4 features. A beta can be
found here:
ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-cxx-4.2-beta1.tar.gz

I have not updated the documentation with new build instructions, but in
all cases, install the netcdf-4.1.3 C library (or the snapshot)
somewhere, and then set CPPFLAGS and LDFLAGS to point to that spot for
the builds of the fortran and C++ libraries.

More beta releases, and then full 4.2 releases for the Fortran and C++
libraries will come before the netCDF C library 4.2 release. 

These changes is intended to lighten our workload when new versions are
released, and to provide the capability of doing a fortran or C++
release without waiting for the next major C library release.

Any feedback would be most appreciated. Please send it to:
address@hidden

Thanks!

Ed
-- 
Ed Hartnett  -- address@hidden

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


> That worked, Sean!
> 
> The history from my build is shown below.
> 
> One question: Where did the separate Fortran/C++ libraries go? Have they been 
> rolled into one common library or do I need to set some flags to build them?
> 
> My previous build generated these libraries:
> 
> -rwxr-xr-x  1 root  wheel   1.1K Aug  1 14:34 libnetcdff.la
> -rw-r--r--  1 root  wheel   854K Aug  1 14:34 libnetcdff.a
> -rwxr-xr-x  1 root  wheel   1.1K Aug  1 14:34 libnetcdf_c++.la
> -rw-r--r--  1 root  wheel   309K Aug  1 14:34 libnetcdf_c++.a
> 
> Now I only see these:
> 
> -rwxr-xr-x  1 root  wheel   1.1K Aug 12 17:21 libnetcdf.la
> lrwxr-xr-x  1 root  wheel    17B Aug 12 17:21 libnetcdf.dylib -> 
> libnetcdf.7.dylib
> -rw-r--r--  1 root  wheel   1.8M Aug 12 17:21 libnetcdf.a
> -rwxr-xr-x  1 root  wheel   1.5M Aug 12 17:21 libnetcdf.7.dylib
> 
> There are no occurrences of 'mpif90' in my 'make.log' file. None of these 
> configure settings work:
> 
> configure: WARNING: unrecognized options: --enable-fortran, --enable-cxx
> configure: WARNING: unrecognized options: --enable-f77, --enable-f90, 
> --enable-cxx4
> 
> What do I need to set to build these interfaces?
> 
> Thank you!
> Craig
> 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> wget ftp://ftp.unidata.ucar.edu/pub/netcdf/snapshot/netcdf-4-daily.tar.gz
> tar -xzvf netcdf-4-daily.tar.gz
> 
> cd netcdf-4.2-snapshot2011081208
> 
> setenv USR_LOCAL /usr/local
> setenv LIBZ /usr
> setenv SZIP ${USR_LOCAL}/szip
> setenv HDF5 ${USR_LOCAL}/phdf5
> setenv INCS "-I${HDF5}/include -I${SZIP}/include"
> setenv LIBS "-L${HDF5}/lib -lhdf5 -L${LIBZ}/lib -lz -L${SZIP}/lib -lsz"
> 
> setenv NETCDF4 ${USR_LOCAL}/netcdf4
> 
> setenv CPP "cpp -C -P -xassembler-with-cpp -traditional"
> setenv CC mpicc
> setenv CXX mpicxx
> setenv F77 mpif77
> setenv FF mpif77
> setenv FC mpif90
> setenv F90 mpif90
> 
> setenv CPPFLAGS "-DNDEBUG -DpgiFortran"
> setenv CFLAGS "-w -O3 -xHost -ip -fp-model fast=2 -no-prec-div -no-prec-sqrt 
> -ftz -no-multibyte-chars -m64 ${INCS}"
> setenv CXXFLAGS "${CFLAGS}"
> setenv FCFLAGS "-w -O3 -xHost -ip -fp-model fast=2 -no-heap-arrays 
> -no-prec-div -no-prec-sqrt -ftz -align all -m64 ${INCS}"
> setenv FFLAGS "${FCLAGS}"
> setenv LDFLAGS "-w -O3 -xHost -ip -fp-model fast=2 -no-heap-arrays 
> -no-prec-div -no-prec-sqrt -ftz -m64 ${LIBS}"
> 
> ./configure --prefix=${NETCDF4} --enable-netcdf4
> 
> make | & tee make.log
> make check | & tee check.log
> sudo make install
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> 
> On Aug 12, 2011, at 5:02 PM, Unidata netCDF Support wrote:
> 
> > Greetings!
> >
> > There have been some changes with the netCDF configure script which 
> > included dropping the --with-zlib and --with-szlib flags (those flags 
> > actually broke the install on some systems, so they had to go). In order to 
> > tell the configure script to use szlib and zlib, you simply have to point 
> > it the directory where they live, except now you need to do so with the 
> > CPPFLAGS and LDFLAGS:
> >
> > CPPFLAGS="-I/path/to/zlib/include -I/path/to/szlib/include" 
> > LDFLAGS=-"L/path/to/zlib/lib -L/path/to/szlib/lib" ./configure <options>
> >
> > If configure can find the zlib and szlib libs in the paths you specify in 
> > CPPFLAGS and LDFLAGS, then it will use them.
> >
> > We don't use a --enable-parallel flag - in order to build the parallel 
> > version of netCDF (and HDF), check out the following page:
> >
> > http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-install/parallel.html#parallel
> >
> > Cheers!
> >
> > Sean
> >
> >> Thank you, Sean!
> >>
> >> I just downloaded the daily snapshot and ran configure with:
> >>
> >> ./configure --prefix=${NETCDF4} --enable-netcdf4 --enable-parallel 
> >> --with-zlib=${LIBZ}/lib --with-szlib=${SZIP}/lib
> >>
> >> I received these new warnings:
> >>
> >> configure: WARNING: unrecognized options: --enable-parallel, --with-zlib, 
> >> --with-szlib
> >>
> >> If I specify CC=mpicc, FF=mpif77, FC=mpif90, etc., does configure 
> >> automatically know to build a parallel version?
> >>
> >> 'configure --help' tells me this:
> >>
> >> Optional Packages:
> >> --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
> >>
> >> How will configure know to build with zlib and szip?
> >>
> >> Craig
> >>
> >> On Aug 12, 2011, at 10:56 AM, Unidata netCDF Support wrote:
> >>
> >>> Greetings Craig,
> >>>
> >>> It looks like this bug in the tests has been fixed. I am not sure if the 
> >>> fix has been pushed to the nightly build yet or not, but as a work 
> >>> around, compile netCDF without either the --enable-large-file-tests or 
> >>> --enable-benchmarks flags.
> >>>
> >>> Please let me know how this goes! Cheers!
> >>>
> >>> Sean
> >>>
> >>>> Great -- thank you for keeping me updated on the situation, Sean!
> >>>>
> >>>> Craig
> >>>>
> >>>> On Aug 5, 2011, at 4:26 PM, Unidata netCDF Support wrote:
> >>>>
> >>>>> Thanks for the logs Craig. This appears to be a bug. The main 
> >>>>> developers of netCDF are looking into the problem, and I'll let you 
> >>>>> know when it gets fixed in the nightly build.
> >>>>>
> >>>>> Thanks!
> >>>>>
> >>>>> Sean
> >>>>>
> >>>>>> Hi Sean,
> >>>>>>
> >>>>>> Attached are the logs, compressed with 'gzip' to prevent contamination 
> >>>>>> by e-mail clients:
> >>>>>>
> >>>>>> config.log.gz
> >>>>>> make.log.gz
> >>>>>> check.log.gz
> >>>>>>
> >>>>>> Guess I could edit the source (tst_create_files.c), but there must be 
> >>>>>> some reason why the function signatures don't match.
> >>>>>>
> >>>>>> Thanks for your help!
> >>>>>> Craig
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On Jul 29, 2011, at 10:28 PM, Unidata netCDF Support wrote:
> >>>>>>
> >>>>>>> Hi Craig,
> >>>>>>>
> >>>>>>> Unfortunately, I've never passed step one with users in trying to fix 
> >>>>>>> this one. Step one is "please send me the logs from configure, make, 
> >>>>>>> and make check", but I get silence after that. So, I'll cross my 
> >>>>>>> fingers and ask, would you mind sending those logs?
> >>>>>>>
> >>>>>>> Sorry for the lack of magic, but with your help, we'll do our best!
> >>>>>>>
> >>>>>>> Sean
> >>>>>>>
> >>>>>>>> Hi Sean,
> >>>>>>>>
> >>>>>>>> That fix got me past those errors!
> >>>>>>>>
> >>>>>>>> However, now I am running into this mpicc build error:
> >>>>>>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >>>>>>>> gnumake[2]: `tst_large' is up to date.
> >>>>>>>> depbase=`echo tst_create_files.o | sed 
> >>>>>>>> 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> >>>>>>>> mpicc -DHAVE_CONFIG_H -I. -I.. -I../fortran  -I../include -I../oc  
> >>>>>>>> -DNDEBUG -DpgiFortran  -w -O3 -xHost -ip -fp-model fast=2 
> >>>>>>>> -no-prec-div -no-prec-sqrt -ftz -no-multibyte-chars -m64 
> >>>>>>>> -I/usr/local/phdf5/include -I/usr/local/szip/include -MT 
> >>>>>>>> tst_create_files.o -MD -MP -MF $depbase.Tpo -c -o tst_create_files.o 
> >>>>>>>> tst_create_files.c &&\
> >>>>>>>> mv -f $depbase.Tpo $depbase.Po
> >>>>>>>> tst_create_files.c(61): error #140: too many arguments in function 
> >>>>>>>> call
> >>>>>>>> if (nc_def_var_chunking(ncid, varid, NULL, chunk_sizes, NULL)) ERR;
> >>>>>>>> ^
> >>>>>>>> gnumake[2]: *** [tst_create_files.o] Error 2
> >>>>>>>> gnumake[1]: *** [check-am] Error 2
> >>>>>>>> make: *** [check-recursive] Error 1
> >>>>>>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >>>>>>>>
> >>>>>>>> Any magic for this one?
> >>>>>>>>
> >>>>>>>> Craig
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On Jul 29, 2011, at 4:48 PM, Unidata netCDF Support wrote:
> >>>>>>>>
> >>>>>>>>> Greetings Craig!
> >>>>>>>>>
> >>>>>>>>> The issue has to do with a test related to libsz - a fix has 
> >>>>>>>>> recently be added, but is only avaliable in the nightly build at 
> >>>>>>>>> this point. Please try using the nightly build to see if this fixes 
> >>>>>>>>> the issue:
> >>>>>>>>>
> >>>>>>>>> ftp.unidata.ucar.edu/pub/netcdf/snapshot/netcdf-4-daily.tar.gz
> >>>>>>>>>
> >>>>>>>>> Cheers!
> >>>>>>>>>
> >>>>>>>>> Sean
> >>>>>>>>>
> >>>>>>>>>> Hi,
> >>>>>>>>>>
> >>>>>>>>>> I am trying to build NetCDF 4.1.3 on Mac OS X 10.7 (Lion) with the 
> >>>>>>>>>> Intel 12.0.4.184 compilers using these settings:
> >>>>>>>>>>
> >>>>>>>>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >>>>>>>>>> setenv USR_LOCAL /usr/local
> >>>>>>>>>> setenv LIBZ /usr
> >>>>>>>>>> setenv HDF5 ${USR_LOCAL}/phdf5
> >>>>>>>>>>
> >>>>>>>>>> setenv INCS "-I${HDF5}/include"
> >>>>>>>>>> setenv LIBS "-L${HDF5}/lib -lhdf5 -L${LIBZ}/lib -lz"
> >>>>>>>>>>
> >>>>>>>>>> setenv NETCDF4 ${USR_LOCAL}/netcdf4
> >>>>>>>>>>
> >>>>>>>>>> setenv CPP "cpp -C -P -xassembler-with-cpp -traditional"
> >>>>>>>>>> setenv CC mpicc
> >>>>>>>>>> setenv CXX mpicxx
> >>>>>>>>>> setenv F77 mpif77
> >>>>>>>>>> setenv FF mpif77
> >>>>>>>>>> setenv FC mpif90
> >>>>>>>>>>
> >>>>>>>>>> setenv CPPFLAGS "-DNDEBUG -DpgiFortran"
> >>>>>>>>>> setenv CFLAGS "-w -O3 -xHost -ip -fp-model fast=2 -no-prec-div 
> >>>>>>>>>> -no-prec-sqrt -ftz -no-multibyte-chars -m64 ${INCS}"
> >>>>>>>>>> setenv CXXFLAGS "-w -O3 -xHost -ip -fp-model fast=2 -no-prec-div 
> >>>>>>>>>> -no-prec-sqrt -ftz -no-multibyte-chars -m64 ${INCS}"
> >>>>>>>>>> setenv FCLAGS "-w -O3 -xHost -ip -fp-model fast=2 -no-heap-arrays 
> >>>>>>>>>> -no-prec-div -no-prec-sqrt -ftz -align all -m64 ${INCS}"
> >>>>>>>>>> setenv FFLAGS "-w -O3 -xHost -ip -fp-model fast=2 -no-heap-arrays 
> >>>>>>>>>> -no-prec-div -no-prec-sqrt -ftz -align all -m64 ${INCS}"
> >>>>>>>>>> setenv LDFLAGS "-w -O3 -xHost -ip -fp-model fast=2 -no-heap-arrays 
> >>>>>>>>>> -no-prec-div -no-prec-sqrt -ftz -m64 ${LIBS}"
> >>>>>>>>>>
> >>>>>>>>>> ./configure --prefix=${NETCDF4} --enable-parallel 
> >>>>>>>>>> --with-zlib=/usr/lib --enable-large-file-tests --enable-benchmarks
> >>>>>>>>>>
> >>>>>>>>>> make |& tee make.log
> >>>>>>>>>> make check |& tee check.log
> >>>>>>>>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >>>>>>>>>>
> >>>>>>>>>> It builds fine and all the tests are successful, until it hits 
> >>>>>>>>>> this compiler glitch:
> >>>>>>>>>>
> >>>>>>>>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >>>>>>>>>> libtool: link: mpif90 -I../fortran -I../f90 -I../f90 -I../include 
> >>>>>>>>>> -I../oc -g -w -O3 -xHost -ip -fp-model fast=2 -no-heap-arrays 
> >>>>>>>>>> -no-prec-div -no-prec-sqrt -ftz -m64 -o f90tst_vars4 
> >>>>>>>>>> f90tst_vars4.o  -L/usr/local/phdf5/lib -L/usr/local/szip/lib 
> >>>>>>>>>> -L/usr/lib ../fortran/.libs/libnetcdff.a 
> >>>>>>>>>> /Users/cmattock/Downloads/netcdf-4.1.3/liblib/.libs/libnetcdf.a 
> >>>>>>>>>> /usr/local/phdf5/lib/libhdf5_hl.dylib -lcurl 
> >>>>>>>>>> /usr/local/phdf5/lib/libhdf5.dylib /usr/local/szip/lib/libsz.dylib 
> >>>>>>>>>> -lm -lz
> >>>>>>>>>> mpif90  -I../fortran -I../f90 -I../f90 -I../include -I../oc  -g -c 
> >>>>>>>>>> -o f90tst_vars2.o  f90tst_vars2.f90
> >>>>>>>>>> f90tst_vars2.f90(37): error #6418: This name has already been 
> >>>>>>>>>> assigned a data type.   [CACHE_SIZE]
> >>>>>>>>>> integer, parameter :: CACHE_SIZE = 8, CACHE_NELEMS = 571, 
> >>>>>>>>>> CACHE_PREEMPTION = 66
> >>>>>>>>>> ------------------------^
> >>>>>>>>>> f90tst_vars2.f90(37): error #6418: This name has already been 
> >>>>>>>>>> assigned a data type.   [CACHE_NELEMS]
> >>>>>>>>>> integer, parameter :: CACHE_SIZE = 8, CACHE_NELEMS = 571, 
> >>>>>>>>>> CACHE_PREEMPTION = 66
> >>>>>>>>>> ----------------------------------------^
> >>>>>>>>>> f90tst_vars2.f90(77): error #6284: There is no matching specific 
> >>>>>>>>>> function for this generic function reference.   [NF90_DEF_VAR]
> >>>>>>>>>> call check(nf90_def_var(ncid, VAR5_NAME, NF90_INT, dimids, varid5, 
> >>>>>>>>>> chunksizes = chunksizes, &
> >>>>>>>>>> -------------^
> >>>>>>>>>> f90tst_vars2.f90(85): error #6404: This name does not have a type, 
> >>>>>>>>>> and must have an explicit type.   [NF90_SET_VAR_CHUNK_CACHE]
> >>>>>>>>>> call check(nf90_set_var_chunk_cache(ncid, varid1, CACHE_SIZE, &
> >>>>>>>>>> -------------^
> >>>>>>>>>> compilation aborted for f90tst_vars2.f90 (code 1)
> >>>>>>>>>> gnumake[2]: *** [f90tst_vars2.o] Error 1
> >>>>>>>>>> gnumake[1]: *** [check-am] Error 2
> >>>>>>>>>> make: *** [check-recursive] Error 1
> >>>>>>>>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >>>>>>>>>>
> >>>>>>>>>> Is this repetitive parameter information coming in through the 
> >>>>>>>>>> "use netcdf" import? What is the best way to fix this?
> >>>>>>>>>>
> >>>>>>>>>> Thank you!
> >>>>>>>>>> Craig
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Ticket Details
> >>>>>>>>> ===================
> >>>>>>>>> Ticket ID: XCV-291469
> >>>>>>>>> Department: Support netCDF
> >>>>>>>>> Priority: Normal
> >>>>>>>>> Status: Open
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> Ticket Details
> >>>>>>> ===================
> >>>>>>> Ticket ID: XCV-291469
> >>>>>>> Department: Support netCDF
> >>>>>>> Priority: Normal
> >>>>>>> Status: Open
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>> Ticket Details
> >>>>> ===================
> >>>>> Ticket ID: XCV-291469
> >>>>> Department: Support netCDF
> >>>>> Priority: High
> >>>>> Status: Open
> >>>>>
> >>>>
> >>>>
> >>>
> >>>
> >>> Ticket Details
> >>> ===================
> >>> Ticket ID: XCV-291469
> >>> Department: Support netCDF
> >>> Priority: Urgent
> >>> Status: Open
> >>>
> >>
> >>
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: XCV-291469
> > Department: Support netCDF
> > Priority: Urgent
> > Status: Open
> >
> 
> 


Ticket Details
===================
Ticket ID: XCV-291469
Department: Support netCDF
Priority: Urgent
Status: Open


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.