- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Fortran and OpenMP developers, I have a mixed Fortran/C code and I want to ask you if this situation is correct:
From C:
int a;
#omp threadprivate(a)
void foo() {
a = //something
}
From Fortran Main:
$OMP PARALLEL
foo()
$OMP END PARALLEL
So, I have a function from C that set a global variable declared as threadprivate. The function is called from a PARALLEL from Fortran. The threadprivate works well in this case?
Thanks.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That works for me on both Linux and Windows. Note, I used Intel C++ and Intel Fortran.
Jim Dempsey
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page