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

Confusion with different configure options with intel coarray-fortran

Phy_Soham
Novice
373 Views

Hello all,

I am recently trying to run coarray-Fortran program in distributed memory.
As far as I understand, the options are:

-coarray=shared : shared memory system


-coarray=distributed : distributed memory system. Must need to specify -coarray-config-file . According to the Guide available online (https://www.intel.com/content/www/us/en/developer/articles/technical/distributed-memory-coarray-fortran-with-the-intel-fortran-compiler-for-linux-essential.html) this is the only way to run in a distributed memory system.


-coarray=single : Contrary to the name, it also supports multiple images and distributed memory systems with all the communications between images. The program can be launched like a typical mpi program : mpirun -np nprocs ./a.out . Although the documentation says: "This results in an executable with a single running image."

If this is so, why does the Essential Guide page only emphasize on caf configuration file to run in distributed memory (and not -coarray=single option)?

In the caf-configuration file process, two instances of the same application can not be launched simultaneously (with different launch configurations), as it uses the same configuration file (the path is fixed during compilation time).
Compiled with -coarray=single several instances can be launched simultaneously with different mpi configurations.

0 Kudos
2 Replies
Barbara_P_Intel
Moderator
347 Views

The Intel Fortran implementation of coarrays uses Intel MPI under the covers for all three keywords: shared, distributed and single.

Shared is designed to run multiple images on a single node.

Single is designed to launch a single image when you enter the executable name. Since it is based on MPI, it's not surprising to me that when you launch that executable with mpirun you get multiple images.

But then CAF executables are not designed to be launched with mpirun.

As for the Essential Guide, maybe Getting Started Guide would be a better term.

Did you see this environment variable, FOR_COARRAY_CONFIG_FILE? There's more information about using coarrays in the Fortran Developer Guide and Reference.

(Ignore the references to a special license requirement. That's not true today with oneAPI. I reported that problem to the tech writer.)

 

Phy_Soham
Novice
283 Views

Thanks for the clarification.
Specifying the environment variable FOR_COARRAY_CONFIG_FILE at the execution time also works.

0 Kudos
Reply