- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This defect is fixed in the Intel Fortran Composer XE 2013 Update 3 (2013.3.163 - Linux)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page