Skip to content

Conversation

@dyzheng
Copy link
Collaborator

@dyzheng dyzheng commented Feb 10, 2026

Replace hardcoded MPI_COMM_WORLD with configurable base_comm parameter in the MPI initialization path, enabling workflows like parallel NEB, phonon calculations, or replica exchange MD to split MPI ranks into independent groups, each running its own ESolver instance in a separate subprocess.

Changes:

  • parallel_global: add base_comm parameter to divide_pools(), split_diag_world(), split_grid_world(), init_pools()
  • parallel_reduce: add comm parameter to all reduce_all, reduce_min, reduce_max, reduce_double_allpool, gather_int_all functions
  • parallel_common: add comm parameter to all bcast_* functions
  • PyESolverLCAO: add mpi_comm_handle parameter to initialize()
  • LCAOWorkflow: add mpi_comm parameter forwarded to ESolver

All parameters default to MPI_COMM_WORLD for full backward compatibility. Existing code compiles and behaves identically without modification.

Reminder

  • Have you linked an issue with this pull request?
  • Have you added adequate unit tests and/or case tests for your pull request?
  • Have you noticed possible changes of behavior below or in the linked issue?
  • Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable)

Linked Issue

Fix #...

Unit Tests and/or Case Tests for my changes

  • A unit test is added for each new feature or bug fix.

What's changed?

  • Example: My changes might affect the performance of the application under certain conditions, and I have tested the impact on various scenarios...

Any changes of core modules? (ignore if not applicable)

  • Example: I have added a new virtual function in the esolver base class in order to ...

…workflows

    Replace hardcoded MPI_COMM_WORLD with configurable base_comm parameter in
    the MPI initialization path, enabling workflows like parallel NEB, phonon
    calculations, or replica exchange MD to split MPI ranks into independent
    groups, each running its own ESolver instance in a separate subprocess.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor plan in ABACUS for future pybind11 implementation

1 participant