[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #TRL-392354]: netcdf-4 build fails
- Subject: [netCDF #TRL-392354]: netcdf-4 build fails
- Date: Mon, 04 Aug 2014 09:51:25 -0600
Hello,
> Hi!
>
> Per Jansson, PhD student, physical oceanography at UiT, Norway, here.
>
> (On a brand new workstation with ubuntu 14.04 LTS.)
>
> I'm trying to build netcdf-4.3.2 C-libraries with support for parallel and
> netcdf-4, but ran into problems;
>
> I have successfully installed hdf5 (1.8.13) (make check install-->ok). like
> this;
> export LD_LIBRARYS_PATH="/home/per/local/lib /usr/local/lib"
> export CPPFLAGS="-I/home/per/local/include"
I don't know if it is relevant, but LD_LIBRARYS_PATH should, I believe, be:
LD_LIBRARY_PATH="/home/per/local/lib:/usr/local/lib"
I have not seen 'LD_LIBRARYS_PATH' before, and a google search is not showing
me any information about it. Section 3.3.1 of the following document describes
how to use LD_LIBRARY_PATH.
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
> export LDFLAGS="-L/home/per/local/lib"
> export LIBS="-lz -ldl"
> export CC=mpicc
> ./configure --prefix=/home/per/local/ -with-zlib=/home/per/local
> -enable-parallel
Unless this is a typo in the email, I believe you should use
'--enable-parallel', with two dashes, not '-enable-parallel', as you have
above. What is happening is that configure is not finding parallel symbols in
libhdf5, and so 'USE_PARALLEL' is not being defined. As a result, MPI_Comm is
being defined in ncdispatch.h; this is guarded by an "#ifndef USE_PARALLEL"
block. Looking at the config.log file you provided, it confirms that no
parallel symbols are found.
Can you confirm that libhdf5 actually built with parallel functionality?
Thanks,
-Ward
> make check
> make install
>
> Then I try to build the netcdf-4.3.2 C-libraries like this;
> export LD_LIBRARYS_PATH="/home/per/local/lib /usr/local/lib"
Again, I'm not sure if it is relevant, but this should be changed as described
above.
> export CPPFLAGS="-I/home/per/local/include"
> export LDFLAGS="-L/home/per/local/lib"
> export LIBS="-lz -ldl"
> export CC=mpicc
> ./configure --prefix=/home/per/local --enable-netcdf-4
> --enable-parallel-tests --disable-shared --disable-dap
> so far ok
> make check
> produces; (this is end-bit of the output...)
> ============================================================================
> Testsuite summary for netCDF 4.3.2
> ============================================================================
> # TOTAL: 26
> # PASS: 26
> # SKIP: 0
> # XFAIL: 0
> # FAIL: 0
> # XPASS: 0
> # ERROR: 0
> ============================================================================
> make[3]: Leaving directory `/home/per/software/netcdf-4.3.2/h5_test'
> make[2]: Leaving directory `/home/per/software/netcdf-4.3.2/h5_test'
> make[1]: Leaving directory `/home/per/software/netcdf-4.3.2/h5_test'
> Making check in libdispatch
> make[1]: Entering directory `/home/per/software/netcdf-4.3.2/libdispatch'
> make[1]: Nothing to be done for `check'.
> make[1]: Leaving directory `/home/per/software/netcdf-4.3.2/libdispatch'
> Making check in libsrc
> make[1]: Entering directory `/home/per/software/netcdf-4.3.2/libsrc'
> make[1]: Nothing to be done for `check'.
> make[1]: Leaving directory `/home/per/software/netcdf-4.3.2/libsrc'
> Making check in libsrc4
> make[1]: Entering directory `/home/per/software/netcdf-4.3.2/libsrc4'
> /bin/bash ../libtool --tag=CC --mode=compile mpicc -DHAVE_CONFIG_H -I.
> -I.. -I../include -I/home/per/local/include -g -O2 -MT
> libnetcdf4_la-nc4attr.lo -MD -MP -MF .deps/libnetcdf4_la-nc4attr.Tpo -c -o
> libnetcdf4_la-nc4attr.lo `test -f 'nc4attr.c' || echo './'`nc4attr.c
> libtool: compile: mpicc -DHAVE_CONFIG_H -I. -I.. -I../include
> -I/home/per/local/include -g -O2 -MT libnetcdf4_la-nc4attr.lo -MD -MP -MF
> .deps/libnetcdf4_la-nc4attr.Tpo -c nc4attr.c -o libnetcdf4_la-nc4attr.o
> In file included from nc4dispatch.h:15:0,
> from nc4attr.c:17:
> ../include/ncdispatch.h:90:13: error: conflicting types for 'MPI_Comm'
> typedef int MPI_Comm;
> ^
> In file included from /home/per/local/include/H5public.h:61:0,
> from /home/per/local/include/hdf5.h:24,
> from ../include/nc4internal.h:18,
> from nc4attr.c:15:
> /home/per/local/include/mpi.h:324:37: note: previous declaration of
> 'MPI_Comm' was here
> typedef struct ompi_communicator_t *MPI_Comm;
> ^
> In file included from nc4dispatch.h:15:0,
> from nc4attr.c:17:
> ../include/ncdispatch.h:91:13: error: conflicting types for 'MPI_Info'
> typedef int MPI_Info;
> ^
> In file included from /home/per/local/include/H5public.h:61:0,
> from /home/per/local/include/hdf5.h:24,
> from ../include/nc4internal.h:18,
> from nc4attr.c:15:
> /home/per/local/include/mpi.h:331:29: note: previous declaration of
> 'MPI_Info' was here
> typedef struct ompi_info_t *MPI_Info;
> ^
> In file included from nc4dispatch.h:15:0,
> from nc4attr.c:17:
> ../include/ncdispatch.h:92:0: warning: "MPI_COMM_WORLD" redefined [enabled by
> default]
> #define MPI_COMM_WORLD 0
> ^
> In file included from /home/per/local/include/H5public.h:61:0,
> from /home/per/local/include/hdf5.h:24,
> from ../include/nc4internal.h:18,
> from nc4attr.c:15:
> /home/per/local/include/mpi.h:1016:0: note: this is the location of the
> previous definition
> #define MPI_COMM_WORLD OMPI_PREDEFINED_GLOBAL( MPI_Comm, ompi_mpi_comm_world)
> ^
> In file included from nc4dispatch.h:15:0,
> from nc4attr.c:17:
> ../include/ncdispatch.h:93:0: warning: "MPI_INFO_NULL" redefined [enabled by
> default]
> #define MPI_INFO_NULL 0
> ^
> In file included from /home/per/local/include/H5public.h:61:0,
> from /home/per/local/include/hdf5.h:24,
> from ../include/nc4internal.h:18,
> from nc4attr.c:15:
> /home/per/local/include/mpi.h:743:0: note: this is the location of the
> previous definition
> #define MPI_INFO_NULL OMPI_PREDEFINED_GLOBAL(MPI_Info, ompi_mpi_info_null)
> ^
> make[1]: *** [libnetcdf4_la-nc4attr.lo] Error 1
> make[1]: Leaving directory `/home/per/software/netcdf-4.3.2/libsrc4'
> make: *** [check-recursive] Error 1
> per@per-HP-Z620-Workstation:~/software/netcdf-4.3.2$
>
> What is happening? If it's any help, I have attached the config.log file...
> I need the netcdf-4 to be able to install netcdf-fortran-4.4.0, which I need
> to install ROMS (regional Ocean Model System).
>
>
> Best regards!
> Per
>
>
Ticket Details
===================
Ticket ID: TRL-392354
Department: Support netCDF
Priority: Normal
Status: Closed