- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page