Difference between revisions of "Communication"

From Gw-qcd-wiki
Jump to: navigation, search
Line 1: Line 1:
 +
=Code organization=
 
The communication is organized in three layers:
 
The communication is organized in three layers:
  
* low level: these routines send/receive unstructured data from one process to another
+
* [[#Low level routines|low level]]: these routines send/receive unstructured data from one process to another
 
* intermediate level: these routines handle data movement between lattice data structures
 
* intermediate level: these routines handle data movement between lattice data structures
 
* high level: these routines implement shifts
 
* high level: these routines implement shifts
 +
 +
=Low level routines=
 +
 +
These routines are simple wrappers that sit on top of the communication library (most likely MPI).
 +
Their purpose is to insulate our codes from the communication layer. Here is a list of the low level routines with a simple description:
 +
 +
void init_machine(int &argc, char **&argv, bool single_node = false)
 +
:This function needs to be called if the communication library is linked to initialize the communication layer. The parameters argc and argv are the ones passed to main by the operating system. The last parameter indicates whether the code is ment to run in serial.
 +
void shutdown_machine()
 +
:comm library cleanup. call before exiting main program.
 +
printf("me")
 +
:printing routine
  
 
This is found in the comm folder, it handles the communication between nodes.
 
This is found in the comm folder, it handles the communication between nodes.
 
*[[comm_intermediate.cpp]]
 
*[[comm_intermediate.cpp]]
 
*[[comm_low_cuda.cu]]
 
*[[comm_low_cuda.cu]]

Revision as of 17:19, 13 December 2011

Code organization

The communication is organized in three layers:

  • low level: these routines send/receive unstructured data from one process to another
  • intermediate level: these routines handle data movement between lattice data structures
  • high level: these routines implement shifts

Low level routines

These routines are simple wrappers that sit on top of the communication library (most likely MPI). Their purpose is to insulate our codes from the communication layer. Here is a list of the low level routines with a simple description:

void init_machine(int &argc, char **&argv, bool single_node = false)
This function needs to be called if the communication library is linked to initialize the communication layer. The parameters argc and argv are the ones passed to main by the operating system. The last parameter indicates whether the code is ment to run in serial.
void shutdown_machine()
comm library cleanup. call before exiting main program.
printf("me")
printing routine

This is found in the comm folder, it handles the communication between nodes.