Gromacs
5.1.3
|
Utility functions for basic MPI and network functionality.
Functions | |
gmx_bool | gmx_mpi_initialized (void) |
Returns whether MPI has been initialized. More... | |
int | gmx_node_num (void) |
Returns the number of nodes. More... | |
int | gmx_node_rank (void) |
Returns the rank of the node. More... | |
int | gmx_physicalnode_id_hash (void) |
Return a non-negative hash that is, hopefully, unique for each physical node. More... | |
int | gmx_hostname_num (void) |
Returns an integer characteristic of and, hopefully, unique to each physical node in the MPI system. More... | |
void | gmx_abort (int errorno) |
Abort the parallel run. | |
int gmx_hostname_num | ( | void | ) |
Returns an integer characteristic of and, hopefully, unique to each physical node in the MPI system.
If the first part of the MPI hostname (up to the first dot) ends with a number, returns this number. If the first part of the MPI hostname does not ends in a number (0-9 characters), returns 0.
gmx_bool gmx_mpi_initialized | ( | void | ) |
Returns whether MPI has been initialized.
The return value is FALSE
if MPI_Init() has not been called, or if GROMACS has been compiled without MPI support. For thread-MPI, returns TRUE
when the threads have been started.
Note that there is a lot of code in between MPI_Init() and the thread-MPI thread start where the return value is different depending on compilation options.
int gmx_node_num | ( | void | ) |
Returns the number of nodes.
For thread-MPI, returns one before the threads have been started. This allows code between the real MPI_Init() and the thread-MPI "init" to still use this function to check for serial/parallel status and work as expected: for thread-MPI, at that point they should behave as if the run was serial.
int gmx_node_rank | ( | void | ) |
Returns the rank of the node.
For thread-MPI, returns zero before the threads have been started. This allows code between the real MPI_Init() and the thread-MPI "init" to still use this function to check for master node work as expected: for thread-MPI, at that point the only thread of execution should behave as if it the master node.
int gmx_physicalnode_id_hash | ( | void | ) |
Return a non-negative hash that is, hopefully, unique for each physical node.
This hash is useful for determining hardware locality.