Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/src/plugin/ipc/socket/socketconnlist.cpp
+++ b/src/plugin/ipc/socket/socketconnlist.cpp
@@ -257,7 +257,8 @@

if ((getenv("SLURM_JOBID")) ||
(getenv("SLURM_JOB_ID")) ||
- (getenv("HYDI_CONTROL_FD"))) {
+ (getenv("HYDI_CONTROL_FD")) ||
+ (getenv("PMI_FD"))) {
return;
}

13 changes: 13 additions & 0 deletions contrib/dmtcp-patches/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Required Hydra `PMI_FD` downstream patch

This directory records the exact DMTCP source delta required by the contributor's validated MANA/MPICH/Hydra environment.

Apply locally for testing:

```bash
bash contrib/dmtcp-patches/apply.sh
```

The helper modifies only the checked-out DMTCP submodule source and is idempotent. The resulting dirty submodule contents are for validation only and must be restored before committing this MANA draft branch.

This draft intentionally asks the MANA maintainers to decide whether the final solution should be a temporary downstream patch, an in-tree MANA compatibility fix, a direct DMTCP contribution, or another design.
14 changes: 14 additions & 0 deletions contrib/dmtcp-patches/apply.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail
mana_root="$(cd "$(dirname "$0")/../.." && pwd)"
patch="$mana_root/contrib/dmtcp-patches/0001-ipc-skip-socket-scan-when-PMI_FD-is-set.patch"
source_file="$(git -C "$mana_root/dmtcp" grep -l 'HYDI_CONTROL_FD' -- '*socketconnlist.cpp' | head -n 1)"
[[ -n "$source_file" ]] || { echo "ERROR: socketconnlist.cpp not found" >&2; exit 1; }
if git -C "$mana_root/dmtcp" grep -q 'getenv("PMI_FD")' -- "$source_file"; then
echo "PMI_FD is already present in dmtcp/$source_file"
exit 0
fi
git -C "$mana_root/dmtcp" apply "$patch"
git -C "$mana_root/dmtcp" diff --check
echo "Applied $patch to the local DMTCP submodule checkout."
echo "Do not commit dirty submodule contents in this draft PR."