Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script interface maintenance #4511

Merged
merged 5 commits into from
May 19, 2022
Merged

Script interface maintenance #4511

merged 5 commits into from
May 19, 2022

Conversation

jngrad
Copy link
Member

@jngrad jngrad commented May 16, 2022

Description of changes:

  • convert cellsystem.pyx from Cython to Python
    • hide cell system implementation details from the python interface
    • reduce use of the MpiCallbacks framework in the core
  • improve script interface type conversion code
    • add support for Python dict with strings as keys
    • improve error messages when attempting to convert a primitive type to a STL container type
    • simplify collision detection getter/setter logic
  • implement a parallel-try-catch mechanism in the GlobalContext framework to make the ScriptInterface object registry resilient to exceptions thrown in MPI-parallel code (implementation of the solution outlined in Script interface object constructors are not thread-safe #4449)

jngrad added 2 commits May 16, 2022 11:27
Collision detection modes are self-contained and cannot be combined.
Add support for dicts with string keys. Improve error messages
for failed conversions by get_value() and reduce complexity of
demangled symbols by removing allocators from container types.
jngrad added 2 commits May 16, 2022 13:07
Rely on the C++ AutoParameters class to remove all the type
conversion code from the Cython class. Convert the Cython file
to a Python file. Use the standard checkpointing mechanism.
Use standard MPI communication instead of MpiCallbacks.
Also make source files self-contained with include-what-you-use.
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jngrad jngrad requested a review from reinaual May 16, 2022 12:39
pkreissl
pkreissl previously approved these changes May 17, 2022
Make C++ exceptions from core classes safe in a MPI-parallel context
via a parallel exception handler. When an exception occurs, re-throw
the exception on the head node and throw a ScriptInterface::Exception
on worker nodes.
@jngrad jngrad added this to the Espresso 4.2 milestone May 17, 2022
@jngrad jngrad added the automerge Merge with kodiak label May 19, 2022
@kodiakhq kodiakhq bot merged commit e188fb7 into espressomd:python May 19, 2022
@jngrad jngrad deleted the si_refactor branch May 19, 2022 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants