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

How to use coarray for sharing compuation

Andrew_Smith
Valued Contributor I
695 Views

Hi, I am happily using openMP shared memory with $OMP DO and $OMP TASK. But I want to consider coarray instead for a new project. While passing data between coarry images seams easy I cannot see how to share execution in a similar way to $OMP DO and $OMP TASK.  Can sombody point me to something I can read to get familiar.

0 Kudos
3 Replies
Steven_L_Intel1
Employee
695 Views

The coarray model is quite different from OpenMP. Where OpenMP has a single program that does "fork and join", a coarray program runs multiple copies (termed "images") of the program in parallel, sharing variables and synchronizing. Coarrays are closer to MPI programming than OpenMP.

0 Kudos
jimdempseyatthecove
Honored Contributor III
695 Views

Typically one would not use coarray or MPI within a single CPU or SMP system unless the O/S restricted you to running 32-bit applications on a system with more than 4GB of RAM and your problem set will not fit within the addressing limitations of a single 32-bit process.

Jim Dempsey

0 Kudos
Andrew_Smith
Valued Contributor I
695 Views

I understand all the aspects of coarray mentioned by Steve and Jim. I am trying to use some third party library that is not thread safe, so coarray having seperate images should fix that. I would also like to undertsand coarray better just from an personal interest point of view. Are there any examples of how to use it that cover the aspect of how to set it up to do parallel computation or is it only intended as a data communication mechanism?

0 Kudos
Reply