Bug with ifort >= 12 + OpenMP + O>=2 + pointer + matrix storage.

Bug with ifort >= 12 + OpenMP + O>=2 + pointer + matrix storage.

I think I met a bug with Intel Ifort 12 or more, when + compiling with -openmp a subroutine + with a parallel region (not met at runtime but taken into acount by the compiler) + at optimization level O2 or more. The very simple code reproducer consists in:
- allocate a structure array that is a two dimensional array,
- allocate a temporary pointer array in a routine, copy the strycture array into it, then copy the temporary array back to the structure array.
When the back copy is the fortran 90 style ( struct%tab(:) = tmparray(:)) it is OK, when it is a manual loop, we get a
forrtl: severe (174): SIGSEGV, segmentation fault occurred
It is fine when structure array is one dimensional, or when the temporary array is ALLOCATABLE, or when there is a print inside the manuel loop (no vectorization).
To compile and test: ifort -openmp -O3 main.f90 myfcell.f90 && ./a.out

Downloadapplication/octet-stream myfcell.f90860 bytes
Downloadapplication/octet-stream main.f90103 bytes
4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

We will investigate.  Thank you for the test case.


I opened a bug report on this.  It seems to affect versions 12.0, 12.1, and 13.  It is not present in version 11.x compilers.

We will let you know when a fixed compiler is available.

Fixed by Version Build 20130313.

Leave a Comment

Please sign in to add a comment. Not a member? Join today