Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / utility / init.cpp
index 5609e94a515501f722b78aa3a2dd304581563d25..07d87b8f2fc7115fba749b3fe20d8e80756db381 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014,2015,2016,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2018,2019, 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.
@@ -49,7 +49,7 @@
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/gmxassert.h"
 #if GMX_LIB_MPI
-#include "gromacs/utility/gmxmpi.h"
+#    include "gromacs/utility/gmxmpi.h"
 #endif
 
 namespace gmx
@@ -61,9 +61,9 @@ namespace
 //! Maintains global counter of attempts to initialize MPI
 int g_initializationCounter = 0;
 #endif
-}
+} // namespace
 
-void init(int *argc, char ***argv) // NOLINT(readability-non-const-parameter)
+void init(int* argc, char*** argv) // NOLINT(readability-non-const-parameter)
 {
 #if GMX_LIB_MPI
     int isInitialized = 0, isFinalized = 0;
@@ -81,10 +81,10 @@ void init(int *argc, char ***argv) // NOLINT(readability-non-const-parameter)
     }
     else
     {
-#if GMX_FAHCORE
+#    if GMX_FAHCORE
         fah_MPI_Init(argc, argv);
-#else
-#    if GMX_OPENMP
+#    else
+#        if GMX_OPENMP
         /* Formally we need to use MPI_Init_thread and ask for MPI_THREAD_FUNNELED
          * level of thread support when using OpenMP. However, in practice we
          * have never seen any problems with just using MPI_Init(), and some MPI
@@ -108,13 +108,15 @@ void init(int *argc, char ***argv) // NOLINT(readability-non-const-parameter)
         rc = MPI_Init_thread(argc, argv, MPI_THREAD_FUNNELED, &provided);
         if (rc != 0 && provided < MPI_THREAD_FUNNELED)
         {
-            gmx_warning("GROMACS was compiled with OpenMP support, but there is no thread support in the MPI library. Keep your fingers crossed.");
+            gmx_warning(
+                    "GROMACS was compiled with OpenMP support, but there is no thread support in "
+                    "the MPI library. Keep your fingers crossed.");
             MPI_Init(argc, argv);
         }
-#    else
+#        else
         MPI_Init(argc, argv);
+#        endif
 #    endif
-#endif
     }
     // Bump the counter to record this initialization event
     g_initializationCounter++;