Quantcast
Channel: Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2583

MIxed Fortran C OpenMP code

$
0
0

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.


Viewing all articles
Browse latest Browse all 2583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>