Skip to content

Improving counting of threads and CPUs for MPI jobs - #439

Merged
xiangtaoxu merged 1 commit into
EDmodel:masterfrom
LMurphy186232:omp-fix
Sep 12, 2026
Merged

xiangtaoxu merged 1 commit into
EDmodel:masterfrom
LMurphy186232:omp-fix

Conversation

@LMurphy186232

Copy link
Copy Markdown
Contributor

Fix for array overruns when reporting MPI core usage.

Description

Changed the reporting of cores and threads in MPI runs to count core and thread IDs in dynamically allocated arrays, allowing for correct reporting no matter how these IDs are assigned.

Previously, the code assumed that when reporting on core and thread assignments to ED2 in MPI runs, ID numbers would be numbered sequentially starting at 0, and that there would be a maximum of 64 of each. Current HPC systems break both of those assumptions and this led to occasional array overflows.

Collaborators

@xiangtaoxu
@mpaiao

Types of changes

Changes in Settings, Input Files or Output Files

  • This feature requires changes in ED2IN
  • This feature requires changes in the XML parameter file
  • This feature requires changes in other input files
  • This feature will change output files

Expectation of Answer Changes:

  • No changes expected (bit-for-bit compatibility)
  • Changes expected with specific configurations (see details below)
  • Changes expected in all simulations (see details below)

No change expected in model output, just in the capacity of certain runs to proceed at all.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • ED2 Wiki update:

Testing :

  • All new and existing tests passed.

@mpaiao

mpaiao commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Thanks for PR @LMurphy186232, I went through it and it looks good to me.

@yixin98

yixin98 commented Sep 11, 2026

Copy link
Copy Markdown

I tested this on a cluster node with 96 cores, and it resolved the array overflow error that used to occur.

@xiangtaoxu
xiangtaoxu merged commit 0a57f1b into EDmodel:master Sep 12, 2026
4 of 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.

4 participants