aboutsummaryrefslogtreecommitdiff
path: root/Carpet
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2007-04-23 17:55:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2007-04-23 17:55:00 +0000
commit05da9014611ff445033fd2e1d2f3712b2efd3b7d (patch)
tree3c24ea9dfe2f6225abd110617b0f02c6b1ff8230 /Carpet
parentc0aa147090c411252a39e6b787fcd984061ee5b8 (diff)
Carpet: Output all host names when starting up
darcs-hash:20070423175548-dae7b-967fad44532c30c97634ad2dc4a7c81002b4f384.gz
Diffstat (limited to 'Carpet')
-rw-r--r--Carpet/Carpet/src/SetupGH.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/Carpet/Carpet/src/SetupGH.cc b/Carpet/Carpet/src/SetupGH.cc
index bc26c55d9..ffe0f4d59 100644
--- a/Carpet/Carpet/src/SetupGH.cc
+++ b/Carpet/Carpet/src/SetupGH.cc
@@ -6,12 +6,14 @@
#include <iostream>
#include <sstream>
#include <stack>
+#include <string>
#include <vector>
#include <cctk.h>
#include <cctk_Parameters.h>
#include <util_ErrorCodes.h>
+#include <util_Network.h>
#include <util_Table.h>
#include <bbox.hh>
@@ -188,6 +190,19 @@ namespace Carpet {
// Say hello
Waypoint ("Setting up the grid hierarchy");
Output ("Carpet is running on %d processors", CCTK_nProcs(cctkGH));
+ Output ("This is processor %d", CCTK_MyProc(cctkGH));
+
+ if (verbose) {
+ char hostnamebuf[1000];
+ Util_GetHostName (hostnamebuf, sizeof hostnamebuf);
+ string const hostname (hostnamebuf);
+ vector <string> hostnames = AllGatherString (MPI_COMM_WORLD, hostname);
+ int const nprocs = CCTK_nProcs (cctkGH);
+ Output ("Running on the following hosts:");
+ for (int n = 0; n < nprocs; ++ n) {
+ Output (" %4d: %s\n", n, hostnames.at(n).c_str());
+ }
+ }
// Check arguments:
// Only a specific number of dimensions is supported