X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7d18220729378bc55a4b8ccc298d80e03263f3f0..HEAD:/teshsuite/smpi/mpich3-test/pt2pt/large_message.c diff --git a/teshsuite/smpi/mpich3-test/pt2pt/large_message.c b/teshsuite/smpi/mpich3-test/pt2pt/large_message.c index b8a6d0924c..cc0526a086 100644 --- a/teshsuite/smpi/mpich3-test/pt2pt/large_message.c +++ b/teshsuite/smpi/mpich3-test/pt2pt/large_message.c @@ -8,62 +8,69 @@ #include #include "mpitest.h" -/* tests send/recv of a message > 2GB. count=270M, type=long long +/* tests send/recv of a message > 2GB. count=270M, type=long long run with 3 processes to exercise both shared memory and TCP in Nemesis tests*/ -int main(int argc, char *argv[]) +int main(int argc, char *argv[]) { - int /* ierr, */ i,size,rank; - int cnt = 270000000; - MPI_Status status; - long long *cols; - int errs = 0; + int ierr, i, size, rank; + int cnt = 270000000; + int stat_cnt = 0; + MPI_Status status; + long long *cols; + int errs = 0; - MTest_Init(&argc,&argv); + MTest_Init(&argc, &argv); /* need large memory */ - if (sizeof(void *) < 8) { - MTest_Finalize(errs); - MPI_Finalize(); - return 0; - } + if (sizeof(void *) < 8) { + MTest_Finalize(errs); + MPI_Finalize(); + return 0; + } - /* ierr = */ MPI_Comm_size(MPI_COMM_WORLD,&size); - /* ierr = */ MPI_Comm_rank(MPI_COMM_WORLD,&rank); - if (size != 3) { - fprintf(stderr,"[%d] usage: mpiexec -n 3 %s\n",rank,argv[0]); - MPI_Abort(MPI_COMM_WORLD,1); - } + ierr = MPI_Comm_size(MPI_COMM_WORLD, &size); + ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); + if (size != 3) { + fprintf(stderr, "[%d] usage: mpiexec -n 3 %s\n", rank, argv[0]); + MPI_Abort(MPI_COMM_WORLD, 1); + } - cols = malloc(cnt*sizeof(long long)); - if (cols == NULL) { - printf("malloc of >2GB array failed\n"); - errs++; - MTest_Finalize(errs); - MPI_Finalize(); - return 0; - } + cols = malloc(cnt * sizeof(long long)); + if (cols == NULL) { + printf("malloc of >2GB array failed\n"); + errs++; + MTest_Finalize(errs); + MPI_Finalize(); + return 0; + } - if (rank == 0) { - for (i=0; i