From f85e9b104a7d1d910a8bff98f8e37b9ffbede6ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 25 Oct 2024 12:46:24 +0200 Subject: [PATCH] =?UTF-8?q?gnu:=20prrte:=20Record=20the=20absolute=20file?= =?UTF-8?q?=20name=20of=20=E2=80=98prted=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously a command like: guix shell --pure openmpi@5 openssh intel-mpi-benchmarks \ --with-input=openmpi@4=openmpi@5 slurm -- \ salloc -N2 -- mpirun -np 2 --map-by node IMB-MPI1 PingPong would silently fail due to ‘prted’ not being found in $PATH. * gnu/packages/parallel.scm (prrte)[arguments]: Add ‘patch-prted-reference’ phase. Change-Id: Iff30cb5a4dcc9e9cfe6638d518ee4f19561289a0 Signed-off-by: Andreas Enge --- gnu/packages/parallel.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm index 202a98b2bc67aa0ba0ce0426069298b6324b16f3..85f8a114c35ac9eac385e581a5ed40ea3d16bb40 100644 --- a/gnu/packages/parallel.scm +++ b/gnu/packages/parallel.scm @@ -727,7 +727,15 @@ commonly needed services in distributed and parallel computing systems.") (("_ABSOLUTE") "") (("PRTE_CONFIGURE_CLI") - "\"[elided to reduce closure]\""))))) + "\"[elided to reduce closure]\"")))) + (add-after 'unpack 'patch-prted-reference + (lambda _ + ;; Record the absolute file name of 'prted' instead of + ;; assuming it will be found in $PATH at run time. + (substitute* "src/runtime/prte_mca_params.c" + (("prte_launch_agent =.*") + (string-append "prte_launch_agent = \"" + #$output "/bin/prted\";\n")))))) #:disallowed-references (list (canonical-package gcc)))) (inputs (list libevent