Nature Language: testMultiPingpong:Verifies the the multi pingpong benchmark worked correctly.
  
CPP: int testMultiPingpong(int sizeofBuffer, int dataSize){ \n    int i; \n    int testFlag, localTestFlag; \n    localTestFlag = TRUE; \n    \n    if (crossCommRank == pingNode){ \n        testBuf = (int *)malloc(sizeof(int) * sizeofBuffer); \n        \n        #pragma omp parallel for default(none) \\ \n        private(i) \\ \n        shared(testBuf,dataSize,sizeofBuffer,globalIDarray)\\ \n        schedule(static,dataSize) \n        for (i=0; i<sizeofBuffer; i++){ \n            testBuf[i] = globalIDarray[myThreadID]; \n        } \n        \n        for (i=0; i<sizeofBuffer; i++){ \n            if (testBuf[i] != finalRecvBuf[i]){ \n                localTestFlag = FALSE; \n            } \n        } \n        \n        free(testBuf); \n    } \n    \n    MPI_Reduce(&localTestFlag, &testFlag, 1, MPI_INT,MPI_LAND, 0, comm); \n    \n    if (myMPIRank == 0){ \n        setTestOutcome(testFlag); \n    } \n    \n    return 0; \n}",
  
Fortran: SUBROUTINE testMultiPingpong(sizeofBuffer, dataSize)\n integer, intent(in) :: sizeofBuffer, dataSize\n integer :: i\n logical :: testFlag, localTestFlag\n\n !Initialise localtestFlag to true\n localTestFlag = .true.\n\n !All processes with crossCommRank = pingNode check\n !if multi-pingpong worked ok.\n IF (crossCommRank == pingNode) THEN\n \n !allocate space for testBuf\n allocate(testBuf(sizeofBuffer))\n \n !Construct testBuf array with correct values.\n !These are the values that should be in finalRecvBuf.\n!$OMP PARALLEL DO DEFAULT(NONE),&\n!$OMP PRIVATE(i), &\n!$OMP SHARED(testBuf,dataSize,sizeofBuffer,globalIDarray),&\n!$OMP SCHEDULE(STATIC,dataSize)\n\n DO i = 1,sizeofBuffer\n testBuf(i) = globalIDarray(myThreadID)\n END DO\n\n!$OMP END PARALLEL DO\n\n !Compare each element of testBuf and finalRecvBuf\n DO i = 1, sizeofBuffer\n IF (testBuf(i) /= finalRecvBuf(i)) THEN\n localTestFlag = .false.\n END IF\n END DO\n\n !free space for testBuf\n deallocate(testBuf)\n\n END IF\n\n !Reduce localTestFlag to master with logical AND operator\n CALL MPI_Reduce(localTestFlag, testFlag, 1, MPI_LOGICAL, &\n MPI_LAND, 0, comm, ierr)\n !Master then sets testOutcome using reduceFlag\n IF (myMPIRank == 0) THEN\n CALL setTestOutcome(testFlag)\n END IF\n\n END SUBROUTINE testMultiPingpong
  