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

Intel FORTRAN compiler (ifx) : threadprivate common block issue

apkumbhar
初學者
509 檢視

When Intel FORTRAN compiler (ifx) is used in combination with threadprivate common block then the memory location pointed by threadprivate variable is different when variable is used from different routines.

 

Let’s Say, I have a variable kou and it is part of threadprivate common block. When I am referring to the variable and checking it’s memory location from dominit.F and mrmain.f as below

write(*,*) "dominit.F loc 3 ",loc(kou),kou

 

dominit.F loc 2          2040460304416                     6
dominit.F loc 3          2040460304416                     6
mrmain.F loc 3          2040450520288                     0

 

Then memory location is different and hence value stored is also different. Note that the code is executing outside OpenMP parallel region. So expected that memory referred should be same from all subroutines.

 

0 積分
2 回應
Ron_Green
主席
435 檢視

This was reported to us a week or 2 ago and an existing bug report was opened.  We will be addressing this issue.

To be sure, do you have a simple reproducer that I could test once a fix has been promoted to our main branch?

jimdempseyatthecove
榮譽貢獻者 III
193 檢視

Add to your existing code a module, with a threadprivate variable koukou.

Have mrmain and dominit print the loc of koukou in addition to the loc of kou

IOW see if the address issue is with module variables as well.

Note, I am assuming dominit is printing out the loc of the common variable as opposed to a dummy variable who's actual argument is the common variable. If not, please inform.

Jim Dempsey

 

回覆