also make comm->style, comm->layout, and comm->mode accessible through the library interface
This commit is contained in:
@ -1198,14 +1198,29 @@ internally by the :doc:`Fortran interface <Fortran>` and are not likely to be us
|
||||
* - triclinic
|
||||
- 1 if the the simulation box is triclinic, 0 if orthogonal.
|
||||
See :doc:`change_box`.
|
||||
|
||||
**Communication status**
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: auto
|
||||
|
||||
* - Keyword
|
||||
- Description / Return value
|
||||
* - universe_rank
|
||||
- MPI rank on LAMMPS' universe communicator (0 <= universe_rank < universe_size)
|
||||
* - universe_size
|
||||
- Number of ranks on LAMMPS' universe communicator (world_size <= universe_size)
|
||||
* - world_rank
|
||||
- MPI rank on LAMMPS' world communicator (0 <= world_rank < world_size)
|
||||
- MPI rank on LAMMPS' world communicator (0 <= world_rank < world_size, aka comm->me)
|
||||
* - world_size
|
||||
- Number of ranks on LAMMPS' world communicator
|
||||
- Number of ranks on LAMMPS' world communicator (aka comm->nprocs)
|
||||
* - comm_style
|
||||
- communication style (0 = BRICK, 1 = TILED)
|
||||
* - comm_layout
|
||||
- communication layout (0 = LAYOUT_UNIFORM, 1 = LAYOUT_NONUNIFORM, 2 = LAYOUT_TILED)
|
||||
* - comm_mode
|
||||
- communication mode (0 = SINGLE, 1 = MULTI, 2 = MULTIOLD)
|
||||
|
||||
.. _extract_system_sizes:
|
||||
|
||||
@ -1310,6 +1325,9 @@ int lammps_extract_setting(void *handle, const char *keyword)
|
||||
if (strcmp(keyword,"world_rank") == 0) return lmp->comm->me;
|
||||
if (strcmp(keyword,"world_size") == 0) return lmp->comm->nprocs;
|
||||
if (strcmp(keyword,"nthreads") == 0) return lmp->comm->nthreads;
|
||||
if (strcmp(keyword,"comm_style") == 0) return lmp->comm->style;
|
||||
if (strcmp(keyword,"comm_layout") == 0) return lmp->comm->layout;
|
||||
if (strcmp(keyword,"comm_mode") == 0) return lmp->comm->mode;
|
||||
|
||||
if (strcmp(keyword,"nlocal") == 0) return lmp->atom->nlocal;
|
||||
if (strcmp(keyword,"nghost") == 0) return lmp->atom->nghost;
|
||||
|
||||
Reference in New Issue
Block a user