Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
9 Views

class pointer problem with Intel 2020 compiler

It seems the Intel 2020 Fortran compiler has screwed up the handling of class pointer inside a parallel region.  The following code snippet example works fine with Intel 2019 compiler and gfortran.

Program main
type, abstract :: abstype
   integer :: me=0
end type abstype

type, extends(abstype) :: type1
end type type1

type(type1), target :: t1
class(abstype), pointer :: base
integer ix, iy, nx, ny

nx = 2
ny = 2

base => t1

select type(base)
class is (type1)
print *, base%me
!$omp parallel do default(shared) private(iy,ix)
do iy = 1,ny
   do ix = 1,nx
   print *, ix, iy, base%me
   enddo
enddo

class default
end select

print *, "DONE"

end Program

 

0 Kudos
5 Replies
Highlighted
New Contributor II
9 Views

maybe related to https:/

0 Kudos
Highlighted
Beginner
9 Views

Thanks for the note.  It

Thanks for the note.  It could be related (meaning the same code path in the compiler) although I think my situation is more well defined that your situation since I am not doing the select inside a parallel region and in my example when you run it with OMP_NUM_THREADS=1 it always works.  Did they give you an idea when your issue may be fixed?

0 Kudos
Highlighted
Moderator
9 Views

I opened a new bug report. 

I opened a new bug report.  This code is different enough from the other forum thread.

CMPLRIL0-32859

You asked about a date for fix.  Hard to say, the Fortran developers have a lot of work between now and 2021.  Were I you, I would use 19.0.x for now. 

0 Kudos
Highlighted
Beginner
9 Views

Thank you Ron.

Thank you Ron.

Yes, we are staying with the 19.x compiler for now since it would take a lot of work to change our codes to work around this issue because it is a pretty common construct for us.

0 Kudos
Highlighted
New Contributor I
9 Views

Hard to say, the Fortran

Hard to say, the Fortran developers have a lot of work between now and 2021.  

----------------------------------------------------------------------------------------------------------

I cannot remember the book - but in some famous novel -- the author wrote that he would love to look into the minds of a particular group -- Fortran Compiler writers must be such a group. 

0 Kudos