Is it possible that the compiler,
$ pgf90 -V
pgf90 10.9-0 64-bit target on x86-64 Linux -tp istanbul-64
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2010, STMicroelectronics, Inc. All Rights Reserved.
is performing asynchronous IO or auto-parallelization without being asked to? I am seeing a non-deterministic insufficient memory error without any backtrace or line number info, which seems to go away when I add some print statements.
0: ALLOCATE: 18446744073709551615 bytes requested; not enough memory
I read an input file from std in and then perform some memory allocation, and this is the step where I think I get the error. Also, the system has plenty of memory to handle what I request in the input file. sometimes this error appears and other times it doesn’t. I am definitely not requesting that much memory in my code. The array bounds are read from the input file and I’m wondering if maybe somehow they are not being flushed to memory before the allocation is performed. I show the compile command below.
Also, is there a list of supported F2003 features for this compiler release? I think the only ones I am using are ALLOCATABLE dummy arguments, STOP statements with INTEGER PARAMETER constants, USE ISO_FORTRAN_ENV, ONLY: output_unit and POINTER, vector, derived TYPE components. I want to make sure that this is not the source of the problem.
The code was compiled thusly (I also tried to throw every warning or runtime check I could think of at it to figure out what was going on):
pgf90 -Minfo=all -Mrecursive -Ktrap=align,divz -C -Mchkfpstk -Mchkptr -Mchkstk -Mstandard -Mallocatable=95 -Minform=inform -g -traceback -I include -c modinput.f90
nelems:
258, any reduction inlined
259, any reduction inlined
pgf90 -Minfo=all -Mrecursive -Ktrap=align,divz -C -Mchkfpstk -Mchkptr -Mchkstk -Mstandard -Mallocatable=95 -Minform=inform -g -traceback -I include -c extractplanes.f90
PGF90-I-0035-Predefined intrinsic time loses intrinsic property (extractplanes.f90: 41)
pgf90 -Minfo=all -Mrecursive -Ktrap=align,divz -C -Mchkfpstk -Mchkptr -Mchkstk -Mstandard -Mallocatable=95 -Minform=inform -g -traceback -I include -o extractplanes extractplanes.o modinput.o
My code for reading the input file is somewhat complicated, and I don’t want to post it, and I have not yet been able to create a smaller example to reproduce the issue. Despite this any insight anyone has is much appreciated.