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

class pointer problem with Intel 2020 compiler

Vu__Phuong
Principiante
1.729 Visualizações

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
6 Respostas
Ferdinand_T_
Novo colaborador II
1.729 Visualizações
Vu__Phuong
Principiante
1.729 Visualizações

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?

Ron_Green
Moderador
1.729 Visualizações

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. 

Vu__Phuong
Principiante
1.729 Visualizações

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.

JohnNichols
Colaborador valorado III
1.729 Visualizações

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. 

Barbara_P_Intel
Funcionário
1.496 Visualizações

I apologize for not notifying you sooner, but this bug was fixed in an earlier version of the 2021.x.x compiler that is available in the oneAPI HPC Toolkit. 2021.4.0 is the current release.

Can you try the current release that was made available on October 1 and let me know how it works for you?



Responder