From 31e3cc2b605d0d8237d62443a5b994b70354f7a7 Mon Sep 17 00:00:00 2001 From: "Julian M. Kunkel" Date: Sat, 7 Jul 2018 22:46:13 +0100 Subject: [PATCH] Bugfix extraction further. --- src/utilities.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utilities.c b/src/utilities.c index 80f7f66..cf9f9d8 100755 --- a/src/utilities.c +++ b/src/utilities.c @@ -158,6 +158,8 @@ int CountTasksPerNode(MPI_Comm comm) { * to the task count on the host running MPI task 0. */ int CountTasksPerNode(MPI_Comm comm) { + int size; + MPI_Comm_size(comm, & size); /* for debugging and testing */ if (getenv("IOR_FAKE_TASK_PER_NODES")){ int tasksPerNode = atoi(getenv("IOR_FAKE_TASK_PER_NODES")); @@ -183,7 +185,7 @@ int CountTasksPerNode(MPI_Comm comm) { FAIL("gethostname()"); } if (rank == 0) { - /* MPI_receive all hostnames, and compare to local hostname */ + /* MPI_receive all hostnames, and compares them to the local hostname */ for (i = 0; i < size-1; i++) { MPI_Recv(hostname, MAX_PATHLEN, MPI_CHAR, MPI_ANY_SOURCE, MPI_ANY_TAG, testComm, &status);