compile error

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

I am attching the text dump from jobcomp compiledump.txt, my cppdefs cppdefs.h, and param.h 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 symbol bry_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 symbol mixing_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 symbol coup_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 symbol avg_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 symbol coup_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 symbol avg_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

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.

Thanks, and for gfortran the solution is adding mcmodel=large flag in jobcomp :
elif [[ $FC == gfortran ]] ; then
CPP1=“cpp -traditional -DLinux”
CFT1=gfortran
FFLAGS1=“-O3 -fdefault-real-8 -fdefault-double-8 -mcmodel=large”