- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm having a problem using ifort 12.1 on the following code
file tmem.f90:
[fortran]program tmem use mem_mod real(kind(1.d0)), allocatable :: work(:) integer :: err !$omp parallel private(work, err) ! allocate(work(10), stat=err) call aalloc_d(work, 10, err) write(*,*)'err:',err !$omp end parallel stop end program tmem [/fortran]
and file mem_mod.f90:
[fortran]module mem_mod contains subroutine aalloc_d(a, n, err) real(kind(1.d0)), allocatable :: a(:) integer, intent(in) :: n integer :: err err = 0 write(*,*)allocated(a) allocate(a(n), stat=err) return end subroutine aalloc_d end module mem_mod [/fortran]The problem is that when I run this code (with any number of OpenMP threads, even 1) I get an error 151, which, according to the ifort guide means that I'm trying to allocate something already allocated. Now, I suspect that this is an ifort bug for the following reasons:
- the code works with intel 12.1 if I put both the module and the program in the same file
- the code works (either in separate files or in the same one) with ifort 11.1, ifort 12.0, gfortran 4.6 and xlf2003 13.1
- the code works if the allocation is done with a simple "allocate" instead of calling the alloc_d subroutine (see the commented line in the program)
Can anybody help?
Regards,
alfredo
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Alfredo,
Thank you for reporting this to us. This is abug in the compiler. I have escalated this to the developers. The issue number is DPD200178119.
I will post any updates I receive on the issue to this thread.
Regards,
Annalee
Thank you for reporting this to us. This is abug in the compiler. I have escalated this to the developers. The issue number is DPD200178119.
I will post any updates I receive on the issue to this thread.
Regards,
Annalee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Annalee,
thanks for taking care of informing the devs about this. I'm looking forward for the fix.
Kind regards,
alfredo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
it looks like this bug has not yet been fixed in ifort v13.1.0. Is there any plan to have it fixed in a future release?
Best regards,
alfredo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From a different thread, a work around is to add copyin(work)
This will copy the empty (void) array descriptor for work (then it will look un-allocated).
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
jimdempseyatthecove wrote:
From a different thread, a work around is to add copyin(work)
This will copy the empty (void) array descriptor for work (then it will look un-allocated).
Jim Dempsey
Thanks Jim,
actually adding copyin(work) does not change anything for me. Following the same idea, I tried firstprivate(work) but the result is still the same, I always get error 151.
Could you pease point me to the other thread?
regards,
alfredo
- 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
Alfredo,
The "moderated" reply with the link may show later, for now the other thread is within the top few on this forum as of Feb 23
Jim

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page