#include "mpi.h"
#include "mpitest.h"
+#include "smpi_cocci.h"
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_SYS_TIME_H
#define LARGE_BUF (256 * 1024)
/* FIXME: MAX_BUF is too large */
-#define MAX_BUF (128 * 1024 * 1024)
+#define MAX_BUF (32 * 1024 * 1024)
#define LOOPS 10
-__thread char * sbuf, * rbuf;
-__thread int * recvcounts, * displs;
+char * sbuf, * rbuf;
+int * recvcounts, * displs;
int errs = 0;
/* #define dprintf printf */
if (!displs) fprintf(stderr,"\tdispls of %zd bytes\n", comm_size * sizeof(int) );
fflush(stderr);
MPI_Abort(MPI_COMM_WORLD, -1);
+ exit(-1);
}
if (!comm_rank) {
comm_tests(comm);
MPI_Comm_free(&comm);
- //free(sbuf);
- //free(rbuf);
+ free(sbuf);
+ free(rbuf);
free(recvcounts);
free(displs);
void comm_tests(MPI_Comm comm)
{
int comm_size, comm_rank;
- double rtime, max_time;
+ double rtime = rtime; /* stop warning about unused variable */
+ double max_time;
long long msg_size;
MPI_Comm_size(comm, &comm_size);
if (tmp != (int)tmp) {
fprintf( stderr, "Integer overflow in variable tmp\n" );
MPI_Abort( MPI_COMM_WORLD, 1 );
+ exit(1);
}
recvcounts[i] = (int) tmp;