Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28463 Discussions

ifort segfault error, something to do with assumed shape arrays

SounakBiswas
Beginner
496 Views

My posts keep getting marked spam. Third attempt.

So I have been stumped with a segfault. Compiles with gfortran, with and w/o optimisations. With ifort it works only w/o optimizations ot w/o openmp.  I have tried usual tricks : increased OMP_STACKSIZE, compiled with -warn all and -check all flags. I payed special attention to interfaces  and the check arg_temp_created flag, and also fiddled arround with heap arrays with no avail. 

I have finally managed to strip down to an mwe (main.f90) which I attach. Would appreciate any help. 

compiler version: 2021.10.0 20230609 

 

mwe description:  Basically the mwe has an array (rank 3) from the main program passed to an intermediate subroutine, which in turn passes it on to a function which calculates a comples number. Fiddling around with some harmless looking loops and write statements seem to make the segfault go away sometimes, though valgrind seems to pretty consistently show 'invalid read' and invalid access warnings.  

 

this is my compile line :
ifort -o ALF.out -st08 -cpp -O3 -fp-model -fast=2 -xHost -unroll -finline-functions -ipo -ip  -heap-arrays 1024 -no-wrap-margin -g -parallel -qopenmp main.F90

 

 

 

I have attached my valgrind output


0 Kudos
1 Solution
2 Replies
Igor_V_Intel
Employee
428 Views
0 Kudos
SounakBiswas
Beginner
405 Views

Thank you very much Igor. 

sorry for multiple posting. The other post was marked spam. 

Thanks again

0 Kudos
Reply