Skip to content

Comments

robustify the code and add hello world style for "... python -m dlp_mpi"#11

Merged
boeddeker merged 7 commits intofgnt:masterfrom
boeddeker:master
Jan 20, 2026
Merged

robustify the code and add hello world style for "... python -m dlp_mpi"#11
boeddeker merged 7 commits intofgnt:masterfrom
boeddeker:master

Conversation

@boeddeker
Copy link
Member

No description provided.

Why hello world syle __main__.py:
 - I had no other idea, what python -m dlp_mpi could do
 - Testing with "... python -m dlp_mpi" (... is mpi, slurm or amerun call) makes it easier as running the examples
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request robustifies the MPI backend initialization code and adds a "hello world" style entry point for running python -m dlp_mpi. The changes improve the SLURM port selection fallback logic to handle cases where SLURM_STEP_RESV_PORTS is not available, refactor the initialization detection code for better maintainability, and add a diagnostic tool for debugging MPI setup issues.

Changes:

  • Added fallback port selection strategies for SLURM environments when SLURM_STEP_RESV_PORTS is unavailable
  • Refactored initialization logic in get_init.py to use a more flexible type detection system with better error handling
  • Created __main__.py entry point to display MPI backend information and demonstrate basic MPI functionality

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.

File Description
dlp_mpi/util.py Updated MPI import to use the wrapper module instead of importing mpi4py directly
dlp_mpi/ame/core/_init/slurm.py Added multi-tier fallback logic for port selection and fixed authkey encoding
dlp_mpi/ame/core/_init/get_init.py Refactored initialization code with new _get() and print_info() functions for better diagnostics
dlp_mpi/main.py New entry point for displaying MPI configuration and testing basic functionality

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

boeddeker and others added 4 commits January 19, 2026 19:18
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@boeddeker boeddeker merged commit d1ea587 into fgnt:master Jan 20, 2026
6 checks passed
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.

1 participant