From 394f1ab6e8e2c4b1f36c62296e89a799d16156de Mon Sep 17 00:00:00 2001 From: Carl Pearson Date: Fri, 14 Jul 2023 14:40:40 -0600 Subject: [PATCH] Don't write to source tree during build --- perf_test/batched/sparse/CMakeLists.txt | 15 ++++++++++++--- perf_test/batched/sparse/scripts/run_CG.sh | 3 --- perf_test/batched/sparse/scripts/run_CG.sh.in | 1 + perf_test/batched/sparse/scripts/run_GMRES.sh | 3 --- perf_test/batched/sparse/scripts/run_GMRES.sh.in | 1 + perf_test/batched/sparse/scripts/run_SPMV.sh | 3 --- perf_test/batched/sparse/scripts/run_SPMV.sh.in | 1 + 7 files changed, 15 insertions(+), 12 deletions(-) delete mode 100755 perf_test/batched/sparse/scripts/run_CG.sh create mode 100755 perf_test/batched/sparse/scripts/run_CG.sh.in delete mode 100755 perf_test/batched/sparse/scripts/run_GMRES.sh create mode 100755 perf_test/batched/sparse/scripts/run_GMRES.sh.in delete mode 100755 perf_test/batched/sparse/scripts/run_SPMV.sh create mode 100755 perf_test/batched/sparse/scripts/run_SPMV.sh.in diff --git a/perf_test/batched/sparse/CMakeLists.txt b/perf_test/batched/sparse/CMakeLists.txt index 76a25d9938..b4f3c31f31 100644 --- a/perf_test/batched/sparse/CMakeLists.txt +++ b/perf_test/batched/sparse/CMakeLists.txt @@ -3,6 +3,15 @@ ADD_SUBDIRECTORY(cusolver) ADD_SUBDIRECTORY(GMRES) ADD_SUBDIRECTORY(SPMV) -FILE(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/scripts/binary_dir.txt -"${CMAKE_CURRENT_BINARY_DIR}" -) \ No newline at end of file +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/scripts/run_CG.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/scripts/run_CG.sh +) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/scripts/run_GMRES.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/scripts/run_GMRES.sh +) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/scripts/run_SPMV.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/scripts/run_SPMV.sh +) diff --git a/perf_test/batched/sparse/scripts/run_CG.sh b/perf_test/batched/sparse/scripts/run_CG.sh deleted file mode 100755 index fc740b0a77..0000000000 --- a/perf_test/batched/sparse/scripts/run_CG.sh +++ /dev/null @@ -1,3 +0,0 @@ -exe_path=$(head -n 1 "binary_dir.txt") - -${exe_path}/CG/KokkosBatched_Test_CG -A ../data/A.mm -B ../data/B.mm -X ../output/X_CG -timers ../output/timers_CG -n1 10 -n2 100 -team_size -1 -implementation 0 -l -n_iterations 20 -tol 1e-8 -vector_length 8 -N_team 8 \ No newline at end of file diff --git a/perf_test/batched/sparse/scripts/run_CG.sh.in b/perf_test/batched/sparse/scripts/run_CG.sh.in new file mode 100755 index 0000000000..d3b45fc5b6 --- /dev/null +++ b/perf_test/batched/sparse/scripts/run_CG.sh.in @@ -0,0 +1 @@ +@CMAKE_CURRENT_BINARY_DIR@/CG/KokkosBatched_Test_CG -A ../data/A.mm -B ../data/B.mm -X ../output/X_CG -timers ../output/timers_CG -n1 10 -n2 100 -team_size -1 -implementation 0 -l -n_iterations 20 -tol 1e-8 -vector_length 8 -N_team 8 \ No newline at end of file diff --git a/perf_test/batched/sparse/scripts/run_GMRES.sh b/perf_test/batched/sparse/scripts/run_GMRES.sh deleted file mode 100755 index e26ab2aa15..0000000000 --- a/perf_test/batched/sparse/scripts/run_GMRES.sh +++ /dev/null @@ -1,3 +0,0 @@ -exe_path=$(head -n 1 "binary_dir.txt") - -${exe_path}/GMRES/KokkosBatched_Test_GMRES -A ../data/A.mm -B ../data/B.mm -X ../output/X_GMRES -timers ../output/timers_GMRES -n1 10 -n2 100 -team_size -1 -implementation 0 -l -n_iterations 20 -tol 1e-8 -vector_length 8 -N_team 8 \ No newline at end of file diff --git a/perf_test/batched/sparse/scripts/run_GMRES.sh.in b/perf_test/batched/sparse/scripts/run_GMRES.sh.in new file mode 100755 index 0000000000..b2e9e4174f --- /dev/null +++ b/perf_test/batched/sparse/scripts/run_GMRES.sh.in @@ -0,0 +1 @@ +@CMAKE_CURRENT_BINARY_DIR@/GMRES/KokkosBatched_Test_GMRES -A ../data/A.mm -B ../data/B.mm -X ../output/X_GMRES -timers ../output/timers_GMRES -n1 10 -n2 100 -team_size -1 -implementation 0 -l -n_iterations 20 -tol 1e-8 -vector_length 8 -N_team 8 \ No newline at end of file diff --git a/perf_test/batched/sparse/scripts/run_SPMV.sh b/perf_test/batched/sparse/scripts/run_SPMV.sh deleted file mode 100755 index d4edd993aa..0000000000 --- a/perf_test/batched/sparse/scripts/run_SPMV.sh +++ /dev/null @@ -1,3 +0,0 @@ -exe_path=$(head -n 1 "binary_dir.txt") - -${exe_path}/SPMV/KokkosBatched_Test_SPMV -A ../data/A.mm -B ../data/B.mm -X ../output/X_SPMV -timers ../output/timers_SPMV -n1 10 -n2 100 -team_size -1 -implementation 3 -l -vector_length 8 -N_team 8 \ No newline at end of file diff --git a/perf_test/batched/sparse/scripts/run_SPMV.sh.in b/perf_test/batched/sparse/scripts/run_SPMV.sh.in new file mode 100755 index 0000000000..2c9fabe547 --- /dev/null +++ b/perf_test/batched/sparse/scripts/run_SPMV.sh.in @@ -0,0 +1 @@ +@CMAKE_CURRENT_BINARY_DIR@/SPMV/KokkosBatched_Test_SPMV -A ../data/A.mm -B ../data/B.mm -X ../output/X_SPMV -timers ../output/timers_SPMV -n1 10 -n2 100 -team_size -1 -implementation 3 -l -vector_length 8 -N_team 8 \ No newline at end of file