Convert some mdrun utility code to C++
[alexxy/gromacs.git] / src / gromacs / gmxlib / network.cpp
similarity index 99%
rename from src/gromacs/gmxlib/network.c
rename to src/gromacs/gmxlib/network.cpp
index 94905661e1c4b89bc11b4cc88c76f18b043f9d62..5ac06a00aeb7eb5b251b9dc024422acae8cc587b 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -138,7 +138,6 @@ t_commrec *reinitialize_commrec_for_this_thread(const t_commrec gmx_unused *cro)
 void gmx_setup_nodecomm(FILE gmx_unused *fplog, t_commrec *cr)
 {
     gmx_nodecomm_t *nc;
-    int             n, rank, nodehash, ng, ni;
 
     /* Many MPI implementations do not optimize MPI_Allreduce
      * (and probably also other global communication calls)
@@ -156,6 +155,8 @@ void gmx_setup_nodecomm(FILE gmx_unused *fplog, t_commrec *cr)
     nc->bUse = FALSE;
 #ifndef GMX_THREAD_MPI
 #ifdef GMX_MPI
+    int n, rank, nodehash, ng, ni;
+
     MPI_Comm_size(cr->mpi_comm_mygroup, &n);
     MPI_Comm_rank(cr->mpi_comm_mygroup, &rank);