"ld: 32-bit RIP relative reference out of range" on Mac OSX

3

I am trying to compile a Fortran 90 code that basically solves a very large system of differential equations (around 5000 ODEs). In order to increase the precision of the solver, I have to increase the size of the solution arrays, and I am running into a problem. I am using a Mac computer with El Capitan, with an i7 Intel core processor and 8GB of RAM. I use the Eclipse IDE, and gfortran 5.3 compiler. Here is my error :

    Building target: evolution_neutrinos_interpolation
Invoking: MacOS X Fortran Linker
gfortran  -o "evolution_neutrinos_interpolation"  ./Components_hamiltonian.o ./DormandPrinceIntegration.o ./evolution_equations.o ./evolution_self.o ./input.o ./interp.o ./output.o   
final section layout:
    __TEXT/__text addr=0x100000D72, size=0x0000839E, fileOffset=0x00000D72, type=1
    __TEXT/__stubs addr=0x100009110, size=0x000000A8, fileOffset=0x00009110, type=28
    __TEXT/__stub_helper addr=0x1000091B8, size=0x00000128, fileOffset=0x000091B8, type=32
    __TEXT/__const addr=0x1000092E0, size=0x00000709, fileOffset=0x000092E0, type=0
    __TEXT/__cstring addr=0x1000099F0, size=0x00000052, fileOffset=0x000099F0, type=13
    __TEXT/__eh_frame addr=0x100009A48, size=0x000005A0, fileOffset=0x00009A48, type=19
    __DATA/__got addr=0x10000A000, size=0x00000058, fileOffset=0x0000A000, type=29
    __DATA/__nl_symbol_ptr addr=0x10000A058, size=0x00000010, fileOffset=0x0000A058, type=29
    __DATA/__la_symbol_ptr addr=0x10000A068, size=0x000000E0, fileOffset=0x0000A068, type=27
    __DATA/__data addr=0x10000A160, size=0x0000015A, fileOffset=0x0000A160, type=0
    __DATA/__bss5 addr=0x10000A2BA, size=0x00000000, fileOffset=0x00000000, type=25
    __DATA/__pu_bss5 addr=0x10000A2C0, size=0x003DB4C8, fileOffset=0x00000000, type=25
    __DATA/__bss2 addr=0x1003E5788, size=0x0000000C, fileOffset=0x00000000, type=25
    __DATA/__pu_bss2 addr=0x1003E5794, size=0x00000018, fileOffset=0x00000000, type=25
    __DATA/__pu_bss3 addr=0x1003E57B0, size=0x00000050, fileOffset=0x00000000, type=25
    __DATA/__huge addr=0x1003E5800, size=0xB9FFE3E8, fileOffset=0x00000000, type=25
ld: 32-bit RIP relative reference out of range (3098686801 max is +/-4GB): from ___interp_MOD_computation_2ndderivatives (0x100005F13) to _array2nd.3498 (0x1B8B297C0) in '___interp_MOD_computation_2ndderivatives' from ./interp.o for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [evolution_neutrinos_interpolation] Error 1

I should precise that I am really a newbie when it comes to compiling a code, and I pretty much don't understand what I am doing. However, I feel like this error is telling me that the code only uses 4GB of ram instead of 8, so I am kind of confused. When I reduce the size of my solution arrays, the error disappear, but I do need the precision. Is there an option that should be added to gfortran in order to use the 8GB of RAM ? Here is my compilation command :

gfortran -funderscoring -O0 -g -Wall -c -fmessage-length=0 -o 

Also, from what I read on the internet, I should precise that all my real variables are declared as "double precision", and all my integers are declared as "integer*8" (at least, I tried). I could provide some code, but it is fairly large and I don't think I could Thank you for your help !

gcc
compiler-errors
fortran
gfortran
asked on Stack Overflow Feb 24, 2016 by Amélie • edited Feb 25, 2016 by Vladimir F

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0