From 1f927d1f57a815ef7017ffb669b9065186814c27 Mon Sep 17 00:00:00 2001 From: Mekeal Date: Sun, 12 Jan 2025 15:04:56 -0600 Subject: [PATCH] Updating mympiapp.ctest to use numdiff instead of ndiff -ndiff was recommended for use in the textbook, though wouldn't work correctly on an Arch Linux machine. In particular, the "--relative-error" option wasn't recognized. -Building the included numdiff package and modifying the .ctest file to use it fixed the issue --- Listing1/mympiapp.ctest | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Listing1/mympiapp.ctest b/Listing1/mympiapp.ctest index f945f4e..8cc4b9f 100755 --- a/Listing1/mympiapp.ctest +++ b/Listing1/mympiapp.ctest @@ -7,11 +7,11 @@ mpirun -n 1 ./MPITimeIt > run1.out mpirun -n 2 ./MPITimeIt > run2.out # Compare the output for the two MPI jobs with a tolerance of 1% # Reduce the tolerance to 1.0e-5 to get test to fail -ndiff --relative-error 1.0e-2 run1.out run2.out +numdiff --relative-tolerance 1.0e-2 run1.out run2.out # Capture the status set by the ndiff command test1=$? # Compare the output for the serial job and the 2 processor MPI run with a tolerance of 1% -ndiff --relative-error 1.0e-2 run0.out run2.out +numdiff --relative-tolerance 1.0e-2 run0.out run2.out # Capture the status set by the ndiff command test2=$? # Exit with the cumulative status code so CTest can report pass or fail