Hitmap 1.3
|
#include <stdio.h>
#include <stdlib.h>
#include <hit_com.h>
#include <unistd.h>
#include <hit_funcop.h>
#include <hit_sshape.h>
#include <hit_cshape.h>
#include <hit_bshape.h>
#include <hit_error.h>
#include <pthread.h>
Go to the source code of this file.
Functions | |
void | hit_comInit (int *pargc, char **pargv[]) |
void | hit_comFinalize () |
HitType | hit_comType (const void *varP, HitType baseType) |
void * | hit_comSearchData (const void *varP) |
HitType | hit_comTypeRec (const void *varP, HitType baseType) |
void | hit_comAllowDim (HitLayout *lay, int dim) |
HitCom | hit_comSendRecvReplaceSelectTag (HitLayout lay, HitRanks sendTo, const void *tileP, HitShape selection, int selectMode, HitRanks receiveFrom, HitType baseType, int tag) |
HitCom | hit_comSendRecvSelectTag (HitLayout lay, HitRanks sendTo, const void *tilePSend, HitShape selectionSend, int selectSendMode, HitRanks receiveFrom, const void *tilePRecv, HitShape selectionRecv, int selectRecvMode, HitType baseType, int tag) |
HitCom | hit_comReduceSelect (HitLayout lay, HitRanks root, const void *tilePSend, HitShape selectionSend, int selectSendMode, const void *tilePRecv, HitShape selectionRecv, int selectRecvMode, HitType baseType, HitOp operation) |
HitCom | hit_comReduceDimSelect (HitLayout lay, int dim, HitRanks root, const void *tilePSend, HitShape selectionSend, int selectSendMode, const void *tilePRecv, HitShape selectionRecv, int selectRecvMode, HitType baseType, HitOp operation) |
HitCom | hit_comBroadcastSelect (HitLayout lay, HitRanks root, const void *tileP, HitShape selection, int selectMode, HitType baseType) |
HitCom | hit_comBroadcastDimSelect (HitLayout lay, int dim, int root, const void *tileP, HitShape selection, int selectMode, HitType baseType) |
HitCom | hit_comAlltoallSelect (HitLayout lay, const void *tilePSend, HitShape selectionSend, int selectSendMode, const void *tilePRecv, HitShape selectionRecv, int selectRecvMode, HitType baseType, int count) |
HitCom | hit_comAlltoallSelectv (HitLayout lay, const void *tilePSend, HitShape *selectionSend, int selectSendMode, const void *tilePRecv, HitShape *selectionRecv, int selectRecvMode, HitType baseType) |
HitCom | hit_comAllGathervInternal (HitLayout lay, const void *tilePSend, const void *tilePRecv, HitType baseType, const char *file, int line) |
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_comAllDistribute (HitLayout lay, const void *tilePSend, int *count, const void *tilePRecv, HitType baseType) |
HitCom | hit_comSparseScatterRowsInternal (HitLayout lay, const void *tilePSend, const void *tilePRecv, HitType baseType, const char *file, int line) |
void | hit_comUpdateOriginData (HitCom *com, const void *tileP) |
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_comDoReduce (HitCom *issue) |
void | hit_comDoBroadcast (HitCom *issue) |
void | hit_comDoAlltoall (HitCom *issue) |
void | hit_comDoAlltoallv (HitCom *issue) |
void | hit_comDoSparseUpdateCSR (HitCom *issue) |
void | hit_comDoSparseUpdateBitmap (HitCom *issue) |
void | hit_comDoSparseUpdate (HitCom *issue) |
void | hit_comDoSparseScatter (HitCom *issue) |
void | hit_comDoSparseScatterRows (HitCom *issue) |
void | hit_comDoAllGatherv (HitCom *issue) |
void | hit_comDo (HitCom *issue) |
void | hit_comOpSumDoubleBasic (void *in, void *inout) |
void | hit_comOpMaxDoubleBasic (void *in, void *inout) |
void | hit_comOpMinDoubleBasic (void *in, void *inout) |
void | hit_comOpSumIntBasic (void *in, void *inout) |
void | hit_comOpMaxIntBasic (void *in, void *inout) |
void | hit_comOpMinIntBasic (void *in, void *inout) |
void | hit_comOpGenericAnyType (void *in, void *inout, MPI_Datatype datatype, int offset, size_t tam, HitComOpFunction f) |
void | hit_comOpSumDouble (void *in, void *inout, int *len, HitType *type) |
void | hit_comOpMaxDouble (void *in, void *inout, int *len, HitType *type) |
void | hit_comOpMinDouble (void *in, void *inout, int *len, HitType *type) |
void | hit_comOpSumInt (void *in, void *inout, int *len, HitType *type) |
void | hit_comOpMaxInt (void *in, void *inout, int *len, HitType *type) |
void | hit_comOpMinInt (void *in, void *inout, int *len, HitType *type) |
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.
Definition in file hit_com.c.
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.
lay | The layout with the partition. |
tilePSend | The tile with the partial sets. |
count | The number of elements in each partial set. |
tilePRecv | The tile to reive the complete sets for each processors. |
baseType | The hitmap base type of the data. |
Definition at line 1651 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.
lay | Pointer to the layout. |
dim | Dimension to enable the dimension communications. |
Definition at line 367 of file hit_com.c.
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.
lay | Layout. |
tilePSend | Pointer to the HitTile to send |
selectionSend | HitShape to applied to the send tile |
modeSelectSend | Constant indicating if the send tile is selected in tile or array coordinates |
tilePRecv | Pointer to the HitTile to receive. It must be of the same type that tilePSendç |
selectionRecv | HitShape to applied to the receive tile |
modeSelectRecv | Constant indicating if the receive tile is selected in tile or array coordinates |
baseType | Basic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...) |
count | Number of elements to send/receive. |
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.
lay | Layout. |
tilePSend | Pointer to the HitTile to send |
selectionSend | HitShape to applied to the send tile |
modeSelectSend | Constant indicating if the send tile is selected in tile or array coordinates |
tilePRecv | Pointer to the HitTile to receive. It must be of the same type that tilePSendç |
selectionRecv | HitShape to applied to the receive tile |
modeSelectRecv | Constant indicating if the receive tile is selected in tile or array coordinates |
baseType | Basic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...) |
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
lay | layout |
dim | dimension where the broadcast will be applied. It should be lower than the dimensions of the layout |
root | Rank coordinate in the selected dimension of the process that will send |
tile | Pointer to the HitTile to send or receive |
selection | HitShape to applied to the tile |
modeSelect | Constant indicating if the tile is selected in tile or array coordinates |
baseType | Basic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...) |
Definition at line 779 of file hit_com.c.
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
lay | layout |
root | HitRanks coordinates of the process that will send |
tile | Pointer to the HitTile to send or receive |
selection | HitShape to applied to the tile |
modeSelect | Constant indicating if the tile is selected in tile or array coordinates |
baseType | Basic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...) |
Definition at line 731 of file hit_com.c.
void hit_comDo | ( | HitCom * | issue | ) |
void hit_comDoAllGatherv | ( | HitCom * | issue | ) |
void hit_comDoAlltoall | ( | HitCom * | issue | ) |
void hit_comDoAlltoallv | ( | HitCom * | issue | ) |
void hit_comDoBroadcast | ( | HitCom * | issue | ) |
void hit_comDoRecv | ( | HitCom * | issue | ) |
void hit_comDoReduce | ( | HitCom * | issue | ) |
void hit_comDoSend | ( | HitCom * | issue | ) |
void hit_comDoSendRecvReplace | ( | HitCom * | issue | ) |
void hit_comDoSparseScatter | ( | HitCom * | issue | ) |
void hit_comDoSparseScatterRows | ( | HitCom * | issue | ) |
void hit_comDoSparseUpdate | ( | HitCom * | issue | ) |
void hit_comDoSparseUpdateBitmap | ( | HitCom * | issue | ) |
void hit_comDoSparseUpdateCSR | ( | HitCom * | issue | ) |
void hit_comEndRecv | ( | HitCom * | issue | ) |
void hit_comEndSend | ( | HitCom * | issue | ) |
void hit_comFinalize | ( | ) |
void hit_comFree | ( | HitCom | issue | ) |
void hit_comInit | ( | int * | pargc, |
char ** | pargv[] | ||
) |
hit_comInit: initializes the communication environment
pargc | pointer to the counter arguments of the main routine |
pargv | pointer to the arguments of the main routine |
Definition at line 111 of file hit_com.c.
void hit_comOpGenericAnyType | ( | void * | in, |
void * | inout, | ||
HitType | datatype, | ||
int | offset, | ||
size_t | tam, | ||
HitComOpFunction | f | ||
) |
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.
Definition at line 2671 of file hit_com.c.
void hit_comOpMaxDoubleBasic | ( | void * | in, |
void * | inout | ||
) |
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.
Definition at line 2687 of file hit_com.c.
void hit_comOpMaxIntBasic | ( | void * | in, |
void * | inout | ||
) |
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.
Definition at line 2677 of file hit_com.c.
void hit_comOpMinDoubleBasic | ( | void * | in, |
void * | inout | ||
) |
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.
Definition at line 2691 of file hit_com.c.
void hit_comOpMinIntBasic | ( | void * | in, |
void * | inout | ||
) |
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.
Definition at line 2665 of file hit_com.c.
void hit_comOpSumDoubleBasic | ( | void * | in, |
void * | inout | ||
) |
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.
Definition at line 2683 of file hit_com.c.
void hit_comOpSumIntBasic | ( | void * | in, |
void * | inout | ||
) |
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
lay | layout |
dim | dimension where the broadcast will be applied. It should be lower than the dimensions of the layout |
root | HitRanks coordinates of the process that will receive the final data |
tilePSend | Pointer to the HitTile to send |
selectionSend | HitShape to applied to the send tile |
modeSelectSend | Constant indicating if the send tile is selected in tile or array coordinates |
tilePRecv | Pointer to the HitTile to receive. It must be of the same type that tilePSendç |
selectionRecv | HitShape to applied to the receive tile |
modeSelectRecv | Constant indicating if the receive tile is selected in tile or array coordinates |
baseType | Basic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...) |
operation | HitOp created to reduce the elements of the tile |
Definition at line 660 of file hit_com.c.
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
lay | layout |
root | HitRanks coordinates of the process that will receive the final data |
tilePSend | Pointer to the HitTile to send |
selectionSend | HitShape to applied to the send tile |
modeSelectSend | Constant indicating if the send tile is selected in tile or array coordinates |
tilePRecv | Pointer to the HitTile to receive. It must be of the same type that tilePSend |
selectionRecv | HitShape to applied to the receive tile |
modeSelectRecv | Constant indicating if the receive tile is selected in tile or array coordinates |
baseType | Basic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...) |
operation | HitOp created to reduce the elements of the tile |
Definition at line 585 of file hit_com.c.
|
inline |
hit_comSearchData: Return the data pointer of a tile. In case it is a multilevel tile it returns the data pointer of the first leaf tile. This pointer is used along with the MPI derived type (recursively built for multilevel tiles) to find all the data of any kind of tile.
varP | Tile pointer. |
Definition at line 278 of file hit_com.c.
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.
lay | layout. |
sendTo | HitRanks coordinates of the process that will send. |
tileP | Pointer to the HitTile to send and receive. |
selection | HitShape to applied to the tile. |
modeSelect | Constant indicating if the tile is selected in tile or array coordinates. |
receiveFrom | HitRanks coordinates of the process that will receive |
baseType | Basic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...). |
tag | Tag of the communication. |
Definition at line 393 of file hit_com.c.
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
lay | layout |
sendTo | HitRanks coordinates of the process that will receive |
tilePSend | Pointer to the HitTile to send |
selectionSend | HitShape to applied to the send tile |
modeSelectSend | Constant indicating if the send tile is selected in tile or array coordinates |
receiveFrom | HitRanks coordinates of the process from which to receive |
tilePRecv | Pointer to the HitTile to receive |
selectionRecv | HitShape to applied to the receive tile |
modeSelectRecv | Constant indicating if the receive tile is selected in tile or array coordinates |
baseType | Basic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...) |
tag | Tag of the communication |
Definition at line 450 of file hit_com.c.
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.
lay | Layout. |
tileP | Pointer to the HitTile. |
baseType | Basic type of the elements of the tile (HIT_INT, HIT_DOUBLE, HIT_FLOAT,...). |
Definition at line 1084 of file hit_com.c.
void hit_comStartRecv | ( | HitCom * | issue | ) |
void hit_comStartSend | ( | HitCom * | issue | ) |
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.
com | A pointer to the communication. |
tileP | The new tile pointer with the origin data. |
Definition at line 1985 of file hit_com.c.
HitComAlltoallv HIT_COM_ALLTOALLV_NULL = HIT_COM_ALLTOALLV_NULL_STATIC |
Hit COM alltoallv: NULL VALUE for HitComAlltoallv.
HitCom HIT_COM_NULL = HIT_COM_NULL_STATIC |
HitComSparse HIT_COM_SPARSE_NULL = HIT_COM_SPARSE_NULL_STATIC |
Hit COM sparse: NULL VALUE for HitComSparse.
HitType HIT_SHAPE_SIG |