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

[netCDF #BBK-543101]: netcdf installation with parallel netcdf



Hello,

The issue appears to be with the static libpnetcdf; from the information you 
have sent, I see the following:

> /storage/softwares/installedsoftware/netcdf_4.4.0_parallel/lib/libpnetcdf.a(mpinetcdf.o):
> relocation R_X86_64_32 against `.rodata.str1.4' can not be used when making
> a shared object; recompile with -fPIC

It appears that you need to recompile libpnetcdf with -fPIC, possibly as a 
shared library instead of a static library.  That, or you will need to pass 
`--disable-shared` when compiling libnetcdf, and build it as a static library.

We can test that this is the problem by trying to build libnetcdf without 
pnetcdf support; if that works, we can be confident that this is the only 
issue.  If it doesn't work, then something else is going on. If that is the 
case, you can please provide your config.log generated by configure? 

Thanks, I hope this helps,

-Ward

> Hello,
> 
> I get the error even when I don't install parallel netcdf.
> 
> When I install hdf5 with --enable-parallel and then later install netcdf
> 4.3.2, I get the error as mentioned in the email.
> 
> How exactly do we fix this issue?
> 
> Thanks,
> Nitin
> 
> On Wed, Feb 11, 2015 at 12:34 PM, nitin bhat <address@hidden> wrote:
> 
> > Hi,
> >
> > I want to install parallel netcdf with netcdf. I have tried the following
> > and got the following error:
> >
> > To install, netcdf with parallel netcdf, the documentation talks about
> > carrying out the installation in the following way:
> >
> > Install zlib
> > Install hdf5 with --enable-parallel
> > install pnetcdf
> > install netcdf with --enable-pnetcdf
> >
> > I tried two cases
> >
> >  I installed hdf5-1.8.14 with pnetcdf 1.4.0
> >
> >
> >
> > *Now, while installing netcdf, I am getting the following error in the
> > make process. *
> >
> > libtool: link: mpiicc -shared  -fPIC -DPIC  .libs/libnetcdf_la-stub.o
> > -Wl,--whole-archive ../libdispatch/.libs/
> > libnetcdf2.a ../libdispatch/.libs/libdispatch.a
> > ../libsrc/.libs/libnetcdf3.a ../libsrc5/.libs/libnetcdf5.a
> > ../libdap2/.libs/libdap2.a ../oc2/.libs/liboc.a
> > ../libsrc4/.libs/libnetcdf4.a -Wl,--no-whole-archive
> > -L/storage/softwares/installedsoftware/netcdf_4.4.0_parallel/lib -lpnetcdf
> > /storage/softwares/installedsoftware/netcdf_4.4.0_parallel/lib/libhdf5_hl.a
> > /storage/softwares/installedsoftware/netcdf_4.4.0_parallel/lib/libhdf5.a
> > -lz -ldl -lm -lcurl  -O3   -Wl,-soname -Wl,libnetcdf.so.7 -o
> > .libs/libnetcdf.so.7.2.0
> > ld:
> > /storage/softwares/installedsoftware/netcdf_4.4.0_parallel/lib/libpnetcdf.a(mpinetcdf.o):
> > relocation R_X86_64_32 against `.rodata.str1.4' can not be used when making
> > a shared object; recompile with -fPIC
> > /storage/softwares/installedsoftware/netcdf_4.4.0_parallel/lib/libpnetcdf.a:
> > could not read symbols: Bad value
> > make[2]: *** [libnetcdf.la] Error 1
> > make[2]: Leaving directory
> > `/storage/softwares/installationfiles/netcdf_4.4.0_with_fortran_hdf5_zlib_parallel/netcdf-4.3.2/liblib'
> > make[1]: *** [all-recursive] Error 1
> > make[1]: Leaving directory
> > `/storage/softwares/installationfiles/netcdf_4.4.0_with_fortran_hdf5_zlib_parallel/netcdf-4.3.2'
> > make: *** [all] Error 2
> >
> >
> >
> >
> > *The following are the environment variables that I am using. *
> > export PERL_LOCAL_LIB_ROOT=/usr/
> > lib64/perl5/XML
> > export PATH=/opt/intel/itac/
> > 8.1.4.045/bin:/opt/intel/vtune_amplifier_xe_2013/bin64:/opt/intel/vtune_amplifier_xe_2013:/storage/softwares/installedsoftware/ferret/bin:/storage/softwares/installedsoftware/netcdf_4.4.0_parallel/bin:$PATH
> > export PERL5LIB=/usr/lib64/perl5/XML:/usr/lib64:$PERL5LIB
> > export
> > NETCDF_PATH=/storage/softwares/installedsoftware/netcdf_4.4.0_parallel
> > export
> > LD_LIBRARY_PATH=/storage/softwares/installedsoftware/netcdf_4.4.0_parallel/lib:$LD_LIBRARY_PATH
> > export
> > LDFLAGS="-L/storage/softwares/installedsoftware/netcdf_4.4.0_parallel/lib
> > -lhdf5_hl -lhdf5 -lz -lm"
> > export
> > LIBS=-L/storage/softwares/installedsoftware/netcdf_4.4.0_parallel/lib
> > export
> > CPPFLAGS="-I/storage/softwares/installedsoftware/netcdf_4.4.0_parallel/include
> > -DMPICH_IGNORE_CXX_SEEK"
> > export
> > FFFLAGS=-I/storage/softwares/installedsoftware/netcdf_4.4.0_parallel/include
> > export
> > FCFLAGS=-I/storage/softwares/installedsoftware/netcdf_4.4.0_parallel/include
> > export
> > LIB_NETCDF=/storage/softwares/installedsoftware/netcdf_4.4.0_parallel/lib
> > export
> > INC_NETCDF=/storage/softwares/installedsoftware/netcdf_4.4.0_parallel/include
> >
> > ##########
> > export I_MPI_CC=icc
> > export I_MPI_CXX=icpc
> >
> > export I_MPI_F77=ifort
> > export I_MPI_F90=ifort
> > ##############
> >
> > ###########
> > export CC=mpiicc
> > export CXX=mpiicpc
> >
> > export CFLAGS='-O3 -xHost -ip -no-prec-div -static-intel
> > -I/storage/softwares/installedsoftware/netcdf_4.4.0_parallel/include '
> > export CXXFLAGS='-O3 -xHost -ip -no-prec-div -static-intel
> > -I/storage/softwares/installedsoftware/netcdf_4.4.0_parallel/include'
> >
> > export MPICC=mpiicc
> > export MPICXX=mpicpc
> > export F77=mpiifort
> > export FC=mpiifort
> > export F90=mpiifort
> > export MPIF90=mpiifort
> > export MPIF77=mpiifort
> >
> > export FFLAGS='-O3 -xHost -ip -no-prec-div -static-intel
> > -I/storage/softwares/installedsoftware/netcdf_4.4.0_parallel/include'
> > export FCFLAGS='-O3 -xHost -ip -no-prec-div -static-intel
> > -I/storage/softwares/installedsoftware/netcdf_4.4.0_parallel/include'
> >
> > export CPP='icc -E'
> > export CXXCPP='icpc -E'
> >
> >
> > Thanks,
> > Nitin
> >
> >
> 
> 

Ticket Details
===================
Ticket ID: BBK-543101
Department: Support netCDF
Priority: Normal
Status: Closed