Ask Your Question
0

compile error

asked 2021-01-01 21:34:39 +0200

I am trying to set up a regional simulation. I am getting the following error:

I am attching the text dump from jobcomp C:\fakepath\compiledump.txt, my cppdefs C:\fakepath\cppdefs.h, and param.h C:\fakepath\param.h file. Can someone please help me out?

Error at compilation:

init_scalars.o: In function init_scalars_': init_scalars_.f:(.text+0x423): relocation truncated to fit: R_X86_64_PC32 against symbolbry_indices_integer_' defined in COMMON section in init_scalars.o init_scalars_.f:(.text+0x450): relocation truncated to fit: R_X86_64_PC32 against symbol mixing_csmooth_' defined in COMMON section in init_scalars.o init_scalars_.f:(.text+0x456): relocation truncated to fit: R_X86_64_PC32 against symbolmixing_ismooth_' defined in COMMON section in init_scalars.o init_arrays.o: In function init_arrays_tile_': init_arrays_.f:(.text+0xfa): relocation truncated to fit: R_X86_64_32S against symbolcoup_rufrc_bak_' defined in COMMON section in step.o init_arrays_.f:(.text+0x1ad): relocation truncated to fit: R_X86_64_32S against symbol avg_zeta_' defined in COMMON section in init_arrays.o init_arrays_.f:(.text+0x1b7): relocation truncated to fit: R_X86_64_32S against symbolavg_ubar_' defined in COMMON section in init_arrays.o init_arrays_.f:(.text+0x1c1): relocation truncated to fit: R_X86_64_32S against symbol avg_vbar_' defined in COMMON section in init_arrays.o init_arrays_.f:(.text+0x1cb): relocation truncated to fit: R_X86_64_32S against symbolcoup_rufrc_' defined in COMMON section in step.o init_arrays_.f:(.text+0x1d5): relocation truncated to fit: R_X86_64_32S against symbol coup_rufrc_bak_' defined in COMMON section in step.o init_arrays_.f:(.text+0x26a): relocation truncated to fit: R_X86_64_32S against symbolavg_zeta_' defined in COMMON section in init_arrays.o init_arrays_.f:(.text+0x272): additional relocation overflows omitted from the output gmake: * [croco] Error 1

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2021-01-03 08:12:46 +0200

updated 2021-01-03 08:13:37 +0200

I was able to resolve this issue by adding mcmodel medium flag in the jobcomp script. My understanding of the error is that the error occurs when grid size is large and the compiler cannot allocate larger arrays with default flags. So mcmodel medium flag is required.

My modified jobcomp script with that flag looks like this for ifort compiler:

!# Set compilation options !# if [[ $OS == Linux || $OS == Darwin ]] ; then # ===== LINUX ===== if [[ $FC == ifort || $FC == ifc ]] ; then CPP1="cpp -traditional -DLinux -DIfort" CFT1=ifort FFLAGS1="-O3 -fno-alias -i4 -r8 -fp-model precise -mcmodel medium"

Note the '-mcmodel medium' added to the script.

Earlier I was trying to compile jobcomp with this command: " ./jobcomp -mcmodel medium " but this fails because flag has to be switched on inside the jobcomp script.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2021-01-01 21:34:39 +0200

Seen: 105 times

Last updated: Jan 03