|
Packit |
0848f5 |
/* -*- Mode: C++; c-basic-offset:4 ; -*- */
|
|
Packit |
0848f5 |
/*
|
|
Packit |
0848f5 |
*
|
|
Packit |
0848f5 |
* (C) 2001 by Argonne National Laboratory.
|
|
Packit |
0848f5 |
* See COPYRIGHT in top-level directory.
|
|
Packit |
0848f5 |
*/
|
|
Packit |
0848f5 |
#ifndef MPITESTCONF_H_INCLUDED
|
|
Packit |
0848f5 |
#error Required mpitestconf.h file not included first!
|
|
Packit |
0848f5 |
#endif
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
#ifndef MTEST_INCLUDED
|
|
Packit |
0848f5 |
#define MTEST_INCLUDED
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
#include <string.h>
|
|
Packit |
0848f5 |
/*
|
|
Packit |
0848f5 |
* Init and finalize test
|
|
Packit |
0848f5 |
*/
|
|
Packit |
0848f5 |
void MTest_Init(void);
|
|
Packit |
0848f5 |
void MTest_Finalize(int);
|
|
Packit |
0848f5 |
void MTestPrintError(int);
|
|
Packit |
0848f5 |
void MTestPrintErrorMsg(const char[], int);
|
|
Packit |
0848f5 |
void MTestPrintfMsg(int, const char[], ...);
|
|
Packit |
0848f5 |
void MTestError(const char[]);
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
/*
|
|
Packit |
0848f5 |
* This structure contains the information used to test datatypes
|
|
Packit |
0848f5 |
*/
|
|
Packit |
0848f5 |
typedef struct _MTestDatatype {
|
|
Packit |
0848f5 |
MPI::Datatype datatype;
|
|
Packit |
0848f5 |
void *buf; /* buffer to use in communication */
|
|
Packit |
0848f5 |
int count; /* count to use for this datatype */
|
|
Packit |
0848f5 |
int isBasic; /* true if the type is predefined */
|
|
Packit |
0848f5 |
int printErrors; /* true if errors should be printed
|
|
Packit |
0848f5 |
* (used by the CheckBuf routines) */
|
|
Packit |
0848f5 |
/* The following is optional data that is used by some of
|
|
Packit |
0848f5 |
* the derived datatypes */
|
|
Packit |
0848f5 |
int stride, nelm, blksize, *index;
|
|
Packit |
0848f5 |
/* stride, nelm, and blksize are in bytes */
|
|
Packit |
0848f5 |
int *displs, basesize;
|
|
Packit |
0848f5 |
/* displacements are in multiples of base type; basesize is the
|
|
Packit |
0848f5 |
* size of that type */
|
|
Packit |
0848f5 |
void *(*InitBuf) (struct _MTestDatatype *);
|
|
Packit |
0848f5 |
void *(*FreeBuf) (struct _MTestDatatype *);
|
|
Packit |
0848f5 |
int (*CheckBuf) (struct _MTestDatatype *);
|
|
Packit |
0848f5 |
} MTestDatatype;
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
int MTestCheckRecv(MPI::Status &, MTestDatatype *);
|
|
Packit |
0848f5 |
int MTestGetDatatypes(MTestDatatype *, MTestDatatype *, int);
|
|
Packit |
0848f5 |
void MTestResetDatatypes(void);
|
|
Packit |
0848f5 |
void MTestFreeDatatype(MTestDatatype *);
|
|
Packit |
0848f5 |
const char *MTestGetDatatypeName(MTestDatatype *);
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
int MTestGetIntracomm(MPI::Intracomm &, int);
|
|
Packit |
0848f5 |
int MTestGetIntracommGeneral(MPI::Intracomm &, int, bool);
|
|
Packit |
0848f5 |
int MTestGetIntercomm(MPI::Intercomm &, int &, int);
|
|
Packit |
0848f5 |
int MTestGetComm(MPI::Comm **, int);
|
|
Packit |
0848f5 |
const char *MTestGetIntracommName(void);
|
|
Packit |
0848f5 |
const char *MTestGetIntercommName(void);
|
|
Packit |
0848f5 |
void MTestFreeComm(MPI::Comm & comm);
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
int MTestSpawnPossible(int *);
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
#ifdef HAVE_MPI_WIN_CREATE
|
|
Packit |
0848f5 |
int MTestGetWin(MPI::Win &, bool);
|
|
Packit |
0848f5 |
const char *MTestGetWinName(void);
|
|
Packit |
0848f5 |
void MTestFreeWin(MPI::Win &);
|
|
Packit |
0848f5 |
#endif
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
/* useful for avoid valgrind warnings about padding bytes */
|
|
Packit |
0848f5 |
#define MTEST_VG_MEM_INIT(addr_, size_) \
|
|
Packit |
0848f5 |
do { \
|
|
Packit |
0848f5 |
memset(addr_, 0, size_); \
|
|
Packit |
0848f5 |
} while (0)
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
#endif
|