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_
Einsteiger
1.635Aufrufe

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 Antworten
TimP
Geehrter Beitragender III
1.635Aufrufe

Oops disregard

jimdempseyatthecove
Geehrter Beitragender III
1.635Aufrufe

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

Jim Dempsey

Martyn_C_Intel
Mitarbeiter
1.635Aufrufe

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.

Patrice_l_
Einsteiger
1.635Aufrufe

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.

Martyn_C_Intel
Mitarbeiter
1.635Aufrufe

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.

Martyn_C_Intel
Mitarbeiter
1.635Aufrufe

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.

Martyn_C_Intel
Mitarbeiter
1.635Aufrufe

That beta update compiler is now available.

Patrice_l_
Einsteiger
1.635Aufrufe

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

Antworten