Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Collective Functions being odd

N_Netto
Beginner
163 Views


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

 

0 Kudos
2 Replies
Barbara_P_Intel
Moderator
163 Views

I filed a bug on your behalf, CMPLRIL0-32774.

 

Barbara_P_Intel
Moderator
152 Views

This problem has been fixed in the latest compiler that was released last week, PSXE2020 update 2, Fortran 19.1.2.

Please try it out!



Reply