Skip to content

Conversation

@jan-janssen
Copy link
Member

@jan-janssen jan-janssen commented May 28, 2024

Summary by CodeRabbit

  • New Features

    • Introduced GitHub Actions workflows for running unit tests with Flux-MPICH and Flux-OpenMPI integration.
    • Added support for specifying the PMI interface in Executor classes, with a new pmi parameter.
  • Updates

    • Updated OpenMPI dependency to be more flexible and added flux-pmix dependency.
    • Installation documentation updated to reflect changes in dependencies and new pmi parameter settings.
  • Bug Fixes

    • Enhanced validation for PMI interface parameters to ensure compatibility with different backends.
  • Tests

    • Added new tests to cover the pmi parameter functionality.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 28, 2024

Walkthrough

The updates primarily focus on enhancing flexibility and integration within the project. The OpenMPI dependency version is relaxed across several configuration files. New GitHub Actions workflows are introduced for unit testing with Flux-MPICH and Flux-OpenMPI. The installation documentation and core code are updated to support the pmix backend for OpenMPI v5, and new parameters are added to handle PMI interfaces. Tests are also updated to reflect these changes.

Changes

File(s) Change Summary
.ci_support/environment-openmpi.yml, binder/environment.yml Updated OpenMPI dependency from 4.1.6 to an unspecified version. Added flux-pmix dependency.
.github/workflows/benchmark.yml Changed environment variable from OMPI_MCA_rmaps_base_oversubscribe to PRTE_MCA_rmaps_default_mapping_policy with value ':oversubscribe'.
.github/workflows/unittest-flux-mpich.yml, .github/workflows/unittest-flux-openmpi.yml Introduced new GitHub Actions workflows for unit testing with Flux-MPICH and Flux-OpenMPI integration.
docs/installation.md Updated installation commands to reflect new OpenMPI and flux-pmix configurations. Added pmi="pmix" parameter for pympipool.Executor.
pympipool/__init__.py, pympipool/scheduler/__init__.py, pympipool/scheduler/flux.py Added pmi parameter to relevant classes and functions to specify PMI interface.
pympipool/shared/inputcheck.py Added check_pmi function to validate PMI parameters. Modified validate_backend to return "mpi" by default.
tests/test_executor_backend_flux.py, tests/test_flux_executor.py Updated tests to include pmi parameter derived from environment variable PYMPIPOOL_PMIX.
tests/test_shared_input_check.py Changed argument order in validate_backend function call.

Poem

In the land of code so bright,
Dependencies take their flight.
OpenMPI's chains now free,
With pmix, new paths to see.
Flux and tests, they intertwine,
In workflows, their powers shine.
A rabbit's cheer, a code refined,
Flexibility and strength combined!


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between b11eda3 and 5a9fc5f.
Files selected for processing (2)
  • .ci_support/environment-openmpi.yml (1 hunks)
  • binder/environment.yml (1 hunks)
Files skipped from review due to trivial changes (2)
  • .ci_support/environment-openmpi.yml
  • binder/environment.yml

@jan-janssen
Copy link
Member Author

30.978s: job.exception type=exec severity=0 rank 0 exited and exit-timeout=30s has expired
flux-job: task(s) exited with exit code 1
No PMIx server was reachable, but a PMI1/2 was detected.
If srun is being used to launch application,  2 singletons will be started.
30.976s: flux-shell[0]: FATAL: doom: rank 0 exited and exit-timeout=30s has expired

@jan-janssen
Copy link
Member Author

Waiting for conda-forge/staged-recipes#26478

@jan-janssen jan-janssen marked this pull request as draft May 28, 2024 09:51
@jan-janssen
Copy link
Member Author

I continue to debug this by testing test.py:

from mpi4py import MPI

comm = MPI.COMM_WORLD
size = comm.Get_size()
rank = comm.Get_rank()

print(comm, size, rank)

When I run this with flux run -n 4 python test.py I get:

No PMIx server was reachable, but a PMI1/2 was detected.
If srun is being used to launch application,  4 singletons will be started.
<mpi4py.MPI.Intracomm object at 0x7f400985a460> 1 0
<mpi4py.MPI.Intracomm object at 0x7f7531ffa3d0> 1 0
<mpi4py.MPI.Intracomm object at 0x7f2b0e45e2e0> 1 0
<mpi4py.MPI.Intracomm object at 0x7fa56ebea370> 1 0

But when I run it with flux run -n 4 -o pmi=pmix python test.py I get:

<mpi4py.MPI.Intracomm object at 0x7fcb4017e3d0> 4 3
<mpi4py.MPI.Intracomm object at 0x7f4d107ce310> 4 2
<mpi4py.MPI.Intracomm object at 0x7f95641065e0> 4 1
<mpi4py.MPI.Intracomm object at 0x7f202ce0e400> 4 0

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

…openmpi_constraint

# Conflicts:
#	pympipool/scheduler/__init__.py
#	pympipool/shared/inputcheck.py
#	tests/test_shared_input_check.py
@jan-janssen jan-janssen marked this pull request as ready for review May 29, 2024 09:50
@jan-janssen jan-janssen merged commit 635acdb into main May 29, 2024
@jan-janssen jan-janssen deleted the release_openmpi_constraint branch May 29, 2024 09:56
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 5a9fc5f and 4af4e97.
Files selected for processing (13)
  • .github/workflows/benchmark.yml (1 hunks)
  • .github/workflows/unittest-flux-mpich.yml (1 hunks)
  • .github/workflows/unittest-flux-openmpi.yml (1 hunks)
  • binder/environment.yml (1 hunks)
  • docs/installation.md (1 hunks)
  • notebooks/examples.ipynb (1 hunks)
  • pympipool/init.py (6 hunks)
  • pympipool/scheduler/init.py (5 hunks)
  • pympipool/scheduler/flux.py (9 hunks)
  • pympipool/shared/inputcheck.py (2 hunks)
  • tests/test_executor_backend_flux.py (3 hunks)
  • tests/test_flux_executor.py (2 hunks)
  • tests/test_shared_input_check.py (1 hunks)
Files not summarized due to errors (1)
  • notebooks/examples.ipynb: Error: Message exceeds token limit
Files skipped from review due to trivial changes (2)
  • .github/workflows/benchmark.yml
  • tests/test_shared_input_check.py
Additional Context Used
LanguageTool (17)
docs/installation.md (17)

Near line 9: A comma might be missing here.
Context: ...RM allocation using the srun command. Still this always queries the central databa...
Rule ID: AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA


Near line 10: A comma might be missing here.
Context: ...s the central database of the SLURM job scheduler which can decrease the performance of t...
Rule ID: AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA


Near line 16: A comma might be missing here.
Context: ...for GPUs from your vendor. In the same way the version of pmi for your queuing s...
Rule ID: AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA


Near line 21: A comma might be missing here.
Context: ... ### AMD GPUs with mpich / cray mpi For example the [Frontier HPC](https://www.olcf.orn...
Rule ID: AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA


Near line 22: The preposition “with” seems more likely in this position.
Context: ...th cray mpi version which is compatible to mpich 4.X. So the corresponding versi...
Rule ID: AI_EN_LECTOR_REPLACEMENT_PREPOSITION


Near line 28: A comma might be missing here.
Context: ... Nvidia GPUs with mpich / cray mpi For example the [Perlmutter HPC](https://docs.nersc...
Rule ID: AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA


Near line 29: The preposition “with” seems more likely in this position.
Context: ...ation with cray mpi which is compatible to mpich 4.X. So the corresponding vers...
Rule ID: AI_EN_LECTOR_REPLACEMENT_PREPOSITION


Near line 34: A comma might be missing here.
Context: ...en installing on a login node without a GPU the conda install command might fail wi...
Rule ID: AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA


Near line 43: A comma might be missing here.
Context: ...# Intel GPUs with mpich / cray mpi For example the [Aurora HPC](https://www.alcf.anl.g...
Rule ID: AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA


Near line 44: The preposition “with” seems more likely in this position.
Context: ...ation with cray mpi which is compatible to mpich 4.X. So the corresponding versi...
Rule ID: AI_EN_LECTOR_REPLACEMENT_PREPOSITION


Near line 51: The preposition ‘for’ seems more likely in this position.
Context: ...ch / cray mpi, it can also be installed in compatibility with openmpi or intel mpi...
Rule ID: AI_HYDRA_LEO_REPLACE_IN_FOR


Near line 68: It appears that a comma is missing.
Context: ...the flux scheduler. In this interactive shell you can now list the available resourc...
Rule ID: DURING_THAT_TIME_COMMA


Near line 85: Possible missing comma found.
Context: ...e resources to the flux framework. For SLURM this is achieved by calling `flux start...
Rule ID: AI_HYDRA_LEO_MISSING_COMMA


Near line 104: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...). While this is not recommended in the high performance computing (HPC) context as pympipool ...
Rule ID: EN_COMPOUND_ADJECTIVE_INTERNAL


Near line 104: Possible missing comma found.
Context: ...in the high performance computing (HPC) context as pympipool with `block_allocation=F...
Rule ID: AI_HYDRA_LEO_MISSING_COMMA


Near line 106: Consider inserting a comma after an introductory phrase for better readability.
Context: ...p for each submitted python function. In this case pympipool can be installed using: ```...
Rule ID: IN_THAT_CASE_COMMA


Near line 112: The operating system from Apple is written “macOS”.
Context: ...orkstation installations on Windows and MacOS.
Rule ID: MAC_OS

Ruff (2)
tests/test_executor_backend_flux.py (2)

12-12: pympipool.scheduler.flux.PyFluxExecutor imported but unused; consider using importlib.util.find_spec to test for availability


13-13: pympipool.scheduler.flux.FluxPythonInterface imported but unused; consider using importlib.util.find_spec to test for availability

Markdownlint (83)
docs/installation.md (83)

3: Expected: 0 or 2; Actual: 1
Trailing spaces


4: Expected: 0 or 2; Actual: 1
Trailing spaces


7: Expected: 0 or 2; Actual: 1
Trailing spaces


9: Expected: 0 or 2; Actual: 1
Trailing spaces


10: Expected: 0 or 2; Actual: 1
Trailing spaces


15: Expected: 0 or 2; Actual: 1
Trailing spaces


16: Expected: 0 or 2; Actual: 1
Trailing spaces


17: Expected: 0 or 2; Actual: 1
Trailing spaces


18: Expected: 0 or 2; Actual: 1
Trailing spaces


21: Expected: 0 or 2; Actual: 1
Trailing spaces


23: Expected: 0 or 2; Actual: 1
Trailing spaces


27: Expected: 0 or 2; Actual: 1
Trailing spaces


28: Expected: 0 or 2; Actual: 1
Trailing spaces


29: Expected: 0 or 2; Actual: 1
Trailing spaces


30: Expected: 0 or 2; Actual: 1
Trailing spaces


39: Expected: 0 or 2; Actual: 1
Trailing spaces


40: Expected: 0 or 2; Actual: 1
Trailing spaces


42: Expected: 0 or 2; Actual: 1
Trailing spaces


43: Expected: 0 or 2; Actual: 1
Trailing spaces


44: Expected: 0 or 2; Actual: 1
Trailing spaces


45: Expected: 0 or 2; Actual: 1
Trailing spaces


51: Expected: 0 or 2; Actual: 1
Trailing spaces


52: Expected: 0 or 2; Actual: 1
Trailing spaces


63: Expected: 0 or 2; Actual: 1
Trailing spaces


68: Expected: 0 or 2; Actual: 1
Trailing spaces


69: Expected: 0 or 2; Actual: 1
Trailing spaces


80: Expected: 0 or 2; Actual: 1
Trailing spaces


81: Expected: 0 or 2; Actual: 1
Trailing spaces


84: Expected: 0 or 2; Actual: 1
Trailing spaces


89: Expected: 0 or 2; Actual: 1
Trailing spaces


94: Expected: 0 or 2; Actual: 1
Trailing spaces


95: Expected: 0 or 2; Actual: 1
Trailing spaces


96: Expected: 0 or 2; Actual: 1
Trailing spaces


105: Expected: 0 or 2; Actual: 1
Trailing spaces


1: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


2: Expected: 1; Actual: 0; Above
Headings should be surrounded by blank lines


2: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


13: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


20: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


27: Expected: 1; Actual: 0; Above
Headings should be surrounded by blank lines


27: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


42: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


50: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


62: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


83: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


94: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


101: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


24: null
Fenced code blocks should be surrounded by blank lines


26: null
Fenced code blocks should be surrounded by blank lines


31: null
Fenced code blocks should be surrounded by blank lines


33: null
Fenced code blocks should be surrounded by blank lines


36: null
Fenced code blocks should be surrounded by blank lines


38: null
Fenced code blocks should be surrounded by blank lines


46: null
Fenced code blocks should be surrounded by blank lines


53: null
Fenced code blocks should be surrounded by blank lines


55: null
Fenced code blocks should be surrounded by blank lines


57: null
Fenced code blocks should be surrounded by blank lines


59: null
Fenced code blocks should be surrounded by blank lines


65: null
Fenced code blocks should be surrounded by blank lines


67: null
Fenced code blocks should be surrounded by blank lines


70: null
Fenced code blocks should be surrounded by blank lines


72: null
Fenced code blocks should be surrounded by blank lines


74: null
Fenced code blocks should be surrounded by blank lines


79: null
Fenced code blocks should be surrounded by blank lines


86: null
Fenced code blocks should be surrounded by blank lines


88: null
Fenced code blocks should be surrounded by blank lines


90: null
Fenced code blocks should be surrounded by blank lines


97: null
Fenced code blocks should be surrounded by blank lines


108: null
Fenced code blocks should be surrounded by blank lines


9: null
Spaces inside code span elements


24: null
Fenced code blocks should have a language specified


31: null
Fenced code blocks should have a language specified


36: null
Fenced code blocks should have a language specified


46: null
Fenced code blocks should have a language specified


53: null
Fenced code blocks should have a language specified


57: null
Fenced code blocks should have a language specified


65: null
Fenced code blocks should have a language specified


70: null
Fenced code blocks should have a language specified


74: null
Fenced code blocks should have a language specified


86: null
Fenced code blocks should have a language specified


90: null
Fenced code blocks should have a language specified


97: null
Fenced code blocks should have a language specified


108: null
Fenced code blocks should have a language specified

Additional comments not posted (14)
binder/environment.yml (2)

6-6: The removal of the version constraint on openmpi aligns with the PR's objectives and should facilitate broader compatibility testing.


12-12: Adding flux-pmix as a dependency is appropriate for ensuring compatibility with OpenMPI version 5.0.

.github/workflows/unittest-flux-mpich.yml (1)

18-19: Properly extending the environment to include necessary dependencies like flux-core and versioneer ensures that the testing environment is correctly set up.

.github/workflows/unittest-flux-openmpi.yml (1)

18-19: Including flux-pmix in the environment setup is essential for compatibility testing with OpenMPI version 5.0, ensuring the testing environment is correctly configured.

tests/test_executor_backend_flux.py (1)

85-85: The addition of the pmi parameter to the test functions is necessary for testing the new PMI interface functionality in the pympipool package.

Also applies to: 98-98

pympipool/shared/inputcheck.py (1)

88-94: The addition of the check_pmi function is appropriate for validating the pmi parameter based on the backend, ensuring compatibility with OpenMPI v5.

tests/test_flux_executor.py (1)

73-73: The addition of the pmi parameter to the test functions is necessary for testing the new PMI interface functionality in the pympipool package.

Also applies to: 81-81

docs/installation.md (2)

54-59: Update the installation instructions to reflect the new OpenMPI version and the required flux-pmix plugin.

The updated instructions clearly guide users on how to install the necessary components for OpenMPI version 5, including the new flux-pmix plugin. This is crucial for ensuring compatibility and proper functionality.


60-60: Clarify the usage of the pmi="pmix" parameter in the pympipool.Executor.

Ensure that the pmi="pmix" parameter is correctly implemented in the pympipool.Executor to handle the new backend requirements.

pympipool/scheduler/__init__.py (2)

54-54: Ensure the new pmi parameter is correctly integrated across different executor types.

The addition of the pmi parameter in the create_executor function and its documentation is well-integrated. This change supports the new requirements for OpenMPI v5 and enhances flexibility in backend management.

Also applies to: 88-88


Line range hint 96-123: Validate the pmi parameter handling in the PyFluxExecutor and PyFluxStepExecutor.

This script checks that the pmi parameter is being correctly passed and utilized within the PyFluxExecutor and PyFluxStepExecutor classes, ensuring compatibility with OpenMPI v5.

Verification successful

The __init__ methods for both PyFluxExecutor and PyFluxStepExecutor classes do include the pmi parameter. This confirms that the pmi parameter is being handled in the constructors of these classes.

  • PyFluxExecutor class:
    • __init__ method includes pmi: Optional[str] = None
  • PyFluxStepExecutor class:
    • __init__ method includes pmi: Optional[str] = None

This indicates that the pmi parameter is indeed being passed and utilized within these classes.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correct handling of the `pmi` parameter in the `PyFluxExecutor` and `PyFluxStepExecutor`.

# Test: Search for the usage of the `pmi` parameter in these classes.
ast-grep --lang python --pattern $'class PyFluxExecutor {
  $$$
  __init__($_, $_, pmi=$_) {
    $$$
  }
  $$$  
}'

Length of output: 461



Script:

#!/bin/bash
# Description: Locate the definitions of the `PyFluxExecutor` and `PyFluxStepExecutor` classes and verify the `pmi` parameter handling.

# Step 1: Search for the definitions of `PyFluxExecutor` and `PyFluxStepExecutor` classes.
echo "Searching for PyFluxExecutor class definition..."
ast-grep --lang python --pattern 'class PyFluxExecutor { $$$ }'

echo "Searching for PyFluxStepExecutor class definition..."
ast-grep --lang python --pattern 'class PyFluxStepExecutor { $$$ }'

# Step 2: Verify the `__init__` methods of these classes for the `pmi` parameter.
echo "Verifying __init__ method of PyFluxExecutor for pmi parameter..."
ast-grep --lang python --pattern 'class PyFluxExecutor { $$$ __init__($_, $_, pmi=$_) { $$$ } $$$ }'

echo "Verifying __init__ method of PyFluxStepExecutor for pmi parameter..."
ast-grep --lang python --pattern 'class PyFluxStepExecutor { $$$ __init__($_, $_, pmi=$_) { $$$ } $$$ }'

Length of output: 2449



Script:

#!/bin/bash
# Description: Locate the definitions of the `PyFluxExecutor` and `PyFluxStepExecutor` classes and verify the `pmi` parameter handling.

# Step 1: Search for the definitions of `PyFluxExecutor` and `PyFluxStepExecutor` classes.
echo "Searching for PyFluxExecutor class definition..."
rg 'class PyFluxExecutor'

echo "Searching for PyFluxStepExecutor class definition..."
rg 'class PyFluxStepExecutor'

# Step 2: Verify the `__init__` methods of these classes for the `pmi` parameter.
echo "Verifying __init__ method of PyFluxExecutor for pmi parameter..."
rg 'def __init__.*pmi' -A 10

echo "Verifying __init__ method of PyFluxStepExecutor for pmi parameter..."
rg 'def __init__.*pmi' -A 10

Length of output: 764



Script:

#!/bin/bash
# Description: Locate the `__init__` methods of the `PyFluxExecutor` and `PyFluxStepExecutor` classes and verify their parameters.

# Step 1: Locate the `__init__` methods of `PyFluxExecutor` and `PyFluxStepExecutor` classes.
echo "Locating __init__ method of PyFluxExecutor..."
rg 'def __init__' pympipool/scheduler/flux.py -A 10

echo "Locating __init__ method of PyFluxStepExecutor..."
rg 'def __init__' pympipool/scheduler/flux.py -A 10

Length of output: 2465

pympipool/scheduler/flux.py (2)

31-31: Consistent integration of the pmi parameter across Flux executor classes.

The consistent addition of the pmi parameter across various classes within the flux.py module supports the new OpenMPI v5 requirements. This ensures that the PMI interface can be appropriately configured, enhancing the module's flexibility and compatibility.

Also applies to: 70-70, 112-112, 148-148, 182-182


Line range hint 192-212: Ensure the pmi parameter is correctly utilized in the FluxPythonInterface.

This script checks that the pmi parameter is being correctly utilized in the FluxPythonInterface, ensuring that it is properly set in the job specifications when provided.

Verification successful

The pmi parameter is correctly utilized in the FluxPythonInterface class. The __init__ method in pympipool/scheduler/flux.py includes the pmi parameter, and it is used in the setattr_shell_option method.

  • pympipool/scheduler/flux.py: The pmi parameter is set in the job specification using jobspec.setattr_shell_option("pmi", self._pmi).
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correct utilization of the `pmi` parameter in the `FluxPythonInterface`.

# Test: Search for the implementation and usage of the `pmi` parameter in the `FluxPythonInterface`.
ast-grep --lang python --pattern $'class FluxPythonInterface {
  $$$
  __init__($_, $_, pmi=$_) {
    $$$
  }
  $$$  
}'

Length of output: 466



Script:

#!/bin/bash
# Locate the FluxPythonInterface class definition
ast-grep --lang python --pattern 'class FluxPythonInterface { $$$ }'

# Locate the __init__ method within the FluxPythonInterface class and check for the pmi parameter
ast-grep --lang python --pattern 'class FluxPythonInterface { $$$ def __init__($_, $_, pmi=$_) { $$$ } $$$ }'

# Check for the usage of the pmi parameter within the FluxPythonInterface class
ast-grep --lang python --pattern 'class FluxPythonInterface { $$$ setattr_shell_option("pmi", $_) $$$ }'

Length of output: 1435



Script:

#!/bin/bash
# Locate the FluxPythonInterface class definition
rg 'class FluxPythonInterface' --glob '*.py'

# Locate the __init__ method within the FluxPythonInterface class and check for the pmi parameter
rg 'def __init__' --glob '*.py' -A 5

# Check for the usage of the pmi parameter within the FluxPythonInterface class
rg 'setattr_shell_option\("pmi"' --glob '*.py'

Length of output: 7007

pympipool/__init__.py (1)

51-51: Integration of the pmi parameter in the Executor class to support OpenMPI v5.

The addition of the pmi parameter in the Executor class is well-documented and correctly implemented. This change is crucial for ensuring compatibility with OpenMPI v5, particularly when using the flux backend.

Also applies to: 89-89, 111-111, 149-149, 169-169, 188-188

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.

2 participants