diff options
Diffstat (limited to 'src/HostNames.c')
-rw-r--r-- | src/HostNames.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/HostNames.c b/src/HostNames.c index 2ab8d20..1099883 100644 --- a/src/HostNames.c +++ b/src/HostNames.c @@ -90,8 +90,8 @@ char *hostdata = NULL; @@*/ void HTTPDExtra_CollateHostData(void) { - int rank; - int nprocs; + int rank = 0; + int nprocs = 1; char thisdata[HOSTDATALENGTH+1]; Util_GetHostName(thisdata, HOSTDATALENGTH); @@ -103,9 +103,6 @@ void HTTPDExtra_CollateHostData(void) MPI_Comm_size(MPI_COMM_WORLD, &nprocs); /* Work out if this is proc 0 or not. */ MPI_Comm_rank(MPI_COMM_WORLD, &rank); -#else - nprocs = 1; - rank = 0; #endif if(rank == 0) @@ -155,8 +152,8 @@ const char *HTTPDExtra_RemoteHostName(int host) int main(int argc, char *argv[]) { - int rank; - int nprocs; + int rank = 0; + int nprocs = 1; #ifdef CCTK_MPI MPI_Init(&argc, &argv); @@ -166,9 +163,6 @@ int main(int argc, char *argv[]) /* Work out if this is proc 0 or not. */ MPI_Comm_rank(MPI_COMM_WORLD, &rank); -#else - nprocs = 1; - rank = 0; #endif HTTPDExtra_CollateHostData(); |