Homec4science

Support mixed Python use by honoring Python GIL

Authored by Richard Berger <richard.berger@temple.edu> on Mar 29 2017, 07:18.

Description

Support mixed Python use by honoring Python GIL

This enables support to both drive LAMMPS with a Python interpreter and
evaluating Python expressions inside of LAMMPS using that same interpreter.
Previously this has been avoided through an error message because the
binding code did not ensure that the necessary GIL (global interpreter lock)
structures exist (see issue #438).

All code paths which call Python C API functions must first acquire the
GIL through a call PyGILState_Ensure and release it with PyGILState_Release.

Details

Committed
Richard Berger <richard.berger@temple.edu>Mar 29 2017, 07:49
Pushed
jungeOct 19 2017, 09:53
Parents
rLAMMPS4b9d0a956632: sync with SVN
Branches
Unknown
Tags
Unknown

Event Timeline

Richard Berger <richard.berger@temple.edu> committed rLAMMPS1544b51dcbfa: Support mixed Python use by honoring Python GIL (authored by Richard Berger <richard.berger@temple.edu>).Mar 29 2017, 07:49