mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-28 06:05:44 -04:00
patch f37eede226
This commit is contained in:
parent
1827a57304
commit
fe8ef0bf65
2 changed files with 18 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
17
src/tools/grouphostname_patch.sh
Executable file
17
src/tools/grouphostname_patch.sh
Executable 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue