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!
26750 Discussions

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

OP1
New Contributor I
102 Views

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
    Steve_Lionel
    Black Belt Retired Employee
    102 Views

    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.

    Reply