This commit is contained in:
edoapra 2025-03-04 17:41:51 -08:00
parent 1827a57304
commit fe8ef0bf65
No known key found for this signature in database
GPG key ID: 9E6A0B70826967BA
2 changed files with 18 additions and 0 deletions

View file

@ -204,6 +204,7 @@ if [[ -d "ga-5.9" ]]; then
if [[ ! -f "ga-5.9/patched59" ]]; then
./gasparse_patch.sh $GA_DIR
./eaf32bit_patch.sh $GA_DIR
./grouphostname_patch.sh $GA_DIR
echo patched
touch ga-5.9/patched59
fi

View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
rm -f grouphostname.patch
cat > grouphostname.patch <<EOF
--- $1/comex/src-mpi-pr/groups.c
+++ $1/comex/src-mpi-pr/groups.c
@@ -453,7 +453,7 @@ void comex_group_init(MPI_Comm comm)
/* create node comm */
/* MPI_Comm_split requires a non-negative color,
* so sort and sanitize */
- sorted = (long*)malloc(sizeof(host_name_t) * g_state.size);
+ sorted = (host_name_t*)malloc(sizeof(host_name_t) * g_state.size);
(void)memcpy(sorted, g_state.host, sizeof(host_name_t)*g_state.size);
qsort(sorted, g_state.size, sizeof(host_name_t), cmpname);
/* count is number of distinct host IDs that are lower than
EOF
patch -p0 -s -N < grouphostname.patch
echo grouphostname.patch applied