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

Openmp allocatable type private bug

Patrice_l_
Beginner
1,005 Views

Hi all,

I think there is a bug , when using an allocatable type in a private list, like the small example below. For this program , I get "allocatable array is already allocated" , without openmp it works well. And No problem with gfortran either. 

Thanks.

Pat

 

program toto
implicit none
type qq
double precision,dimension(:),allocatable :: f
end type
call t()
contains
subroutine t()
type(qq),allocatable :: ff
double precision,dimension(:),allocatable :: f
integer :: i,j
i=0
!$omp parallel sections private(f,ff)
!$omp section 
print *,i
!$omp section
allocate(f(10))
f=2
print *,'f',f
deallocate(f)
!$omp section
allocate(ff)
allocate(ff%f(5))
ff%f=5
print *,'g',ff%f
deallocate(ff)
!$omp end parallel sections
end subroutine
end program toto

 

0 Kudos
8 Replies
TimP
Honored Contributor III
1,005 Views

Oops disregard

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,005 Views

Add copyin(f,ff) such that the empty array descriptors are copied to the thread copy of the array descriptor.

Jim Dempsey

0 Kudos
Martyn_C_Intel
Employee
1,005 Views

With what compiler version, environment and command line did you see the error?

I tried and your code seemed to work fine for me. I don't see why a copyin clause should be needed, there's no actual data to copy.

0 Kudos
Patrice_l_
Beginner
1,005 Views

Hi ,

I'm using version 15.0.1 and I'm compiling with ifort -O0 -C -g -traceback. The test case is simple so it doesnt trigger the bug without the check. But it does in a more complicated case.

Pat.

0 Kudos
Martyn_C_Intel
Employee
1,005 Views

Thanks, that allowed me to reproduce. I was able to make a smaller test case that gave the error even without -C. This has been escalated to the compiler developers, we'll let you know what they say. It's possible that there might be a link between this issue and the other one that you reported.

Thanks for reporting these problems and for providing clear reproducers.

0 Kudos
Martyn_C_Intel
Employee
1,005 Views

This seems to be an independent problem. A fix is being targeted for the same update to the version 16.0 beta compiler as for your OpenMP tasking issue, available in about a couple of weeks. If you would like to test the fix in the 16.0 beta compiler, see Steve's post at the top of this forum, (https://software.intel.com/en-us/forums/topic/549312 ) and go to the registration link. Please let us know if it works.

0 Kudos
Martyn_C_Intel
Employee
1,005 Views

That beta update compiler is now available.

0 Kudos
Patrice_l_
Beginner
1,005 Views

I confirm this bug is fixed with the intel 16 beta update 1.

0 Kudos
Reply