*/
/* A basic test of all 17 nonblocking collective operations specified by the
- * draft MPI-3 standard. It only exercises the intracommunicator functionality,
+ * MPI-3 standard. It only exercises the intracommunicator functionality,
* does not use MPI_IN_PLACE, and only transmits/receives simple integer types
* with relatively small counts. It does check a few fancier issues, such as
* ensuring that "premature user releases" of MPI_Op and MPI_Datatype objects
#include "mpi.h"
#include <stdlib.h>
#include <stdio.h>
-/* USE_STRICT_MPI may be defined in mpitestconf.h */
-#include "mpitestconf.h"
#define COUNT (10)
#define PRIME (17)
} \
} while (0)
-/* Since MPICH is currently the only NBC implementation in existence, just use
- * this quick-and-dirty #ifdef to decide whether to test the nonblocking
- * collectives. Eventually we can add a configure option or configure test, or
- * the MPI-3 standard will be released and these can be gated on a MPI_VERSION
- * check */
-#if !defined(USE_STRICT_MPI) && defined(MPICH)
-#define TEST_NBC_ROUTINES 1
-#endif
-
static void sum_fn(void *invec, void *inoutvec, int *len, MPI_Datatype *datatype)
{
int i;
int main(int argc, char **argv)
{
+ int i, j;
int rank, size;
int *buf = NULL;
int *recvbuf = NULL;
int *rdispls = NULL;
int *sendtypes = NULL;
int *recvtypes = NULL;
-#if defined(TEST_NBC_ROUTINES)
- int i, j;
- char *buf_alias = NULL;
+ signed char *buf_alias = NULL;
MPI_Request req;
-#endif
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
-#if defined(TEST_NBC_ROUTINES)
buf = malloc(COUNT*size*sizeof(int));
recvbuf = malloc(COUNT*size*sizeof(int));
}
/* MPI_Ibcast (again, but designed to stress scatter/allgather impls) */
- buf_alias = (char *)buf;
+ buf_alias = (signed char *)buf;
my_assert(COUNT*size*sizeof(int) > PRIME); /* sanity */
for (i = 0; i < PRIME; ++i) {
if (rank == 0)
for (i = PRIME; i < COUNT * size * sizeof(int); ++i) {
buf_alias[i] = 0xbf;
}
- MPI_Ibcast(buf, PRIME, MPI_SIGNED_CHAR, 0, MPI_COMM_WORLD, &req);
+ MPI_Ibcast(buf_alias, PRIME, MPI_SIGNED_CHAR, 0, MPI_COMM_WORLD, &req);
MPI_Wait(&req, MPI_STATUS_IGNORE);
for (i = 0; i < PRIME; ++i) {
if (buf_alias[i] != i)
}
}
-#endif /* defined(TEST_NBC_ROUTINES) */
-
if (rank == 0)
printf(" No Errors\n");