program test
implicit none
integer::s !! or s[*]
s = this_image()
call co_sum(s)
write(*,*) s
end program
Hi Luke,
I haven’t dug out the standard, but I am 99.9% sure that collectives can operate on any variable and do not require the variable to be declared as a coarray. I think this is true for some of the atomics as well, but I’m less confident on that point. Implementing collectives in an optimal way is fairly challenging to do. Using a well optimized low(er) level communication library, like MPI, allows OpenCoarrays to take advantage of these highly optimized, extant collective procedures and make them available to the CAF programmer with a simple, standardized interface.
OpenCoarrays provides the opencoarrays
module that lets you use these intrinsics with other compilers, even if they don’t support F2018 collectives yet.
To my knowledge there is no performance advantage or disadvantage of declaration of the argument to a collective as being a coarray, but I have not checked this in the source nor have I performed any tests to verify this hypothesis.
Best,
Izaak “Zaak” Beekman
You received this message because you are subscribed to a topic in the Google Groups "OpenCoarrays" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opencoarrays/mCdUjcBlHQM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to opencoarrays...@googlegroups.com.
Visit this group at https://groups.google.com/group/opencoarrays.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencoarrays/fd013de5-3dec-4def-8b7a-bfd98178c196%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencoarrays/CAAbnBwbMP5m9xtoofem%2B4V-DPb3Ka-648h%2BZqQaGk7BDMxBCwg%40mail.gmail.com.