Nature Language: allocateScatterGatherData:Allocate memory for main data arrays
  
CPP: int allocateScatterGatherData(int bufferSize, int benchmarkType){ \n  if (benchmarkType == SCATTER){ \n    if (myMPIRank == SCATTERROOT){ \n      scatterSendBuf = (int *) malloc((bufferSize * numMPIprocs) * sizeof(int)); \n    } \n    scatterRecvBuf = (int *) malloc(bufferSize * sizeof(int)); \n    finalBuf = (int *)malloc(bufferSize * sizeof(int)); \n  } else if (benchmarkType == GATHER){ \n    gatherSendBuf = (int *) malloc(bufferSize * sizeof(int)); \n    if (myMPIRank == GATHERROOT){ \n      gatherRecvBuf = (int *) malloc((bufferSize * numMPIprocs) * sizeof(int)); \n      finalBuf = (int *) malloc((bufferSize * numMPIprocs) * sizeof(int)); \n    } \n  } \n  return 0; \n}",
  
Fortran: SUBROUTINE allocateData(bufferSize, benchmarkType)\ninteger, intent(in) :: bufferSize, benchmarkType\n\nIF (benchmarkType == SCATTER) THEN !Allocate for scatter\n\n!scatterSendBuf is size (bufferSize * numMPIprocs)\nIF (myMPIRank == SCATTERROOT) THEN\nallocate(scatterSendBuf(bufferSizenumMPIprocs))\nEND IF\nallocate(scatterRecvBuf(bufferSize))\nallocate(finalBuf(bufferSize))\n\nELSE IF (benchmarkType == GATHER) THEN !Allocate for gather\n\nallocate(gatherSendBuf(bufferSize))\nIF (myMPIRank == GATHERROOT) THEN\nallocate(gatherRecvBuf(bufferSizenumMPIprocs))\nallocate(finalBuf(bufferSize*numMPIprocs))\nEND IF\n\nEND IF\n\nEND SUBROUTINE allocateData
  