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

Use OpenMP to parallelize different source file

Liang_W_1
Beginner
657 Views

Hello, 

I tried to parallelize the Fortran codes using OpenMP. When I put all the subroutines in one single source file and created a static library, then I came into problem to run my model with this static library. But when I separate the subroutines that do the parallelization, and compile the rest of them as a static library. Using this library and those parallelization subroutines to created a new project, then I am able to run my model. That sounds weird but dose any one have the same issue?

Many thanks

0 Kudos
4 Replies
Steven_L_Intel1
Employee
657 Views

Do you compile all the code with the OpenMP option enabled? Are you able to provide a small test case that shows the problem?

0 Kudos
Liang_W_1
Beginner
657 Views

Hello, Steve

I have double checked my codes and I found that the Coarrays option under Language tab has to be enabled. Now I am running the models.

The corresponding links can be found as follows,

https://software.intel.com/en-us/node/590553

Thank you,

Liang

0 Kudos
Steven_L_Intel1
Employee
657 Views

That's coarrays, not OpenMP. VERY different parallelzation concept. Which are you using in your own application?

0 Kudos
Liang_W_1
Beginner
657 Views

Sorry, I messed up the idea. I shouldn't enable coarray since it is not recommended when using OpenMP. 

0 Kudos
Reply