/*
* 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.
#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
//! 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;
}
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
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++;