- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using MS VS 2019 (haven't tried 2022 community yet)
Debugging threadprivate variables is problematic. I suspect it uses the address of the main thread regardless of the thread context. The memory address does not change when you use loc(module::var) in a memory window, issued with thread focus set to different threads.
Related:
I tried a work around to use associate(local_var => threadprivate_var)
When I attempt to view the contents of the variable, the debugger shows:
Childeren could not be evaluated
For now, I can work around by declaring the threadprivate variable with target, then set a pointer to this within the procedure. This (both issues) is cumbersome to say the least.
Jim Dempsey
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you get a chance, can you upload a reproducer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MS VS 2022 (17.7.5) hangs in Locals window (note "busy"). IDE hangs, had to kill it with TaskManager.
NOTE, compile with OpenMP enabled.
Will get MS VS 2019 after I reboot. (system behaving funny).
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After reboot, S VS 2019 wouldn't launch. Hung at splash screen.
Rebooted again, performing Repair on MS VS 2019.
That was on my Xeon E5-2620v2 system.
Running MS VS 2019 on my Intel NUC
I don't crash (and don't bugger MS VS), but cannot access threadprivate variables.
program Console29
use mod_foo
implicit none
integer :: i
do i=1,size(aType%array)
aType%array(i) = i
end do
end program Console29
module mod_foo
type sometype
real :: array(10)
end type sometype
type(sometype) :: aType
!$omp threadprivate(aType)
end module mod_foo
Note, compile as separate source files.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@jimdempseyatthecove, VS 2022 v17.7.x has issues with the Fortran compiler. Devorah posted a patch in this thread. Maybe that will help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jim, there is a bullet, bite it and update to VS 2022 Preview.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did. 2022 hangs... and somehow trashed 2019 in the process.
Must be an infinite loop.
Not only did I have the kill MS VS 2022 (17.7.5) with Task Manager, I also had to kill MS Remote Debugger (I only debugged locally).
After I killed those processes, the system acted funny. I rebooted, then MS VS 2019 wouldn't load past the splash screen. Killed that, rebooted, did a Repair on 2019. Now it is back up and running.
Stranger than fiction comes to mind.
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Buy a decent computer.
I laughed till I cried.
Biting the bullet is usually without chloroform, it is generally not pleasant. Then again neither is driving an oyster knife into your wrist on your 21st birthday and your Dr Father saying - be a man and put a band aid on it.

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