Cray compiler asks for a flag, then doesn't recognize it

1.5k Views Asked by At

I am trying to compile a code with crayftn.

I get an error message

/opt/cray/pe/cce/10.0.1/binutils/x86_64/x86_64-pc-linux-gnu/bin/ld: failed to convert GOTPCREL relocation; relink with --no-relax

So it wants the flag --no-relax? OK, I can do that. So I re-link with that flag, and then it tells me

ftn -O3 --no-relax -dynamic -h pic -h omp -o stream_cray stream_mpi.o mysecond.o
ftn-2115 crayftn: ERROR in command line
  "-no-relax" is an invalid command-line option.

So it asks for "--no-relax", but then it doesn't understand it. Anyone know of a way out of this conundrum? Or another way of solving the root problem in the first place?

1

There are 1 best solutions below

3
paulsm4 On

I found this link:

https://bb.cgd.ucar.edu/cesm/threads/failed-to-convert-gotpcrel-relocation-relink-with-no-relax.4494/

PROBLEM:

Hi, I get the following error message for CLM5.0 compilation with Intel compilers, during the final cesm bld ..ld: failed to convert GOTPCREL relocation; relink with --no-relax

SOLUTION:

Hi, Seems like found a solution to fix the compilation ...Adding of "-Wl,--no-relax" in LDFLAGS does not solve this problem, but "-mcmodel medium" in FFLAGS fixes this issue, after searching for "Relocation truncated to fit" in google search engine, it comes up with this link which was helpful to solve the issue "https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/268394"

Best Regards,Prabhakar

See also:

https://community.intel.com/t5/Intel-Fortran-Compiler/relocation-truncated-to-fit/td-p/1146616

This looks like mixing compilers and libraries from different systems mixed up, either 32bit vs. 64bit or installations for ifort and mpiifort based on different glibc or something similar.

I'm still curious about your "development environment":

Q: Have you been able to successfully compile, link and run ANY program with your crayftn? Q: What version of crayftn? 10.0.1? Q: What platform? Where is x86_64-pc-linux coming from? Just curious...