Is there an equivalent of mpi_gather in coarray Fortran syntax? I know that it is possible to loop over all images to gather all values on all images. would be nice if the coarray objects could be called as coarray segments like:
real :: num
To further bring attention to this question, why was coarray slicing, as exemplified in the above, chosen to be illegal in the Fortran standard? It seems to me that it would have been neat concise substitute for such MPI functionalities as mpi_gather().
.. would be nice if the coarray objects could be called as coarray segments likeNumVec = num[ 1 : num_images() ]
I think the following is allowed by the standard, too bad Intel Fortran runs into an ICE with it:
NumVec = [( num, i=1, num_images() )]
Hi FortranFan, thanks for the response. That is the solution I am using right now, but compared to a mpi_gather implementation in our code, I see that I am getting a performance hit in the Coarray implementation of the software, which is roughly equal to a factor of num_images(). Of course, the code is more complex. I will have to isolate this segment of the code to see if that's at the root of the performance hit in Coarray implementation compared to the MPI version.
But still, I am not convinced why the Fortran committee considered coarray slicing illegal: NumVec = num[ 1 : num_images() ]