KMR
Macros | Functions
kmratoa.c File Reference

Communication Routines. More...

#include <mpi.h>
#include <stdlib.h>
#include <limits.h>
#include <errno.h>
#include <assert.h>
#include "kmr.h"
#include "kmrimpl.h"

Go to the source code of this file.

Macros

#define DUMP_(X0, X1, X2, X3, X4)   if (tracing) kmr_atoa_dump_(X0,X1,X2,X3,X4)
 
#define MAX(a, b)   (((a)>(b))?(a):(b))
 

Functions

int kmr_allgatherv (KMR *mr, _Bool rankzeroonly, void *sbuf, long scnt, void *rbuf, long *rcnts, long *rdsps)
 All-gathers data, or gathers data when RANKZEROONLY. More...
 
static int kmr_alltoall_bruck (KMR *mr, void *sbuf, void *rbuf, int cnt)
 
int kmr_alltoallv (KMR *mr, void *sbuf, long *scnts, long *sdsps, void *rbuf, long *rcnts, long *rdsps)
 Does all-to-all-v, but it takes arguments of long-integers. More...
 
static int kmr_alltoallv_bruck (KMR *mr, void *sbuf, long *scnts, long *sdsps, void *rbuf, long *rcnts, long *rdsps)
 
static int kmr_alltoallv_mpi (KMR *mr, void *sbuf, long *scnts, long *sdsps, void *rbuf, long *rcnts, long *rdsps)
 
static void kmr_atoa_dump_ (KMR *mr, void *sbuf, int sz, char *title, int step)
 
int kmr_exchange_sizes (KMR *mr, long *sbuf, long *rbuf)
 Calls all-to-all to exchange one long-integer. More...
 
int kmr_gather_sizes (KMR *mr, long siz, long *rbuf)
 Calls all-gather for collecting one long-integer. More...
 
static _Bool kmr_powerof2_p (int x)
 
static _Bool kmr_powerof4_p (int x)
 

Detailed Description

Communication Routines.

KMR makes almost all data exchanges through this. Some exceptions are "kmrmapms.c" and "kmrfiles.c". It provides operations with size_t data length.

Definition in file kmratoa.c.

Function Documentation

int kmr_exchange_sizes ( KMR mr,
long *  sbuf,
long *  rbuf 
)

Calls all-to-all to exchange one long-integer.

Definition at line 46 of file kmratoa.c.

int kmr_gather_sizes ( KMR mr,
long  siz,
long *  rbuf 
)

Calls all-gather for collecting one long-integer.

Definition at line 58 of file kmratoa.c.

int kmr_allgatherv ( KMR mr,
_Bool  rankzeroonly,
void *  sbuf,
long  scnt,
void *  rbuf,
long *  rcnts,
long *  rdsps 
)

All-gathers data, or gathers data when RANKZEROONLY.

Definition at line 70 of file kmratoa.c.

int kmr_alltoallv ( KMR mr,
void *  sbuf,
long *  scnts,
long *  sdsps,
void *  rbuf,
long *  rcnts,
long *  rdsps 
)

Does all-to-all-v, but it takes arguments of long-integers.

Setting ATOA_THRESHOLD=0 forces to use MPI all-to-all-v.

Definition at line 116 of file kmratoa.c.