More Related Content
Similar to Overlapping Communication and Computation by Using a Hybrid MPI/SMPSs Approach (20)
More from TakuyaFukuoka2 (9)
Overlapping Communication and Computation by Using a Hybrid MPI/SMPSs Approach
- 7. SMPSs(2)
#pragma css task [clause-list]
{ function-header | function-definition}
Therearefourkindsofclause
input(data‑reference‑list)
output(data‑reference‑list)
inout(data‑reference‑list)
highpriority
Thefirstthreeclause(input,output,inout)isusedtodeterminethe
dependencyoftasks
Thehighpriorityclauseisusedtospecifytheprioritywhen
schedulingtasks.
7
- 8. SMPSs(3)
# pragma css barrier
# pragma css wait on <list of variables>
TheSMPSsprogrammingmodelcanaddabarrier
Inthefirstexample,theexecutionisstoppeduntilallthetasksis
finished.
Inthesecondexample,theexecutionisstoppeduntilthevariables
in<listofvariables>arecompletelyupdated.
8
- 13. HybridMPI/SMPSs(2)
# pragma css restart
Inordertoavoiddeadlock,therestartpragmaisintroduced
Aborttheexecutionofcurrenttaskandputitagaininthe
readyqueue
#pragma css task input(req)
void wait (MPI_Request *req){
int go;
MPI_Test (req, &go, ...);
if (go==0) #pragma css restart;
MPI_Wait (req_recv, ...);
}
void application_receive(){
recv ();
wait ();
}
13