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

[netCDF #FUI-502452]: Problems adding CXX to NetCDF build



Hi Ray,

> We are migrating our supercomputers.  The following is on a vanilla
> X86_64 box running RHEL 6.
> 
> Any help would be greatly appreciated because I do not see what I am
> doing wrong. Thanks.

The configure script for netCDF-cxx4 4.2 evidently can't find the netCDF C
library you installed, although it finds the associated include file, netcdf.h:

  checking netcdf.h usability... yes
  checking netcdf.h presence... yes
  checking for netcdf.h... yes
  checking for library containing nc_create... no

Check the config.log file for the details of what happened at this
step.  nc_create should have been found in the libnetcdf.a static
library installed in /N/soft/rhel6/netcdf_c/intel/mpi/4.2.1.1/lib

Make sure you weren't running this last configure step using sudo, and 
expecting to inherit environment variables such as LDFLAGS.  You can
run "make install" as sudo, but should build as a non-root user, in 
general.

Otherwise, I don't see anything wrong.  We don't test the cxx4 build
on all platforms or with mpicxx, so there may be a problem with that
combination that we don't encounter here.

--Russ

> Cat of my build script and its output for NetCDF 4.2.1.1:
> 
> [rsheppar@qtii001 netcdf-4.2.1.1]$ cat compile_netcdf_c.bash
> #!/bin/bash
> export F77=mpif77
> export CXX=mpicxx
> export FF=mpif77
> export FC=mpif90
> export CC=mpicc
> export CPPFLAGS="-I/N/soft/rhel6/curl/intel/7.28.1/include/curl
> -I/N/soft/rhel6/hdf5/intel/mpi/1.8.10/include
> -I/N/soft/rhel6/hdf5/tools/include -I/N/soft/rhel6/hdf5/tools/include"
> export LDFLAGS="-L/N/soft/rhel6/curl/intel/7.28.1/lib
> -L/N/soft/rhel6/hdf5/intel/mpi/1.8.10/lib -lhdf5
> -L/N/soft/rhel6/hdf5/tools/include -L/N/soft/rhel6/hdf5/tools/lib"
> export FCFLAGS=" -O2 "
> export FFLAGS="-O2"
> export CFLAGS=" -O2"
> ./configure --prefix=/N/soft/rhel6/netcdf_c/intel/mpi/4.2.1.1
> --disable-dll  --enable-netcdf-4 --disable-shared
> [rsheppar@qtii001 netcdf-4.2.1.1]$ ./compile_netcdf_c.bash
> configure: netCDF 4.2.1.1
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking target system type... x86_64-unknown-linux-gnu
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> configure: checking user options
> checking whether a win32 DLL is desired... no
> checking whether a NCIO_MINBLOCKSIZE was specified... 256
> checking if fsync support is enabled... yes
> checking whether extra valgrind tests should be run... no
> checking whether we should try to build netCDF-4... yes
> checking whether reading of HDF4 SD files is to be enabled... no
> checking whether to fetch some sample HDF4 files from Unidata ftp site
> to test HDF4 reading (requires wget)... no
> checking whether parallel I/O for classic and 64-bit offset files using
> parallel-netcdf is to be enabled... no
> checking whether extra example tests should be run... no
> checking whether parallel IO tests should be run... no
> checking whether a default chunk size in bytes was specified... 4194304
> checking whether a maximum per-variable cache size for HDF5 was
> specified... 67108864
> checking whether a number of chunks for the default per-variable cache
> was specified... 10
> checking whether a default file cache size for HDF5 was specified... 4194304
> checking whether a default file cache maximum number of elements for
> HDF5 was specified... 1009
> checking whether a default cache preemption for HDF5 was specified... 0.75
> checking whether netCDF-4 logging is enabled... no
> checking whether cdmremote client is to be built... no
> checking whether DAP client is to be built... yes
> checking for style of include used by make... GNU
> checking for gcc... mpicc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether mpicc accepts -g... yes
> checking for mpicc option to accept ISO C89... none needed
> checking dependency style of mpicc... gcc3
> checking for curl_easy_setopt in -lcurl... yes
> checking for library containing curl_easy_setopt... -lcurl
> checking whether dap remote testing should be enabled (default on)... yes
> checking whether netcdf4 group names should be enabled (default on)... yes
> checking whether the time-consuming dap tests should be enabled (default
> off)... no
> checking whether netCDF extra tests should be run (developers only)... no
> checking whether FFIO will be used... no
> checking whether examples should be built... yes
> checking whether v2 netCDF API should be built... yes
> checking whether the ncgen/ncdump/nccopy should be built... yes
> checking whether test should be built and run... yes
> checking whether large file (> 2GB) tests should be run... no
> checking whether benchmaks should be run (experimental)... no
> checking whether extreme numbers should be used in tests... yes
> checking where to put large temp files if large file tests are run... .
> configure: finding C compiler
> checking for gcc... (cached) mpicc
> checking whether we are using the GNU C compiler... (cached) yes
> checking whether mpicc accepts -g... (cached) yes
> checking for mpicc option to accept ISO C89... (cached) none needed
> checking dependency style of mpicc... (cached) gcc3
> checking whether mpicc and cc understand -c and -o together... yes
> checking for an ANSI C-conforming const... yes
> checking whether a CURLOPT_KEYPASSWD is defined... yes
> configure: setting up libtool
> checking how to print strings... printf
> checking for a sed that does not truncate output... /bin/sed
> checking for grep that handles long lines and -e... /bin/grep
> checking for egrep... /bin/grep -E
> checking for fgrep... /bin/grep -F
> checking for ld used by mpicc... /usr/bin/ld
> checking if the linker (/usr/bin/ld) is GNU ld... yes
> checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
> checking the name lister (/usr/bin/nm -B) interface... BSD nm
> checking whether ln -s works... yes
> checking the maximum length of command line arguments... 1966080
> checking whether the shell understands some XSI constructs... yes
> checking whether the shell understands "+="... yes
> checking how to convert x86_64-unknown-linux-gnu file names to
> x86_64-unknown-linux-gnu format... func_convert_file_noop
> checking how to convert x86_64-unknown-linux-gnu file names to toolchain
> format... func_convert_file_noop
> checking for /usr/bin/ld option to reload object files... -r
> checking for objdump... objdump
> checking how to recognize dependent libraries... pass_all
> checking for dlltool... no
> checking how to associate runtime and link libraries... printf %s\n
> checking for ar... ar
> checking for archiver @FILE support... @
> checking for strip... strip
> checking for ranlib... ranlib
> checking command to parse /usr/bin/nm -B output from mpicc object... ok
> checking for sysroot... no
> checking for mt... no
> checking if : is a manifest tool... no
> checking how to run the C preprocessor... mpicc -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking for dlfcn.h... yes
> checking for objdir... .libs
> checking if mpicc supports -fno-rtti -fno-exceptions... yes
> checking for mpicc option to produce PIC... -fPIC -DPIC
> checking if mpicc PIC flag -fPIC -DPIC works... yes
> checking if mpicc static flag -static works... no
> checking if mpicc supports -c -o file.o... yes
> checking if mpicc supports -c -o file.o... (cached) yes
> checking whether the mpicc linker (/usr/bin/ld -m elf_x86_64) supports
> shared libraries... yes
> checking dynamic linker characteristics... GNU/Linux ld.so
> checking how to hardcode library paths into programs... immediate
> checking whether stripping libraries is possible... yes
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... no
> checking whether to build static libraries... yes
> configure: finding other utilities
> checking for doxygen... doxygen
> checking for special C compiler options needed for large files... no
> checking for _FILE_OFFSET_BITS value needed for large files... no
> configure: displaying some results
> checking CPPFLAGS... -I/N/soft/rhel6/curl/intel/7.28.1/include/curl
> -I/N/soft/rhel6/hdf5/intel/mpi/1.8.10/include
> -I/N/soft/rhel6/hdf5/tools/include -I/N/soft/rhel6/hdf5/tools/include
> checking CC CFLAGS... mpicc  -O2
> checking type mpicc... mpicc is /N/soft/rhel6/openmpi/intel/1.6.3/bin/mpicc
> checking CXX... mpicxx
> checking CXXFLAGS...
> checking type mpicxx... mpicxx is
> /N/soft/rhel6/openmpi/intel/1.6.3/bin/mpicxx
> checking FC... mpif90
> checking FFLAGS... -O2
> checking type mpif90... mpif90 is
> /N/soft/rhel6/openmpi/intel/1.6.3/bin/mpif90
> checking F90... unset
> checking AR... ar
> checking AR_FLAGS... cru
> checking type ar... ar is /usr/bin/ar
> checking NM... /usr/bin/nm -B
> checking NMFLAGS...
> configure: checking types, headers, and functions
> checking for stdlib.h... (cached) yes
> checking for sys/types.h... (cached) yes
> checking sys/param.h usability... yes
> checking sys/param.h presence... yes
> checking for sys/param.h... yes
> checking for dirent.h that defines DIR... yes
> checking for library containing opendir... none required
> checking for ANSI C header files... (cached) yes
> checking for sys/wait.h that is POSIX.1 compatible... yes
> checking whether time.h and sys/time.h may both be included... yes
> checking locale.h usability... yes
> checking locale.h presence... yes
> checking for locale.h... yes
> checking stdio.h usability... yes
> checking stdio.h presence... yes
> checking for stdio.h... yes
> checking stdarg.h usability... yes
> checking stdarg.h presence... yes
> checking for stdarg.h... yes
> checking errno.h usability... yes
> checking errno.h presence... yes
> checking for errno.h... yes
> checking ctype.h usability... yes
> checking ctype.h presence... yes
> checking for ctype.h... yes
> checking fcntl.h usability... yes
> checking fcntl.h presence... yes
> checking for fcntl.h... yes
> checking malloc.h usability... yes
> checking malloc.h presence... yes
> checking for malloc.h... yes
> checking for stdlib.h... (cached) yes
> checking for string.h... (cached) yes
> checking for strings.h... (cached) yes
> checking for unistd.h... (cached) yes
> checking for sys/stat.h... (cached) yes
> checking getopt.h usability... yes
> checking getopt.h presence... yes
> checking for getopt.h... yes
> checking sys/time.h usability... yes
> checking sys/time.h presence... yes
> checking for sys/time.h... yes
> checking for vprintf... yes
> checking for _doprnt... no
> checking sys/resource.h usability... yes
> checking sys/resource.h presence... yes
> checking for sys/resource.h... yes
> checking for stdbool.h that conforms to C99... yes
> checking for _Bool... yes
> checking for strlcat... no
> checking for strerror... yes
> checking for snprintf... yes
> checking for strchr... yes
> checking for strrchr... yes
> checking for strcat... yes
> checking for strcpy... yes
> checking for strdup... yes
> checking for strcasecmp... yes
> checking for strtod... yes
> checking for strtoll... yes
> checking for strtoull... yes
> checking for strstr... yes
> checking for mkstemp... yes
> checking for rand... yes
> checking for getrlimit... yes
> checking for gettimeofday... yes
> checking for fsync... yes
> checking for MPI_Comm_f2c... yes
> checking whether in-memory files are enabled... yes
> checking for memmove... yes
> checking for getpagesize... yes
> checking for sysconf... yes
> checking whether mmap is enabled for in-memory files... no
> checking for stdlib.h... (cached) yes
> checking for unistd.h... (cached) yes
> checking for sys/param.h... (cached) yes
> checking for getpagesize... (cached) yes
> checking for working mmap... yes
> checking for mremap... yes
> checking for size_t... yes
> checking for working alloca.h... yes
> checking for alloca... yes
> checking whether isnan is declared... yes
> checking whether isinf is declared... yes
> checking whether isfinite is declared... yes
> checking whether signbit is declared... yes
> checking for struct stat.st_blksize... yes
> checking for IEEE floating point format... yes
> checking for size_t... (cached) yes
> checking for off_t... yes
> checking for ssize_t... yes
> checking for ptrdiff_t... yes
> checking for uchar... no
> checking for longlong... no
> checking whether char is unsigned... no
> checking whether byte ordering is bigendian... no
> checking size of short... 2
> checking size of int... 4
> checking size of long... 8
> checking size of long long... 8
> checking size of float... 4
> checking size of double... 8
> checking size of off_t... 8
> checking size of size_t... 8
> checking for library containing deflate... none required
> checking for floor in -lm... yes
> checking for library containing SZ_Compress... -lsz
> checking for library containing H5Fflush... -lhdf5
> checking for library containing H5DSis_scale... -lhdf5_hl
> checking hdf5.h usability... yes
> checking hdf5.h presence... yes
> checking for hdf5.h... yes
> checking for H5Pget_fapl_mpiposix... yes
> checking for H5Pget_fapl_mpio... yes
> checking for H5Pset_deflate... yes
> checking for H5Z_SZIP... no
> checking whether parallel I/O features are to be included... yes
> checking for long long int... no
> checking for unsigned long long int... yes
> checking what to call the output of the ftpbin target...
> binary-netcdf-4.2.1.1.tar mpif90 mpicxx
> checking binary distribution directory... /home/ftp/pub/binary/dummy_system
> checking value of LIBS... -lhdf5_hl -lhdf5 -lsz -lm -lcurl
> configure: generating header files and makefiles
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating nc-config
> config.status: creating netcdf.pc
> config.status: creating include/Makefile
> config.status: creating h5_test/Makefile
> config.status: creating man4/Makefile
> config.status: creating man4/images/Makefile
> config.status: creating libsrc/Makefile
> config.status: creating libsrc4/Makefile
> config.status: creating nctest/Makefile
> config.status: creating nc_test4/Makefile
> config.status: creating nc_test/Makefile
> config.status: creating ncdump/Makefile
> config.status: creating ncgen3/Makefile
> config.status: creating ncgen/Makefile
> config.status: creating examples/Makefile
> config.status: creating examples/C/Makefile
> config.status: creating examples/CDL/Makefile
> config.status: creating oc/Makefile
> config.status: creating libdap2/Makefile
> config.status: creating libcdmr/Makefile
> config.status: creating librpc/Makefile
> config.status: creating libdispatch/Makefile
> config.status: creating liblib/Makefile
> config.status: creating ncdump/cdl4/Makefile
> config.status: creating ncdump/expected4/Makefile
> config.status: creating ncdap_test/Makefile
> config.status: creating ncdap_test/testdata3/Makefile
> config.status: creating ncdap_test/expected3/Makefile
> config.status: creating ncdap_test/expected4/Makefile
> config.status: creating ncdap_test/expectremote3/Makefile
> config.status: creating ncdap_test/expectremote4/Makefile
> config.status: creating config.h
> config.status: executing depfiles commands
> config.status: executing libtool commands
> [rsheppar@qtii001 netcdf-4.2.1.1]$
> 
> {NOTE: "make" and "make install" run without troubles.  "make check"
> seems to choke for no shared object libraries.  On our machine, the
> compute nodes are far away from the general file systems so shared
> objects are very much discouraged.}
> 
> Now, I move to CXX4-4.2:
> 
> Cat of build script and its output:
> 
> [rsheppar@qtii001 netcdf-cxx4-4.2]$ cat compile_netcdf_cxx.bash
> #!/bin/bash
> export F77=mpif77
> export CXX=mpicxx
> export FF=mpif77
> export FC=mpif90
> export CC=mpicc
> export CPPFLAGS="-I/N/soft/rhel6/curl/intel/7.28.1/include/curl
> -I/N/soft/rhel6/netcdf_c/intel/mpi/4.2.1.1/include
> -I/N/soft/rhel6/hdf5/intel/mpi/1.8.10/include
> -I/N/soft/rhel6/hdf5/tools/include -I/N/soft/rhel6/hdf5/tools/include"
> export LDFLAGS="-L/N/soft/rhel6/curl/intel/7.28.1/lib
> -L/N/soft/rhel6/netcdf_c/intel/mpi/4.2.1.1/lib
> -L/N/soft/rhel6/hdf5/intel/mpi/1.8.10/lib -lhdf5
> -L/N/soft/rhel6/hdf5/tools/include -L/N/soft/rhel6/hdf5/tools/lib"
> export FCFLAGS=" -O2 "
> export FFLAGS="-O2"
> export CFLAGS=" -O2"
> ./configure --prefix=/N/soft/rhel6/netcdf_cxx/intel/mpi/4.4.2
> --disable-shared
> 
> [rsheppar@qtii001 netcdf-cxx4-4.2]$ ./compile_netcdf_cxx.bash
> configure: netCDF-cxx4 4.2
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking target system type... x86_64-unknown-linux-gnu
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> configure: checking user options
> checking whether netCDF extra tests should be run (developers only)... no
> checking whether large file (> 2GB) tests should be run... no
> checking whether benchmaks should be run (experimental)... no
> checking where to put large temp files if large file tests are run... .
> configure: finding other utilities
> configure: setting up libtool
> checking how to print strings... printf
> checking for style of include used by make... GNU
> checking for gcc... mpicc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether mpicc accepts -g... yes
> checking for mpicc option to accept ISO C89... none needed
> checking dependency style of mpicc... gcc3
> checking for a sed that does not truncate output... /bin/sed
> checking for grep that handles long lines and -e... /bin/grep
> checking for egrep... /bin/grep -E
> checking for fgrep... /bin/grep -F
> checking for ld used by mpicc... /usr/bin/ld
> checking if the linker (/usr/bin/ld) is GNU ld... yes
> checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
> checking the name lister (/usr/bin/nm -B) interface... BSD nm
> checking whether ln -s works... yes
> checking the maximum length of command line arguments... 1966080
> checking whether the shell understands some XSI constructs... yes
> checking whether the shell understands "+="... yes
> checking for /usr/bin/ld option to reload object files... -r
> checking for objdump... objdump
> checking how to recognize dependent libraries... pass_all
> checking for ar... ar
> checking for strip... strip
> checking for ranlib... ranlib
> checking command to parse /usr/bin/nm -B output from mpicc object... ok
> checking how to run the C preprocessor... mpicc -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking for dlfcn.h... yes
> checking for objdir... .libs
> checking if mpicc supports -fno-rtti -fno-exceptions... yes
> checking for mpicc option to produce PIC... -fPIC -DPIC
> checking if mpicc PIC flag -fPIC -DPIC works... yes
> checking if mpicc static flag -static works... no
> checking if mpicc supports -c -o file.o... yes
> checking if mpicc supports -c -o file.o... (cached) yes
> checking whether the mpicc linker (/usr/bin/ld -m elf_x86_64) supports
> shared libraries... yes
> checking dynamic linker characteristics... GNU/Linux ld.so
> checking how to hardcode library paths into programs... immediate
> checking whether stripping libraries is possible... yes
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... no
> checking whether to build static libraries... yes
> checking whether we are using the GNU C++ compiler... yes
> checking whether mpicxx accepts -g... yes
> checking dependency style of mpicxx... gcc3
> checking how to run the C++ preprocessor... mpicxx -E
> checking for ld used by mpicxx... /usr/bin/ld -m elf_x86_64
> checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
> checking whether the mpicxx linker (/usr/bin/ld -m elf_x86_64) supports
> shared libraries... yes
> checking for mpicxx option to produce PIC... -fPIC -DPIC
> checking if mpicxx PIC flag -fPIC -DPIC works... yes
> checking if mpicxx static flag -static works... no
> checking if mpicxx supports -c -o file.o... yes
> checking if mpicxx supports -c -o file.o... (cached) yes
> checking whether the mpicxx linker (/usr/bin/ld -m elf_x86_64) supports
> shared libraries... yes
> checking dynamic linker characteristics... (cached) GNU/Linux ld.so
> checking how to hardcode library paths into programs... immediate
> checking for gawk... (cached) gawk
> checking for gcc... (cached) mpicc
> checking whether we are using the GNU C compiler... (cached) yes
> checking whether mpicc accepts -g... (cached) yes
> checking for mpicc option to accept ISO C89... (cached) none needed
> checking dependency style of mpicc... (cached) gcc3
> checking how to run the C preprocessor... mpicc -E
> checking whether ln -s works... yes
> checking whether make sets $(MAKE)... (cached) yes
> checking stddef.h usability... yes
> checking stddef.h presence... yes
> checking for stddef.h... yes
> checking for stdlib.h... (cached) yes
> checking for string.h... (cached) yes
> checking for stdbool.h that conforms to C99... yes
> checking for _Bool... yes
> checking for size_t... yes
> checking for ptrdiff_t... yes
> checking for stdlib.h... (cached) yes
> checking for GNU libc compatible malloc... yes
> checking for special C compiler options needed for large files... no
> checking for _FILE_OFFSET_BITS value needed for large files... no
> checking netcdf.h usability... yes
> checking netcdf.h presence... yes
> checking for netcdf.h... yes
> checking for library containing nc_create... no
> checking for nc_def_opaque... no
> checking for nccreate... no
> checking for nc_set_log_level... no
> checking for oc_open... no
> checking for nc_use_parallel_enabled... no
> configure: error: NetCDF must be built with netCDF-4 enabled.
> [rsheppar@qtii001 netcdf-cxx4-4.2]$
> 
> 
> 
> 
> 
> 
> --
> Respectfully,
> Ray Sheppard
> address@hidden
> http://pti.iu.edu/sciapt
> 317-274-0016
> 
> Principal Analyst
> Scientific Applications and Performance Tuning
> Research Technologies
> University Information Technological Services
> IUPUI campus
> Indiana University
> 
> My "pithy" saying:  Science is the art of translating the world
> into language. Unfortunately, that language is mathematics.
> Bumper sticker wisdom: Make it idiot-proof and they will make a
> better idiot.
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: FUI-502452
Department: Support netCDF
Priority: Normal
Status: Closed