[MITgcm-support] Compiler error when doubling horizontal resolution

Habib Toye Mahamadou Kele habib.toyemahamadoukele at kaust.edu.sa
Wed Dec 23 15:57:15 EST 2015


Hi Roland,

The issue you encountered is due to the size of the arrays (you increased
the resolution therefore the arrays became larger). So you need to review
the memory storage management, by using compiler flag (what you are trying
to do) or modify the code (what I think you do not want to do).

I did not try to compile the code to reproduce your error and try to solve
it (because it would take me some time to set the code and compile it).

However the following links might be helpfull:

http://mitgcm.org/pipermail/mitgcm-support/2006-September/004231.html

http://mitgcm.org/pipermail/mitgcm-support/2006-September/004232.html


https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/270056?db=5
and then
https://software.intel.com/en-us/articles/avoiding-relocation-errors-when-building-applications-with-large-global-or-static-data-on-intel64/


http://stackoverflow.com/questions/10486116/what-does-this-gcc-error-relocation-truncated-to-fit-mean
(read the ticked response)
and then
https://www.technovelty.org/c/relocation-truncated-to-fit-wtf.html


http://stackoverflow.com/questions/12916176/gfortran-for-dummies-what-does-mcmodel-medium-do-exactly


http://stackoverflow.com/questions/11131998/from-which-version-of-gcc-does-mcmodel-large-work


Furthermore,
"the -shared-intel flag is not recognized by gcc" since it is a specific
intel flag.


Regards,
Habib TOYE


On Wed, Dec 23, 2015 at 9:43 PM, Roland Young <Roland.Young at physics.ox.ac.uk
> wrote:

> Hi,
>
> I have just increased the horizontal resolution of my model from
> 512x256x33 to 1024x512x33, but I am getting the following compiler error
> (example given for a C routine, but similar for Fortran):
>
> /home/jupiter/gfd/young/runs/testing/h222_test/build/sigreg.c:34:(.text+0x3):
> relocation truncated to fit: R_X86_64_PC32 against symbol `sigreg_ip'
> defined in COMMON section in sigreg.o
>
> I managed to remove this error from the Fortran routines by adding the
> following compiler flags
>
> FFLAGS="$FFLAGS -mcmodel=medium -shared-intel”
>
> However, I have not been able to remove it from the C routines. I have
> tried
>
> CFLAGS="$CFLAGS -mcmodel=medium”
> CFLAGS="$CFLAGS -mcmodel=large”
> CFLAGS="$CFLAGS -mmodel=medium”
> CFLAGS="$CFLAGS -mmodel=large”
>
> and all give the same error (the -shared-intel flag is not recognised by
> gcc). I think I’m on the right lines but what else needs to be done to fix
> the C compiler error?
>
> Thanks,
>
> Roland
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
>
>

-- 

------------------------------
This message and its contents, including attachments are intended solely 
for the original recipient. If you are not the intended recipient or have 
received this message in error, please notify me immediately and delete 
this message from your computer system. Any unauthorized use or 
distribution is prohibited. Please consider the environment before printing 
this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20151223/9cb04f15/attachment.htm>


More information about the MITgcm-support mailing list