Skip to content

Commit

Permalink
speed up common spmv2 tests
Browse files Browse the repository at this point in the history
spmv2 uses OpenMP and defaults to number of cores for used threads
per process. This unnecessarily oversubscribes the cores on tests
with 4 processes.
Avoid this by setting OMP_NUM_THREADS to 1 for these tests, resulting
in faster tests.
  • Loading branch information
weidendo committed Jun 1, 2024
1 parent f592dce commit 93f43d7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/common/test-spmv2-4.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
${LAUNCHER-./launcher} -n 4 ../../examples/spmv2 10 3000 | LC_ALL='C' sort > test-spmv2-4.out
OMP_NUM_THREADS=1 ${LAUNCHER-./launcher} -n 4 ../../examples/spmv2 10 3000 | LC_ALL='C' sort > test-spmv2-4.out
cmp test-spmv2-4.out "$(dirname -- "${0}")/test-spmv2-4.expected"
2 changes: 1 addition & 1 deletion tests/common/test-spmv2-shrink-4.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
# test shrinking in spmv2
${LAUNCHER-./launcher} -n 4 ../../examples/spmv2 -s 2 10 3000 | LC_ALL='C' sort > test-spmv2-shrink-4.out
OMP_NUM_THREADS=1 ${LAUNCHER-./launcher} -n 4 ../../examples/spmv2 -s 2 10 3000 | LC_ALL='C' sort > test-spmv2-shrink-4.out
cmp test-spmv2-shrink-4.out "$(dirname -- "${0}")/test-spmv2-4.expected"
2 changes: 1 addition & 1 deletion tests/common/test-spmv2-shrink-inc-4.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
# test shrinking with incremental partitioner
${LAUNCHER-./launcher} -n 4 ../../examples/spmv2 -s 2 -i 10 3000 | LC_ALL='C' sort > test-spmv2-shrink-inc-4.out
OMP_NUM_THREADS=1 ${LAUNCHER-./launcher} -n 4 ../../examples/spmv2 -s 2 -i 10 3000 | LC_ALL='C' sort > test-spmv2-shrink-inc-4.out
cmp test-spmv2-shrink-inc-4.out "$(dirname -- "${0}")/test-spmv2-4.expected"
2 changes: 1 addition & 1 deletion tests/common/test-spmv2r-4.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
${LAUNCHER-./launcher} -n 4 ../../examples/spmv2 -r 10 3000 | LC_ALL='C' sort > test-spmv2r-4.out
OMP_NUM_THREADS=1 ${LAUNCHER-./launcher} -n 4 ../../examples/spmv2 -r 10 3000 | LC_ALL='C' sort > test-spmv2r-4.out
cmp test-spmv2r-4.out "$(dirname -- "${0}")/test-spmv2-4.expected"

0 comments on commit 93f43d7

Please sign in to comment.