[MITgcm-support] Compiler error when doubling horizontal resolution

Habib Toye Mahamadou Kele habib.toyemahamadoukele at kaust.edu.sa
Mon Jan 11 08:23:29 EST 2016


Hi Roland,

Thank you for the update!

Regards,
Habib TOYE


On Mon, Jan 11, 2016 at 2:47 PM, Roland Young <young at atm.ox.ac.uk> wrote:

> Hi Habib,
>
> Thanks for your reply. I had seen a few of those links before - I found a
> few tips to get around the Fortran problem using information from those
> links, but I was unable to find anything that fixed the C problem.
>
> In any case, I was able to get around the problem in practice by
> increasing the number of cores. I was trying to test it on a 16-core
> desktop (before running it on 128 or 256). When I increased the number of
> cores to 64 for my test run the size of the arrays for each process became
> small enough that the requirement for mcmodel=medium went away.
>
> Thanks,
>
> Roland
>
>
>
>
>
>
> On 23/12/15 20:57, Habib Toye Mahamadou Kele wrote:
>
>> 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 <mailto: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 <mailto: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.
>>
>>
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>>
>>
>
> --
> Dr Roland Young, Postdoctoral Research Assistant
> Department of Physics, University of Oxford
> t: +44 (0)1865 272337 | e: young at atm.ox.ac.uk
> w: https://www.physics.ox.ac.uk/contacts/people/youngr
>
>
> _______________________________________________
> 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/20160111/9e180ac5/attachment.htm>


More information about the MITgcm-support mailing list