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

Get rid of mpi callbacks #4614

Open
30 of 34 tasks
RudolfWeeber opened this issue Nov 26, 2022 · 0 comments
Open
30 of 34 tasks

Get rid of mpi callbacks #4614

RudolfWeeber opened this issue Nov 26, 2022 · 0 comments
Labels

Comments

@RudolfWeeber
Copy link
Contributor

RudolfWeeber commented Nov 26, 2022

  • To allow for several espressomd.System instances in a single script
  • to allow for shared-memory and/or task-based parallelism
  • to get rid of most Cython code

Cell system / pair finding related

  • cells.cpp:mpi_get_short_range_neighbors_local
  • EspressoSystemStandAlone.cpp:mpi_set_node_grid_local
  • integrate.cpp:mpi_set_skin_local

Analysis and status reporting

  • dpd.cpp:dpd_viscous_stress_local
  • energy.cpp:REGISTER_CALLBACK_MAIN_RANK(calculate_energy)
  • pressure.cpp:REGISTER_CALLBACK_MAIN_RANK(calculate_pressure)
  • errorhandling.cpp:mpi_gather_runtime_errors_local

System and interaction properties

  • EspressoSystemStandAlone.cpp:mpi_set_box_length_local

Propagation, equations of motion

  • EspressoSystemStandAlone.cpp:mpi_set_time_step_local
  • integrate.cpp:REGISTER_CALLBACK_MAIN_RANK(mpi_steepest_descent_local)
  • integrate.cpp:REGISTER_CALLBACK_MAIN_RANK(integrate)
  • thermostat.cpp: mpi_##thermostat##_set_rng_seed
  • thermostat.cpp: mpi_##thermostat##_set_rng_counter
  • thermostat.cpp:mpi_set_brownian_gamma_local
  • thermostat.cpp:mpi_set_brownian_gamma_rot_local
  • thermostat.cpp:mpi_set_langevin_gamma_local
  • thermostat.cpp:mpi_set_langevin_gamma_rot_local
  • thermostat.cpp:mpi_set_thermo_virtual_local
  • thermostat.cpp:mpi_set_temperature_local
  • thermostat.cpp:mpi_set_thermo_switch_local
  • thermostat.cpp:mpi_set_nptiso_gammas_local

Interactions

  • nonbonded_interactions/nonbonded_interaction_data.cpp:mpi_realloc_ia_params_local

Particles management

  • particle_data.cpp:mpi_send_update_message_local
  • particle_data.cpp:mpi_remove_exclusion_local
  • particle_data.cpp:mpi_add_exclusion_local
  • particle_node.cpp:get_particle_data_local
  • particle_node.cpp:mpi_get_particles_local
  • particle_node.cpp:mpi_who_has_local
  • particle_node.cpp:mpi_place_new_particle_local
  • particle_node.cpp:mpi_place_particle_local
  • particle_node.cpp:mpi_remove_particle_local
  • particle_node.cpp:mpi_remove_all_particles_local
  • particle_node.cpp:mpi_synchronize_max_seen_pid_local
  • particle_node.cpp:mpi_send_particle_data_local
kodiakhq bot added a commit that referenced this issue Feb 24, 2023
Partial fix for #4614
Partial fix for #4617
Follow-up to #4637

Description of changes:
- reaction methods are now fully parallel and no longer rely on MpiCallbacks
- reaction methods are no longer entangled with the particle management code
- the Monte Carlo acceptance probability is now implemented in Python
- API changes:
   - it is no longer possible to change the reaction constant of an existing reaction with `gamma <= 0`
   - `ReactionAlgorithm.reaction()` now takes `steps` instead of `reaction_steps` as argument
   - when setting up a MC method with two or more reactions, a runtime error is raised if a reaction accidentally overwrites the default charge of a specific type with a different value
- under-the-hood changes:
   - the `particle_data.cpp` source file was removed
   - the `EspressoSystemStandAlone` class no longer relies on MpiCallbacks
   - frequency of cell system invalidation during Monte Carlo trial moves has been significantly reduced
   - the new Python interface of reaction methods is around 40% slower than the original C++ implementation
@jngrad jngrad added the Core label Feb 24, 2023
kodiakhq bot added a commit that referenced this issue Apr 24, 2023
Fixes #4712

Description of changes:
- rewrite integrator as Python (partial fix for #4542)
- remove two MPI callbacks (partial fix for #4614)
- remove a global variable (partial fix for #2628)
kodiakhq bot added a commit that referenced this issue Aug 7, 2023
kodiakhq bot added a commit that referenced this issue Jan 19, 2024
Description of changes:
- encapsulate thermostats and remove their Cython interface
   - use one C++ `ScriptInterface` class per core class (fixes #3980)
   - introduce the `ThermostatFlags` enum, allow deactivating a single thermostat, add an `is_active` flag accessible from the Python interface (fixes #4266)
- remove 20 MPI callbacks
   - partial fix for #4614
- remove thermostat and thermalized/rigid bond global variables
   - partial fix for #2628
- remove a significant amount of historical Cython code that relied on deprecated Cython features
   - partial fix for #4542
   - ESPResSo is now compatible with Cython 3.0
   - the `nogil` deprecation warning subsists
- improve testing of the thermostats interface
- API changes:
   - thermalized bond parameter `seed` was moved to `system.thermostat.set_thermalized_bond()`
      - this change better reflects the fact there is only one global seed for all thermalized bonds
      - until now this global seed was overwritten by any newly created thermalized bond, whether it was added to the system or not
   - LB thermostat `seed` parameter now gets written to the RNG seed (silent change)
      - until now, the RNG seed was hardcoded as `0` and the `seed` value was used to set the RNG counter, thus two independent simulations with a different seed would actually get the same particle coupling random noise sequence with a time lag equal to the difference between the two seeds
      -  this is a bugfix for ensemble runs
      - fixes #4848
@RudolfWeeber RudolfWeeber added this to the ESPResSo 4.3.0 milestone Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants