Quantcast
Channel: Intel® Software - Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2746

Openmp allocatable type private bug

$
0
0

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

 


Viewing all articles
Browse latest Browse all 2746

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>