From c70718d10bc91a27f588a63b14b7bceb292a9ed0 Mon Sep 17 00:00:00 2001 From: Ryan Mulhall <35538242+rem1776@users.noreply.github.com> Date: Wed, 1 Nov 2023 15:05:19 -0400 Subject: [PATCH] fix: allow for arguments within mpi launcher override (#1401) --- test_fms/test-lib.sh.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test_fms/test-lib.sh.in b/test_fms/test-lib.sh.in index b983b48d84..9be57a630a 100644 --- a/test_fms/test-lib.sh.in +++ b/test_fms/test-lib.sh.in @@ -96,8 +96,10 @@ mpirun () { # Set the name of the mpi launcher for use in test scripts. local mpi_launcher='@MPI_LAUNCHER@' local oversubscribe='@OVERSUBSCRIBE@' + # need to strip off any args that may be included with MPI_LAUNCHER arg for check below to work + local mpi_cmd="`echo $mpi_launcher | awk '{print $1;}'`" # Check if running with MPI: if so, the mpi_launcher will point to a command - command -v "$mpi_launcher" 2>&1 > /dev/null + command -v "$mpi_cmd" 2>&1 > /dev/null if test $? -eq 0 then # use `command` to keep from reusing this function