Hi, I'm migrating a legacy Fortran to a parallel version through coarray structure.
In my implementation, I had to use some collectives like co_sum. However, I think the behaviour or this particular function is... odd. In the manual, it is said that when the result_image is omitted, the result is shared between all images.
However, I think in both 19.1 and 19.1.1 versions of ifort the omitted parameter is setting the result_image as 1. In the following example:
program TestColletiveFunctions implicit none integer(4) :: myID myID = this_image() call co_sum(myID) write( *, * ) 'Processor ', this_image(), ' with myID ', myID end program TestColletiveFunctions
With the following outcome:
Processor 6 with myID 6 Processor 3 with myID 3 Processor 4 with myID 4 Processor 5 with myID 5 Processor 8 with myID 8 Processor 7 with myID 7 Processor 2 with myID 2 Processor 1 with myID 36
It is the intended outcome of this function?
Thanks, in advance
Windows 10 Ifort 19.1.1 and 19.1 x64 /O2 VS 2019 - 16.4.2