Debian Codegraph @

armci/examples/features/notification/README

raw
1 Introduction
2 ============
3
4 A new notification functionality has been introduced in ARMCI primarify for
5 the Co-Array fortran compiler.
6
7 Description
8 ===========
9
10 Notification is a mechanism for synchronization.
11
12 1. process s is the process doing a notify call
13 2. process d is the destiniation of this notification call
14
15 Process s makes a armci_notify(d) call. This call is guarenteed to reach the
16 process d (the destination here) only after all prior calls made by process s
17 to process d complete and are commited into process d's memory. armci_notify
18 is a mechanism by which if s notifies d and d does a corresponding
19 notify_wait, after d returns from notify_wait it knows that all communication
20 calls initiated to d by s, before s issued the notification message, are
21 completed and d's memory will reflect that they are completed.
22
23 Function Definitions
24 ====================
25
26 int armci_notify(int proc)
27 --------------------------
28
29 ::
30
31 parameter
32 proc the process/task to which the notification message is sent to
33 return
34 the current value of the pending operations count for process proc
35 blocking:
36 this is a non-blocking call on most networks
37
38 int armci_notify_wait(int proc,int * pval)
39 ------------------------------------------
40
41 ::
42
43 parameter
44 proc the process/task to which the notification message is sent to
45 pval pointer to the current received count from the initiator of the
46 notify call at the moment.
47 return
48 returns the number of calls that were sent from s (initiator of notify)
49 since the invocation of the last notify_wait
50 blocking:
51 this is a blocking call
52
53 Sample Program
54 ==============
55 An example program is at armci/src/testnotify.c
56
57 Here is a sample where process waits for message from left and sends to
58 right::
59
60 left=me-1;right=(me==nproc-1)?-1:me+1;
61 if(left!=-1){
62 rc = armci_notify_wait(left,&wc);
63 }
64 if(right!=-1){
65 ARMCI_PutS((double*)b[me]+idx, stride,
66 (double*)b[right]+idx, stride, count, strl,right);
67 lc=armci_notify(right);
68 }