[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #XSZ-548173]: Parallel netCDF installation errors
- Subject: [netCDF #XSZ-548173]: Parallel netCDF installation errors
- Date: Tue, 10 Mar 2015 09:58:31 -0600
Hello Graham,
Thank you for providing the files. I'm glad you were able to move beyond the
initial error with configuration.
The new error you are encountering when compiling,
/scratch/dione/packages_new_parallel/lib/libhdf5_hl.a(H5DS.o): relocation
R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared
object; recompile with -fPIC
/scratch/dione/packages_new_parallel/lib/libhdf5_hl.a: could not read
is related to position independent code. You can either recompile libhdf5 as a
shared library (or a static library but also specify '-fPIC' as a mpicc
option), or you can try compiling libnetcdf as a static library. You would do
this by passing the '--disable-shared' flag when running configure, e.g.
CC=/usr/bin/mpicc CPPFLAGS=-I/scratch/dione/packages_new/include
LDFLAGS=-L/scratch/dione/packages_new/lib
LD_LIBRARY_PATH=/scratch/dione/packages_new/lib ./configure
--prefix=/scratch/dione/packages_new_parallel --disable-shared
Let me know if this works for you.
Have a good day,
-Ward
> Hi,
>
> I am trying to compile and install netCDF with a parallel build of HDF5.
>
> First I installed an up to date zlib then I installed a serial HDF5 and
> a parallel HDF5 so that
>
> /scratch/dione/packages_new/ ... contains the HDF5 and zlib lib,
> include, bin folders.
>
> /scratch/dione/packages_new_parallel ... contains the parallel HDF5 and
> zlib lib, include and bin folders.
>
> ZLIB INSTALL:
> ./configure --prefix=/scratch/dione/packages_new
> make
> make test
> make install prefix=/scratch/dione/packages_new
> &
> ./configure --prefix=/scratch/dione/packages_new_parallel
> make
> make test
> make install prefix=/scratch/dione/packages_new_parallel
>
> HDF5 INSTALL:
> ./configure --prefix=/scratch/dione/packages_new --enable-fortran
> --enable-hl
> --with-zlib=/scratch/dione/packages/include,/scratch/dione/packages_new/lib
> make
> make check
> make install prefix=/scratch/dione/packages_new
> &
> ./configure --prefix=/scratch/dione/packages_new_parallel
> --enable-parallel --enable-fortran --enable-hl
> --with-zlib=/scratch/dione/packages_new_parallel/include,/scratch/dione/packages_new_parallel/lib
> make
> make check
> make install prefix=/scratch/dione/packages_new_parallel
>
> ________
>
> Then, to install the serial netCDF I used
>
> ./configure --prefix=/scratch/dione/packages_new
> CPPFLAGS=-I/scratch/dione/packages_new/include
> LDFLAGS=-L/scratch/dione/packages_new/lib
> LD_LIBRARY_PATH=/scratch/dione/packages_new/lib
> make
> make check
> make install prefix=/scratch/dione/packages_new
>
> This worked successfully.
>
> However, I tried to do the same for parallel netCDF I ran into errors.
>
> I tried two cases, one of which wouldn't compile, and one of which
> failed to 'make'.
>
> 1) I used
> ./configure --prefix=/scratch/dione/packages_new_parallel
> CPPFLAGS=-I/scratch/dione/packages_new_parallel/include
> LDFLAGS=-L/scratch/dione/packages_new_parallel/lib
> LD_LIBRARY_PATH=/scratch/dione/packages_new_parallel
>
> and I get the error:
> checking hdf5.h usability ... no
> checking hdf5.h presence ... no
> checking for hdf5.h ... no
> configure: error: Compiling a test with HDF5 failed. Either hdf5.h
> cannot be found, or config.log should be checked for other reason
>
> I've included the config.log file and named it config1.log
>
> 2) I was hunting online and a similar error was reported stating that
> the error message might points to the fact that the compiler isn't
> correct. So, if I specifically tell it where the parallel compiler is
> then it seems to compile.
> $ ./configure --prefix=/scratch/dione/packages_new_parallel
> CPPFLAGS=-I/scratch/dione/packages_new_parallel/include
> LDFLAGS=-L/scrach/dione/packages_new_parallel/lib
> LD_LIBRARY_PATH=/scratch/dione/packages_new_parallel/lib
> CC=/usr/bin/mpicc
>
> However, I then type 'make' and get the error below. I've included the
> config.log file and named it config2.log.
>
> Do you know what may be causing this issue?
>
> Many thanks,
> Graham
>
>
> ERROR MESSAGE:
> make LD_LIBRARY_PATH=/scratch/dione/packages_new_parallel/lib
> make all-recursive
> make[1]: Entering directory
> `/scratch/dione/packages_new_parallel/netcdf-c-4.3.3.1'
> Making all in include
> make[2]: Entering directory
> `/scratch/dione/packages_new_parallel/netcdf-c-4.3.3.1/include'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory
> `/scratch/dione/packages_new_parallel/netcdf-c-4.3.3.1/include'
> Making all in h5_test
> make[2]: Entering directory
> `/scratch/dione/packages_new_parallel/netcdf-c-4.3.3.1/h5_test'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory
> `/scratch/dione/packages_new_parallel/netcdf-c-4.3.3.1/h5_test'
> Making all in libdispatch
> make[2]: Entering directory
> `/scratch/dione/packages_new_parallel/netcdf-c-4.3.3.1/libdispatch'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory
> `/scratch/dione/packages_new_parallel/netcdf-c-4.3.3.1/libdispatch'
> Making all in libsrc
> make[2]: Entering directory
> `/scratch/dione/packages_new_parallel/netcdf-c-4.3.3.1/libsrc'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory
> `/scratch/dione/packages_new_parallel/netcdf-c-4.3.3.1/libsrc'
> Making all in libsrc4
> make[2]: Entering directory
> `/scratch/dione/packages_new_parallel/netcdf-c-4.3.3.1/libsrc4'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory
> `/scratch/dione/packages_new_parallel/netcdf-c-4.3.3.1/libsrc4'
> Making all in liblib
> make[2]: Entering directory
> `/scratch/dione/packages_new_parallel/netcdf-c-4.3.3.1/liblib'
> /bin/bash ../libtool --tag=CC --mode=link /usr/bin/mpicc -g -O2
> -version-info 9:0:2 -L/scratch/dione/packages_new_parallel/lib -o
> libnetcdf.la -rpath /scratch/dione/packages_new_parallel/lib
> libnetcdf_la-stub.lo ../libdispatch/libnetcdf2.la
> ../libdispatch/libdispatch.la ../libsrc/libnetcdf3.la
> ../libsrc4/libnetcdf4.la -lhdf5_hl -lhdf5 -ldl -lm -lz
> libtool: link: /usr/bin/mpicc -shared -fPIC -DPIC
> .libs/libnetcdf_la-stub.o -Wl,--whole-archive
> ../libdispatch/.libs/libnetcdf2.a ../libdispatch/.libs/libdispatch.a
> ../libsrc/.libs/libnetcdf3.a ../libsrc4/.libs/libnetcdf4.a
> -Wl,--no-whole-archive -L/scratch/dione/packages_new_parallel/lib
> /scratch/dione/packages_new_parallel/lib/libhdf5_hl.a
> /scratch/dione/packages_new_parallel/lib/libhdf5.a -ldl -lm -lz -O2
> -Wl,-soname -Wl,libnetcdf.so.7 -o .libs/libnetcdf.so.7.2.0
> /usr/bin/ld:
> /scratch/dione/packages_new_parallel/lib/libhdf5_hl.a(H5DS.o):
> relocation R_X86_64_32 against `.rodata.str1.1' can not be used when
> making a shared object; recompile with -fPIC
> /scratch/dione/packages_new_parallel/lib/libhdf5_hl.a: could not read
> symbols: Bad value
> collect2: ld returned 1 exit status
> make[2]: *** [libnetcdf.la] Error 1
> make[2]: Leaving directory
> `/scratch/dione/packages_new_parallel/netcdf-c-4.3.3.1/liblib'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/scratch/dione/packages_new_parallel/netcdf-c-4.3.3.1'
> make: *** [all] Error 2
>
>
> --
> Graham Kerr
> Solar Physics PhD Student
>
> Rm 604 Kelvin Building,
> SUPA School of Physics and Astronomy
> University of Glasgow,
> Glasgow,
> G12 8QQ
>
> T: +44 141 330 2960
> E: address@hidden
> W: http://www.astro.gla.ac.uk/?p=1417
>
>
>
Ticket Details
===================
Ticket ID: XSZ-548173
Department: Support netCDF
Priority: Normal
Status: Closed