I’ve installed pgi 10.4 on our HPC cluster running SuSE SLES10SP2.
To install the latest netcdf software, hdf5 was installed, and netcdf could be compiled.
But when I try to use the netcdf I get sometimes this error message.
What does it mean ?
I used two example files from netcdf. One for f77 code, and the same for f90.
/usr/bin/ld:
/usr/local/apps/netcdf/4.1.1_pgi/lib/libnetcdf.a(netcdf4.o)(.data+0x3428):
reloc against `.text’: error 2
/usr/bin/ld: final link failed: Nonrepresentable section on output
What’s wrong ?
A second question:
We have a couple of different compiler installed (everybody has code witch only
get compiled using A,B,C …).
What is a good solution to set the env. automatically (with a single source command),
to set include paths, lib pathes etc. pp. ?
We are using gcc,gfortran,pgi,sun and intel ;(
/usr/bin/ld:
/usr/local/apps/netcdf/4.1.1_pgi/lib/libnetcdf.a(netcdf4.o)(.data+0x3428):
reloc against `.text': error 2
/usr/bin/ld: final link failed: Nonrepresentable section on output
I have not encountered this before nor have I been able to recreate the error here. How was NetCDF built? (i.e. what compiler environment variables were set before running configure). Also, if you used gcc to build the C portions for the library, which version of gcc did you use?
While most likely not related, UNIDATA did fix a bug in NetCDF that caused a problem when building with PGI 10.4. Just in case, you might try downloading the 4.1.2 package.
I could, after playing around with the compiler flags and building a new hdf5 (static and shared) successfully compile netcdf 4.1.1 and also the 4.1.2 beta.
I used the 10.6 PGI and 5 mins ago also the 10.9. Static libs are working correctly,
but running the configure script from netcdf always gives error messages like
checking whether the pgcc linker (pgf90 -m elf_x86_64) supports shared libraries… no
and finally no shared libs are created. But we need the shared libs for mpi code!
Any idea ?
export CXX=pgcpp
export F77=pgf90
export FC=pgf90
export LD=pgf90
export CFLAGS=“-O2” # also with -fPIC and/or -fpic
export FFLAGS=“-O2 -Msignextend” # also with -fPIC and/or -fpic
export CPPFLAGS=“-DpgiFortran” # also with -fPIC and/or -fpic