Valid code leads to allocation memory excess or segmentation violation

The attached code, when compiled with nvfortran 23.1 and executed, leads to the error message:
0: ALLOCATE: 3298534884208 bytes requested; not enough memory
There could be an error in calculating the address space indices or so!?
When removing the finalizers and a bit of oter code the code leads to a segmentation violation.
Reproducer has ca. 1.8k lines.
alloc_exceed_mem.f90 (55.0 KB)

Hi Juergen,

Looks like this one may have been fixed already as I can reproduce the issue in 23.1 but not in 23.3. Can you try updating to 23.3 to see if it fix it for you as well?

% nvfortran alloc_exeed_mem.f90 -V23.1; a.out
* Test output: sf_base_13
*   Purpose: initialize and fill a pair generator object

* Initialize configuration data

* Initialize generator object

0: ALLOCATE: 3298534884208 bytes requested; not enough memory
% nvfortran alloc_exeed_mem.f90 -V23.3 ; a.out
* Test output: sf_base_13
*   Purpose: initialize and fill a pair generator object

* Initialize configuration data

* Initialize generator object

 inside sf_test_generator_init ++++++++++++++++
* Generate free r values

-Mat

Yes, I confirm that I don’t see this problem any more with nvfortran 23.3.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.