I’m trying to wrap my head around how the intel compiler (ifort, not ifx) handles coarrays. It seems like when I build a coarray program with ifort -coarray , the resulting binary does depend on the MPI library (according to ldd), but when I run it, it spawns one image per CPU core. If I run it under mpiexec -n 2 then it spawns… TWO images per CPU core. Does anybody know what’s going on? Is it actually using MPI under the hood or not, and either way, how do you control the image count? Thanks.
Ahhh okay, thanks to both of you. So it looks like you aren’t supposed to run coarray programs with mpiexec if they’re built with ifort. Rather you’re supposed to use environment variables or compiler flags to control the MPI configuration and then just launch the program. I have been used to OpenCoarrays, where you invoke mpiexec yourself. Thank you again.
With OpenCoarrays, the preferred program launcher is cafrun. Although it is true that it currently wraps mpiexec or mpirun, there have in the past been alternatives such as GASNet and OpenSHMEM and University of Rom “Tor Vergata” Prof. Salvatore Filippone will supervise a graduate student who starts next month on writing an OpenSHMEM implementation atop GASNet with the motivation of reviving these MPI alternatives in a combined form. If that works out, then there could be future options to install OpenCoarrays with MPI or OpenSHMEM/GASnet under the hood. Launching with cafrun could then be the universal way to launch independent of which transport layer is used.
You can use Intel MPI’s mpiexecwith ifort if you specify -coarray=single. The manual doesn’t describe this very well. There’s also -coarray-config-file=filename.