[J3] PUT with Notify and NOTIFY WAIT
Brad Richardson
everythingfunctional at protonmail.com
Wed Apr 24 13:43:36 UTC 2024
Thanks Reinhold. That made it click for me. By way of (untested)
example.
program
use iso_fortran_env, only: notify_type
implicit none
type(notify_type) :: notifications[*]
integer :: vals1[*], vals2[*]
if (this_image() == 1) then
vals1[2] = 42
vals2[2, notify=notification] = 1729
end if
if (this_image() == 2) then
! only ensures second put has completed
notify wait (notifications)
print *, vals2
! first put may still be "in flight"
end if
end
Regards,
Brad
On Wed, 2024-04-24 at 05:45 +0000, Bader, Reinhold via J3 wrote:
> Jon,
>
> PUT / NOTIFY WAIT are intended to make *only* the coarray that issues
> the PUT visible on the other image.
>
> Regards,
> Reinhold
>
> Von: J3 <j3-bounces at mailman.j3-fortran.org> Im Auftrag von Steidel,
> Jon L via J3
> Gesendet: Montag, 22. April 2024 21:33
> An: J3 Mailinglist <j3 at mailman.j3-fortran.org>
> Cc: Steidel, Jon L <jon.l.steidel at intel.com>
> Betreff: [J3] PUT with Notify and NOTIFY WAIT
>
> PUT with notify is a shorthand way to do a store to a remote image
> and post an event in a single statement. A NOTIFY WAIT statement is
> effectively an EVENT WAIT statement. The difference here is PUT with
> notify and NOTIFY WAIT operate on variables of NOTIFY_TYPE while
> EVENT POST and EVENT WAIT operate on variables of EVENT_TYPE. We
> made the two types distinct to prevent interaction between event and
> notify variables; it was undesirable to allow a PUT with notify
> operation to satisfy an EVENT WAIT operation, or and EVENT POST
> satisfying a NOTIFY WAIT operation.
>
> EVENT WAIT and EVENT POST are image control statements. PUT with
> notify and NOTIFY WAIT are not. Does anyone recall what the
> rationale was for not also making PUT with notify and NOTIFY WAIT
> image control statements?
>
> Thanks for any insights.
>
> -jon
More information about the J3
mailing list