Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

Coarrays and allocatable components again

$
0
0

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

 

 


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>