Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29279 Discussions

Coarrays and allocatable components again

Nick_M_3
New Contributor I
464 Views

This may overlap with previous issues, but is simpler.

PROGRAM Main
    TYPE :: Mytype
        INTEGER, ALLOCATABLE :: ptr(:)
    END TYPE Mytype
    TYPE(Mytype) :: coarray


  •     ALLOCATE(coarray%ptr(3))    
        IF (THIS_IMAGE() == 2) coarray%ptr = 123
        SYNC ALL
        IF (THIS_IMAGE() == 1) THEN
            coarray = coarray[2]
            PRINT *, coarray%ptr
        END IF
    END PROGRAM Main
  •  -1083162920       32767 -1083162920

     

     

    0 Kudos
    2 Replies
    Steven_L_Intel1
    Employee
    464 Views

    Thanks, Nick, We'll check this out.

    0 Kudos
    Steven_L_Intel1
    Employee
    464 Views

    This is an issue we're already working on. Issue ID is DPD200255148.

    0 Kudos
    Reply