no automatic deallocation with -g -openmp

no automatic deallocation with -g -openmp

Imagen de lcoul

In attachment, you will find a short program demonstrating the problem.

A private allocatable array is created when calling a subroutine. The array is passed as argument with the attributes ALLOCATABLE and INTENT(out). It means that the array is first automatically deallocated at the entrance of the subroutine if it is already allocated.

For the sequential version, all seems OK, with or without the flag -g :

coul@b10p5001:~/test$ ifort demo.f90
coul@b10p5001:~/test$ ./a.out
   1.00000000000000     
   2.00000000000000     
   3.00000000000000     
   4.00000000000000     
   5.00000000000000

But with the compilation flags -g -openmp, I get :

coul@b10p5001:~/test$ ifort -g -openmp demo.f90
coul@b10p5001:~/test$ ./a.out
forrtl: severe (151): allocatable array is already allocated
forrtl: severe (151): allocatable array is already allocated

Notice that all seems OK if I delete the flag -g

64 bit version :

coul@b10p5001:~/test$ ifort --version
ifort (IFORT) 13.0.0 20120731
Copyright (C) 1985-2012 Intel Corporation.  All rights reserved.

AdjuntoTamaño
Descargar demo.f90430 bytes
publicaciones de 4 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen de Kevin Davis (Intel)

I do not see the attachment. At your convenience, could you try attaching again please?

Imagen de Kevin Davis (Intel)

The issue occurs in conjunction with de-optimizing (to -O0) implicit with -g or explicitly with -O1 or -O0. You can avoid the error by explicitly asserting -O2 when using -g. I reported this defect to Development (internal tracking id below) and will update the thread as I learn more. Thank you for the convenient reproducer also.

(Internal tracking id: DPD200237628)

(Resolution Update on 04/05/2013): This defect is fixed in the Intel Fortran Composer XE 2013 Update 3 (2013.3.163 - Linux)

Imagen de Kevin Davis (Intel)

This defect is fixed in the Intel Fortran Composer XE 2013 Update 3 (2013.3.163 - Linux)

Inicie sesión para dejar un comentario.