XcalableMP / Specification

Specification of XcalableMP
0 stars 0 forks source link

[C]post/wait指示文を関数に変更 #44

Open mnakao opened 8 years ago

mnakao commented 8 years ago
USE, INTRINSIC :: iso_fortran_env
TYPE(event_type) :: submit[*]
   :
EVENT POST (submit[i], STAT=status)
  :
EVENT WAIT (submit, UNTIL_COUNT=10)
#include <xmp.h>
#pragma xmp nodes p(*)
  :
if(xmp_node_num()==1){
  [S1]
  #pragma xmp post (p(2), tag)
}
else{
  #pragma xmp wait (p(1), tag)
  [S2]
}
#include <xmp.h>
xmp_event_t submit:[*];
#pragma xmp nodes p(*)
  :
if(xmp_node_num()==1){
  [S1]
  xmp_event_post(submit:[2]);
}
else{
  xmp_event_wait(submit);
  [S2]
}