Skip to content

Commit

Permalink
add distributed tests again
Browse files Browse the repository at this point in the history
This reverts commit 0dab762.
Additionally replaces the JSON test case output by their description
  • Loading branch information
upsj committed Jul 27, 2023
1 parent 3478acd commit d56b298
Show file tree
Hide file tree
Showing 31 changed files with 938 additions and 160 deletions.
4 changes: 3 additions & 1 deletion benchmark/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@ add_benchmark_test(solver)
add_benchmark_test(sparse_blas)
add_benchmark_test(spmv)
if (GINKGO_BUILD_MPI)
add_benchmark_test(multi_vector_distributed)
add_benchmark_test(spmv_distributed)
add_benchmark_test(solver_distributed)
endif()
endif()
7 changes: 7 additions & 0 deletions benchmark/test/input.distributed_mtx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"size": 100,
"stencil": "7pt",
"comm_pattern": "stencil"
}
]
38 changes: 38 additions & 0 deletions benchmark/test/multi_vector_distributed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env python3
import test_framework

# check that all input modes work:
# parameter
test_framework.compare_output_distributed(
["-input", '[{"n": 100}]'],
expected_stdout="multi_vector_distributed.simple.stdout",
expected_stderr="multi_vector_distributed.simple.stderr",
num_procs=3,
)

# stdin
test_framework.compare_output_distributed(
[],
expected_stdout="multi_vector_distributed.simple.stdout",
expected_stderr="multi_vector_distributed.simple.stderr",
stdin='[{"n": 100}]',
num_procs=3,
)

# file
test_framework.compare_output_distributed(
["-input", str(test_framework.sourcepath / "input.blas.json")],
expected_stdout="multi_vector_distributed.simple.stdout",
expected_stderr="multi_vector_distributed.simple.stderr",
stdin='[{"n": 100}]',
num_procs=3,
)

# profiler annotations
test_framework.compare_output_distributed(
["-input", '[{"n": 100}]', "-profile", "-profiler_hook", "debug"],
expected_stdout="multi_vector_distributed.profile.stdout",
expected_stderr="multi_vector_distributed.profile.stderr",
stdin='[{"n": 100}]',
num_procs=3,
)
6 changes: 1 addition & 5 deletions benchmark/test/reference/blas.profile.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ Running on reference(0)
Running with 0 warm iterations and 1 running iterations
The random seed for right hand sides is 42
The operations are copy,axpy,scal
Running test case
{
"n": 100,
"blas": {}
}
Running test case n = 100
DEBUG: begin n = 100
Running blas: copy
DEBUG: begin copy
Expand Down
6 changes: 1 addition & 5 deletions benchmark/test/reference/blas.simple.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ Running on reference(0)
Running with 2 warm iterations and 10 running iterations
The random seed for right hand sides is 42
The operations are copy,axpy,scal
Running test case
{
"n": 100,
"blas": {}
}
Running test case n = 100
Running blas: copy
Running blas: axpy
Running blas: scal
7 changes: 1 addition & 6 deletions benchmark/test/reference/conversion.all.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ Running on reference(0)
Running with 2 warm iterations and 10 running iterations
The random seed for right hand sides is 42
The formats are coo,csr,ell,sellp,hybrid
Running test case
{
"size": 100,
"stencil": "7pt",
"conversion": {}
}
Running test case stencil(100,7pt)
Matrix is of size (125, 125), 725
Running conversion: coo-read
Running conversion: coo-csr
Expand Down
7 changes: 1 addition & 6 deletions benchmark/test/reference/conversion.profile.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ Running on reference(0)
Running with 0 warm iterations and 1 running iterations
The random seed for right hand sides is 42
The formats are coo,csr
Running test case
{
"size": 100,
"stencil": "7pt",
"conversion": {}
}
Running test case stencil(100,7pt)
Matrix is of size (125, 125), 725
DEBUG: begin stencil(100,7pt)
Running conversion: coo-read
Expand Down
7 changes: 1 addition & 6 deletions benchmark/test/reference/conversion.simple.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ Running on reference(0)
Running with 2 warm iterations and 10 running iterations
The random seed for right hand sides is 42
The formats are coo,csr
Running test case
{
"size": 100,
"stencil": "7pt",
"conversion": {}
}
Running test case stencil(100,7pt)
Matrix is of size (125, 125), 725
Running conversion: coo-read
Running conversion: coo-csr
Expand Down
11 changes: 1 addition & 10 deletions benchmark/test/reference/distributed_solver.profile.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@ Running with 0 warm iterations and 1 running iterations
The random seed for right hand sides is 42
Running cg with 1000 iterations and residual goal of 1.000000e-06
The number of right hand sides is 1
Running test case
{
"size": 100,
"stencil": "7pt",
"comm_pattern": "stencil",
"optimal": {
"spmv": "csr-csr"
},
"solver": {}
}
Running test case stencil(100,7pt,stencil)
DEBUG: begin allocate
DEBUG: end allocate
DEBUG: begin partition::build_ranges_from_global_size
Expand Down
11 changes: 1 addition & 10 deletions benchmark/test/reference/distributed_solver.simple.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ Running with 2 warm iterations and 1 running iterations
The random seed for right hand sides is 42
Running cg with 1000 iterations and residual goal of 1.000000e-06
The number of right hand sides is 1
Running test case
{
"size": 100,
"stencil": "7pt",
"comm_pattern": "stencil",
"optimal": {
"spmv": "csr-csr"
},
"solver": {}
}
Running test case stencil(100,7pt,stencil)
Matrix is of size (125, 125)
Running solver: cg
7 changes: 1 addition & 6 deletions benchmark/test/reference/matrix_statistics.simple.stderr
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
This is Ginkgo 1.7.0 (develop)
running with core module 1.7.0 (develop)
Running test case
{
"size": 100,
"stencil": "7pt",
"problem": {}
}
Running test case stencil(100,7pt)
Matrix is of size (125, 125), 725
Loading

0 comments on commit d56b298

Please sign in to comment.