From 58f13ba352b156fe4823db111d85a8821bb5c87f Mon Sep 17 00:00:00 2001 From: "Julian M. Kunkel" Date: Sat, 7 Jul 2018 22:54:40 +0100 Subject: [PATCH] Bugfix: extraction to count ranks per host used local communicator. --- src/utilities.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utilities.c b/src/utilities.c index cf9f9d8..962ccb2 100755 --- a/src/utilities.c +++ b/src/utilities.c @@ -188,16 +188,16 @@ int CountTasksPerNode(MPI_Comm comm) { /* 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); + MPI_ANY_TAG, comm, &status); if (strcmp(hostname, localhost) == 0) { count++; } } } else { /* MPI_send hostname to root node */ - MPI_Send(localhost, MAX_PATHLEN, MPI_CHAR, 0, 0, testComm); + MPI_Send(localhost, MAX_PATHLEN, MPI_CHAR, 0, 0, comm); } - MPI_Bcast(&count, 1, MPI_INT, 0, testComm); + MPI_Bcast(&count, 1, MPI_INT, 0, comm); return(count); }