From 8bcc4f3ab8eced54d1ef7c8a4ea3ba509c1bdf0f Mon Sep 17 00:00:00 2001
From: Tim Wickberg <tim@schedmd.com>
Date: Mon, 29 Apr 2019 16:20:55 -0600
Subject: [PATCH] testsuite - remove mpi-testscripts (were for POE)

---
 testsuite/expect/Makefile.am                  |    7 -
 testsuite/expect/Makefile.in                  |    7 -
 testsuite/expect/mpi-testscripts/Makefile     |   66 -
 testsuite/expect/mpi-testscripts/allred.c     | 2966 -----------------
 .../expect/mpi-testscripts/allred_timed.c     |   57 -
 testsuite/expect/mpi-testscripts/alltoall.c   |   44 -
 .../expect/mpi-testscripts/alltoall_timed.c   |   59 -
 .../expect/mpi-testscripts/barrier_timed.c    |   91 -
 .../expect/mpi-testscripts/script.slurm.sh    |   23 -
 9 files changed, 3320 deletions(-)
 delete mode 100644 testsuite/expect/mpi-testscripts/Makefile
 delete mode 100644 testsuite/expect/mpi-testscripts/allred.c
 delete mode 100644 testsuite/expect/mpi-testscripts/allred_timed.c
 delete mode 100644 testsuite/expect/mpi-testscripts/alltoall.c
 delete mode 100644 testsuite/expect/mpi-testscripts/alltoall_timed.c
 delete mode 100644 testsuite/expect/mpi-testscripts/barrier_timed.c
 delete mode 100755 testsuite/expect/mpi-testscripts/script.slurm.sh

diff --git a/testsuite/expect/Makefile.am b/testsuite/expect/Makefile.am
index 477459d6ebe..d0862bd0fbf 100644
--- a/testsuite/expect/Makefile.am
+++ b/testsuite/expect/Makefile.am
@@ -2,13 +2,6 @@
 AUTOMAKE_OPTIONS = foreign
 
 EXTRA_DIST = \
-	mpi-testscripts/allred.c	\
-	mpi-testscripts/allred_timed.c	\
-	mpi-testscripts/alltoall.c	\
-	mpi-testscripts/alltoall_timed.c	\
-	mpi-testscripts/barrier_timed.c	\
-	mpi-testscripts/Makefile	\
-	mpi-testscripts/script.slurm.sh	\
 	globals				\
 	globals_accounting		\
 	README				\
diff --git a/testsuite/expect/Makefile.in b/testsuite/expect/Makefile.in
index 21babb2e137..fc9eefa5f43 100644
--- a/testsuite/expect/Makefile.in
+++ b/testsuite/expect/Makefile.in
@@ -410,13 +410,6 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 EXTRA_DIST = \
-	mpi-testscripts/allred.c	\
-	mpi-testscripts/allred_timed.c	\
-	mpi-testscripts/alltoall.c	\
-	mpi-testscripts/alltoall_timed.c	\
-	mpi-testscripts/barrier_timed.c	\
-	mpi-testscripts/Makefile	\
-	mpi-testscripts/script.slurm.sh	\
 	globals				\
 	globals_accounting		\
 	README				\
diff --git a/testsuite/expect/mpi-testscripts/Makefile b/testsuite/expect/mpi-testscripts/Makefile
deleted file mode 100644
index ea3639b5dde..00000000000
--- a/testsuite/expect/mpi-testscripts/Makefile
+++ /dev/null
@@ -1,66 +0,0 @@
-########################################################################
-#
-# Makefile for NEWS Tests  (96-12-11)
-#
-########################################################################
-
-CODES = barrier_timed allred allred_timed alltoall alltoall_timed
-
-CC = mpcc
-CFLAGS = $(OPT4)
-
-
-FC = mpxlf
-FFLAGS =    ${OPT4}
-
-# ====================
-
-all : ${CODES}
-
-barrier : barrier.o
-	echo "Building code barrier...";\
-	${CC} -o barrier barrier.o
-
-barrier_timed : barrier_timed.o
-	echo "Building code barrier_timed...";\
-	${CC} -o barrier_timed barrier_timed.o
-
-allred : allred.o
-	echo "Building code allred...";\
-	${CC} -o allred allred.o
-
-allred_timed : allred_timed.o
-	echo "Building code allred_timed...";\
-	${CC} -o allred_timed allred_timed.o
-
-alltoall : alltoall.o
-	echo "Building code alltoall...";\
-	${CC} -o alltoall alltoall.o
-
-alltoall_timed : alltoall_timed.o
-	echo "Building code alltoall_timed...";\
-	${CC} -o alltoall_timed alltoall_timed.o
-
-clean :
-	rm -f *.o ${CODES}
-
-#**********************#
-#     SUFFIX RULES     #
-#**********************#
-
-#.SILENT :
-
-.SUFFIXES :
-.SUFFIXES : .o .c .f
-
-.c.o :
-	echo ${CC} $<
-	${CC} -c ${CFLAGS} ${INCL} $<
-
-.f.o :
-	echo ${FC} $<
-	${FC} -c ${FFLAGS} ${INCL} $<
-
-########################################################################
-#       END OF MAKE
-########################################################################
diff --git a/testsuite/expect/mpi-testscripts/allred.c b/testsuite/expect/mpi-testscripts/allred.c
deleted file mode 100644
index 4239df7a608..00000000000
--- a/testsuite/expect/mpi-testscripts/allred.c
+++ /dev/null
@@ -1,2966 +0,0 @@
-#include <math.h>
-#include "mpi.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define SKIP_LOGICALS
-
-#define MAX_PROD_RANK 10
-#define MAX_SUM_RANK 1000
-
-/* WHY? FOR THE FOLLOWING? NEED TO FIX IT... */
-/* Run this test on 2, 4, 6, 8, or 10 processes only */
-
-int main( int argc, char **argv )
-{
-int count, errcnt = 0, gerr = 0, size, rank, size_max_prod_rank, size_max_sum_rank;
-MPI_Comm comm;
-MPI_Init( &argc, &argv );
-
-MPI_Comm_size( MPI_COMM_WORLD, &size );
-
-size_max_prod_rank = (size < MAX_PROD_RANK) ? size : MAX_PROD_RANK;
-size_max_sum_rank = (size < MAX_SUM_RANK) ? size : MAX_SUM_RANK;
-
-MPI_Comm_rank( MPI_COMM_WORLD, &rank );
-count = 10;
-comm = MPI_COMM_WORLD;
-
-/* Test sum */
-#ifdef DEBUG
-    if (rank == 0) printf( "Testing MPI_SUM...\n" );
-#endif
-
-for (count = 1; count < 11; count += 9) {
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-/* OLD TEST WILL BREAK WITH LARGE NUMBERS OF TASKS... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = i*size;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_SUM_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = i;
-     *(sol + i) = i*size_max_sum_rank;
-     *(out + i) = 0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 0;
-     *(sol + i) = i*size_max_sum_rank;
-     *(out + i) = 0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_INT, MPI_SUM, MPI_COMM_WORLD );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_SUM\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-/* OLD TEST WILL BREAK WITH LARGE NUMBERS OF TASKS... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = i*size;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_SUM_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = i;
-     *(sol + i) = i*size_max_sum_rank;
-     *(out + i) = 0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 0;
-     *(sol + i) = i*size_max_sum_rank;
-     *(out + i) = 0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_SUM, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_SUM\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-/* OLD TEST WILL BREAK WITH LARGE NUMBERS OF TASKS... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = i*size;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_SUM_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = i;
-     *(sol + i) = i*size_max_sum_rank;
-     *(out + i) = 0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 0;
-     *(sol + i) = i*size_max_sum_rank;
-     *(out + i) = 0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_SUM, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_SUM\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-/* OLD TEST WILL BREAK WITH LARGE NUMBERS OF TASKS... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = i*size;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_SUM_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = i;
-     *(sol + i) = i*size_max_sum_rank;
-     *(out + i) = 0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 0;
-     *(sol + i) = i*size_max_sum_rank;
-     *(out + i) = 0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_SUM, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_SUM\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-/* OLD TEST WILL BREAK WITH LARGE NUMBERS OF TASKS... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = i*size;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_SUM_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = i;
-     *(sol + i) = i*size_max_sum_rank;
-     *(out + i) = 0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 0;
-     *(sol + i) = i*size_max_sum_rank;
-     *(out + i) = 0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_SUM, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_SUM\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-/* OLD TEST WILL BREAK WITH LARGE NUMBERS OF TASKS... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = i*size;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_SUM_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = i;
-     *(sol + i) = i*size_max_sum_rank;
-     *(out + i) = 0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 0;
-     *(sol + i) = i*size_max_sum_rank;
-     *(out + i) = 0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_SUM, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_SUM\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-float *in, *out, *sol;
-int  i, fnderr=0;
-in = (float *)malloc( count * sizeof(float) );
-out = (float *)malloc( count * sizeof(float) );
-sol = (float *)malloc( count * sizeof(float) );
-/* OLD TEST WILL BREAK WITH LARGE NUMBERS OF TASKS... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = i*size;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_SUM_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = (float) i;
-     *(sol + i) = ((float) i)*((float) size_max_sum_rank);
-     *(out + i) = 0.0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 0.0;
-     *(sol + i) = ((float) i)*((float) size_max_sum_rank);
-     *(out + i) = 0.0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_FLOAT, MPI_SUM, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_FLOAT and op MPI_SUM\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-double *in, *out, *sol;
-int  i, fnderr=0;
-in = (double *)malloc( count * sizeof(double) );
-out = (double *)malloc( count * sizeof(double) );
-sol = (double *)malloc( count * sizeof(double) );
-/* OLD TEST WILL BREAK WITH LARGE NUMBERS OF TASKS... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = i*size;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_SUM_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = (double) i;
-     *(sol + i) = ((double) i)*((double) size_max_sum_rank);
-     *(out + i) = 0.0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 0.0;
-     *(sol + i) = ((double) i)*((double) size_max_sum_rank);
-     *(out + i) = 0.0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_DOUBLE, MPI_SUM, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_DOUBLE and op MPI_SUM\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_SUM\n", errcnt, rank );
-errcnt = 0;
-
-
-/* Test product */
-#ifdef DEBUG
-    if (rank == 0) printf( "Testing MPI_PROD...\n" );
-#endif
-
-{
-int *in, *out, *sol;
-int  i, j, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = (i > 0) ? (int)(pow((double)(i),(double)size)+0.1) : 0;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_PROD_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = i;
-     *(sol + i) = 1;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (*(sol + i)) * i; }
-     *(out + i) = 0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 1;
-     *(sol + i) = 1;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (*(sol + i)) * i; }
-     *(out + i) = 0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_INT, MPI_PROD, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_PROD\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, j, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = (i > 0) ? (int)(pow((double)(i),(double)size)+0.1) : 0;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_PROD_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = i;
-     *(sol + i) = 1;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (*(sol + i)) * i; }
-     *(out + i) = 0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 1;
-     *(sol + i) = 1;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (*(sol + i)) * i; }
-     *(out + i) = 0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_PROD, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_PROD\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, j, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = (i > 0) ? (int)(pow((double)(i),(double)size)+0.1) : 0;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_PROD_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = i;
-     *(sol + i) = 1;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (*(sol + i)) * i; }
-     *(out + i) = 0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 1;
-     *(sol + i) = 1;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (*(sol + i)) * i; }
-     *(out + i) = 0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_PROD, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_PROD\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, j, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = (i > 0) ? (int)(pow((double)(i),(double)size)+0.1) : 0;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_PROD_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = i;
-     *(sol + i) = 1;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (*(sol + i)) * i; }
-     *(out + i) = 0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 1;
-     *(sol + i) = 1;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (*(sol + i)) * i; }
-     *(out + i) = 0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_PROD, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_PROD\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, j, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = (i > 0) ? (int)(pow((double)(i),(double)size)+0.1) : 0;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_PROD_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = i;
-     *(sol + i) = 1;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (*(sol + i)) * i; }
-     *(out + i) = 0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 1;
-     *(sol + i) = 1;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (*(sol + i)) * i; }
-     *(out + i) = 0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_PROD, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_PROD\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, j, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = (i > 0) ? (int)(pow((double)(i),(double)size)+0.1) : 0;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_PROD_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = i;
-     *(sol + i) = 1;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (*(sol + i)) * i; }
-     *(out + i) = 0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 1;
-     *(sol + i) = 1;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (*(sol + i)) * i; }
-     *(out + i) = 0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_PROD, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_PROD\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-float *in, *out, *sol;
-int  i, j, fnderr=0;
-in = (float *)malloc( count * sizeof(float) );
-out = (float *)malloc( count * sizeof(float) );
-sol = (float *)malloc( count * sizeof(float) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = (i > 0) ? (int)(pow((double)(i),(double)size)+0.1) : 0;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_PROD_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = (float) i;
-     *(sol + i) = 1.0;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (float) (*(sol + i)) * (float) i; }
-     *(out + i) = 0.0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 1.0;
-     *(sol + i) = (float) 1;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (*(sol + i)) * (float) i; }
-     *(out + i) = 0.0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_FLOAT, MPI_PROD, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_FLOAT and op MPI_PROD\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-double *in, *out, *sol;
-int  i, j, fnderr=0;
-in = (double *)malloc( count * sizeof(double) );
-out = (double *)malloc( count * sizeof(double) );
-sol = (double *)malloc( count * sizeof(double) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = i; *(sol + i) = (i > 0) ? (int)(pow((double)(i),(double)size)+0.1) : 0;
-	*(out + i) = 0; }
-	*/
- if (rank < MAX_PROD_RANK) {
-   for (i=0; i<count; i++) {
-     *(in + i) = (double) i;
-     *(sol + i) = 1.0;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (double) (*(sol + i)) * (double) i; }
-     *(out + i) = 0.0; }
- } else {
-   for (i=0; i<count; i++) {
-     *(in + i) = 1.0;
-     *(sol + i) = (double) 1;
-     for (j=0; j<size_max_prod_rank; j++) {
-       *(sol + i) = (*(sol + i)) * (double) i; }
-     *(out + i) = 0.0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_DOUBLE, MPI_PROD, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;
- fprintf (stderr, "MPI_DOUBLE choked: got: %f; expected %f\n", *(out + i),*(sol + i));}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_DOUBLE and op MPI_PROD\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_PROD\n", errcnt, rank );
-errcnt = 0;
-
-
-/* Test max */
-#ifdef DEBUG
-    if (rank == 0) printf( "Testing MPI_MAX...\n" );
-#endif
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = (size - 1 + i);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_INT, MPI_MAX, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_MAX\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = (size - 1 + i);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_MAX, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_MAX\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = (size - 1 + i);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_MAX, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_MAX\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = (size - 1 + i);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_MAX, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_MAX\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = (size - 1 + i);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_MAX, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_MAX\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = (size - 1 + i);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_MAX, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_MAX\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-float *in, *out, *sol;
-int  i, fnderr=0;
-in = (float *)malloc( count * sizeof(float) );
-out = (float *)malloc( count * sizeof(float) );
-sol = (float *)malloc( count * sizeof(float) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = (size - 1 + i);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_FLOAT, MPI_MAX, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_FLOAT and op MPI_MAX\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-double *in, *out, *sol;
-int  i, fnderr=0;
-in = (double *)malloc( count * sizeof(double) );
-out = (double *)malloc( count * sizeof(double) );
-sol = (double *)malloc( count * sizeof(double) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = (size - 1 + i);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_DOUBLE, MPI_MAX, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_DOUBLE and op MPI_MAX\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_MAX\n", errcnt, rank );
-errcnt = 0;
-
-/* Test min */
-#ifdef DEBUG
-    if (rank == 0) printf( "Testing MPI_MIN...\n" );
-#endif
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = i;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_INT, MPI_MIN, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_MIN\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = i;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_MIN, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_MIN\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = i;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_MIN, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_MIN\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = i;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_MIN, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_MIN\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = i;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_MIN, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_MIN\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = i;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_MIN, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_MIN\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-float *in, *out, *sol;
-int  i, fnderr=0;
-in = (float *)malloc( count * sizeof(float) );
-out = (float *)malloc( count * sizeof(float) );
-sol = (float *)malloc( count * sizeof(float) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = i;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_FLOAT, MPI_MIN, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_FLOAT and op MPI_MIN\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-double *in, *out, *sol;
-int  i, fnderr=0;
-in = (double *)malloc( count * sizeof(double) );
-out = (double *)malloc( count * sizeof(double) );
-sol = (double *)malloc( count * sizeof(double) );
-for (i=0; i<count; i++) { *(in + i) = (rank + i); *(sol + i) = i;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_DOUBLE, MPI_MIN, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_DOUBLE and op MPI_MIN\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_MIN\n", errcnt, rank );
-errcnt = 0;
-
-#ifndef SKIP_LOGICALS
-
-/* Test LOR */
-#ifdef DEBUG
-    if (rank == 0) printf( "Testing MPI_LOR...\n" );
-#endif
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = (rank & 0x1); *(sol + i) = (size > 1);
-	*(out + i) = 0; }
-*/
- if (rank) {
-   for (i=0; i<count; i++) { *(in + i) = 0; *(out + i) = 0; }
- }
- else {
-   for (i=0; i<count; i++) { *(in + i) = 0x1; *(out + i) = 0; }
- }
-
-MPI_Allreduce( in, out, count, MPI_INT, MPI_LOR, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (!(*(out + i))) {errcnt++; fnderr++;}}
-
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_LOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-for (i=0; i<count; i++) { *(in + i) = (rank & 0x1); *(sol + i) = (size > 1);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_LOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_LOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-for (i=0; i<count; i++) { *(in + i) = (rank & 0x1); *(sol + i) = (size > 1);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_LOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_LOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-for (i=0; i<count; i++) { *(in + i) = (rank & 0x1); *(sol + i) = (size > 1);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_LOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_LOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-for (i=0; i<count; i++) { *(in + i) = (rank & 0x1); *(sol + i) = (size > 1);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_LOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_LOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-for (i=0; i<count; i++) { *(in + i) = (rank & 0x1); *(sol + i) = (size > 1);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_LOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_LOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_LOR(1)\n", errcnt, rank );
-errcnt = 0;
-
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0; *(out + i) = 0x1; }
-
-MPI_Allreduce( in, out, count, MPI_INT, MPI_LOR, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (*(out + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_LOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0; *(out + i) = 0x1; }
-
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_LOR, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (*(out + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_LOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0; *(out + i) = 0x1; }
-
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_LOR, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (*(out + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_LOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0; *(out + i) = 0x1; }
-
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_LOR, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (*(out + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_LOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0; *(out + i) = 0x1; }
-
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_LOR, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (*(out + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_LOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0; *(out + i) = 0x1; }
-
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_LOR, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (*(out + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_LOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_LOR(0)\n", errcnt, rank );
-errcnt = 0;
-
-/* Test LXOR */
-#ifdef DEBUG
-    if (rank == 0) printf( "Testing MPI_LXOR...\n" );
-#endif
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = (rank == 1); *(sol + i) = (size > 1);
-	*(out + i) = 0; }
-*/
- if (rank == 1) {
-   for (i=0; i<count; i++) { *(in + i) = 0x1; *(out + i) = 0; }}
- else {
-   for (i=0; i<count; i++) { *(in + i) = 0; *(out + i) = 0; }}
-
-MPI_Allreduce( in, out, count, MPI_INT, MPI_LXOR, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
-for (i=0; i<count; i++) { if (!(*(out + i))) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_LXOR\n", rank);
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-for (i=0; i<count; i++) { *(in + i) = (rank == 1); *(sol + i) = (size > 1);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-for (i=0; i<count; i++) { *(in + i) = (rank == 1); *(sol + i) = (size > 1);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-for (i=0; i<count; i++) { *(in + i) = (rank == 1); *(sol + i) = (size > 1);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-for (i=0; i<count; i++) { *(in + i) = (rank == 1); *(sol + i) = (size > 1);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-for (i=0; i<count; i++) { *(in + i) = (rank == 1); *(sol + i) = (size > 1);
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_LXOR(1)\n", errcnt, rank );
-errcnt = 0;
-
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_INT, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_LXOR(0)\n", errcnt, rank );
-errcnt = 0;
-
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-for (i=0; i<count; i++) { *(in + i) = 1; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_INT, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-for (i=0; i<count; i++) { *(in + i) = 1; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-for (i=0; i<count; i++) { *(in + i) = 1; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-for (i=0; i<count; i++) { *(in + i) = 1; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-for (i=0; i<count; i++) { *(in + i) = 1; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-for (i=0; i<count; i++) { *(in + i) = 1; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_LXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_LXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_LXOR(1-0)\n", errcnt, rank );
-errcnt = 0;
-
-/* Test LAND */
-#ifdef DEBUG
-    if (rank == 0) printf( "Testing MPI_LAND...\n" );
-#endif
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = (rank & 0x1); *(sol + i) = 0;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0x1; *(out + i) = 0; }
-
-MPI_Allreduce( in, out, count, MPI_INT, MPI_LAND, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (!(*(out + i))) {errcnt++; fnderr++;}}
-
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_LAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = (rank & 0x1); *(sol + i) = 0;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0x1; *(out + i) = 0; }
-
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_LAND, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (!(*(out + i))) {errcnt++; fnderr++;}}
-
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_LAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = (rank & 0x1); *(sol + i) = 0;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0x1; *(out + i) = 0; }
-
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_LAND, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (!(*(out + i))) {errcnt++; fnderr++;}}
-
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_LAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = (rank & 0x1); *(sol + i) = 0;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0x1; *(out + i) = 0; }
-
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_LAND, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (!(*(out + i))) {errcnt++; fnderr++;}}
-
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_LAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/* BUT NOT THIS ONE - CHANGING IT ANYWAY... */
-/*
-for (i=0; i<count; i++) { *(in + i) = (rank & 0x1); *(sol + i) = 0;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0x1; *(out + i) = 0; }
-
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_LAND, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/* BUT NOT THIS ONE - CHANGING IT ANYWAY... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (!(*(out + i))) {errcnt++; fnderr++;}}
-
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_LAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = (rank & 0x1); *(sol + i) = 0;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0x1; *(out + i) = 0; }
-
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_LAND, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (!(*(out + i))) {errcnt++; fnderr++;}}
-
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_LAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_LAND(1)\n", errcnt, rank );
-errcnt = 0;
-
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = 1; *(sol + i) = 1;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0; *(out + i) = 0x1; }
-
-MPI_Allreduce( in, out, count, MPI_INT, MPI_LAND, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (*(out + i)) {errcnt++; fnderr++;}}
-
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_LAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = 1; *(sol + i) = 1;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0; *(out + i) = 0x1; }
-
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_LAND, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (*(out + i)) {errcnt++; fnderr++;}}
-
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_LAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = 1; *(sol + i) = 1;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0; *(out + i) = 0x1; }
-
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_LAND, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (*(out + i)) {errcnt++; fnderr++;}}
-
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_LAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = 1; *(sol + i) = 1;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0; *(out + i) = 0x1; }
-
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_LAND, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (*(out + i)) {errcnt++; fnderr++;
-fprintf( stderr,
- 	"(%d) MPI_UNSIGNED_SHORT MPI_LAND index %d\n", rank, i );}}
-
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_LAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = 1; *(sol + i) = 1;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0; *(out + i) = 0x1; }
-
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_LAND, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (*(out + i)) {errcnt++; fnderr++;}}
-
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_LAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { *(in + i) = 1; *(sol + i) = 1;
-	*(out + i) = 0; }
-*/
- for (i=0; i<count; i++) { *(in + i) = 0; *(out + i) = 0x1; }
-
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_LAND, comm );
-/* OLD TEST SEEMS TO BE BROKEN AT LEAST ON BlueGeneL... */
-/*
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-*/
- for (i=0; i<count; i++) { if (*(out + i)) {errcnt++; fnderr++;}}
-
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_LAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_LAND(0)\n", errcnt, rank );
-errcnt = 0;
-
-#endif
-
-/* Test BOR */
-#ifdef DEBUG
-    if (rank == 0) printf( "Testing MPI_BOR...\n" );
-#endif
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-for (i=0; i<count; i++) { *(in + i) = rank & 0x3; *(sol + i) = (size < 3) ? size - 1 : 0x3;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_INT, MPI_BOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_BOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-for (i=0; i<count; i++) { *(in + i) = rank & 0x3; *(sol + i) = (size < 3) ? size - 1 : 0x3;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_BOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_BOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-for (i=0; i<count; i++) { *(in + i) = rank & 0x3; *(sol + i) = (size < 3) ? size - 1 : 0x3;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_BOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_BOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-for (i=0; i<count; i++) { *(in + i) = rank & 0x3; *(sol + i) = (size < 3) ? size - 1 : 0x3;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_BOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_BOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-for (i=0; i<count; i++) { *(in + i) = rank & 0x3; *(sol + i) = (size < 3) ? size - 1 : 0x3;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_BOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_BOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-for (i=0; i<count; i++) { *(in + i) = rank & 0x3; *(sol + i) = (size < 3) ? size - 1 : 0x3;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_BOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_BOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned char *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned char *)malloc( count * sizeof(unsigned char) );
-out = (unsigned char *)malloc( count * sizeof(unsigned char) );
-sol = (unsigned char *)malloc( count * sizeof(unsigned char) );
-for (i=0; i<count; i++) { *(in + i) = rank & 0x3; *(sol + i) = (size < 3) ? size - 1 : 0x3;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_BYTE, MPI_BOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_BYTE and op MPI_BOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_BOR(1)\n", errcnt, rank );
-errcnt = 0;
-
-/* Test BAND */
-#ifdef DEBUG
-    if (rank == 0) printf( "Testing MPI_BAND...\n" );
-#endif
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-for (i=0; i<count; i++) { *(in + i) = (rank == size-1 ? i : ~0); *(sol + i) = i;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_INT, MPI_BAND, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_BAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-for (i=0; i<count; i++) { *(in + i) = (rank == size-1 ? i : ~0); *(sol + i) = i;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_BAND, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_BAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-for (i=0; i<count; i++) { *(in + i) = (rank == size-1 ? i : ~0); *(sol + i) = i;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_BAND, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_BAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-for (i=0; i<count; i++) { *(in + i) = (rank == size-1 ? i : ~0); *(sol + i) = i;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_BAND, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_BAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-for (i=0; i<count; i++) { *(in + i) = (rank == size-1 ? i : ~0); *(sol + i) = i;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_BAND, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_BAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-for (i=0; i<count; i++) { *(in + i) = (rank == size-1 ? i : ~0); *(sol + i) = i;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_BAND, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_BAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned char *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned char *)malloc( count * sizeof(unsigned char) );
-out = (unsigned char *)malloc( count * sizeof(unsigned char) );
-sol = (unsigned char *)malloc( count * sizeof(unsigned char) );
-for (i=0; i<count; i++) { *(in + i) = (rank == size-1 ? i : ~0); *(sol + i) = i;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_BYTE, MPI_BAND, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_BYTE and op MPI_BAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_BAND(1)\n", errcnt, rank );
-errcnt = 0;
-
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-for (i=0; i<count; i++) { *(in + i) = (rank == size-1 ? i : 0); *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_INT, MPI_BAND, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_BAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-for (i=0; i<count; i++) { *(in + i) = (rank == size-1 ? i : 0); *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_BAND, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_BAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-for (i=0; i<count; i++) { *(in + i) = (rank == size-1 ? i : 0); *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_BAND, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_BAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-for (i=0; i<count; i++) { *(in + i) = (rank == size-1 ? i : 0); *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_BAND, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_BAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-for (i=0; i<count; i++) { *(in + i) = (rank == size-1 ? i : 0); *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_BAND, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_BAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-for (i=0; i<count; i++) { *(in + i) = (rank == size-1 ? i : 0); *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_BAND, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_BAND\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_BAND(0)\n", errcnt, rank );
-errcnt = 0;
-
-/* Test BXOR */
-#ifdef DEBUG
-    if (rank == 0) printf( "Testing MPI_BXOR...\n" );
-#endif
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-for (i=0; i<count; i++) { *(in + i) = (rank == 1)*0xf0 ; *(sol + i) = (size > 1)*0xf0 ;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_INT, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-for (i=0; i<count; i++) { *(in + i) = (rank == 1)*0xf0 ; *(sol + i) = (size > 1)*0xf0 ;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-for (i=0; i<count; i++) { *(in + i) = (rank == 1)*0xf0 ; *(sol + i) = (size > 1)*0xf0 ;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-for (i=0; i<count; i++) { *(in + i) = (rank == 1)*0xf0 ; *(sol + i) = (size > 1)*0xf0 ;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-for (i=0; i<count; i++) { *(in + i) = (rank == 1)*0xf0 ; *(sol + i) = (size > 1)*0xf0 ;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-for (i=0; i<count; i++) { *(in + i) = (rank == 1)*0xf0 ; *(sol + i) = (size > 1)*0xf0 ;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_BXOR(1)\n", errcnt, rank );
-errcnt = 0;
-
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_INT, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-for (i=0; i<count; i++) { *(in + i) = 0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_BXOR(0)\n", errcnt, rank );
-errcnt = 0;
-
-
-{
-int *in, *out, *sol;
-int  i, fnderr=0;
-in = (int *)malloc( count * sizeof(int) );
-out = (int *)malloc( count * sizeof(int) );
-sol = (int *)malloc( count * sizeof(int) );
-for (i=0; i<count; i++) { *(in + i) = ~0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_INT, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_INT and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-long *in, *out, *sol;
-int  i, fnderr=0;
-in = (long *)malloc( count * sizeof(long) );
-out = (long *)malloc( count * sizeof(long) );
-sol = (long *)malloc( count * sizeof(long) );
-for (i=0; i<count; i++) { *(in + i) = ~0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_LONG, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_LONG and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-short *in, *out, *sol;
-int  i, fnderr=0;
-in = (short *)malloc( count * sizeof(short) );
-out = (short *)malloc( count * sizeof(short) );
-sol = (short *)malloc( count * sizeof(short) );
-for (i=0; i<count; i++) { *(in + i) = ~0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_SHORT, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_SHORT and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned short *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned short *)malloc( count * sizeof(unsigned short) );
-out = (unsigned short *)malloc( count * sizeof(unsigned short) );
-sol = (unsigned short *)malloc( count * sizeof(unsigned short) );
-for (i=0; i<count; i++) { *(in + i) = ~0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_SHORT, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_SHORT and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned *)malloc( count * sizeof(unsigned) );
-out = (unsigned *)malloc( count * sizeof(unsigned) );
-sol = (unsigned *)malloc( count * sizeof(unsigned) );
-for (i=0; i<count; i++) { *(in + i) = ~0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-unsigned long *in, *out, *sol;
-int  i, fnderr=0;
-in = (unsigned long *)malloc( count * sizeof(unsigned long) );
-out = (unsigned long *)malloc( count * sizeof(unsigned long) );
-sol = (unsigned long *)malloc( count * sizeof(unsigned long) );
-for (i=0; i<count; i++) { *(in + i) = ~0; *(sol + i) = 0;
-	*(out + i) = 0; }
-MPI_Allreduce( in, out, count, MPI_UNSIGNED_LONG, MPI_BXOR, comm );
-for (i=0; i<count; i++) { if (*(out + i) != *(sol + i)) {errcnt++; fnderr++;}}
-if (fnderr) fprintf( stderr,
- 	"(%d) Error for type MPI_UNSIGNED_LONG and op MPI_BXOR\n", rank );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_BXOR(1-0)\n", errcnt, rank );
-errcnt = 0;
-
-
-/* Test Maxloc */
-#ifdef DEBUG
-    if (rank == 0) printf( "Testing MPI_MAXLOC...\n" );
-#endif
-
-{
-struct int_test { int a; int b; } *in, *out, *sol;
-int  i,fnderr=0;
-in = (struct int_test *)malloc( count * sizeof(struct int_test) );
-out = (struct int_test *)malloc( count * sizeof(struct int_test) );
-sol = (struct int_test *)malloc( count * sizeof(struct int_test) );
-for (i=0; i<count; i++) { (in + i)->a = (rank + i); (in + i)->b = rank;
-        (sol + i)->a = (size - 1 + i); (sol + i)->b = (size-1);
-	(out + i)->a = 0; (out + i)->b = -1; }
-MPI_Allreduce( in, out, count, MPI_2INT, MPI_MAXLOC, comm );
-for (i=0; i<count; i++) { if ((out + i)->a != (sol + i)->a ||
-	                      (out + i)->b != (sol + i)->b) {
-	errcnt++; fnderr++;
-    fprintf( stderr, "(%d) Expected (%d,%d) got (%d,%d)\n", rank,
-	(int)((sol + i)->a),
-	(sol+i)->b, (int)((out+i)->a), (out+i)->b );
-}}
-if (fnderr) fprintf( stderr,
-	"(%d) Error for type MPI_2INT and op MPI_MAXLOC (%d of %d wrong)\n",
-                     rank, fnderr, count );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-struct long_test { long a; int b; } *in, *out, *sol;
-int  i,fnderr=0;
-in = (struct long_test *)malloc( count * sizeof(struct long_test) );
-out = (struct long_test *)malloc( count * sizeof(struct long_test) );
-sol = (struct long_test *)malloc( count * sizeof(struct long_test) );
-for (i=0; i<count; i++) { (in + i)->a = (rank + i); (in + i)->b = rank;
-        (sol + i)->a = (size - 1 + i); (sol + i)->b = (size-1);
-	(out + i)->a = 0; (out + i)->b = -1; }
-MPI_Allreduce( in, out, count, MPI_LONG_INT, MPI_MAXLOC, comm );
-for (i=0; i<count; i++) { if ((out + i)->a != (sol + i)->a ||
-	                      (out + i)->b != (sol + i)->b) {
-	errcnt++; fnderr++;
-    fprintf( stderr, "(%d) Expected (%d,%d) got (%d,%d)\n", rank,
-	(int)((sol + i)->a),
-	(sol+i)->b, (int)((out+i)->a), (out+i)->b );
-}}
-if (fnderr) fprintf( stderr,
-	"(%d) Error for type MPI_LONG_INT and op MPI_MAXLOC (%d of %d wrong)\n",
-                     rank, fnderr, count );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-struct short_test { short a; int b; } *in, *out, *sol;
-int  i,fnderr=0;
-in = (struct short_test *)malloc( count * sizeof(struct short_test) );
-out = (struct short_test *)malloc( count * sizeof(struct short_test) );
-sol = (struct short_test *)malloc( count * sizeof(struct short_test) );
-for (i=0; i<count; i++) { (in + i)->a = (rank + i); (in + i)->b = rank;
-        (sol + i)->a = (size - 1 + i); (sol + i)->b = (size-1);
-	(out + i)->a = 0; (out + i)->b = -1; }
-MPI_Allreduce( in, out, count, MPI_SHORT_INT, MPI_MAXLOC, comm );
-for (i=0; i<count; i++) { if ((out + i)->a != (sol + i)->a ||
-	                      (out + i)->b != (sol + i)->b) {
-	errcnt++; fnderr++;
-    fprintf( stderr, "(%d) Expected (%d,%d) got (%d,%d)\n", rank,
-	(int)((sol + i)->a),
-	(sol+i)->b, (int)((out+i)->a), (out+i)->b );
-}}
-if (fnderr) fprintf( stderr,
-	"(%d) Error for type MPI_SHORT_INT and op MPI_MAXLOC (%d of %d wrong)\n",
-                     rank, fnderr, count );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-struct float_test { float a; int b; } *in, *out, *sol;
-int  i,fnderr=0;
-in = (struct float_test *)malloc( count * sizeof(struct float_test) );
-out = (struct float_test *)malloc( count * sizeof(struct float_test) );
-sol = (struct float_test *)malloc( count * sizeof(struct float_test) );
-for (i=0; i<count; i++) { (in + i)->a = (rank + i); (in + i)->b = rank;
-        (sol + i)->a = (size - 1 + i); (sol + i)->b = (size-1);
-	(out + i)->a = 0; (out + i)->b = -1; }
-MPI_Allreduce( in, out, count, MPI_FLOAT_INT, MPI_MAXLOC, comm );
-for (i=0; i<count; i++) { if ((out + i)->a != (sol + i)->a ||
-	                      (out + i)->b != (sol + i)->b) {
-	errcnt++; fnderr++;
-    fprintf( stderr, "(%d) Expected (%d,%d) got (%d,%d)\n", rank,
-	(int)((sol + i)->a),
-	(sol+i)->b, (int)((out+i)->a), (out+i)->b );
-}}
-if (fnderr) fprintf( stderr,
-	"(%d) Error for type MPI_FLOAT_INT and op MPI_MAXLOC (%d of %d wrong)\n",
-                     rank, fnderr, count );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-struct double_test { double a; int b; } *in, *out, *sol;
-int  i,fnderr=0;
-in = (struct double_test *)malloc( count * sizeof(struct double_test) );
-out = (struct double_test *)malloc( count * sizeof(struct double_test) );
-sol = (struct double_test *)malloc( count * sizeof(struct double_test) );
-for (i=0; i<count; i++) { (in + i)->a = (rank + i); (in + i)->b = rank;
-        (sol + i)->a = (size - 1 + i); (sol + i)->b = (size-1);
-	(out + i)->a = 0; (out + i)->b = -1; }
-MPI_Allreduce( in, out, count, MPI_DOUBLE_INT, MPI_MAXLOC, comm );
-for (i=0; i<count; i++) { if ((out + i)->a != (sol + i)->a ||
-	                      (out + i)->b != (sol + i)->b) {
-	errcnt++; fnderr++;
-    fprintf( stderr, "(%d) Expected (%d,%d) got (%d,%d)\n", rank,
-	(int)((sol + i)->a),
-	(sol+i)->b, (int)((out+i)->a), (out+i)->b );
-}}
-if (fnderr) fprintf( stderr,
-	"(%d) Error for type MPI_DOUBLE_INT and op MPI_MAXLOC (%d of %d wrong)\n",
-                     rank, fnderr, count );
-free( in );
-free( out );
-free( sol );
-}
-
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_MAXLOC\n", errcnt, rank );
-errcnt = 0;
-
-
-/* Test minloc */
-#ifdef DEBUG
-    if (rank == 0) printf( "Testing MPI_MINLOC...\n" );
-#endif
-
-
-{
-struct int_test { int a; int b; } *in, *out, *sol;
-int  i,fnderr=0;
-in = (struct int_test *)malloc( count * sizeof(struct int_test) );
-out = (struct int_test *)malloc( count * sizeof(struct int_test) );
-sol = (struct int_test *)malloc( count * sizeof(struct int_test) );
-for (i=0; i<count; i++) { (in + i)->a = (rank + i); (in + i)->b = rank;
-        (sol + i)->a = i; (sol + i)->b = 0;
-	(out + i)->a = 0; (out + i)->b = -1; }
-MPI_Allreduce( in, out, count, MPI_2INT, MPI_MINLOC, comm );
-for (i=0; i<count; i++) { if ((out + i)->a != (sol + i)->a ||
-	                      (out + i)->b != (sol + i)->b) {
-	errcnt++; fnderr++;
-    fprintf( stderr, "(%d) Expected (%d,%d) got (%d,%d)\n", rank,
-	(int)((sol + i)->a),
-	(sol+i)->b, (int)((out+i)->a), (out+i)->b );
-}}
-if (fnderr) fprintf( stderr,
-	"(%d) Error for type MPI_2INT and op MPI_MINLOC (%d of %d wrong)\n",
-                     rank, fnderr, count );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-struct long_test { long a; int b; } *in, *out, *sol;
-int  i,fnderr=0;
-in = (struct long_test *)malloc( count * sizeof(struct long_test) );
-out = (struct long_test *)malloc( count * sizeof(struct long_test) );
-sol = (struct long_test *)malloc( count * sizeof(struct long_test) );
-for (i=0; i<count; i++) { (in + i)->a = (rank + i); (in + i)->b = rank;
-        (sol + i)->a = i; (sol + i)->b = 0;
-	(out + i)->a = 0; (out + i)->b = -1; }
-MPI_Allreduce( in, out, count, MPI_LONG_INT, MPI_MINLOC, comm );
-for (i=0; i<count; i++) { if ((out + i)->a != (sol + i)->a ||
-	                      (out + i)->b != (sol + i)->b) {
-	errcnt++; fnderr++;
-    fprintf( stderr, "(%d) Expected (%d,%d) got (%d,%d)\n", rank,
-	(int)((sol + i)->a),
-	(sol+i)->b, (int)((out+i)->a), (out+i)->b );
-}}
-if (fnderr) fprintf( stderr,
-	"(%d) Error for type MPI_LONG_INT and op MPI_MINLOC (%d of %d wrong)\n",
-                     rank, fnderr, count );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-struct short_test { short a; int b; } *in, *out, *sol;
-int  i,fnderr=0;
-in = (struct short_test *)malloc( count * sizeof(struct short_test) );
-out = (struct short_test *)malloc( count * sizeof(struct short_test) );
-sol = (struct short_test *)malloc( count * sizeof(struct short_test) );
-for (i=0; i<count; i++) { (in + i)->a = (rank + i); (in + i)->b = rank;
-        (sol + i)->a = i; (sol + i)->b = 0;
-	(out + i)->a = 0; (out + i)->b = -1; }
-MPI_Allreduce( in, out, count, MPI_SHORT_INT, MPI_MINLOC, comm );
-for (i=0; i<count; i++) { if ((out + i)->a != (sol + i)->a ||
-	                      (out + i)->b != (sol + i)->b) {
-	errcnt++; fnderr++;
-    fprintf( stderr, "(%d) Expected (%d,%d) got (%d,%d)\n", rank,
-	(int)((sol + i)->a),
-	(sol+i)->b, (int)((out+i)->a), (out+i)->b );
-}}
-if (fnderr) fprintf( stderr,
-	"(%d) Error for type MPI_SHORT_INT and op MPI_MINLOC (%d of %d wrong)\n",
-                     rank, fnderr, count );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-struct float_test { float a; int b; } *in, *out, *sol;
-int  i,fnderr=0;
-in = (struct float_test *)malloc( count * sizeof(struct float_test) );
-out = (struct float_test *)malloc( count * sizeof(struct float_test) );
-sol = (struct float_test *)malloc( count * sizeof(struct float_test) );
-for (i=0; i<count; i++) { (in + i)->a = (rank + i); (in + i)->b = rank;
-        (sol + i)->a = i; (sol + i)->b = 0;
-	(out + i)->a = 0; (out + i)->b = -1; }
-MPI_Allreduce( in, out, count, MPI_FLOAT_INT, MPI_MINLOC, comm );
-for (i=0; i<count; i++) { if ((out + i)->a != (sol + i)->a ||
-	                      (out + i)->b != (sol + i)->b) {
-	errcnt++; fnderr++;
-    fprintf( stderr, "(%d) Expected (%d,%d) got (%d,%d)\n", rank,
-	(int)((sol + i)->a),
-	(sol+i)->b, (int)((out+i)->a), (out+i)->b );
-}}
-if (fnderr) fprintf( stderr,
-	"(%d) Error for type MPI_FLOAT_INT and op MPI_MINLOC (%d of %d wrong)\n",
-                     rank, fnderr, count );
-free( in );
-free( out );
-free( sol );
-}
-
-
-{
-struct double_test { double a; int b; } *in, *out, *sol;
-int  i,fnderr=0;
-in = (struct double_test *)malloc( count * sizeof(struct double_test) );
-out = (struct double_test *)malloc( count * sizeof(struct double_test) );
-sol = (struct double_test *)malloc( count * sizeof(struct double_test) );
-for (i=0; i<count; i++) { (in + i)->a = (rank + i); (in + i)->b = rank;
-        (sol + i)->a = i; (sol + i)->b = 0;
-	(out + i)->a = 0; (out + i)->b = -1; }
-MPI_Allreduce( in, out, count, MPI_DOUBLE_INT, MPI_MINLOC, comm );
-for (i=0; i<count; i++) { if ((out + i)->a != (sol + i)->a ||
-	                      (out + i)->b != (sol + i)->b) {
-	errcnt++; fnderr++;
-    fprintf( stderr, "(%d) Expected (%d,%d) got (%d,%d)\n", rank,
-	(int)((sol + i)->a),
-	(sol+i)->b, (int)((out+i)->a), (out+i)->b );
-}}
-if (fnderr) fprintf( stderr,
-	"(%d) Error for type MPI_DOUBLE_INT and op MPI_MINLOC (%d of %d wrong)\n",
-                     rank, fnderr, count );
-free( in );
-free( out );
-free( sol );
-}
-
-gerr += errcnt;
-if (errcnt > 0)
-	printf( "Found %d errors on %d for MPI_MINLOC\n", errcnt, rank );
-errcnt = 0;
-
-}
-
-if (gerr > 0) {
-	MPI_Comm_rank( MPI_COMM_WORLD, &rank );
-	printf( "Found %d errors overall on %d\n", gerr, rank );
-	}
-else if (!rank) {
-    printf( "PASSED\n", gerr, rank );
-}
-
-MPI_Finalize( );
-return 0;
-}
diff --git a/testsuite/expect/mpi-testscripts/allred_timed.c b/testsuite/expect/mpi-testscripts/allred_timed.c
deleted file mode 100644
index 9e508546ca9..00000000000
--- a/testsuite/expect/mpi-testscripts/allred_timed.c
+++ /dev/null
@@ -1,57 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include "mpi.h"
-
-#define MAX_SUM_RANK 1000
-
-#define ALLRED_COUNT 1000
-
-#define EXPECTED_AVG_uSEC 30
-
-int main(int argc, char **argv)
-{
-   int me,tasks,i, errcount=0;
-   double start,end,diff,avg_diff_usec,in,out = 0.0;
-
-   MPI_Init(&argc, &argv);
-   MPI_Comm_size(MPI_COMM_WORLD,&tasks);
-   if(tasks < 2) {
-     printf("MUST RUN WITH AT LEAST 2 TASKS\n");
-     errcount++;
-     MPI_Finalize();
-     exit(0);
-   }
-
-   MPI_Comm_rank(MPI_COMM_WORLD,&me);
-
-   in = (me < MAX_SUM_RANK) ? (double) me: 0.0;
-
-   MPI_Barrier(MPI_COMM_WORLD);
-   if (!me) {
-     start = MPI_Wtime();
-   }
-
-   for(i=0;i<ALLRED_COUNT;i++)
-     MPI_Allreduce( &in, &out, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD );
-
-   if (!me) {
-     end = MPI_Wtime();
-     diff = end - start;
-     avg_diff_usec = diff * (1000000/ALLRED_COUNT);
-     printf("AFTER ALLREDS, START TIME = %f, END TIME = %f, DIFF (sec) = %f,\n",start,end,diff);
-     printf("\t\tITERS = %d, AVG (usec) = %f, EXPECTED = %d\n",ALLRED_COUNT,avg_diff_usec, EXPECTED_AVG_uSEC);
-     if (avg_diff_usec < EXPECTED_AVG_uSEC) {
-       printf ("PASSED\n");
-     }
-     else if (avg_diff_usec < (2* EXPECTED_AVG_uSEC)) {
-       printf ("Acceptable\n");
-     }
-     else {
-       printf ("FAILED\n");
-     }
-     fflush (stdout);
-   }
-
-   MPI_Finalize();
-return 0;
-}
diff --git a/testsuite/expect/mpi-testscripts/alltoall.c b/testsuite/expect/mpi-testscripts/alltoall.c
deleted file mode 100644
index 41f5dbf35c4..00000000000
--- a/testsuite/expect/mpi-testscripts/alltoall.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include "mpi.h"
-
-
-#define MAXLEN 10000
-
-int main(int argc, char **argv)
-{
-   int *out, *in,i,j,k;
-   int myself,tasks, errcount=0;
-
-   MPI_Init(&argc, &argv);
-   MPI_Comm_rank(MPI_COMM_WORLD,&myself);
-   MPI_Comm_size(MPI_COMM_WORLD,&tasks);
-   for(j=1;j<=MAXLEN;j*=10)  {
-      out=(int *)calloc(j*tasks, sizeof(int));
-      in=(int *)calloc(j*tasks,sizeof(int));
-      for(i=0;i<j*tasks;i++)  out[i] = myself;
-
-      MPI_Alltoall(out,j,MPI_INT,in,j,MPI_INT,MPI_COMM_WORLD);
-
-      for(i=0;i<tasks;i++)  {
-         for(k=0;k<j;k++) {
-if ((k+i*j) >= MAXLEN) continue;
-            if(in[k+i*j] != i)
-			{
-				printf("[%d] bad answer (%d) at index %d of %d (should be %d)\n",tasks,in[k+i*j],k+i*j,j*tasks,i);
-			    errcount++;
-			}
-         }
-      }
-     free(out);
-     free(in);
-   }
-   MPI_Barrier(MPI_COMM_WORLD);
-
-   if ((!errcount) && (!myself)) {
-     printf ("PASSED\n");
-     fflush(stdout);
-   }
-   MPI_Finalize();
-return 0;
-}
diff --git a/testsuite/expect/mpi-testscripts/alltoall_timed.c b/testsuite/expect/mpi-testscripts/alltoall_timed.c
deleted file mode 100644
index 77c08addf36..00000000000
--- a/testsuite/expect/mpi-testscripts/alltoall_timed.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include "mpi.h"
-
-#define ALLTOALL_COUNT 1000
-
-/* A wild guess... */
-#define EXPECTED_AVG_uSEC 100
-
-int main(int argc, char **argv)
-{
-   int *out, *in,j,k;
-   int me,tasks,i, errcount=0;
-   double start,end,diff,avg_diff_usec;
-
-   MPI_Init(&argc, &argv);
-   MPI_Comm_size(MPI_COMM_WORLD,&tasks);
-   if(tasks < 2) {
-     printf("MUST RUN WITH AT LEAST 2 TASKS\n");
-     errcount++;
-     MPI_Finalize();
-     exit(0);
-   }
-
-   MPI_Comm_rank(MPI_COMM_WORLD,&me);
-
-   out=(int *)calloc(tasks, sizeof(int));
-   in=(int *)calloc(tasks,sizeof(int));
-   for(i=0;i<tasks;i++)  out[i] = me;
-
-   MPI_Barrier(MPI_COMM_WORLD);
-   if (!me) {
-     start = MPI_Wtime();
-   }
-
-   for(i=0;i<ALLTOALL_COUNT;i++)
-     MPI_Alltoall(out,1,MPI_INT,in,1,MPI_INT,MPI_COMM_WORLD);
-
-   if (!me) {
-     end = MPI_Wtime();
-     diff = end - start;
-     avg_diff_usec = diff * (1000000/ALLTOALL_COUNT);
-     printf("AFTER ALLTOALLS, START TIME = %f, END TIME = %f, DIFF (sec) = %f,\n",start,end,diff);
-     printf("\t\tITERS = %d, AVG (usec) = %f, EXPECTED = %d\n",ALLTOALL_COUNT,avg_diff_usec, EXPECTED_AVG_uSEC);
-     if (avg_diff_usec < EXPECTED_AVG_uSEC) {
-       printf ("PASSED\n");
-     }
-     else if (avg_diff_usec < (2* EXPECTED_AVG_uSEC)) {
-       printf ("Acceptable\n");
-     }
-     else {
-       printf ("SLOW\n");
-     }
-     fflush (stdout);
-   }
-
-   MPI_Finalize();
-return 0;
-}
diff --git a/testsuite/expect/mpi-testscripts/barrier_timed.c b/testsuite/expect/mpi-testscripts/barrier_timed.c
deleted file mode 100644
index a366c5d2664..00000000000
--- a/testsuite/expect/mpi-testscripts/barrier_timed.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-
- MESSAGE PASSING INTERFACE TEST CASE SUITE
-
- Copyright IBM Corp. 1995
-
- IBM Corp. hereby grants a non-exclusive license to use, copy, modify, and
- distribute this software for any purpose and without fee provided that the
- above copyright notice and the following paragraphs appear in all copies.
-
- IBM Corp. makes no representation that the test cases comprising this
- suite are correct or are an accurate representation of any standard.
-
- In no event shall IBM be liable to any party for direct, indirect, special
- incidental, or consequential damage arising out of the use of this software
- even if IBM Corp. has been advised of the possibility of such damage.
-
- IBM CORP. SPECIFICALLY DISCLAIMS ANY WARRANTIES INCLUDING, BUT NOT LIMITED
- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS AND IBM
- CORP. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
- ENHANCEMENTS, OR MODIFICATIONS.
-
-****************************************************************************
-
- These test cases reflect an interpretation of the MPI Standard.  They are
- are, in most cases, unit tests of specific MPI behaviors.  If a user of any
- test case from this set believes that the MPI Standard requires behavior
- different than that implied by the test case we would appreciate feedback.
-
- Comments may be sent to:
-    Richard Treumann
-    treumann@kgn.ibm.com
-
-****************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include "mpi.h"
-
-#define BARRIER_COUNT 1000
-
-#define EXPECTED_AVG_uSEC 6
-
-int main(int argc, char **argv)
-{
-   int me,tasks,i, errcount=0;
-   double start,end,diff,avg_diff_usec;
-
-   MPI_Init(&argc, &argv);
-   MPI_Comm_size(MPI_COMM_WORLD,&tasks);
-   if(tasks < 2)
-   {
-	   printf("MUST RUN WITH AT LEAST 2 TASKS\n");
-	   errcount++;
-	   MPI_Finalize();
-	   exit(0);
-   }
-
-   MPI_Comm_rank(MPI_COMM_WORLD,&me);
-
-   MPI_Barrier(MPI_COMM_WORLD);
-
-   if (!me) {
-     start = MPI_Wtime();
-   }
-
-   for(i=0;i<BARRIER_COUNT;i++)
-     MPI_Barrier(MPI_COMM_WORLD);
-
-   if (!me) {
-     end = MPI_Wtime();
-     diff = end - start;
-     avg_diff_usec = diff * (1000000/BARRIER_COUNT);
-     printf("AFTER BARRIERS, START TIME = %f, END TIME = %f, DIFF (sec) = %f,\n",start,end,diff);
-     printf("\t\tITERS = %d, AVG (usec) = %f, EXPECTED = %d\n",BARRIER_COUNT,avg_diff_usec, EXPECTED_AVG_uSEC);
-     if (avg_diff_usec < EXPECTED_AVG_uSEC) {
-       printf ("PASSED\n");
-     }
-     else if (avg_diff_usec < (2* EXPECTED_AVG_uSEC)) {
-       printf ("Acceptable\n");
-     }
-     else {
-       printf ("FAILED\n");
-     }
-     fflush (stdout);
-   }
-
-   MPI_Finalize();
-return 0;
-}
diff --git a/testsuite/expect/mpi-testscripts/script.slurm.sh b/testsuite/expect/mpi-testscripts/script.slurm.sh
deleted file mode 100755
index 675a3ce9bef..00000000000
--- a/testsuite/expect/mpi-testscripts/script.slurm.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-export MP_RMPOOL=slurm
-export MP_NODES=$SLURM_NNODES
-export MP_PROCS=$SLURM_NTASKS
-
-date
-echo "******************************************************************"
-echo "running allred"
-poe mpi-testscripts/allred
-echo "******************************************************************"
-echo "running alltoall"
-poe mpi-testscripts/alltoall
-echo "******************************************************************"
-echo "running barrier_timed"
-poe mpi-testscripts/barrier_timed
-echo "******************************************************************"
-echo "running allred_timed"
-poe mpi-testscripts/allred_timed
-echo "******************************************************************"
-echo "running alltoall_timed"
-poe mpi-testscripts/alltoall_timed
-echo "******************************************************************"
-date
-- 
GitLab