Skip to content

Commit dab75eb

Browse files
djelovinaDenis Jelovina
andauthored
551 fix some script (#92)
* split old and new smoke tests * move alp_cholesky to smoke and enable smoke test * move alp_gemm to smoke and enable smoke test Co-authored-by: Denis Jelovina <denis.jelovina@huawei.com>
1 parent 18deb88 commit dab75eb

File tree

5 files changed

+44
-8
lines changed

5 files changed

+44
-8
lines changed

tests/smoke/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,14 @@ add_grb_executables( small_pagerank ../unit/auto_launcher.cpp
159159
BACKENDS reference reference_omp bsp1d hybrid
160160
)
161161

162+
add_grb_executables( alp_gemm alp_gemm.cpp
163+
BACKENDS alp_reference
164+
)
165+
166+
add_grb_executables( alp_cholesky alp_cholesky.cpp
167+
BACKENDS alp_reference
168+
)
169+
162170
# targets to list and build the test for this category
163171
get_property( smoke_tests_list GLOBAL PROPERTY tests_category_smoke )
164172
add_custom_target( "list_tests_category_smoke"
File renamed without changes.
File renamed without changes.

tests/smoke/smoketests.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ echo "**************************************************************************
3939
echo " FUNCTIONAL PERFORMANCE DESCRIPTION "
4040
echo "----------------------------------------------------------------------------------------"
4141
echo " "
42+
# run non alp_ backends
4243
for BACKEND in ${BACKENDS[@]}; do
44+
if [ "${BACKEND:0:4}" == "alp_" ]; then
45+
continue
46+
fi
47+
4348
if [ "$BACKEND" = "bsp1d" ]; then
4449
if [ -z "${LPFRUN}" ]; then
4550
echo "LPFRUN is not set!"
@@ -505,6 +510,37 @@ for BACKEND in ${BACKENDS[@]}; do
505510
fi
506511
done
507512

513+
for BACKEND in ${BACKENDS[@]}; do
514+
if [ "${BACKEND:0:4}" != "alp_" ]; then
515+
continue
516+
fi
517+
518+
runner=
519+
echo "#################################################################"
520+
echo "# Starting standardised smoke tests for the ${BACKEND} backend"
521+
if [ "x${runner}" != "x" ]; then
522+
echo "# using runner \`\`$runner''"
523+
fi
524+
echo "#################################################################"
525+
echo " "
526+
527+
NTEST_CHOLESKY=30
528+
echo ">>> [x] [ ] Tests Cholesky decomposition for a random"
529+
echo " symmetric matrix (${NTEST_CHOLESKY}x${NTEST_CHOLESKY})."
530+
bash -c "$runner ${TEST_BIN_DIR}/alp_cholesky_${BACKEND} -n ${NTEST_CHOLESKY} &> ${TEST_OUT_DIR}/alp_cholesky_${BACKEND}.log"
531+
head -1 ${TEST_OUT_DIR}/alp_cholesky_${BACKEND}.log
532+
grep 'Test OK' ${TEST_OUT_DIR}/alp_cholesky_${BACKEND}.log || echo "Test FAILED"
533+
echo " "
534+
535+
NTEST_GEMM=100
536+
echo ">>> [x] [ ] Tests Gemm on matrix (${NTEST_GEMM}x${NTEST_GEMM}x${NTEST_GEMM})."
537+
bash -c "$runner ${TEST_BIN_DIR}/alp_gemm_${BACKEND} ${NTEST_GEMM} &> ${TEST_OUT_DIR}/alp_gemm_${BACKEND}.log"
538+
head -1 ${TEST_OUT_DIR}/alp_gemm_${BACKEND}.log
539+
grep 'Test OK' ${TEST_OUT_DIR}/alp_gemm_${BACKEND}.log || echo "Test FAILED"
540+
echo " "
541+
542+
done
543+
508544
echo "*****************************************************************************************"
509545
echo "All smoke tests done."
510546
echo " "

tests/unit/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ add_grb_executables( add15m add15m.cpp
3333
BACKENDS reference NO_BACKEND_NAME
3434
)
3535

36-
add_grb_executables( alp_gemm alp_gemm.cpp
37-
BACKENDS alp_reference
38-
)
39-
40-
add_grb_executables( alp_cholesky alp_cholesky.cpp
41-
BACKENDS alp_reference
42-
)
43-
4436
add_grb_executables( alp_views alp_views.cpp
4537
BACKENDS alp_reference
4638
)

0 commit comments

Comments
 (0)