Nature Language: testBroadcast:Verifies that the broadcast benchmark worked correctly.
  
CPP: int testBroadcast(int bufferSize){\n    int i, testFlag, reduceFlag;\n    testFlag = TRUE;\n\n    for (i=0; i<bufferSize; i++){\n        if (finalBroadcastBuf[i] != BROADCASTNUM){\n            testFlag = FALSE;\n        }\n    }\n\n    MPI_Reduce(&testFlag, &reduceFlag, 1, MPI_INT, MPI_LAND, 0, comm);\n\n    if (myMPIRank == 0){\n        setTestOutcome(testFlag);\n    }\n\n    return 0;\n}",
  
Fortran: SUBROUTINE testBroadcast(bufferSize)\n\n\tinteger, intent(in) :: bufferSize\n\tinteger :: i\n\tlogical :: testFlag, reduceFlag\n\n\t!Initialise testFlag to true\n\ttestFlag = .true.\n\n\t!Compare each element of finalBroadcastBuf with BROADCASTNUM\n\tDO i = 1, bufferSize\n\t\tIF (finalBroadcastBuf(i) /= BROADCASTNUM) THEN\n\t\t\ttestFlag = .false.\n\t\tEND IF\n\tEND DO\n\n\t!Reduce testFlag to master with logical AND operation\n\tCALL MPI_Reduce(testFlag, reduceFlag, 1, MPI_LOGICAL, &\n\t\tMPI_LAND, 0, comm, ierr)\n\t!Master then sets testOutcome using reduceFlag\n\tIF (myMPIRank == 0) THEN\n\t\tCALL setTestOutcome(reduceFlag)\n\tEND IF\n\nEND SUBROUTINE testBroadcast
  