Hitmap 1.3
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
hit_com.h File Reference
#include <stdio.h>
#include "hit_mpi.h"
#include "hit_error.h"
#include "hit_tile.h"
#include "hit_layout.h"
#include "hit_allocP.h"
#include "hit_comTypeStruct.h"
Include dependency graph for hit_com.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  HitCom
 
struct  HitComAlltoallv
 
struct  HitComSparse
 

Macros

#define hit_mpiTestError(ok, cad)
 
#define HIT_CHAR   MPI_CHAR
 
#define HIT_INT   MPI_INT
 
#define HIT_FLOAT   MPI_FLOAT
 
#define HIT_DOUBLE   MPI_DOUBLE
 
#define HIT_BOOL   MPI_BOOL
 
#define HIT_COMTYPE_NULL   0
 
#define HIT_SENDRECV   3
 
#define HIT_REDUCE   4
 
#define HIT_ALLREDUCE   5
 
#define HIT_ALLTOALL   6
 
#define HIT_ALLTOALLV   7
 
#define HIT_BROADCAST   8
 
#define HIT_SENDRECV_REPLACE   9
 
#define HIT_SPARSE_UPDATE   10
 
#define HIT_SPARSE_SCATTER   11
 
#define HIT_ALLDISTRIBUTE   12
 
#define HIT_SPARSE_SCATTER_ROWS   13
 
#define HIT_ALLGATHERV   14
 
#define HIT_ANY_TAG   0
 
#define HIT_COM_MYSELF   -100
 
#define hit_Rank   (HIT_TOPOLOGY_INFO->selfRank)
 
#define hit_NProcs   (HIT_TOPOLOGY_INFO->numProcs)
 
#define hit_Comm   (HIT_TOPOLOGY_INFO->comm)
 
#define HIT_TYPE_NULL   MPI_DATATYPE_NULL
 
#define hit_comFreeType(type)   if (type!=HIT_TYPE_NULL) MPI_Type_free( &type );
 
#define hit_comTypeStruct(new_type, Nstruct, n,...)   hit_comTypeStruct##n(new_type,Nstruct,__VA_ARGS__)
 
#define HIT_COM_NULL_STATIC
 
#define HIT_COM_ALLTOALLV_NULL_STATIC   {NULL,NULL,NULL,NULL,NULL}
 
#define HIT_COM_SPARSE_NULL_STATIC   {HIT_SHAPE_NULL_STATIC, NULL, NULL, NULL, 0, 0, 0, NULL}
 
#define HIT_COM_TILECOORDS   0x43
 
#define HIT_COM_ARRAYCOORDS   0x44
 
#define hit_comSendRecv(lay, sendTo, tilePSend, receiveFrom, tilePRecv, baseType)   hit_comSendRecvSelect(lay, sendTo, tilePSend, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, receiveFrom, tilePRecv, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType)
 
#define hit_comSendRecvTag(lay, sendTo, tilePSend, receiveFrom, tilePRecv, baseType, tag)   hit_comSendRecvSelectTag(lay, sendTo, tilePSend, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, receiveFrom, tilePRecv, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, tag)
 
#define hit_comSendRecvSelect(lay, sendTo, tilePSend, selectionSend, modeSelectSend, receiveFrom, tilePRecv, selectionRecv, modeSelectRecv, baseType)   hit_comSendRecvSelectTag(lay, sendTo, tilePSend, selectionSend, modeSelectSend, receiveFrom, tilePRecv, selectionRecv, modeSelectRecv, baseType, HIT_ANY_TAG)
 
#define hit_comSendSelectTag(lay, sendTo, tileP, selection, modeSelect, baseType, tag)   hit_comSendRecvSelectTag(lay, sendTo, tileP, selection, modeSelect, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, tag)
 
#define hit_comSendTag(lay, sendTo, tileP, baseType, tag)   hit_comSendRecvSelectTag(lay, sendTo, tileP, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, tag)
 
#define hit_comSendSelect(lay, sendTo, tileP, selection, modeSelect, baseType)   hit_comSendRecvSelect(lay, sendTo, tileP, selection, modeSelect, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType)
 
#define hit_comSend(lay, sendTo, tileP, baseType)   hit_comSendRecvSelect(lay, sendTo, tileP, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType)
 
#define hit_comRecvSelectTag(lay, receiveFrom, tileP, selection, modeSelect, baseType, tag)   hit_comSendRecvSelectTag(lay, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, receiveFrom, tileP, selection, modeSelect, baseType, tag)
 
#define hit_comRecvTag(lay, receiveFrom, tileP, baseType, tag)   hit_comSendRecvSelect(lay, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, receiveFrom, tileP, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, tag)
 
#define hit_comRecvSelect(lay, receiveFrom, tileP, selection, modeSelect, baseType)   hit_comSendRecvSelect(lay, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, receiveFrom, tileP, selection, modeSelect, baseType)
 
#define hit_comRecv(lay, receiveFrom, tileP, baseType)   hit_comSendRecvSelect(lay, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, receiveFrom, tileP, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType)
 
#define hit_comUpdateSendTile(comm, sendTile)   comm.dataSend=sendTile.data
 
#define hit_comUpdateRecvTile(comm, recvTile)   comm.dataRecv=recvTile.data
 
#define hit_comUpdateSendTo(comm, topo, SendTo)   comm.sendTo=hit_topRankInternal(topo,SendTo)
 
#define hit_comUpdateRecvFrom(comm, topo, RecvFrom)   comm.recvFrom=hit_topRankInternal(topo,RecvFrom)
 
#define hit_comUpdateDimSendTo(comm, dim, SendTo)   comm.sendTo=SendTo
 
#define hit_comUpdateDimRecvFrom(comm, dim, RecvFrom)   comm.recvFrom=RecvFrom
 
#define hit_comUpdateTag(comm, Tag)   comm.tag=Tag
 
#define hit_comAllowDims(lay)
 
#define hit_comShiftDimSelect(lay, dim, shift, tileP, selection, modeSelect, baseType, tag)   hit_comSendRecvReplaceSelectTag(lay, hit_layNeighbor(lay,dim,shift), tileP, selection, modeSelect, hit_layNeighbor(lay,dim,-shift), baseType, tag)
 
#define hit_comShiftDim(lay, dim, shift, tileP, baseType)   hit_comShiftDimSelect(lay, dim, shift, tileP, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, HIT_ANY_TAG)
 
#define hit_comShiftDimAsync(lay, dim, shift, tileSend, tileRecv, baseType, tag)   hit_comSendRecvTag(lay, hit_layNeighbor( lay, dim, shift ), tileSend, hit_layNeighbor( lay, dim, -shift ), tileRecv, baseType, tag)
 
#define hit_comBroadcast(lay, root, tile, baseType)   hit_comBroadcastSelect(lay, root, tile, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType)
 
#define hit_comBroadcastDim(lay, dim, root, tile, baseType)   hit_comBroadcastDimSelect(lay, dim, root, tile, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType)
 
#define hit_comReduce(lay, root, tilePSend, tilePRecv, baseType, operation)   hit_comReduceSelect(lay, root, tilePSend, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, tilePRecv, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, operation)
 
#define hit_comReduceDim(lay, dim, root, tilePSend, tilePRecv, baseType, operation)   hit_comReduceDimSelect(lay, dim, root, tilePSend, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, tilePRecv, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, operation)
 
#define hit_comAlltoall(lay, tilePSend, tilePRecv, baseType, count)   hit_comAlltoallSelect(lay, tilePSend, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, tilePRecv, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, count)
 
#define hit_comAlltoallv(lay, tilePSend, selectionSend, tilePRecv, selectionRecv, baseType)   hit_comAlltoallSelectv(lay, tilePSend, selectionSend, HIT_COM_TILECOORDS, tilePRecv, selectionRecv, HIT_COM_TILECOORDS, baseType)
 
#define hit_comSparseScatter(lay, tilePSend, tilePRecv, baseType)   hit_comSparseScatterInternal(lay, tilePSend, tilePRecv, baseType, __FILE__, __LINE__)
 
#define hit_comSparseScatterRows(lay, tilePSend, tilePRecv, baseType)   hit_comSparseScatterRowsInternal(lay, tilePSend, tilePRecv, baseType, __FILE__, __LINE__)
 
#define hit_comAllGatherv(lay, tilePSend, tilePRecv, baseType)   hit_comAllGathervInternal(lay, tilePSend, tilePRecv, baseType, __FILE__, __LINE__)
 
#define hit_comTagSet(...)   enum { __VA_ARGS__ }
 
#define hit_comDoSendRecv(comm)
 
#define hit_comDoOnce(com)   { HitCom __HIT_COM__ = com; hit_comDo( & __HIT_COM__ ); hit_comFree( __HIT_COM__ ); }
 
#define hit_error(name, file, numLine)
 
#define hit_comBarrier(lay)   MPI_Barrier( lay.pTopology[0]->comm )
 
#define hit_comOp(function, operation)   MPI_Op_create((HitReduceFunction *)function, 1, &(operation) );
 
#define hit_comOpNoCommutative(function, operation)   MPI_Op_create(function, 0, &(operation) );
 
#define hit_comOpFree(operation)   MPI_Op_free( &(operation) );
 

Typedefs

typedef MPI_Datatype HitType
 
typedef MPI_Aint HitAint
 
typedef MPI_Op HitOp
 
typedef MPI_User_function HitReduceFunction
 
typedef struct HitComAlltoallv HitComAlltoallv
 
typedef struct HitComSparse HitComSparse
 
typedef void(* HitComOpFunction )(void *, void *)
 

Functions

void hit_comInit (int *pargc, char **pargv[])
 
void hit_comFinalize ()
 
HitType hit_comType (const void *varP, HitType baseType)
 
HitType hit_comTypeRec (const void *varP, HitType baseType)
 
HitCom hit_comSendRecvSelectTag (HitLayout lay, HitRanks sendTo, const void *tilePSend, HitShape selectionSend, int modeSelectSend, HitRanks receiveFrom, const void *tilePRecv, HitShape selectionRecv, int modeSelectRecv, HitType baseType, int tag)
 
void hit_comUpdateOriginData (HitCom *com, const void *tileP)
 
void hit_comAllowDim (HitLayout *lay, int dim)
 
HitCom hit_comSendRecvReplaceSelectTag (HitLayout lay, HitRanks sendTo, const void *tileP, HitShape selection, int modeSelect, HitRanks receiveFrom, HitType baseType, int tag)
 
HitCom hit_comBroadcastSelect (HitLayout lay, HitRanks root, const void *tile, HitShape selection, int modeSelect, HitType baseType)
 
HitCom hit_comBroadcastDimSelect (HitLayout lay, int dim, int root, const void *tile, HitShape selection, int modeSelect, HitType baseType)
 
HitCom hit_comReduceSelect (HitLayout lay, HitRanks root, const void *tilePSend, HitShape selectionSend, int modeSelectSend, const void *tilePRecv, HitShape selectionRecv, int modeSelectRecv, HitType baseType, HitOp operation)
 
HitCom hit_comReduceDimSelect (HitLayout lay, int dim, HitRanks root, const void *tilePSend, HitShape selectionSend, int modeSelectSend, const void *tilePRecv, HitShape selectionRecv, int modeSelectRecv, HitType baseType, HitOp operation)
 
HitCom hit_comAlltoallSelect (HitLayout lay, const void *tilePSend, HitShape selectionSend, int modeSelectSend, const void *tilePRecv, HitShape selectionRecv, int modeSelectRecv, HitType baseType, int count)
 
HitCom hit_comAlltoallSelectv (HitLayout lay, const void *tilePSend, HitShape *selectionSend, int modeSelectSend, const void *tilePRecv, HitShape *selectionRecv, int modeSelectRecv, HitType baseType)
 
HitCom hit_comSparseUpdate (HitLayout lay, const void *tileP, HitType baseType)
 
HitCom hit_comSparseUpdateCSR (HitLayout lay, const void *tileP, HitType baseType)
 
HitCom hit_comSparseUpdateBitmap (HitLayout lay, const void *tileP, HitType baseType)
 
HitCom hit_comSparseScatterInternal (HitLayout lay, const void *tilePSend, const void *tilePRecv, HitType baseType, const char *file, int line)
 
HitCom hit_comSparseScatterRowsInternal (HitLayout lay, const void *tilePSend, const void *tilePRecv, HitType baseType, const char *file, int line)
 
HitCom hit_comAllDistribute (HitLayout lay, const void *tilePSend, int *count, const void *tilePRecv, HitType baseType)
 
HitCom hit_comAllGathervInternal (HitLayout lay, const void *tilePSend, const void *tilePRecv, HitType baseType, const char *file, int line)
 
void hit_comFree (HitCom issue)
 
void hit_comStartSend (HitCom *issue)
 
void hit_comEndSend (HitCom *issue)
 
void hit_comDoSend (HitCom *issue)
 
void hit_comDoRecv (HitCom *issue)
 
void hit_comStartRecv (HitCom *issue)
 
void hit_comEndRecv (HitCom *issue)
 
void hit_comDoSendRecvReplace (HitCom *issue)
 
void hit_comDoAlltoall (HitCom *issue)
 
void hit_comDoAlltoallv (HitCom *issue)
 
void hit_comDoReduce (HitCom *issue)
 
void hit_comDoBroadcast (HitCom *issue)
 
void hit_comDoSparseUpdate (HitCom *issue)
 
void hit_comDo (HitCom *issue)
 
void hit_comOpSumDouble (void *, void *, int *, HitType *)
 
void hit_comOpMaxDouble (void *, void *, int *, HitType *)
 
void hit_comOpMinDouble (void *, void *, int *, HitType *)
 
void hit_comOpSumInt (void *, void *, int *, HitType *)
 
void hit_comOpMinInt (void *, void *, int *, HitType *)
 
void hit_comOpMaxInt (void *, void *, int *, HitType *)
 
void hit_comOpGenericAnyType (void *in, void *inout, HitType datatype, int offset, size_t tam, HitComOpFunction f)
 

Variables

HitType HIT_SHAPE_SIG
 
HitOp HIT_OP_SUM_INT
 
HitOp HIT_OP_MIN_INT
 
HitOp HIT_OP_MAX_INT
 
HitOp HIT_OP_SUM_DOUBLE
 
HitOp HIT_OP_MIN_DOUBLE
 
HitOp HIT_OP_MAX_DOUBLE
 
HitCom HIT_COM_NULL
 
HitComAlltoallv HIT_COM_ALLTOALLV_NULL
 
HitComSparse HIT_COM_SPARSE_NULL
 

Detailed Description

MPI Communications management module. It allow to create point to point or collective communications on active processors on a Hitmap Topology or Layout. The communications are encapsulated in a HitCom object.

Version
1.5
Author
Arturo Gonzalez-Escribano
Javier Fresno Bausela
Carlos de Blas Carton
Date
Mar 2013

Definition in file hit_com.h.

Macro Definition Documentation

#define HIT_ALLDISTRIBUTE   12

Constant for All Distribute

Definition at line 109 of file hit_com.h.

#define HIT_ALLGATHERV   14

Constant for All GatherV

Definition at line 113 of file hit_com.h.

#define HIT_ALLREDUCE   5

Constant for All Reduce communication.

Definition at line 95 of file hit_com.h.

#define HIT_ALLTOALL   6

Constant for All to all communication.

Definition at line 97 of file hit_com.h.

#define HIT_ALLTOALLV   7

Constant for All to all v communication.

Definition at line 99 of file hit_com.h.

#define HIT_ANY_TAG   0

constant for communications of any tag

Definition at line 132 of file hit_com.h.

#define HIT_BOOL   MPI_BOOL

Constant for boolean basic type.

Definition at line 80 of file hit_com.h.

#define HIT_BROADCAST   8

Constant for Broadcast communication.

Definition at line 101 of file hit_com.h.

#define HIT_CHAR   MPI_CHAR

Constant for char basic type.

Definition at line 72 of file hit_com.h.

#define HIT_COM_ALLTOALLV_NULL_STATIC   {NULL,NULL,NULL,NULL,NULL}

Hit COM alltoallv: NULL STATIC VALUE for HitComAlltoallv.

Definition at line 330 of file hit_com.h.

#define HIT_COM_ARRAYCOORDS   0x44

Constants for specifying that the selection is made with array coordinates.

Definition at line 345 of file hit_com.h.

#define HIT_COM_MYSELF   -100

constant for selecting my own rank in dimensional collective communications

Definition at line 135 of file hit_com.h.

#define HIT_COM_NULL_STATIC
Value:
{ \
.commType = HIT_COMTYPE_NULL, \
.myself=MPI_PROC_NULL, \
.sendTo=MPI_PROC_NULL, \
.recvFrom=MPI_PROC_NULL, \
.tag=0, \
.typeSend=HIT_TYPE_NULL, \
.typeRecv=HIT_TYPE_NULL, \
.dataSend=NULL, \
.dataRecv=NULL, \
.comm=MPI_COMM_NULL, \
.requestSend=MPI_REQUEST_NULL, \
.requestRecv=MPI_REQUEST_NULL, \
.operation=0, \
.count=0, \
.alltoallv=NULL}
#define HIT_COMTYPE_NULL
Definition: hit_com.h:89
#define HIT_TYPE_NULL
Definition: hit_com.h:181

Hit COM: Static null value

Definition at line 308 of file hit_com.h.

#define HIT_COM_SPARSE_NULL_STATIC   {HIT_SHAPE_NULL_STATIC, NULL, NULL, NULL, 0, 0, 0, NULL}

Hit COM sparse: NULL STATIC VALUE for HitComSparse.

Definition at line 335 of file hit_com.h.

#define HIT_COM_TILECOORDS   0x43

Constants for specifying that the selection is made with tile coordinates.

Definition at line 343 of file hit_com.h.

#define hit_comAllGatherv (   lay,
  tilePSend,
  tilePRecv,
  baseType 
)    hit_comAllGathervInternal(lay, tilePSend, tilePRecv, baseType, __FILE__, __LINE__)

Gathers data from all tasks and distribute the combined data to all tasks.

Parameters
layThe layout
tilePSendThe send tile.
tilePRecvThe recv tile.
baseTypeDatatype.
Returns

Definition at line 891 of file hit_com.h.

#define hit_comAllowDims (   lay)
Value:
{\
int hit_i;\
for (hit_i=0;hit_i<hit_layNumDims(lay); hit_i++) hit_comAllowDim(&lay,hit_i); \
}
#define hit_layNumDims(lay)
Definition: hit_layout.h:655
void hit_comAllowDim(HitLayout *lay, int dim)
Definition: hit_com.c:367
HitLayout lay
Definition: heat.c:107

hit_comAllowDims: prepare resources to communicate with hit_com{Broadcast,Reduce}Dim It creates the low level communicator to allow collective dim communications for all dimensions

Parameters
layThe Layout

Definition at line 587 of file hit_com.h.

#define hit_comAlltoall (   lay,
  tilePSend,
  tilePRecv,
  baseType,
  count 
)    hit_comAlltoallSelect(lay, tilePSend, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, tilePRecv, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, count)

hit_comAlltoall: Perform a all to all communication.

Parameters
layLayout.
tilePSendPointer to the HitTile to send
tilePRecvPointer to the HitTile to receive. It must be of the same type that tilePSendç
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
countNumber of elements to send/receive.
Returns
HitCom communication structure.

Definition at line 785 of file hit_com.h.

#define hit_comAlltoallv (   lay,
  tilePSend,
  selectionSend,
  tilePRecv,
  selectionRecv,
  baseType 
)    hit_comAlltoallSelectv(lay, tilePSend, selectionSend, HIT_COM_TILECOORDS, tilePRecv, selectionRecv, HIT_COM_TILECOORDS, baseType)

hit_comAlltoallv: Perform a all to all v communication.

Parameters
layLayout.
tilePSendPointer to the HitTile to send
selectionSendHitShape to applied to the send tile
tilePRecvPointer to the HitTile to receive. It must be of the same type that tilePSendç
selectionRecvHitShape to applied to the receive tile
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
Returns
HitCom communication structure.

Definition at line 812 of file hit_com.h.

#define hit_comBarrier (   lay)    MPI_Barrier( lay.pTopology[0]->comm )

hit_comBarrier: barrier for all active processes in a layout

Parameters
laylayout

Definition at line 1027 of file hit_com.h.

#define hit_comBroadcast (   lay,
  root,
  tile,
  baseType 
)    hit_comBroadcastSelect(lay, root, tile, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType)

hit_comBroadcast: creates a communication for a broadcast communication In this function all the elements of the tiles are communicated

Parameters
laylayout
rootHitRanks coordinates of the process that will send
tilePointer to the HitTile to send or receive
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
Returns
HitCom communication structure

Definition at line 673 of file hit_com.h.

#define hit_comBroadcastDim (   lay,
  dim,
  root,
  tile,
  baseType 
)    hit_comBroadcastDimSelect(lay, dim, root, tile, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType)

hit_comBroadcastDim: creates a communication for a one-dimensional broadcast communication In this function all the elements of the tiles are communicated

Parameters
laylayout
dimdimension where the broadcast will be applied. It should be lower than the dimensions of the layout
rootRank coordinate in the selected dimension of the process that will send
tilePointer to the HitTile to send or receive
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
Returns
HitCom communication structure

Definition at line 696 of file hit_com.h.

#define hit_comDoOnce (   com)    { HitCom __HIT_COM__ = com; hit_comDo( & __HIT_COM__ ); hit_comFree( __HIT_COM__ ); }

hit_comDoOnce: do a communication and free the comm object.

Parameters
comA hit_com object constructor

Definition at line 1003 of file hit_com.h.

#define hit_comDoSendRecv (   comm)
Value:
{ \
}
void hit_comEndSend(HitCom *issue)
Definition: hit_com.c:2062
MPI_Comm comm
Definition: SWpar_ref.c:193
void hit_comDoRecv(HitCom *issue)
Definition: hit_com.c:2084
void hit_comStartSend(HitCom *issue)
Definition: hit_com.c:2051

hit_comDo: do a communication (send and receive) in a send-receive communication

Parameters
commcommunication

Definition at line 983 of file hit_com.h.

#define hit_comFreeType (   type)    if (type!=HIT_TYPE_NULL) MPI_Type_free( &type );

hit_comFreeType: free a derived HitType.

Definition at line 187 of file hit_com.h.

#define hit_Comm   (HIT_TOPOLOGY_INFO->comm)

Low level communicator

Definition at line 145 of file hit_com.h.

#define hit_comOp (   function,
  operation 
)    MPI_Op_create((HitReduceFunction *)function, 1, &(operation) );

hit_comOp: creates a new conmutative HitOp operation. Used in reductions.

Parameters
functionconmutative function to create that matches to ( void * a, void * b, int * len, HitType * )
operationHitOp operation to create

Definition at line 1036 of file hit_com.h.

#define hit_comOpFree (   operation)    MPI_Op_free( &(operation) );

hit_comOpFree: frees a HitOp operation.

Parameters
operationHitOp operation to free.

Definition at line 1048 of file hit_com.h.

#define hit_comOpNoCommutative (   function,
  operation 
)    MPI_Op_create(function, 0, &(operation) );

hit_comOpNoCommutative: creates a new no-conmutative HitOp operation. Used in reductions.

Parameters
functionno-conmutative function to create the operator. Operator function prototype should be ( void * a, void * b, int * len, HitType * )
operationHitOp operation to create

Definition at line 1042 of file hit_com.h.

#define hit_comRecv (   lay,
  receiveFrom,
  tileP,
  baseType 
)    hit_comSendRecvSelect(lay, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, receiveFrom, tileP, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType)

hit_comRecvTag: creates a communications for an only-receive communication In this function all the elements of the tile are received

Parameters
laylayout
receiveFromHitRanks coordinates of the process that will receive
tilePPointer to the HitTile to receive
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
Returns
HitCom communication structure

Definition at line 499 of file hit_com.h.

#define hit_comRecvSelect (   lay,
  receiveFrom,
  tileP,
  selection,
  modeSelect,
  baseType 
)    hit_comSendRecvSelect(lay, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, receiveFrom, tileP, selection, modeSelect, baseType)

hit_comRecvSelect: creates a communications for an only-receive communication In this function a selection is applied to the tile to obtain the elements to receive

Parameters
laylayout
receiveFromHitRanks coordinates of the process that will receive
tilePPointer to the HitTile to receive
selectionHitShape to applied to the receive tile
modeSelectConstant indicating if the receive tile is selected in tile or array coordinates *
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
Returns
HitCom communication structure

Definition at line 489 of file hit_com.h.

#define hit_comRecvSelectTag (   lay,
  receiveFrom,
  tileP,
  selection,
  modeSelect,
  baseType,
  tag 
)    hit_comSendRecvSelectTag(lay, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, receiveFrom, tileP, selection, modeSelect, baseType, tag)

hit_comRecvSelectTag: creates a communications with tag for an only-receive communication In this function a selection is applied to the tile to obtain the elements to receive

Parameters
laylayout
receiveFromHitRanks coordinates of the process that will receive
tilePPointer to the HitTile to receive
selectionHitShape to applied to the receive tile
modeSelectConstant indicating if the receive tile is selected in tile or array coordinates
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
tagTag of the communication
Returns
HitCom communication structure

Definition at line 466 of file hit_com.h.

#define hit_comRecvTag (   lay,
  receiveFrom,
  tileP,
  baseType,
  tag 
)    hit_comSendRecvSelect(lay, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, receiveFrom, tileP, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, tag)

hit_comRecvTag: creates a communications with tag for an only-receive communication In this function all the elements of the tile are received

Parameters
laylayout
receiveFromHitRanks coordinates of the process that will receive
tilePPointer to the HitTile to receive
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
tagTag of the communication
Returns
HitCom communication structure

Definition at line 477 of file hit_com.h.

#define hit_comReduce (   lay,
  root,
  tilePSend,
  tilePRecv,
  baseType,
  operation 
)    hit_comReduceSelect(lay, root, tilePSend, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, tilePRecv, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, operation)

hit_comReduce: creates a communication for a reduce communication. If root is null all processes get the result data. In this function all the elements of the tiles are communicated

Parameters
laylayout
rootHitRanks coordinates of the process that will receive the final data
tilePSendPointer to the HitTile to send
tilePRecvPointer to the HitTile to receive. It must be of the same type that tilePSend
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
operationHitOp created to reduce the elements of the tile
See Also
hit_comOpCreate
Returns
HitCom communication structure

Definition at line 725 of file hit_com.h.

#define hit_comReduceDim (   lay,
  dim,
  root,
  tilePSend,
  tilePRecv,
  baseType,
  operation 
)    hit_comReduceDimSelect(lay, dim, root, tilePSend, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, tilePRecv, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, operation)

hit_comReduceDim: creates a communication for a one-dimensional reduce communication. If root is null all processes get the result data. In this function all the elements of the tiles are communicated

Parameters
laylayout
dimdimension where the broadcast will be applied. It should be lower than the dimensions of the layout
rootHitRanks coordinates of the process that will receive the final data
tilePSendPointer to the HitTile to send
tilePRecvPointer to the HitTile to receive. It must be of the same type that tilePSendç
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
operationHitOp created to reduce the elements of the tile
See Also
hit_comOpCreate
Returns
HitCom communication structure

Definition at line 756 of file hit_com.h.

#define hit_comSend (   lay,
  sendTo,
  tileP,
  baseType 
)    hit_comSendRecvSelect(lay, sendTo, tileP, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType)

hit_comSendSelec: creates a communications for an only-send communication In this function all the elements of the tile are sent

Parameters
laylayout
sendToHitRanks coordinates of the process that will send
tilePPointer to the HitTile to send
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
Returns
HitCom communication structure

Definition at line 452 of file hit_com.h.

#define hit_comSendRecv (   lay,
  sendTo,
  tilePSend,
  receiveFrom,
  tilePRecv,
  baseType 
)    hit_comSendRecvSelect(lay, sendTo, tilePSend, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, receiveFrom, tilePRecv, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType)

hit_comSendRecv: creates a communication for a send-receive pair communication In this function all the elements of the tiles are communicated

Parameters
laylayout
sendToHitRanks coordinates of the process that will receive
tilePSendPointer to the HitTile to send
receiveFromHitRanks coordinates of the process from which to receive
tilePRecvPointer to the HitTile to receive
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
Returns
HitCom communication structure

Definition at line 358 of file hit_com.h.

#define hit_comSendRecvSelect (   lay,
  sendTo,
  tilePSend,
  selectionSend,
  modeSelectSend,
  receiveFrom,
  tilePRecv,
  selectionRecv,
  modeSelectRecv,
  baseType 
)    hit_comSendRecvSelectTag(lay, sendTo, tilePSend, selectionSend, modeSelectSend, receiveFrom, tilePRecv, selectionRecv, modeSelectRecv, baseType, HIT_ANY_TAG)

hit_comSendRecvSelect: creates a communication with tag for a send-receive pair communication In this function a selection is applied to each tile to obtain the elements to communicate

Parameters
laylayout
sendToHitRanks coordinates of the process that will receive
tilePSendPointer to the HitTile to send
selectionSendHitShape to applied to the send tile
modeSelectSendConstant indicating if the send tile is selected in tile or array coordinates
receiveFromHitRanks coordinates of the process from which to receive
tilePRecvPointer to the HitTile to receive
selectionRecvHitShape to applied to the receive tile
modeSelectRecvConstant indicating if the send tile is selected in tile or array coordinates
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
Returns
HitCom communication structure

Definition at line 387 of file hit_com.h.

#define hit_comSendRecvTag (   lay,
  sendTo,
  tilePSend,
  receiveFrom,
  tilePRecv,
  baseType,
  tag 
)    hit_comSendRecvSelectTag(lay, sendTo, tilePSend, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, receiveFrom, tilePRecv, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, tag)

hit_comSendRecvTag: creates a communication with tag for a send-receive pair communication In this function all the elements of the tiles are communicated

Parameters
laylayout
sendToHitRanks coordinates of the process that will receive
tilePSendPointer to the HitTile to send
receiveFromHitRanks coordinates of the process from which to receive
tilePRecvPointer to the HitTile to receive
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
tagTag of the communication
Returns
HitCom communication structure

Definition at line 371 of file hit_com.h.

#define hit_comSendSelect (   lay,
  sendTo,
  tileP,
  selection,
  modeSelect,
  baseType 
)    hit_comSendRecvSelect(lay, sendTo, tileP, selection, modeSelect, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType)

hit_comSendSelec: creates a communications for an only-send communication In this function a selection is applied to the tile to obtain the elements to send

Parameters
laylayout
sendToHitRanks coordinates of the process that will receive
tilePPointer to the HitTile to send
selectionHitShape to applied to the send tile
modeSelectConstant indicating if the send tile is selected in tile or array coordinates
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
Returns
HitCom communication structure

Definition at line 442 of file hit_com.h.

#define hit_comSendSelectTag (   lay,
  sendTo,
  tileP,
  selection,
  modeSelect,
  baseType,
  tag 
)    hit_comSendRecvSelectTag(lay, sendTo, tileP, selection, modeSelect, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, tag)

hit_comSendSelectTag: creates a communications with tag for an only-send communication In this function a selection is applied to the tile to obtain the elements to send

Parameters
laylayout
sendToHitRanks coordinates of the process that will receive
tilePPointer to the HitTile to send
selectionHitShape to applied to the send tile
modeSelectConstant indicating if the send tile is selected in tile or array coordinates
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
tagTag of the communication
Returns
HitCom communication structure

Definition at line 419 of file hit_com.h.

#define hit_comSendTag (   lay,
  sendTo,
  tileP,
  baseType,
  tag 
)    hit_comSendRecvSelectTag(lay, sendTo, tileP, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, HIT_RANKS_NULL, &HIT_TILE_NULL, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, tag)

hit_comSendTag: creates a communications with tag for an only-send communication In this function all the elements of the tile are sent

Parameters
laylayout
sendToHitRanks coordinates of the process that will receive
tilePPointer to the HitTile to send
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
tagTag of the communication
Returns
HitCom communication structure

Definition at line 430 of file hit_com.h.

#define hit_comShiftDim (   lay,
  dim,
  shift,
  tileP,
  baseType 
)    hit_comShiftDimSelect(lay, dim, shift, tileP, HIT_SHAPE_WHOLE, HIT_COM_TILECOORDS, baseType, HIT_ANY_TAG)

hit_comShiftDim: creates a communication in which all processes from the same dimension of the layout send and receive a tile. The tile is sent to a neighbor in shift positions right and received (and overwritten) from the neighbor shift positions left. In this function all the elements of the tiles are communicated.

Parameters
laylayout.
dimdimension of the layout.
shiftdistance to the neighbors to communicate.
tilePPointer to the HitTile to send and receive.
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
Returns
HitCom communication structure.

Definition at line 646 of file hit_com.h.

#define hit_comShiftDimAsync (   lay,
  dim,
  shift,
  tileSend,
  tileRecv,
  baseType,
  tag 
)    hit_comSendRecvTag(lay, hit_layNeighbor( lay, dim, shift ), tileSend, hit_layNeighbor( lay, dim, -shift ), tileRecv, baseType, tag)

hit_comShiftDimAsync: creates a communication in which all processes from the same dimension of the layout send and receive a tile. The tile is sent to a neighbor in shift positions right and received (and overwritten) from the neighbor shift positions left. In this function all the elements of the tiles are communicated

Parameters
laylayout
dimdimension of the layout
shiftdistance to the neighbors to communicate
tileSendPointer to the HitTile to send.
tileRecvPointer to the HitTile to receive.
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
tagA tag to identify an asynchronous communication
Returns
HitCom communication structure.

Definition at line 661 of file hit_com.h.

#define hit_comShiftDimSelect (   lay,
  dim,
  shift,
  tileP,
  selection,
  modeSelect,
  baseType,
  tag 
)    hit_comSendRecvReplaceSelectTag(lay, hit_layNeighbor(lay,dim,shift), tileP, selection, modeSelect, hit_layNeighbor(lay,dim,-shift), baseType, tag)

hit_comShiftDimSelect: creates a communication in which all processes from the same dimension of the layout send and receive a tile. It allows to select part of a tile The tile is sent to a neighbor in shift positions right and received (and overwritten) from the neighbor shift positions left. In this function a selection is applied to the tile to obtain the elements to communicate

Parameters
laylayout
dimdimension of the layout
shiftdistance to the neighbors to communicate
tilePPointer to the HitTile to send and receive
selectionHitShape to applied to the tile
modeSelectConstant indicating if the tile is selected in tile or array coordinates
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
tagA tag to allow its use in asynchronous communications
Returns
HitCom communication structure

Definition at line 619 of file hit_com.h.

#define hit_comSparseScatter (   lay,
  tilePSend,
  tilePRecv,
  baseType 
)    hit_comSparseScatterInternal(lay, tilePSend, tilePRecv, baseType, __FILE__, __LINE__)

Definition at line 852 of file hit_com.h.

#define hit_comSparseScatterRows (   lay,
  tilePSend,
  tilePRecv,
  baseType 
)    hit_comSparseScatterRowsInternal(lay, tilePSend, tilePRecv, baseType, __FILE__, __LINE__)

This communication scatters a sparse matrix by rows.

Parameters
layThe layout with the partition.
tilePSendThe tile with the data to send.
tilePRecvThe tile to receive the data.
baseTypeThe Hitmap base type of the tile.
Returns
The new commucation object

Definition at line 863 of file hit_com.h.

#define hit_comTagSet (   ...)    enum { __VA_ARGS__ }

hit_comtagSet: defines an enumerate type of tags. These tags can be used in communications.

Parameters
...set of tags.

Definition at line 909 of file hit_com.h.

#define HIT_COMTYPE_NULL   0

Constant for Null communication.

Definition at line 89 of file hit_com.h.

#define hit_comTypeStruct (   new_type,
  Nstruct,
  n,
  ... 
)    hit_comTypeStruct##n(new_type,Nstruct,__VA_ARGS__)

Definition at line 208 of file hit_com.h.

#define hit_comUpdateDimRecvFrom (   comm,
  dim,
  RecvFrom 
)    comm.recvFrom=RecvFrom

hit_comUpdateDimRecvFrom: updates the ranks of the processor that receives in a dimension collective communication shortcut to create a new communication

Parameters
commcommunication
dimdimension
RecvFromhit_ranhs of the new process that receives

Definition at line 561 of file hit_com.h.

#define hit_comUpdateDimSendTo (   comm,
  dim,
  SendTo 
)    comm.sendTo=SendTo

hit_comUpdateDimSendTo: updates the ranks of the processor that sends in a dimension collective communication shortcut to create a new communication

Parameters
commcommunication
dimdimension
SendTohit_ranks of the new process that sends

Definition at line 550 of file hit_com.h.

#define hit_comUpdateRecvFrom (   comm,
  topo,
  RecvFrom 
)    comm.recvFrom=hit_topRankInternal(topo,RecvFrom)
Deprecated:
hit_comUpdateRecvFrom: updates the ranks of the processor that receives shortcut to create a new communication
Parameters
commcommunication
topotopology
RecvFromhit_ranks of the new process that receives

Definition at line 539 of file hit_com.h.

#define hit_comUpdateRecvTile (   comm,
  recvTile 
)    comm.dataRecv=recvTile.data

hit_comUpdateRecvTile: updates the tile where data is received. Shortcut to create a new communication when the new tile to communicate has the same type.

Warning
Do not use this function unless you are sure that the new tile has the same data structure as the one used to create the comm object.
Parameters
commcommunication
recvTileNew tile to receive

Definition at line 519 of file hit_com.h.

#define hit_comUpdateSendTile (   comm,
  sendTile 
)    comm.dataSend=sendTile.data

hit_comUpdateSendTile: updates the tile from where data is sent. Shortcut to create a new communication when the new tile to communicate has the same type.

Warning
Do not use this function unless you are sure that the new tile has the same data structure as the one used to create the comm object.
Parameters
commcommunication
sendTileNew tile to send

Definition at line 509 of file hit_com.h.

#define hit_comUpdateSendTo (   comm,
  topo,
  SendTo 
)    comm.sendTo=hit_topRankInternal(topo,SendTo)
Deprecated:
hit_comUpdateSendTo: updates the ranks of the processor that sends shortcut to create a new communication
Parameters
commcommunication
topotopology
SendTohit_ranks of the new process that sends

Definition at line 529 of file hit_com.h.

#define hit_comUpdateTag (   comm,
  Tag 
)    comm.tag=Tag
Deprecated:
hit_comUpdateTag: updates the tag of a communication shortcut to create a new communication
Parameters
commcommunication
Tagnew tag

Definition at line 570 of file hit_com.h.

#define HIT_DOUBLE   MPI_DOUBLE

Constant for double precision real basic type.

Definition at line 78 of file hit_com.h.

#define hit_error (   name,
  file,
  numLine 
)
Value:
{ \
fprintf(stderr,"Hit Programmer, RunTime-Error Rank(%d): %s, in %s[%d]\n", hit_Rank, name, file, numLine); \
MPI_Finalize(); \
exit( HIT_ERR_USER ); \
}
#define hit_Rank
Definition: hit_com.h:140
#define HIT_ERR_USER
Definition: hit_error.h:56

hit_error: prints an error.

Parameters
nameError message.
fileCode file.
numLineLine number.

Definition at line 1012 of file hit_com.h.

#define HIT_FLOAT   MPI_FLOAT

Constant for single precision real basic type.

Definition at line 76 of file hit_com.h.

#define HIT_INT   MPI_INT

Constant for integer basic type.

Definition at line 74 of file hit_com.h.

#define hit_mpiTestError (   ok,
  cad 
)
Value:
if ( ok != MPI_SUCCESS ) { \
fprintf(stderr,"Hit MPI RunTime-Error, Rank %d: %s - %d\n", hit_Rank, cad, ok); fflush(stderr); \
exit(-1); \
}
#define hit_Rank
Definition: hit_com.h:140

This macro checks if the MPI operation was successful.

Definition at line 62 of file hit_com.h.

#define hit_NProcs   (HIT_TOPOLOGY_INFO->numProcs)

Number of total processors

Definition at line 142 of file hit_com.h.

#define hit_Rank   (HIT_TOPOLOGY_INFO->selfRank)

Linear rank for the current processor

Definition at line 140 of file hit_com.h.

#define HIT_REDUCE   4

Constant for Reduce communication.

Definition at line 93 of file hit_com.h.

#define HIT_SENDRECV   3

Constant for Send and/or Receive communication.

Definition at line 91 of file hit_com.h.

#define HIT_SENDRECV_REPLACE   9

Constant for Send and/or Receive Replace communication.

Definition at line 103 of file hit_com.h.

#define HIT_SPARSE_SCATTER   11

Constant for Sparse Broadcast

Definition at line 107 of file hit_com.h.

#define HIT_SPARSE_SCATTER_ROWS   13

Constant for Sparse Scatter Rows

Definition at line 111 of file hit_com.h.

#define HIT_SPARSE_UPDATE   10

Constant for Sparse Update communication.

Definition at line 105 of file hit_com.h.

#define HIT_TYPE_NULL   MPI_DATATYPE_NULL

Null datatype.

Definition at line 181 of file hit_com.h.

Typedef Documentation

typedef MPI_Aint HitAint

Definition at line 82 of file hit_com.h.

HitComAlltoallv: This struct extends the HitCom struct to allow alltoallv communications.

typedef void(* HitComOpFunction)(void *, void *)

HitComOpFunction: basic functions to reduce operations.

Definition at line 1092 of file hit_com.h.

typedef struct HitComSparse HitComSparse

HitComSparse: This struct extends the HitComAlltoallv struct to allow sparse updates.

typedef MPI_Op HitOp

Hit Communication type

Definition at line 118 of file hit_com.h.

typedef MPI_User_function HitReduceFunction

Hit Reduce function

Definition at line 120 of file hit_com.h.

typedef MPI_Datatype HitType

Typedef for the HitType.

Definition at line 70 of file hit_com.h.

Function Documentation

HitCom hit_comAllDistribute ( HitLayout  lay,
const void *  tilePSend,
int *  count,
const void *  tilePRecv,
HitType  baseType 
)

This communication distributes different sets of data to the processors using a plug_layContiguous. The processors have part of each set. When the communication is done, each processors will have the data of its assigned sets.

Parameters
layThe layout with the partition.
tilePSendThe tile with the partial sets.
countThe number of elements in each partial set.
tilePRecvThe tile to reive the complete sets for each processors.
baseTypeThe hitmap base type of the data.
Note
works only with plug_layContiguous
Returns
The new HitCom object.

Definition at line 1651 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

HitCom hit_comAllGathervInternal ( HitLayout  lay,
const void *  tilePSend,
const void *  tilePRecv,
HitType  baseType,
const char *  file,
int  line 
)

Definition at line 996 of file hit_com.c.

void hit_comAllowDim ( HitLayout lay,
int  dim 
)

hit_comAllowDim: enables the collective dimension communications preparing resources to communicate with hit_com{Broadcast,Reduce}Dim with a specific dimension.

Parameters
layPointer to the layout.
dimDimension to enable the dimension communications.

Definition at line 367 of file hit_com.c.

Here is the call graph for this function:

HitCom hit_comAlltoallSelect ( HitLayout  lay,
const void *  tilePSend,
HitShape  selectionSend,
int  modeSelectSend,
const void *  tilePRecv,
HitShape  selectionRecv,
int  modeSelectRecv,
HitType  baseType,
int  count 
)

hit_comAlltoallSelect: Perform a all to all communication.

Parameters
layLayout.
tilePSendPointer to the HitTile to send
selectionSendHitShape to applied to the send tile
modeSelectSendConstant indicating if the send tile is selected in tile or array coordinates
tilePRecvPointer to the HitTile to receive. It must be of the same type that tilePSendç
selectionRecvHitShape to applied to the receive tile
modeSelectRecvConstant indicating if the receive tile is selected in tile or array coordinates
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
countNumber of elements to send/receive.
Returns
HitCom communication structure.

Definition at line 834 of file hit_com.c.

HitCom hit_comAlltoallSelectv ( HitLayout  lay,
const void *  tilePSend,
HitShape selectionSend,
int  modeSelectSend,
const void *  tilePRecv,
HitShape selectionRecv,
int  modeSelectRecv,
HitType  baseType 
)

hit_comAlltoallv: Perform a all to all v communication.

Parameters
layLayout.
tilePSendPointer to the HitTile to send
selectionSendHitShape to applied to the send tile
modeSelectSendConstant indicating if the send tile is selected in tile or array coordinates
tilePRecvPointer to the HitTile to receive. It must be of the same type that tilePSendç
selectionRecvHitShape to applied to the receive tile
modeSelectRecvConstant indicating if the receive tile is selected in tile or array coordinates
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
Returns
HitCom communication structure.

Definition at line 896 of file hit_com.c.

HitCom hit_comBroadcastDimSelect ( HitLayout  lay,
int  dim,
int  root,
const void *  tile,
HitShape  selection,
int  modeSelect,
HitType  baseType 
)

hit_comBroadcastDimSelect: creates a communication for a one-dimensional broadcast communication In this function a selection is applied to the tile to obtain the elements to communicate

Parameters
laylayout
dimdimension where the broadcast will be applied. It should be lower than the dimensions of the layout
rootRank coordinate in the selected dimension of the process that will send
tilePointer to the HitTile to send or receive
selectionHitShape to applied to the tile
modeSelectConstant indicating if the tile is selected in tile or array coordinates
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
Returns
HitCom communication structure

Definition at line 779 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

HitCom hit_comBroadcastSelect ( HitLayout  lay,
HitRanks  root,
const void *  tile,
HitShape  selection,
int  modeSelect,
HitType  baseType 
)

hit_comBroadcastSelect: creates a communication for a broadcast communication In this function a selection is applied to the tile to obtain the elements to communicate

Parameters
laylayout
rootHitRanks coordinates of the process that will send
tilePointer to the HitTile to send or receive
selectionHitShape to applied to the tile
modeSelectConstant indicating if the tile is selected in tile or array coordinates
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
Returns
HitCom communication structure

Definition at line 731 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hit_comDo ( HitCom issue)

hit_comDo: do a communication. It checks the communication type to select the apropiate function.

Parameters
issuepointer to HitCom communication.

Definition at line 2408 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hit_comDoAlltoall ( HitCom issue)

hit_comDoAlltoall: perform an all-to-all communication

Parameters
issuepointer to the communication

Definition at line 2155 of file hit_com.c.

Here is the caller graph for this function:

void hit_comDoAlltoallv ( HitCom issue)

hit_comDoAlltoallv: perform an all-to-all v communication

Parameters
issuepointer to the communication

Definition at line 2165 of file hit_com.c.

Here is the caller graph for this function:

void hit_comDoBroadcast ( HitCom issue)

hit_comDoBroascast: perform a broadcast communication

Parameters
issuepointer to the communication

Definition at line 2143 of file hit_com.c.

Here is the caller graph for this function:

void hit_comDoRecv ( HitCom issue)

hit_comDoRecv: receive in a send-receive communication

Parameters
issuepointer to the communication

Definition at line 2084 of file hit_com.c.

Here is the caller graph for this function:

void hit_comDoReduce ( HitCom issue)

hit_comDoReduce: perform a reduce communication

Parameters
issuepointer to the communication

Definition at line 2126 of file hit_com.c.

Here is the caller graph for this function:

void hit_comDoSend ( HitCom issue)

hit_comDoSend: send in a send-receive communication

Parameters
issuepointer to the communication

Definition at line 2073 of file hit_com.c.

void hit_comDoSendRecvReplace ( HitCom issue)

hit_comDoSendRecvReplace: perform a Sendrecv_replace communication

Parameters
issuepointer to the communication

Definition at line 2116 of file hit_com.c.

Here is the caller graph for this function:

void hit_comDoSparseUpdate ( HitCom issue)

hit_comDoSparseUpdate: perform a sparse update communication.

Parameters
issuepointer to the communication.

Definition at line 2259 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hit_comEndRecv ( HitCom issue)

hit_comEndRecv: end to receive in a send-receive communication

Parameters
issuepointer to the communication

Definition at line 2104 of file hit_com.c.

void hit_comEndSend ( HitCom issue)

hit_comEndSend: end to send in a send-receive communication

Parameters
issuepointer to the communication

Definition at line 2062 of file hit_com.c.

Here is the caller graph for this function:

void hit_comFinalize ( )

hit_comFinalize finalizes the communication environment freeing all internal resources

Definition at line 159 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hit_comFree ( HitCom  issue)

hit_comFree: frees the resources of a communication structure

Parameters
issuecommunication

Definition at line 1995 of file hit_com.c.

Here is the caller graph for this function:

void hit_comInit ( int *  pargc,
char **  pargv[] 
)

hit_comInit: initializes the communication environment

Parameters
pargcpointer to the counter arguments of the main routine
pargvpointer to the arguments of the main routine

Definition at line 111 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hit_comOpGenericAnyType ( void *  in,
void *  inout,
HitType  datatype,
int  offset,
size_t  tam,
HitComOpFunction  f 
)

hit_comOpGenericAnyType

See Also
creation of operations

Definition at line 2552 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hit_comOpMaxDouble ( void *  ,
void *  ,
int *  ,
HitType  
)

hit_comOpMaxDouble: defined operation to calculate the maximum value in tiles of doubles. You must use hit_comOp before use it, and hit_comOpFree at the end of the program.

See Also
creation of operations.

Definition at line 2671 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hit_comOpMaxInt ( void *  ,
void *  ,
int *  ,
HitType  
)

hit_comOpMaxInt: defined operation to calculate the max value in tiles. You must use hit_comOp before use it, and hit_comOpFree at the end of the program.

See Also
creation of operations.

Definition at line 2687 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hit_comOpMinDouble ( void *  ,
void *  ,
int *  ,
HitType  
)

hit_comOpMinDouble: defined operation to calculate the minimum value in tiles of doubles. You must use hit_comOp before use it, and hit_comOpFree at the end of the program.

See Also
creation of operations.

Definition at line 2677 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hit_comOpMinInt ( void *  ,
void *  ,
int *  ,
HitType  
)

hit_comOpMinInt: defined operation to calculate the min value in tiles. You must use hit_comOp before use it, and hit_comOpFree at the end of the program.

See Also
creation of operations.

Definition at line 2691 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hit_comOpSumDouble ( void *  ,
void *  ,
int *  ,
HitType  
)

hit_comOpSumDouble: defined operation to add tiles of doubles You must use hit_comOp before use it, and hit_comOpFree at the end of the program.

See Also
creation of operations.

Definition at line 2665 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hit_comOpSumInt ( void *  ,
void *  ,
int *  ,
HitType  
)

hit_comOpSumInt: defined operation to calculate the sum value in tiles. You must use hit_comOp before use it, and hit_comOpFree at the end of the program.

See Also
creation of operations.

Definition at line 2683 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

HitCom hit_comReduceDimSelect ( HitLayout  lay,
int  dim,
HitRanks  root,
const void *  tilePSend,
HitShape  selectionSend,
int  modeSelectSend,
const void *  tilePRecv,
HitShape  selectionRecv,
int  modeSelectRecv,
HitType  baseType,
HitOp  operation 
)

hit_comReduceDimSelect: creates a communication for a one-dimensional reduce communication. If root is null all processes get the result data. In this function a selection is applied to the tiles to obtain the elements to communicate

Parameters
laylayout
dimdimension where the broadcast will be applied. It should be lower than the dimensions of the layout
rootHitRanks coordinates of the process that will receive the final data
tilePSendPointer to the HitTile to send
selectionSendHitShape to applied to the send tile
modeSelectSendConstant indicating if the send tile is selected in tile or array coordinates
tilePRecvPointer to the HitTile to receive. It must be of the same type that tilePSendç
selectionRecvHitShape to applied to the receive tile
modeSelectRecvConstant indicating if the receive tile is selected in tile or array coordinates
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
operationHitOp created to reduce the elements of the tile
See Also
hit_comOpCreate
Returns
HitCom communication structure

Definition at line 660 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

HitCom hit_comReduceSelect ( HitLayout  lay,
HitRanks  root,
const void *  tilePSend,
HitShape  selectionSend,
int  modeSelectSend,
const void *  tilePRecv,
HitShape  selectionRecv,
int  modeSelectRecv,
HitType  baseType,
HitOp  operation 
)

hit_comReduceSelect: creates a communication for a reduce communication. If root is null all processes get the result data. In this function a selection is applied to the tiles to obtain the elements to communicate

Parameters
laylayout
rootHitRanks coordinates of the process that will receive the final data
tilePSendPointer to the HitTile to send
selectionSendHitShape to applied to the send tile
modeSelectSendConstant indicating if the send tile is selected in tile or array coordinates
tilePRecvPointer to the HitTile to receive. It must be of the same type that tilePSend
selectionRecvHitShape to applied to the receive tile
modeSelectRecvConstant indicating if the receive tile is selected in tile or array coordinates
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
operationHitOp created to reduce the elements of the tile
See Also
hit_comOpCreate
Returns
HitCom communication structure

Definition at line 585 of file hit_com.c.

Here is the call graph for this function:

HitCom hit_comSendRecvReplaceSelectTag ( HitLayout  lay,
HitRanks  sendTo,
const void *  tileP,
HitShape  selection,
int  modeSelect,
HitRanks  receiveFrom,
HitType  baseType,
int  tag 
)

hit_comSendRecvReplaceSelectTag: Sends and receives using a single buffer.

Parameters
laylayout.
sendToHitRanks coordinates of the process that will send.
tilePPointer to the HitTile to send and receive.
selectionHitShape to applied to the tile.
modeSelectConstant indicating if the tile is selected in tile or array coordinates.
receiveFromHitRanks coordinates of the process that will receive
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...).
tagTag of the communication.
Returns
HitCom communication structure.

Definition at line 393 of file hit_com.c.

Here is the call graph for this function:

HitCom hit_comSendRecvSelectTag ( HitLayout  lay,
HitRanks  sendTo,
const void *  tilePSend,
HitShape  selectionSend,
int  modeSelectSend,
HitRanks  receiveFrom,
const void *  tilePRecv,
HitShape  selectionRecv,
int  modeSelectRecv,
HitType  baseType,
int  tag 
)

hit_comSendRecvSelectTag: creates a communication with tag for a send-receive pair communication In this function a selection is applied to each tile to obtain the elements to communicate

Parameters
laylayout
sendToHitRanks coordinates of the process that will receive
tilePSendPointer to the HitTile to send
selectionSendHitShape to applied to the send tile
modeSelectSendConstant indicating if the send tile is selected in tile or array coordinates
receiveFromHitRanks coordinates of the process from which to receive
tilePRecvPointer to the HitTile to receive
selectionRecvHitShape to applied to the receive tile
modeSelectRecvConstant indicating if the receive tile is selected in tile or array coordinates
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...)
tagTag of the communication
Returns
HitCom communication structure

Definition at line 450 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

HitCom hit_comSparseScatterInternal ( HitLayout  lay,
const void *  tilePSend,
const void *  tilePRecv,
HitType  baseType,
const char *  file,
int  line 
)

Definition at line 1543 of file hit_com.c.

HitCom hit_comSparseScatterRowsInternal ( HitLayout  lay,
const void *  tilePSend,
const void *  tilePRecv,
HitType  baseType,
const char *  file,
int  line 
)

Definition at line 1764 of file hit_com.c.

HitCom hit_comSparseUpdate ( HitLayout  lay,
const void *  tileP,
HitType  baseType 
)

Performs a sparse update communication. In a sparse update communication, each processor sends the vertices uses by its neighbors and updates the values of its own neighbor vertices. This communication uses an alltoallv mpi communication.

Parameters
layLayout.
tilePPointer to the HitTile.
baseTypeBasic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...).
Returns
HitCom communication structure.

Definition at line 1084 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

HitCom hit_comSparseUpdateBitmap ( HitLayout  lay,
const void *  tileP,
HitType  baseType 
)

Definition at line 1324 of file hit_com.c.

Here is the caller graph for this function:

HitCom hit_comSparseUpdateCSR ( HitLayout  lay,
const void *  tileP,
HitType  baseType 
)

Definition at line 1109 of file hit_com.c.

Here is the caller graph for this function:

void hit_comStartRecv ( HitCom issue)

hit_comStartRecv: start to receive in a send-receive communication

Parameters
issuepointer to the communication

Definition at line 2094 of file hit_com.c.

Here is the caller graph for this function:

void hit_comStartSend ( HitCom issue)

hit_comStartSend: start to send in a send-receive communication

Parameters
issuepointer to the communication

Definition at line 2051 of file hit_com.c.

Here is the caller graph for this function:

HitType hit_comType ( const void *  varP,
HitType  baseType 
)

hit_comType: create a MPI derived datatype.

Parameters
varPPointer to a HitTile.
baseTypeHitTile base type.
Returns
The derived datatype.

Definition at line 189 of file hit_com.c.

Here is the caller graph for this function:

HitType hit_comTypeRec ( const void *  varP,
HitType  baseType 
)

hit_comTypeRec: recursive creation of MPI derived datatypes for hierarchical tiles.

Parameters
varPPointer to a HitTile.
baseTypeHitTile base type.
Returns
The derived datatype.

Definition at line 290 of file hit_com.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hit_comUpdateOriginData ( HitCom com,
const void *  tileP 
)

hit_comUpdateOriginData: updates the origin data of a communication. Its used to change the tile in a sparse update communication.

Parameters
comA pointer to the communication.
tilePThe new tile pointer with the origin data.

Definition at line 1985 of file hit_com.c.

Here is the caller graph for this function:

Variable Documentation

HitComAlltoallv HIT_COM_ALLTOALLV_NULL

Hit COM alltoallv: NULL VALUE for HitComAlltoallv.

Definition at line 59 of file hit_com.c.

HitCom HIT_COM_NULL

Hit COM: NULL VALUE

Definition at line 58 of file hit_com.c.

HitComSparse HIT_COM_SPARSE_NULL

Hit COM sparse: NULL VALUE for HitComSparse.

Definition at line 60 of file hit_com.c.

HitOp HIT_OP_MAX_DOUBLE

Definition at line 68 of file hit_com.c.

HitOp HIT_OP_MAX_INT

Definition at line 65 of file hit_com.c.

HitOp HIT_OP_MIN_DOUBLE

Definition at line 67 of file hit_com.c.

HitOp HIT_OP_MIN_INT

Definition at line 64 of file hit_com.c.

HitOp HIT_OP_SUM_DOUBLE

Definition at line 66 of file hit_com.c.

HitOp HIT_OP_SUM_INT

Definition at line 63 of file hit_com.c.

HitType HIT_SHAPE_SIG

Extra HitTypes committed in initialization.

Definition at line 71 of file hit_com.c.