refactor handling of plugin loading to make plugin a global property
This commit is contained in:
@ -357,7 +357,8 @@ completed and then MPI is cleanly shut down. After calling this
|
||||
function no more MPI calls may be made.
|
||||
|
||||
*See also*
|
||||
:cpp:func:`lammps_kokkos_finalize`, :cpp:func:`lammps_python_finalize`
|
||||
:cpp:func:`lammps_kokkos_finalize`, :cpp:func:`lammps_python_finalize`,
|
||||
:cpp:func:`lammps_plugin_finalize`
|
||||
\endverbatim */
|
||||
|
||||
void lammps_mpi_finalize()
|
||||
@ -389,7 +390,8 @@ closed (to release associated resources).
|
||||
After calling this function no Kokkos functionality may be used.
|
||||
|
||||
*See also*
|
||||
:cpp:func:`lammps_mpi_finalize`, :cpp:func:`lammps_python_finalize`
|
||||
:cpp:func:`lammps_mpi_finalize`, :cpp:func:`lammps_python_finalize`,
|
||||
:cpp:func:`lammps_plugin_finalize`
|
||||
\endverbatim */
|
||||
|
||||
void lammps_kokkos_finalize()
|
||||
@ -399,6 +401,35 @@ void lammps_kokkos_finalize()
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
/** Unload all plugins and release the corresponding DSO handles
|
||||
*
|
||||
\verbatim embed:rst
|
||||
|
||||
.. versionadded:: TBD
|
||||
|
||||
This function clears the list of all loaded plugins and closes the
|
||||
corresponding DSO handles and releases the imported executable code.
|
||||
|
||||
However, this is **not** done when a LAMMPS instance is deleted because
|
||||
plugins and their shared objects are global properties.
|
||||
|
||||
This function can be called to explicitly clear out all loaded plugins
|
||||
in case it is safe to do so.
|
||||
|
||||
*See also*
|
||||
:cpp:func:`lammps_mpi_finalize`, :cpp:func:`lammps_kokkos_finalize`,
|
||||
:cpp:func:`lammps_python_finalize`
|
||||
\endverbatim */
|
||||
|
||||
void lammps_plugin_finalize()
|
||||
{
|
||||
#if defined(LMP_PLUGIN)
|
||||
plugin_finalize();
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
/** Clear the embedded Python environment
|
||||
*
|
||||
\verbatim embed:rst
|
||||
@ -425,7 +456,8 @@ This function can be called to explicitly clear the Python
|
||||
environment in case it is safe to do so.
|
||||
|
||||
*See also*
|
||||
:cpp:func:`lammps_mpi_finalize`, :cpp:func:`lammps_kokkos_finalize`
|
||||
:cpp:func:`lammps_mpi_finalize`, :cpp:func:`lammps_kokkos_finalize`,
|
||||
:cpp:func:`lammps_plugin_finalize`
|
||||
\endverbatim */
|
||||
|
||||
void lammps_python_finalize()
|
||||
@ -433,7 +465,6 @@ void lammps_python_finalize()
|
||||
Python::finalize();
|
||||
}
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
/** Call a LAMMPS Error class function
|
||||
|
||||
Reference in New Issue
Block a user