MPIRuntimeBenchmarksGeneration: Added logic to add nested loops to function