Gromacs  2018.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
+ This graph shows which files directly or indirectly include this file:

Description

Declares functions for initializing the GROMACS library.

Currently, only MPI initialization/finalization management is required, and only if external MPI support is enabled.

If MPI is already initialized, we should not call MPI_Init() or MPI_Finalize(). This management object permits GROMACS test code to nest calls to functions that might normally implement a stand-alone MPI-using tool. It also permits GROMACS code to be called from code that has already initialized MPI and needs that environment to work and persist after GROMACS code returns (e.g. GROMACS tests, external libraries that call GROMACS code).

It does so by maintaining a counter of the number of MPI initializations, and only calling MPI_Init() or MPI_Finalize when it is safe (ie. when the counter is at zero).

Thread-MPI initialization and finalization for mdrun is all managed in runner.c.

Author
Teemu Murtola teemu.nosp@m..mur.nosp@m.tola@.nosp@m.gmai.nosp@m.l.com

Functions

void gmx::init (int *argc, char ***argv)
 Initializes the GROMACS library. More...
 
void gmx::finalize ()
 Deinitializes the GROMACS library. More...