add lammps_kokos_finalize() support to various LAMMPS wrappers and document

This commit is contained in:
Axel Kohlmeyer
2021-06-27 17:07:42 -04:00
parent 2ef47fce69
commit 9a740a4a60
6 changed files with 41 additions and 13 deletions

View File

@ -460,10 +460,16 @@ class lammps(object):
# -------------------------------------------------------------------------
def finalize(self):
"""Shut down the MPI communication through the library interface by calling :cpp:func:`lammps_finalize`.
"""Shut down the MPI communication and Kokkos environment (if active) through the
library interface by calling :cpp:func:`lammps_mpi_finalize` and
:cpp:func:`lammps_kokkos_finalize`.
You cannot create or use any LAMMPS instances after this function is called
unless LAMMPS was compiled without MPI and without Kokkos support.
"""
self.close()
self.lib.lammps_finalize()
self.lib.lammps_kokkos_finalize()
self.lib.lammps_mpi_finalize()
# -------------------------------------------------------------------------