Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
39 Views

Bug in collective coarray subroutines

Jump to solution

The collective coarray subroutines such as co_sum, co_min, etc. produce incorrect results when result_image is not specified. According to the 2018 Fortran Standard, the results should return on all images in this case. However, it seems the only comes back in image 1. The program below uses the example given in the standard in section 16.9.50 which states:

Example. If the number of images in the current team is two and A is the array [1, 5, 3] on one image and [4,1, 6] on the other image, the value of A after executing the statement CALL CO_SUM(A) is [5, 6, 9] on both images.

The following program shows that this does not happen.

program test
  implicit none
  integer :: a(3)
  • a(:)[1] = [1,5,3] a(:)[2] = [4,1,6] sync all call co_sum(a) sync all print *, a(:), this_image() end program test
  • I compiled this using

    ifort -V -coarray -coarray-num-images=2 -O0 co_sum_test_2.f90 -o co_sum_test_2
    Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.0.166 Build 20191121
    

    ... and running it gave these results:

               5           6           9           1
               4           1           6           2
    

    The result came back in image 1 only when it should have come back in both images.

     

     

    0 Kudos

    Accepted Solutions
    Highlighted
    Moderator
    27 Views

    Re:Bug in collective coarray subroutines

    Jump to solution

    This issue was fixed in PSXE 2020 Update 2.


    View solution in original post

    0 Kudos
    2 Replies
    Moderator
    39 Views

    Thank you for sending us this

    Jump to solution

    Thank you for sending us this bug report.  I'll get it into our system.

    update: ID CMPLRILO-32636

     

    0 Kudos
    Highlighted
    Moderator
    28 Views

    Re:Bug in collective coarray subroutines

    Jump to solution

    This issue was fixed in PSXE 2020 Update 2.


    View solution in original post

    0 Kudos