Nature Language: readBenchmarkParams:Initialises the benchmark parameters.Reads the minimum and maximum data for the benchmarks from the input file (unit 10).
  
CPP: int readBenchmarkParams(){\n\t/* Rank 0 reads parameters from input file */\n\tif (myMPIRank == 0){\n\t\tprintf ("Reading parameters from input file....\\n");\n\t\t/* read minimum data size from input file */\n\t\tfscanf(inputFile, "%d", &minDataSize);\n\t\t/* read maximum data size from input file */\n\t\tfscanf(inputFile, "%d", &maxDataSize);\n\t\t/* read target time from input file */\n\t\tfscanf(inputFile, "%lf", &targetTime);\n\t\t/* set other benchmark parameters */\n\t\twarmUpIters = 2;\n\t\tdefaultReps = 1000;\n\t\t/* Report benchmark parameters */\n\t\tprintf("------------------------------------------\\n");\n\t\tprintf("           Benchmark parameters           \\n");\n\t\tprintf("------------------------------------------\\n");\n\t\tprintf("Minimum data size %d\\n", minDataSize);\n\t\tprintf("Maximum data size %d\\n", maxDataSize);\n\t\tprintf("Target time (sec) %lf\\n", targetTime);\n\t\tprintf("Default Repetitions %d\\n", defaultReps);\n\t\tprintf("No. Warmup iterations %d\\n", warmUpIters);\n\t}\n\t/*Initialise benchmarkNumber to 0 so that the  WHILE loop in\n\tthe driver is entered the first time */\n\tbenchmarkNumber = 0;\n\t/* Broadcast benchmark parameters from master to all\n\tother MPI processes. */\n\tMPI_Bcast(&minDataSize, 1, MPI_INT, 0, comm);\n\tMPI_Bcast(&maxDataSize, 1, MPI_INT, 0, comm);\n\tMPI_Bcast(&targetTime, 1, MPI_DOUBLE, 0, comm);\n\tMPI_Bcast(&defaultReps, 1, MPI_INT, 0, comm);\n\tMPI_Bcast(&warmUpIters, 1, MPI_INT, 0, comm);\n\treturn 0;\n}
  
Fortran: SUBROUTINE setupBenchmarkList()\n\n\t!Pingpong benchmarks\n\tbenchmarkList(1) = 'masteronlypingpong'\n\tbenchmarkList(2) = 'funnelledpingpong'\n\tbenchmarkList(3) = 'multiplepingpong'\n\t!Pingping benchmarks\n\tbenchmarkList(4) = 'masteronlypingping'\n\tbenchmarkList(5) = 'funnelledpingping'\n\tbenchmarkList(6) = 'multiplepingping'\n\t!Haloexchange benchmarks\n\tbenchmarkList(7) = 'masteronlyhaloexchange'\n\tbenchmarkList(8) = 'funnelledhaloexchange'\n\tbenchmarkList(9) = 'multiplehaloexchange'\n\t!Multi-Pingpong benchmarks\n\tbenchmarkList(10) = 'masteronlymultipingpong'\n\tbenchmarkList(11) = 'funnelledmultipingpong'\n\tbenchmarkList(12) = 'multiplemultipingpong'\n\t!Multi-Pingping benchmarks\n\tbenchmarkList(13) = 'masteronlymultipingping'\n\tbenchmarkList(14) = 'funnelledmultipingping'\n\tbenchmarkList(15) = 'multiplemultipingping'\n\t!Collective benchmarks\n\tbenchmarkList(16) = 'barrier'\n\tbenchmarkList(17) = 'reduce'\n\tbenchmarkList(18) = 'allreduce'\n\tbenchmarkList(19) = 'broadcast'\n\tbenchmarkList(20) = 'scatter'\n\tbenchmarkList(21) = 'gather'\n\tbenchmarkList(22) = 'alltoall'\n\nEND SUBROUTINE setupBenchmarkList
  