File: mpi-tests-localhost.patch

package info (click to toggle)
gromacs 2025.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 287,216 kB
  • sloc: xml: 3,718,478; cpp: 654,748; ansic: 75,282; python: 20,471; sh: 3,470; perl: 2,218; yacc: 644; fortran: 397; lisp: 265; makefile: 171; lex: 125; awk: 68; csh: 39
file content (22 lines) | stat: -rw-r--r-- 1,437 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: Run MPI tests explicitly on localhost instead of hostname
 In the default configuration, MPICH tests will fail in a network-restricted
 environment where gethostbyname() does not return a valid address.  As a
 workaround, this passes an explicit "-host localhost" to mpirun for the test
 suite only.
Author: Nicholas Breen <nbreen@debian.org>
Last-Update: 2022-11-20
Forwarded: not-needed

Index: gromacs/cmake/gmxManageMPI.cmake
===================================================================
--- gromacs.orig/cmake/gmxManageMPI.cmake
+++ gromacs/cmake/gmxManageMPI.cmake
@@ -161,7 +161,7 @@ if (NOT MPIEXEC_EXECUTABLE)
 
     set(MPIEXEC_EXECUTABLE "$MPIEXEC")
     set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "Flag used by MPI to specify the number of processes for MPIEXEC; the next option will be the number of processes.")
-    set(MPIEXEC_PREFLAGS "" CACHE STRING "These flags will be directly before the executable that is being run by MPIEXEC.")
+    set(MPIEXEC_PREFLAGS "-host;localhost" CACHE STRING "These flags will be directly before the executable that is being run by MPIEXEC.")
     set(MPIEXEC_POSTFLAGS "" CACHE STRING "These flags will come after all flags given to MPIEXEC.")
     set(MPIEXEC_MAX_NUMPROCS "2" CACHE STRING "Maximum number of processors available to run MPI applications.")
     mark_as_advanced(MPIEXEC MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS)