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

PARSL_MPI_PREFIX moved to the espresso calculator #2422

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

tomdemeyere
Copy link
Contributor

Summary of Changes

As discussed in (#2419) this is an attempt to fix the current issue with the

Expected behavior

Users can redecorate their job, adding the parsl_resource_specification, Parsl take these informations and define environment variables such as PARSL_MPI_PREFIX. If the users redecorate multiple jobs, different PARSL_MPI_PREFIX will be accessible on a per job basis.

Example:

resource_specification_slow = {
    "num_nodes": 1,
    "ranks_per_node": 128,
    "num_ranks": 128,
    "launcher_options": "-vv --cpu-freq=2250000 --hint=nomultithread --distribution=block:block",
}
resource_specification_fast = {
    "num_nodes": 4,
    "ranks_per_node": 128,
    "num_ranks": 128 * 4,
    "launcher_options": "-vv --cpu-freq=2250000 --hint=nomultithread --distribution=block:block",
}

relax_job_slow = redecorate(
    relax_job, job(parsl_resource_specification=resource_specification_slow)
)
relax_job_fast = redecorate(
    relax_job, job(parsl_resource_specification=resource_specification_fast)
)

In this case, each job will have access to a different PARSL_MPI_PREFIX environment variable.

The problem

Right now, the ESPRESSO_PARALLEL_CMD is modified in settings.py based on the PARSL_MPI_PREFIX, the problem is that this env variable is only defined within jobs. ESPRESSO_PARALLEL_CMD end up being defined before that, leading to wrong commands.

The problem

One solution is to modify the command being lunched at the last moment inside the espresso calculator before the command is lunched.

Requirements

Note: If you are an external contributor, you will see a comment from @buildbot-princeton. This is solely for the maintainers.

@buildbot-princeton
Copy link
Collaborator

Can one of the admins verify this patch?

Copy link

codecov bot commented Aug 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.48%. Comparing base (69eba73) to head (9cb0bed).
Report is 22 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2422      +/-   ##
==========================================
+ Coverage   98.45%   98.48%   +0.03%     
==========================================
  Files          84       84              
  Lines        3423     3429       +6     
==========================================
+ Hits         3370     3377       +7     
+ Misses         53       52       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Andrew-S-Rosen
Copy link
Member

Oh, it's Parsl that defines the PARSL_MPI_PREFIX and not the user. We'll that explains it. Happy to merge.

@Andrew-S-Rosen Andrew-S-Rosen merged commit 43fd54d into Quantum-Accelerators:main Aug 14, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants