File: git-test-mpi-path

package info (click to toggle)
eztrace 2.0%2Brepack-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,132 kB
  • sloc: ansic: 23,501; perl: 910; sh: 857; cpp: 771; makefile: 696; fortran: 327; f90: 320; python: 57
file content (44 lines) | stat: -rw-r--r-- 1,590 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
commit 60855334120141cc411b0ee50f77b7d29d7453b9
Author: François Trahay <francois.trahay@telecom-sudparis.eu>
Date:   Tue Aug 23 15:30:07 2022 +0200

    testsuite: make mpirun/mpicc configurable

diff --git a/test/mpi/Makefile b/test/mpi/Makefile
index 1ed521b1..9985716e 100644
--- a/test/mpi/Makefile
+++ b/test/mpi/Makefile
@@ -1,4 +1,6 @@
-CC=mpicc
+MPICC_PATH ?= mpicc
+CC=$(MPICC_PATH)
+
 BIN=mpi_ring mpi_multiring mpi_spawn test_mpi waitall waitany persistent mpi_ping allgather
 
 all: $(BIN)
diff --git a/test/mpi/test_mpi_ping.sh b/test/mpi/test_mpi_ping.sh
index f18ba872..140e5188 100755
--- a/test/mpi/test_mpi_ping.sh
+++ b/test/mpi/test_mpi_ping.sh
@@ -6,7 +6,7 @@ name="mpi_ping"
 np="2"
 
 [ -n "$MPI_MODULE_NAME" ] || MPI_MODULE_NAME=mpi
-run_and_check_command mpirun $MPIRUN_CLI_OPTION -np $np "$EZTRACE_PATH" -t $MPI_MODULE_NAME ./$name
+run_and_check_command "$MPIRUN_PATH" $MPIRUN_CLI_OPTION -np $np "$EZTRACE_PATH" -t $MPI_MODULE_NAME ./$name
 
 trace_filename="${name}_trace/eztrace_log.otf2"
 if ! "$OTF2_PRINT_PATH" "$trace_filename" 2>&1 > /dev/null ; then
diff --git a/test/test_utils/test_utils.sh b/test/test_utils/test_utils.sh
index 29df400b..543979fc 100644
--- a/test/test_utils/test_utils.sh
+++ b/test/test_utils/test_utils.sh
@@ -4,6 +4,8 @@
 [ -n "$EZTRACE_PATH" ]       || EZTRACE_PATH=eztrace
 [ -n "$EZTRACE_AVAIL_PATH" ] || EZTRACE_AVAIL_PATH=eztrace_avail
 [ -n "$EZTRACE_CC_PATH" ]    || EZTRACE_CC_PATH=eztrace_cc
+[ -n "$MPIRUN_PATH" ]        || MPIRUN_PATH=mpirun
+[ -n "$MPICC_PATH" ]         || MPICC_PATH=mpicc
 
 
 C_BLACK='\033[0;30m'