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

Coarray bug with 17U4 ... is it fixed with 17U5 or 18?

Like some of my previous examples, the following code shows an erratic behavior when compiled with 17U4 (Debug or Release mode - it does not matter). The console output will be either blank, or 0,0,0,0,0, or 1,0,0,0,0 etc.

I am currently stuck with 17U4, but before I initiate the request for an upgrade, I would like to know if this bug has been fixed in either 17U5 or 18. Thanks!

MODULE M
    IMPLICIT NONE
    TYPE :: TS
        INTEGER,ALLOCATABLE :: I(:)
    END TYPE TS
    TYPE(TS) :: S
  • END MODULE M PROGRAM P     USE M     IMPLICIT NONE     IF (THIS_IMAGE()==1) THEN         S%I = [1,2,3,4,5]     END IF     SYNC ALL     IF (THIS_IMAGE()==2) THEN         S = S[1]         WRITE(*,*) S%I     END IF END PROGRAM P
  •  

    0 Kudos
    1 Reply
    Highlighted
    Black Belt Retired Employee
    11 Views

    I don't like the behavior I

    I don't like the behavior I am seeing with 18. Note that S%I, while a component of a coarray, is not coindexed in the assignment at line 13, so the automatic allocation should occur. Even if I explicitly allocate S%I in each image, the results are still erratic.

    --
    Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
    0 Kudos