Quantcast
Channel: Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2583

Problem with big arrays?

$
0
0

Hello. I have a code that was running just fine. Then, I increased the size of my arrays largely and it sometimes doesn't compiles and I tried with some flags that compiled but crashed with errors I don't understand. 

I had some arrays of size about 3000, that I changed to 22554 ( and also squared matrices of this size). I have only my main code and a module, in which I create most of my global variables. 

I was originally compiling just with: 

ifort -c global_param.f90; ifort -c dyn.f90; ifort global_param.o dyn.o -check bounds

And for that I got the error during compiling:

global_param.o: In function `global_param_mp_hamiltonian_':
global_param.f90:(.text+0x145): relocation truncated to fit: R_X86_64_32S against symbol `global_param_mp_pot1_' defined in COMMON section in global_param.o
global_param.f90:(.text+0x14e): relocation truncated to fit: R_X86_64_32S against symbol `global_param_mp_pot1_' defined in COMMON section in global_param.o
global_param.f90:(.text+0x173): relocation truncated to fit: R_X86_64_32S against symbol `global_param_mp_pot1_' defined in COMMON section in global_param.o
global_param.f90:(.text+0x1d9): relocation truncated to fit: R_X86_64_32S against symbol `global_param_mp_pot1_' defined in COMMON section in global_param.o
global_param.f90:(.text+0x1e3): relocation truncated to fit: R_X86_64_32S against symbol `global_param_mp_pot1_' defined in COMMON section in global_param.o
global_param.f90:(.text+0x212): relocation truncated to fit: R_X86_64_32S against symbol `global_param_mp_pot1_' defined in COMMON section in global_param.o
global_param.f90:(.text+0x22c): relocation truncated to fit: R_X86_64_32S against symbol `global_param_mp_pot2_' defined in COMMON section in global_param.o
global_param.f90:(.text+0x236): relocation truncated to fit: R_X86_64_32S against symbol `global_param_mp_pot2_' defined in COMMON section in global_param.o
global_param.f90:(.text+0x25a): relocation truncated to fit: R_X86_64_32S against symbol `global_param_mp_pot2_' defined in COMMON section in global_param.o
global_param.f90:(.text+0x2c0): relocation truncated to fit: R_X86_64_32S against symbol `global_param_mp_pot2_' defined in COMMON section in global_param.o
global_param.f90:(.text+0x2ca): additional relocation overflows omitted from the output

The I searched and found out that this could be due to the size of my arrays, and that I should compile with the -fpic and -mcmodel flags. So, I tried:

ifort -c global_param.f90 -fpic -mcmodel=large ;ifort -c dyn.f90 -fpic -mcmodel=large ; ifort -fpic -mcmodel=large global_param.o dyn.o -check bounds

And then I simply got the error

Segmentation fault

 

I don't know what to do. Can someone please help me?

Many thanks in advance,

 

Cayo


Viewing all articles
Browse latest Browse all 2583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>