-
Notifications
You must be signed in to change notification settings - Fork 189
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
Improve exception handling and fix various regressions #4479
Conversation
Check Particle setters/getters on empty myconfig files. Fix incorrect position of the LB boundary in the VTK test. Make VirtualSitesRelative tests independent from each other and faster using less particles (runtime scales with n_part^2). Fix MAX_NUM_PROC regression in the checkpoint test CMake logic.
Use a temporary directory in I/O tests to automate file cleanup. Improve testing of importlib_wrapper and reduce code duplication.
When a real particle is not found, queue a runtime error instead of throwing a fatal error.
Add missing calls to handle_errors() and remove superfluous ones. When calling a script interface method, call handle_errors() with a clear error message. Catch null quaternions in the script interface to avoid triggering a fatal error in boost::qvm. Prevent relative virtual sites from tracking themselves.
Rename `make_map()` to `make_unordered_map_of_variants()` to better reflect its role. Remove `get_map()` and instead implement getter `template <class T> get_value<std::unordered_map<int, T>>(Variant)`. Make Variant runtime error messages human-readable by substituting the Variant demangled name by the string "ScriptInterface::Variant". Reduce code duplication.
When LB_BOUNDARIES is not compiled in, the return type changes and the function pointer stored in the MpiCallbacks framework accesses the wrong data type.
Convert fatal errors into ValueError for invalid particle ids. Make python code for particle creation more readable.
This work is needed for the electrostatics/magnetostatics refactoring in 4.2.0. |
@@ -25,7 +25,12 @@ | |||
|
|||
|
|||
class Non_bonded_interactionsTests(ut.TestCase): | |||
system = espressomd.System(box_l=[20.0, 20.0, 20.0]) | |||
system = espressomd.System(box_l=[30.0, 30.0, 30.0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this number even matter in the test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, with 20
on the x-axis the test fails on 3 MPI ranks because the LJ range of 8.4 is too large. This error message never surfaced before because runtime errors were never checked when setting a interaction. It's only when the integrator runs that it throws, which can be really confusing when the integrator is run indirectly, e.g. via P3M tuning...
Description of changes:
handle_errors("")
with an empty string; now it's called with the method name to help identify which feature threw the exceptionboundary
no longer returns a random integer whenLB_BOUNDARIES
is not compiled inLB_draw_boundaries
option without any otherLB_draw_*
option no longer throws an exceptionlj-demo.py
now properly rescales the particle coordinates (partial fix for lj-demo.py is broken #4347)