From 273cc5ac8859d299e3aa437e1e1924c2e296d83f Mon Sep 17 00:00:00 2001 From: Paulius Velesko Date: Sat, 7 Mar 2026 10:54:56 +0200 Subject: [PATCH 1/6] Add exit(1) on verification failure across all benchmarks Ensures benchmarks return non-zero exit code when verification fails, allowing automated test harnesses to detect failures via process exit codes. Changes are purely additive (insertions only). Adds `if (condition) exit(1);` after PASS/FAIL output in 838 benchmark files covering all variants (CUDA, HIP, OpenMP, SYCL). Adds `#include ` where needed. Preserves original file encoding (ISO-8859) and line endings (CRLF). --- src/accuracy-cuda/main.cu | 3 +++ src/accuracy-hip/main.cu | 2 ++ src/accuracy-omp/main.cpp | 1 + src/accuracy-sycl/main.cpp | 2 ++ src/ace-cuda/main.cu | 1 + src/ace-hip/main.cu | 1 + src/ace-omp/main.cpp | 1 + src/ace-sycl/main.cpp | 1 + src/adam-cuda/main.cu | 1 + src/adam-hip/main.cu | 1 + src/adam-omp/main.cpp | 1 + src/adam-sycl/main.cpp | 1 + src/adamw-cuda/main.cu | 1 + src/adamw-hip/main.cu | 1 + src/adamw-omp/main.cpp | 1 + src/adamw-sycl/main.cpp | 1 + src/adjacent-cuda/main.cu | 3 +++ src/adjacent-hip/main.cu | 3 +++ src/adjacent-omp/main.cpp | 3 +++ src/adjacent-sycl/main.cpp | 3 +++ src/aidw-cuda/main.cu | 2 ++ src/aidw-hip/main.cu | 2 ++ src/aidw-omp/main.cpp | 2 ++ src/aidw-sycl/main.cpp | 2 ++ src/aligned-types-cuda/main.cu | 1 + src/aligned-types-hip/main.cu | 1 + src/aligned-types-omp/main.cpp | 1 + src/aligned-types-sycl/main.cpp | 1 + src/all-pairs-distance-cuda/main.cu | 3 +++ src/all-pairs-distance-hip/main.cu | 3 +++ src/all-pairs-distance-omp/main.cpp | 2 ++ src/all-pairs-distance-sycl/main.cpp | 3 +++ src/asmooth-cuda/reference.h | 1 + src/asta-cuda/main.cu | 2 ++ src/asta-hip/main.cu | 2 ++ src/asta-omp/main.cpp | 2 ++ src/asta-sycl/main.cpp | 2 ++ src/atomicAggregate-cuda/main.cu | 2 ++ src/atomicAggregate-hip/main.cu | 2 ++ src/atomicAggregate-sycl/main.cpp | 2 ++ src/atomicCAS-cuda/main.cu | 1 + src/atomicCAS-hip/main.cu | 1 + src/atomicCAS-sycl/main.cpp | 1 + src/atomicCost-cuda/main.cu | 1 + src/atomicCost-hip/main.cu | 1 + src/atomicCost-omp/main.cpp | 1 + src/atomicCost-sycl/main.cpp | 1 + src/atomicIntrinsics-cuda/reference.h | 1 + src/atomicPerf-cuda/main.cu | 6 ++++++ src/atomicPerf-hip/main.cu | 6 ++++++ src/atomicPerf-omp/main.cpp | 6 ++++++ src/atomicPerf-sycl/main.cpp | 6 ++++++ src/attention-cuda/main.cu | 1 + src/attention-hip/main.cu | 1 + src/attention-omp/main.cpp | 1 + src/attention-paged-cuda/main.cu | 2 ++ src/attention-paged-hip/main.cu | 2 ++ src/attention-paged-sycl/main.cpp | 2 ++ src/attention-sycl/main.cpp | 1 + src/attentionMultiHead-cuda/main.cu | 1 + src/attentionMultiHead-hip/main.cu | 1 + src/attentionMultiHead-sycl/main.cpp | 1 + src/axpby-cuda/main.cu | 1 + src/axpby-hip/main.cu | 1 + src/axpby-sycl/main.cpp | 1 + src/background-subtract-cuda/main.cu | 1 + src/background-subtract-hip/main.cu | 1 + src/background-subtract-omp/main.cpp | 1 + src/background-subtract-sycl/main.cpp | 1 + src/backprop-cuda/main.cu | 1 + src/backprop-hip/main.cu | 1 + src/backprop-omp/main.cpp | 1 + src/backprop-sycl/main.cpp | 1 + src/bezier-surface-cuda/main.cu | 2 ++ src/bezier-surface-hip/main.cu | 2 ++ src/bezier-surface-omp/main.cpp | 2 ++ src/bezier-surface-sycl/main.cpp | 2 ++ src/bilateral-cuda/main.cu | 1 + src/bilateral-hip/main.cu | 1 + src/bilateral-omp/main.cpp | 1 + src/bilateral-sycl/main.cpp | 1 + src/bitonic-sort-cuda/main.cu | 2 ++ src/bitonic-sort-hip/main.cu | 2 ++ src/bitonic-sort-omp/main.cpp | 2 ++ src/bitonic-sort-sycl/main.cpp | 2 ++ src/bitpacking-cuda/main.cu | 2 ++ src/bitpacking-hip/main.cu | 2 ++ src/bitpacking-sycl/main.cpp | 2 ++ src/bitpermute-cuda/main.cu | 2 ++ src/bitpermute-hip/main.cu | 2 ++ src/bitpermute-sycl/main.cpp | 2 ++ src/blas-dot-cuda/main.cu | 1 + src/blas-dot-hip/main.cu | 1 + src/blas-dot-sycl/main.cpp | 1 + src/blas-gemm-cuda/main.cu | 1 + src/blas-gemm-hip/main.cu | 1 + src/blas-gemm-sycl/main.cpp | 1 + src/blockAccess-cuda/main.cu | 1 + src/blockAccess-hip/main.cu | 1 + src/blockAccess-sycl/main.cpp | 1 + src/blockScan-cuda/main.cu | 3 +++ src/blockScan-hip/main.cu | 3 +++ src/blockScan-sycl/main.cpp | 3 +++ src/blockexchange-cuda/main.cu | 1 + src/blockexchange-hip/main.cu | 1 + src/blockexchange-sycl/main.cpp | 1 + src/boxfilter-cuda/main.cu | 2 ++ src/boxfilter-hip/main.cu | 2 ++ src/boxfilter-omp/main.cpp | 2 ++ src/boxfilter-sycl/main.cpp | 2 ++ src/bscan-cuda/main.cu | 2 ++ src/bscan-hip/main-wave64.cu | 2 ++ src/bscan-hip/main.cu | 2 ++ src/bscan-sycl/main-wave64.cpp | 2 ++ src/bscan-sycl/main.cpp | 2 ++ src/bspline-vgh-cuda/main.cu | 1 + src/bspline-vgh-hip/main.cu | 1 + src/bspline-vgh-omp/main.cpp | 1 + src/bspline-vgh-sycl/main.cpp | 1 + src/burger-cuda/main.cu | 1 + src/burger-hip/main.cu | 1 + src/burger-omp/main.cpp | 1 + src/burger-sycl/main.cpp | 1 + src/bwt-cuda/main.cpp | 1 + src/cbsfil-cuda/main.cu | 1 + src/cbsfil-hip/main.cu | 1 + src/cbsfil-omp/main.cpp | 1 + src/cbsfil-sycl/main.cpp | 1 + src/cc-cuda/main.cu | 1 + src/cc-hip/main.cu | 1 + src/cc-sycl/main.cpp | 1 + src/ccl-cuda/main.cu | 1 + src/ccl-hip/main.cu | 1 + src/ccl-sycl/main.cpp | 1 + src/ccsd-trpdrv-cuda/main.cu | 1 + src/ccsd-trpdrv-omp/main.cpp | 1 + src/ccsd-trpdrv-sycl/main.cpp | 1 + src/chacha20-cuda/main.cu | 1 + src/chacha20-hip/main.cu | 1 + src/chacha20-omp/main.cpp | 1 + src/chacha20-sycl/main.cpp | 1 + src/channelSum-cuda/main.cu | 2 ++ src/channelSum-hip/main.cu | 2 ++ src/channelSum-omp/main.cpp | 2 ++ src/channelSum-sycl/main.cpp | 2 ++ src/chi2-cuda/chi2.cu | 1 + src/chi2-hip/chi2.cu | 1 + src/chi2-omp/chi2.cpp | 1 + src/chi2-sycl/chi2.cpp | 1 + src/clink-cuda/reference.h | 2 ++ src/cmembench-cuda/main.cu | 1 + src/cmembench-hip/main.cu | 1 + src/columnarSolver-cuda/main.cu | 1 + src/columnarSolver-hip/main.cu | 1 + src/columnarSolver-omp/main.cpp | 1 + src/columnarSolver-sycl/main.cpp | 1 + src/complex-cuda/main.cu | 1 + src/complex-hip/main.cu | 1 + src/complex-omp/main.cpp | 1 + src/complex-sycl/main.cpp | 1 + src/concat-cuda/main.cu | 1 + src/concat-hip/main.cu | 1 + src/concat-omp/main.cpp | 1 + src/concat-sycl/main.cpp | 1 + src/concurrentKernels-cuda/main.cu | 1 + src/concurrentKernels-hip/main.cu | 1 + src/concurrentKernels-sycl/main.cpp | 1 + src/convolution1D-cuda/main.cu | 1 + src/convolution1D-hip/main.cu | 1 + src/convolution1D-omp/main.cpp | 1 + src/convolution1D-sycl/main.cpp | 1 + src/convolution3D-cuda/main.cu | 1 + src/convolution3D-hip/main.cu | 1 + src/convolution3D-omp/main.cpp | 1 + src/convolution3D-sycl/main.cpp | 1 + src/convolutionSeparable-cuda/main.cu | 1 + src/convolutionSeparable-hip/main.cu | 1 + src/convolutionSeparable-omp/main.cpp | 1 + src/convolutionSeparable-sycl/main.cpp | 1 + src/cooling-cuda/main.cu | 1 + src/cooling-hip/main.cu | 1 + src/cooling-omp/main.cpp | 1 + src/cooling-sycl/main.cpp | 1 + src/coordinates-cuda/main.cu | 1 + src/coordinates-hip/main.cu | 1 + src/coordinates-sycl/main.cpp | 1 + src/cross-cuda/main.cu | 1 + src/cross-hip/main.cu | 1 + src/cross-omp/main.cpp | 1 + src/cross-sycl/main.cpp | 1 + src/crossEntropy-cuda/main.cu | 3 +++ src/crossEntropy-hip/main.cu | 3 +++ src/crossEntropy-sycl/main.cpp | 3 +++ src/damage-cuda/reference.h | 2 ++ src/dct8x8-cuda/main.cu | 1 + src/dct8x8-hip/main.cu | 1 + src/dct8x8-omp/main.cpp | 1 + src/dct8x8-sycl/main.cpp | 1 + src/degrid-cuda/main.cu | 1 + src/degrid-hip/main.cu | 1 + src/degrid-omp/main.cpp | 1 + src/degrid-sycl/main.cpp | 1 + src/dense-embedding-cuda/main.cu | 1 + src/dense-embedding-hip/main.cu | 1 + src/dense-embedding-omp/main.cpp | 1 + src/dense-embedding-sycl/main.cpp | 1 + src/dp-cuda/main.cu | 3 +++ src/dp-hip/main.cu | 3 +++ src/dp-omp/main.cpp | 1 + src/dp-sycl/main.cpp | 3 +++ src/dp4a-cuda/main.cu | 2 ++ src/dp4a-hip/main.cu | 2 ++ src/dp4a-sycl/main.cpp | 2 ++ src/dxtc2-cuda/main.cu | 1 + src/dxtc2-hip/main.cu | 1 + src/dxtc2-omp/main.cpp | 1 + src/dxtc2-sycl/main.cpp | 1 + src/ecdh-cuda/main.cu | 1 + src/ecdh-hip/main.cu | 1 + src/ecdh-omp/main.cpp | 1 + src/ecdh-sycl/main.cpp | 1 + src/eigenvalue-cuda/main.cu | 1 + src/eigenvalue-hip/main.cu | 1 + src/eigenvalue-omp/main.cpp | 1 + src/eigenvalue-sycl/main.cpp | 1 + src/entropy-cuda/main.cu | 1 + src/entropy-hip/main.cu | 1 + src/entropy-omp/main.cpp | 1 + src/entropy-sycl/main.cpp | 1 + src/epistasis-cuda/main.cu | 2 ++ src/epistasis-hip/main.cu | 2 ++ src/epistasis-omp/main.cpp | 2 ++ src/epistasis-sycl/main.cpp | 2 ++ src/f16max-cuda/main.cu | 2 ++ src/f16max-hip/main.cu | 2 ++ src/f16max-sycl/main.cpp | 2 ++ src/f8cast-cuda/main.cu | 2 ++ src/f8cast-hip/main.cu | 2 ++ src/f8cast-sycl/main.cpp | 2 ++ src/fdtd3d-cuda/main.cu | 2 ++ src/fdtd3d-hip/main.cu | 2 ++ src/fdtd3d-omp/main.cpp | 2 ++ src/fdtd3d-sycl/main.cpp | 2 ++ src/fft-cuda/main.cu | 2 ++ src/fft-hip/main.cu | 2 ++ src/fft-omp/main.cpp | 2 ++ src/fft-sycl/main.cpp | 2 ++ src/filter-cuda/main.cu | 2 ++ src/filter-hip/main.cu | 2 ++ src/filter-omp/main.cpp | 1 + src/filter-sycl/main.cpp | 2 ++ src/flip-cuda/main.cu | 1 + src/flip-hip/main.cu | 1 + src/flip-omp/main.cpp | 1 + src/flip-sycl/main.cpp | 1 + src/floydwarshall-cuda/main.cu | 1 + src/floydwarshall-hip/main.cu | 1 + src/floydwarshall-omp/main.cpp | 1 + src/floydwarshall-sycl/main.cpp | 1 + src/fluidSim-cuda/reference.h | 1 + src/fma-cuda/main.cu | 1 + src/fma-hip/main.cu | 1 + src/fma-sycl/main.cpp | 1 + src/fpc-cuda/main.cu | 1 + src/fpc-hip/main.cu | 1 + src/fpc-omp/main.cpp | 1 + src/fpc-sycl/main.cpp | 1 + src/fresnel-cuda/main.cu | 1 + src/fresnel-hip/main.cu | 1 + src/fresnel-omp/main.cpp | 1 + src/fresnel-sycl/main.cpp | 1 + src/fsm-cuda/main.cu | 1 + src/fsm-hip/main.cu | 1 + src/fsm-sycl/main.cpp | 1 + src/fwt-cuda/main.cu | 1 + src/fwt-hip/main.cu | 1 + src/fwt-omp/main.cpp | 1 + src/fwt-sycl/main.cpp | 1 + src/ga-cuda/main.cu | 1 + src/ga-hip/main.cu | 1 + src/ga-omp/main.cpp | 1 + src/ga-sycl/main.cpp | 1 + src/gabor-cuda/main.cu | 1 + src/gabor-hip/main.cu | 1 + src/gabor-omp/main.cpp | 1 + src/gabor-sycl/main.cpp | 1 + src/gamma-correction-cuda/main.cu | 2 ++ src/gamma-correction-hip/main.cu | 2 ++ src/gamma-correction-omp/main.cpp | 2 ++ src/gamma-correction-sycl/main.cpp | 2 ++ src/gaussian-cuda/gaussianElim.cu | 2 ++ src/gaussian-hip/gaussianElim.cu | 2 ++ src/gaussian-omp/gaussianElim.cpp | 2 ++ src/gaussian-sycl/gaussianElim.cpp | 2 ++ src/gc-cuda/main.cu | 1 + src/gc-hip/main.cu | 1 + src/gc-omp/main.cpp | 1 + src/gc-sycl/main.cpp | 1 + src/gd-cuda/reference.h | 2 ++ src/ge-spmm-cuda/main.cu | 1 + src/ge-spmm-hip/main.cu | 1 + src/ge-spmm-sycl/main.cpp | 1 + src/geam-cuda/main.cu | 2 ++ src/geam-hip/main.cu | 2 ++ src/geam-sycl/main.cpp | 1 + src/geglu-cuda/main.cu | 1 + src/geglu-hip/main.cu | 1 + src/geglu-omp/main.cpp | 1 + src/geglu-sycl/main.cpp | 1 + src/gelu-cuda/main.cu | 2 ++ src/gelu-hip/main.cu | 2 ++ src/gelu-sycl/main.cpp | 2 ++ src/glu-cuda/main.cu | 1 + src/glu-hip/main.cu | 1 + src/glu-omp/main.cpp | 1 + src/glu-sycl/main.cpp | 1 + src/goulash-cuda/main.cu | 1 + src/goulash-hip/main.cu | 1 + src/goulash-omp/main.cpp | 1 + src/goulash-sycl/main.cpp | 1 + src/haccmk-cuda/haccmk.cu | 1 + src/haccmk-hip/haccmk.cu | 1 + src/haccmk-omp/haccmk.cpp | 1 + src/haccmk-sycl/haccmk.cpp | 1 + src/hadamard-cuda/main.cu | 1 + src/hadamard-hip/main.cu | 1 + src/hadamard-sycl/main.cpp | 1 + src/hausdorff-cuda/main.cu | 1 + src/hausdorff-hip/main.cu | 1 + src/hausdorff-omp/main.cpp | 1 + src/hausdorff-sycl/main.cpp | 1 + src/heat2d-cuda/main.cu | 1 + src/heat2d-hip/main.cu | 1 + src/heat2d-omp/main.cpp | 1 + src/heat2d-sycl/main.cpp | 1 + src/hellinger-cuda/verify.h | 2 ++ src/histogram-cuda/histogram_compare.cu | 2 ++ src/histogram-hip/histogram_compare.cu | 2 ++ src/histogram-omp/histogram_compare_base.cpp | 2 ++ src/histogram-sycl/histogram_compare_base.cpp | 2 ++ src/hogbom-cuda/main.cpp | 2 ++ src/hwt1d-cuda/main.cu | 2 ++ src/hwt1d-hip/main.cu | 2 ++ src/hwt1d-omp/main.cpp | 2 ++ src/hwt1d-sycl/main.cpp | 2 ++ src/hybridsort-cuda/hybridsort.cu | 1 + src/hybridsort-hip/hybridsort.cu | 1 + src/hybridsort-omp/hybridsort.c | 1 + src/hybridsort-sycl/hybridsort.c | 1 + src/interval-cuda/main.cu | 2 ++ src/interval-hip/main.cu | 2 ++ src/interval-omp/main.cpp | 2 ++ src/interval-sycl/main.cpp | 2 ++ src/inversek2j-cuda/main.cu | 1 + src/inversek2j-hip/main.cu | 1 + src/inversek2j-omp/main.cpp | 1 + src/inversek2j-sycl/main.cpp | 1 + src/is-cuda/main.cu | 1 + src/is-hip/main.cu | 1 + src/is-sycl/main.cpp | 1 + src/ising-cuda/main.cu | 2 ++ src/ising-hip/main.cu | 2 ++ src/ising-omp/main.cpp | 2 ++ src/ising-sycl/main.cpp | 2 ++ src/iso2dfd-cuda/iso2dfd.cu | 2 ++ src/iso2dfd-hip/iso2dfd.cu | 2 ++ src/iso2dfd-omp/iso2dfd.cpp | 2 ++ src/iso2dfd-sycl/iso2dfd.cpp | 2 ++ src/jaccard-cuda/main.cu | 2 ++ src/jaccard-hip/main.cu | 2 ++ src/jaccard-sycl/main.cpp | 2 ++ src/jacobi-cuda/main.cu | 2 ++ src/jacobi-hip/main.cu | 2 ++ src/jacobi-omp/main.cpp | 2 ++ src/jacobi-sycl/main.cpp | 2 ++ src/jenkins-hash-cuda/main.cu | 1 + src/jenkins-hash-hip/main.cu | 1 + src/jenkins-hash-omp/main.cpp | 1 + src/jenkins-hash-sycl/main.cpp | 1 + src/kalman-cuda/reference.h | 1 + src/keccaktreehash-cuda/Test.cu | 1 + src/keccaktreehash-hip/Test.cu | 1 + src/keccaktreehash-omp/Test.cpp | 1 + src/keccaktreehash-sycl/Test.cpp | 1 + src/keogh-cuda/main.cu | 1 + src/keogh-hip/main.cu | 1 + src/keogh-omp/main.cpp | 1 + src/keogh-sycl/main.cpp | 1 + src/knn-cuda/main.cu | 1 + src/knn-hip/main.cu | 1 + src/knn-omp/main.cpp | 1 + src/knn-sycl/main.cpp | 1 + src/laplace-cuda/main.cu | 1 + src/laplace-hip/main.cu | 1 + src/laplace-omp/main.cpp | 1 + src/laplace-sycl/main.cpp | 1 + src/laplace3d-cuda/main.cu | 1 + src/laplace3d-hip/main.cu | 1 + src/laplace3d-omp/main.cpp | 1 + src/laplace3d-sycl/main.cpp | 1 + src/layout-cuda/main.cu | 2 ++ src/layout-hip/main.cu | 2 ++ src/layout-omp/main.cpp | 2 ++ src/layout-sycl/main.cpp | 2 ++ src/lebesgue-cuda/main.cpp | 9 +++++++++ src/lebesgue-sycl/main.cpp | 9 +++++++++ src/lfib4-cuda/main.cu | 2 ++ src/lfib4-hip/main.cu | 2 ++ src/lfib4-sycl/main.cpp | 1 + src/libor-cuda/main.cu | 1 + src/libor-hip/main.cu | 1 + src/libor-sycl/main.cpp | 1 + src/lif-cuda/main.cu | 1 + src/lif-hip/main.cu | 1 + src/lif-omp/main.cpp | 1 + src/lif-sycl/main.cpp | 1 + src/linearprobing-cuda/main.cu | 2 ++ src/linearprobing-hip/main.cu | 2 ++ src/linearprobing-omp/main.cpp | 2 ++ src/linearprobing-sycl/main.cpp | 2 ++ src/logprob-cuda/main.cu | 1 + src/logprob-hip/main.cu | 1 + src/logprob-sycl/main.cpp | 1 + src/lombscargle-cuda/main.cu | 1 + src/lombscargle-hip/main.cu | 1 + src/lombscargle-omp/main.cpp | 1 + src/lombscargle-sycl/main.cpp | 1 + src/marchingCubes-cuda/main.cu | 2 ++ src/marchingCubes-hip/main.cu | 2 ++ src/marchingCubes-sycl/main.cpp | 2 ++ src/mask-cuda/main.cu | 1 + src/mask-hip/main.cu | 1 + src/mask-omp/main.cpp | 1 + src/mask-sycl/main.cpp | 1 + src/matern-cuda/main.cu | 1 + src/matern-hip/main.cu | 1 + src/matern-omp/main.cpp | 1 + src/matern-sycl/main.cpp | 1 + src/matrix-rotate-cuda/main.cu | 1 + src/matrix-rotate-hip/main.cu | 1 + src/matrix-rotate-omp/main.cpp | 1 + src/matrix-rotate-sycl/main.cpp | 1 + src/matrixT-cuda/main.cu | 1 + src/matrixT-hip/main.cu | 1 + src/matrixT-sycl/main.cpp | 1 + src/maxpool3d-cuda/main.cu | 1 + src/maxpool3d-hip/main.cu | 1 + src/maxpool3d-omp/main.cpp | 1 + src/maxpool3d-sycl/main.cpp | 1 + src/mcpr-cuda/reference.h | 1 + src/md5hash-cuda/MD5Hash.cu | 2 ++ src/md5hash-hip/MD5Hash.cu | 2 ++ src/md5hash-omp/MD5Hash.cpp | 1 + src/md5hash-sycl/MD5Hash.cpp | 1 + src/mdh-cuda/main.cu | 1 + src/mdh-hip/main.cu | 1 + src/mdh-omp/main.cpp | 1 + src/mdh-sycl/main.cpp | 1 + src/meanshift-cuda/main.cu | 3 +++ src/meanshift-hip/main.cu | 3 +++ src/meanshift-omp/main.cpp | 3 +++ src/meanshift-sycl/main.cpp | 3 +++ src/medianfilter-cuda/main.cu | 2 ++ src/medianfilter-hip/main.cu | 2 ++ src/medianfilter-omp/main.cpp | 2 ++ src/medianfilter-sycl/main.cpp | 2 ++ src/merge-cuda/main.cu | 1 + src/merge-hip/main.cu | 1 + src/merge-omp/main.cpp | 1 + src/merge-sycl/main.cpp | 1 + src/miniWeather-cuda/main.cu | 1 + src/miniWeather-hip/main.cu | 1 + src/miniWeather-omp/main.cpp | 1 + src/miniWeather-sycl/main.cpp | 1 + src/minisweep-cuda/main.cu | 1 + src/minisweep-hip/main.cu | 1 + src/minisweep-omp/main.cpp | 1 + src/minisweep-sycl/main.cpp | 1 + src/minkowski-cuda/verify.cpp | 1 + src/minmax-cuda/main.cu | 2 ++ src/minmax-sycl/main.cpp | 2 ++ src/mixbench-cuda/main.cu | 1 + src/mixbench-hip/main.cu | 1 + src/mixbench-omp/main.cpp | 1 + src/mixbench-sycl/main.cpp | 1 + src/moe-align-cuda/main.cu | 1 + src/moe-align-hip/main.cu | 1 + src/moe-align-sycl/main.cpp | 1 + src/moe-cuda/main.cu | 1 + src/moe-hip/main.cu | 1 + src/moe-sum-cuda/main.cu | 1 + src/moe-sum-hip/main.cu | 1 + src/moe-sum-sycl/main.cpp | 1 + src/moe-sycl/main.cpp | 1 + src/morphology-cuda/main.cu | 2 ++ src/morphology-hip/main.cu | 2 ++ src/morphology-omp/main.cpp | 2 ++ src/morphology-sycl/main.cpp | 2 ++ src/mr-cuda/main.cu | 1 + src/mr-hip/main.cu | 1 + src/mr-omp/main.cpp | 1 + src/mr-sycl/main.cpp | 1 + src/mrc-cuda/main.cu | 1 + src/mrc-hip/main.cu | 1 + src/mrc-omp/main.cpp | 1 + src/mrc-sycl/main.cpp | 1 + src/mrg32k3a-cuda/main.cu | 2 ++ src/mrg32k3a-hip/main.cu | 2 ++ src/mrg32k3a-sycl/main.cpp | 2 ++ src/mt-cuda/MT.cu | 2 ++ src/mt-hip/MT.cu | 2 ++ src/mt-omp/MT.cpp | 2 ++ src/mt-sycl/MT.cpp | 2 ++ src/mtf-sycl/main.cpp | 1 + src/multinomial-cuda/main.cu | 1 + src/multinomial-hip/main.cu | 1 + src/multinomial-sycl/main.cpp | 1 + src/murmurhash3-cuda/murmurhash3.cu | 1 + src/murmurhash3-hip/murmurhash3.cu | 1 + src/murmurhash3-omp/murmurhash3.cpp | 1 + src/murmurhash3-sycl/murmurhash3.cpp | 1 + src/mxfp4-cuda/verify.h | 1 + src/nlll-cuda/main.cu | 1 + src/nlll-hip/main.cu | 1 + src/nlll-omp/main.cpp | 1 + src/nlll-sycl/main.cpp | 1 + src/nonzero-cuda/main.cu | 1 + src/nonzero-hip/main.cu | 1 + src/nonzero-sycl/main.cpp | 1 + src/norm2-cuda/main.cu | 1 + src/norm2-hip/main.cu | 1 + src/norm2-omp/main.cpp | 1 + src/norm2-sycl/main.cpp | 1 + src/nosync-cuda/main.cu | 2 ++ src/nosync-hip/main.cu | 2 ++ src/nosync-sycl/main.cpp | 2 ++ src/nqueen-cuda/main.cu | 1 + src/nqueen-hip/main.cu | 1 + src/nqueen-omp/main.cpp | 1 + src/nqueen-sycl/main.cpp | 1 + src/nw-cuda/nw.cu | 1 + src/nw-hip/nw.cu | 1 + src/nw-omp/nw.cpp | 1 + src/nw-sycl/nw.cpp | 1 + src/openmp-cuda/main.cu | 1 + src/openmp-hip/main.cu | 1 + src/openmp-omp/main.cpp | 1 + src/openmp-sycl/main.cpp | 1 + src/overlap-cuda/main.cu | 1 + src/overlap-hip/main.cu | 1 + src/overlap-sycl/main.cpp | 1 + src/overlay-cuda/main.cu | 1 + src/overlay-hip/main.cu | 1 + src/overlay-omp/main.cpp | 1 + src/overlay-sycl/main.cpp | 1 + src/p4-cuda/reference.h | 2 ++ src/page-rank-cuda/main.cu | 1 + src/page-rank-hip/main.cu | 1 + src/page-rank-omp/main.cpp | 1 + src/page-rank-sycl/main.cpp | 1 + src/particle-diffusion-cuda/motionsim.cu | 1 + src/particle-diffusion-hip/motionsim.cu | 1 + src/particle-diffusion-omp/motionsim.cpp | 1 + src/particle-diffusion-sycl/motionsim.cpp | 1 + src/perplexity-cuda/main.cu | 1 + src/perplexity-hip/main.cu | 1 + src/perplexity-omp/main.cpp | 1 + src/perplexity-sycl/main.cpp | 1 + src/pnpoly-cuda/main.cu | 1 + src/pnpoly-hip/main.cu | 1 + src/pnpoly-omp/main.cpp | 1 + src/pnpoly-sycl/main.cpp | 1 + src/pool-cuda/main.cu | 2 ++ src/pool-hip/main.cu | 2 ++ src/pool-omp/main.cpp | 2 ++ src/pool-sycl/main.cpp | 2 ++ src/prefetch-cuda/main.cu | 3 +++ src/prefetch-hip/main.cu | 3 +++ src/prefetch-sycl/main.cpp | 3 +++ src/present-cuda/main.cu | 1 + src/present-hip/main.cu | 1 + src/present-omp/main.cpp | 1 + src/present-sycl/main.cpp | 1 + src/projectile-cuda/Projectile.cu | 1 + src/projectile-hip/Projectile.cu | 1 + src/projectile-omp/Projectile.cpp | 1 + src/projectile-sycl/Projectile.cpp | 1 + src/pso-cuda/main.cpp | 2 ++ src/qem-cuda/main.cu | 3 +++ src/qem-hip/main.cu | 3 +++ src/qem-sycl/main.cpp | 3 +++ src/qrg-cuda/main.cu | 1 + src/qrg-hip/main.cu | 1 + src/qrg-omp/main.cpp | 1 + src/qrg-sycl/main.cpp | 1 + src/quant3MatMul-cuda/main.cu | 2 ++ src/quant3MatMul-hip/main.cu | 2 ++ src/quant3MatMul-sycl/main.cpp | 2 ++ src/quantBnB-cuda/main.cu | 1 + src/quantBnB-hip/main.cu | 1 + src/quantBnB-omp/main.cpp | 1 + src/quantBnB-sycl/main.cpp | 1 + src/quantVLLM-cuda/main.cu | 2 ++ src/quantVLLM-hip/main.cu | 2 ++ src/quantVLLM-sycl/main.cpp | 2 ++ src/radixsort-cuda/main.cu | 2 ++ src/radixsort-hip/main.cu | 2 ++ src/radixsort-omp/main.cpp | 2 ++ src/radixsort-sycl/main.cpp | 2 ++ src/radixsort2-cuda/main.cu | 2 ++ src/radixsort2-hip/main.cu | 2 ++ src/radixsort2-sycl/main.cpp | 2 ++ src/rainflow-cuda/main.cu | 1 + src/rainflow-hip/main.cu | 1 + src/rainflow-omp/main.cpp | 1 + src/rainflow-sycl/main.cpp | 1 + src/randomAccess-cuda/main.cu | 1 + src/randomAccess-hip/main.cu | 1 + src/randomAccess-omp/main.cpp | 1 + src/randomAccess-sycl/main.cpp | 1 + src/relu-cuda/main.cu | 4 ++++ src/relu-hip/main.cu | 4 ++++ src/relu-sycl/main.cpp | 4 ++++ src/reverse-cuda/main.cu | 1 + src/reverse-hip/main.cu | 1 + src/reverse-omp/main.cpp | 1 + src/reverse-sycl/main.cpp | 1 + src/rfs-cuda/main.cu | 2 ++ src/rfs-hip/main.cu | 2 ++ src/rfs-omp/main.cpp | 2 ++ src/rfs-sycl/main.cpp | 2 ++ src/ring-cuda/main.cu | 2 ++ src/ring-hip/main.cu | 2 ++ src/ring-sycl/main.cpp | 2 ++ src/rle-cuda/main.cu | 4 ++++ src/rle-hip/main.cu | 4 ++++ src/rng-wallace-cuda/main.cu | 1 + src/rng-wallace-hip/main.cu | 1 + src/rng-wallace-omp/main.cpp | 1 + src/rng-wallace-sycl/main.cpp | 1 + src/romberg-cuda/main.cu | 1 + src/romberg-hip/main.cu | 1 + src/romberg-omp/main.cpp | 1 + src/romberg-sycl/main.cpp | 1 + src/rotary-cuda/main.cu | 2 ++ src/rotary-hip/main.cu | 2 ++ src/rotary-sycl/main.cpp | 2 ++ src/rtm8-cuda/rtm8.cu | 1 + src/rtm8-hip/rtm8.cu | 1 + src/rtm8-omp/rtm8.cpp | 1 + src/rtm8-sycl/rtm8.cpp | 1 + src/s8n-cuda/main.cu | 1 + src/s8n-hip/main.cu | 1 + src/s8n-omp/main.cpp | 1 + src/s8n-sycl/main.cpp | 1 + src/scan-cuda/main.cu | 1 + src/scan-hip/main.cu | 1 + src/scan-omp/main.cpp | 1 + src/scan-sycl/main.cpp | 1 + src/scan2-cuda/main.cu | 2 ++ src/scan2-hip/main.cu | 2 ++ src/scan2-omp/main.cpp | 2 ++ src/scan2-sycl/main.cpp | 2 ++ src/scan3-cuda/main.cu | 3 +++ src/scan3-hip/main.cu | 3 +++ src/scan3-sycl/main.cpp | 2 ++ src/scatter-cuda/main.cu | 1 + src/scatter-hip/main.cu | 1 + src/scatter-sycl/main.cpp | 1 + src/scatterAdd-cuda/main.cu | 1 + src/scatterAdd-hip/main.cu | 1 + src/scatterAdd-omp/main.cpp | 1 + src/scatterAdd-sycl/main.cpp | 1 + src/scatterThrust-cuda/main.cu | 1 + src/scatterThrust-hip/main.cu | 1 + src/scatterThrust-sycl/main.cpp | 1 + src/scel-cuda/main.cu | 1 + src/scel-hip/main.cu | 1 + src/scel-omp/main.cpp | 1 + src/scel-sycl/main.cpp | 1 + src/score-cuda/main.cu | 1 + src/score-hip/main.cu | 1 + src/score-sycl/main.cpp | 1 + src/secp256k1-cuda/main.cu | 2 ++ src/secp256k1-hip/main.cu | 2 ++ src/secp256k1-omp/main.cpp | 1 + src/secp256k1-sycl/main.cpp | 2 ++ src/shuffle-cuda/main.cu | 2 ++ src/shuffle-hip/main.cu | 2 ++ src/shuffle-sycl/main.cpp | 2 ++ src/slit-cuda/main.cu | 1 + src/slit-hip/main.cu | 1 + src/slit-sycl/main.cpp | 1 + src/snake-cuda/main.cu | 1 + src/snake-hip/main.cu | 1 + src/snake-omp/main.cpp | 1 + src/snake-sycl/main.cpp | 1 + src/sobel-cuda/main.cu | 2 ++ src/sobel-hip/main.cu | 2 ++ src/sobel-omp/main.cpp | 2 ++ src/sobel-sycl/main.cpp | 2 ++ src/sobol-cuda/sobol.cu | 2 ++ src/sobol-hip/sobol.cu | 2 ++ src/sobol-omp/sobol.cpp | 2 ++ src/sobol-sycl/sobol.cpp | 2 ++ src/softmax-cuda/main.cu | 1 + src/softmax-fused-cuda/main.cu | 1 + src/softmax-fused-hip/main.cu | 1 + src/softmax-fused-sycl/main.cpp | 1 + src/softmax-hip/main.cu | 1 + src/softmax-omp/main.cpp | 1 + src/softmax-sycl/main.cpp | 1 + src/sort-cuda/main.cu | 1 + src/sort-hip/main.cu | 1 + src/sort-omp/main.cpp | 1 + src/sort-sycl/main.cpp | 1 + src/sortKV-cuda/main.cu | 2 ++ src/sortKV-hip/main.cu | 2 ++ src/sortKV-sycl/main.cpp | 2 ++ src/sosfil-cuda/main.cu | 1 + src/sosfil-hip/main.cu | 1 + src/sosfil-omp/main.cpp | 1 + src/sosfil-sycl/main.cpp | 1 + src/split-cuda/main.cu | 1 + src/split-hip/main.cu | 1 + src/split-omp/main.cpp | 1 + src/split-sycl/main.cpp | 1 + src/sptrsv-cuda/sptrsv_syncfree.cu | 2 ++ src/sptrsv-hip/sptrsv_syncfree.cu | 2 ++ src/sptrsv-omp/sptrsv_syncfree.cpp | 2 ++ src/sptrsv-sycl/sptrsv_syncfree.cpp | 2 ++ src/sssp-cuda/main.cu | 2 ++ src/sssp-hip/main.cu | 2 ++ src/sssp-sycl/main.cpp | 2 ++ src/stddev-cuda/main.cu | 1 + src/stddev-hip/main.cu | 1 + src/stddev-omp/main.cpp | 1 + src/stddev-sycl/main.cpp | 1 + src/stencil1d-cuda/stencil_1d.cu | 1 + src/stencil1d-hip/stencil_1d.cu | 1 + src/stencil1d-omp/stencil_1d.cpp | 1 + src/stencil1d-sycl/stencil_1d.cpp | 1 + src/storeKVCache-cuda/main.cu | 2 ++ src/storeKVCache-hip/main.cu | 2 ++ src/storeKVCache-omp/main.cpp | 2 ++ src/storeKVCache-sycl/main.cpp | 2 ++ src/streamUM-cuda/reference.h | 1 + src/surfel-cuda/main.cu | 1 + src/surfel-hip/main.cu | 1 + src/surfel-omp/main.cpp | 1 + src/surfel-sycl/main.cpp | 1 + src/svd3x3-cuda/main.cu | 1 + src/svd3x3-hip/main.cu | 1 + src/svd3x3-omp/main.cpp | 1 + src/svd3x3-sycl/main.cpp | 1 + src/tensorAccessor-cuda/main.cu | 1 + src/tensorAccessor-hip/main.cu | 1 + src/tensorAccessor-sycl/main.cpp | 1 + src/tensorT-cuda/main.cu | 1 + src/tensorT-hip/main.cu | 1 + src/tensorT-omp/main.cpp | 1 + src/tensorT-sycl/main.cpp | 1 + src/threadcpy-cuda/main.cu | 2 ++ src/threadcpy-hip/main.cu | 2 ++ src/threadcpy-omp/main.cpp | 2 ++ src/threadcpy-sycl/main.cpp | 2 ++ src/threadfence-cuda/main.cu | 1 + src/threadfence-hip/main.cu | 1 + src/threadfence-omp/main.cpp | 1 + src/threadfence-sycl/main.cpp | 1 + src/tissue-cuda/main.cu | 1 + src/tissue-hip/main.cu | 1 + src/tissue-omp/main.cpp | 1 + src/tissue-sycl/main.cpp | 1 + src/topk-cuda/main.cu | 2 ++ src/topk-hip/main.cu | 2 ++ src/topk-sycl/main.cpp | 2 ++ src/triad-cuda/triad.cu | 2 ++ src/triad-hip/triad.cu | 2 ++ src/triad-omp/triad.cpp | 1 + src/triad-sycl/triad.cpp | 2 ++ src/triad-sycl/triad2.cpp | 1 + src/tsa-cuda/main.cu | 2 ++ src/tsa-hip/main.cu | 2 ++ src/tsa-omp/main.cpp | 2 ++ src/tsa-sycl/main.cpp | 2 ++ src/tsp-cuda/main.cu | 1 + src/tsp-hip/main.cu | 1 + src/tsp-omp/main.cpp | 1 + src/tsp-sycl/main.cpp | 1 + src/unfold-cuda/main.cu | 1 + src/unfold-hip/main.cu | 1 + src/unfold-sycl/main.cpp | 1 + src/urng-cuda/main.cu | 1 + src/urng-hip/main.cu | 1 + src/urng-omp/main.cpp | 1 + src/urng-sycl/main.cpp | 1 + src/vanGenuchten-cuda/main.cu | 1 + src/vanGenuchten-hip/main.cu | 1 + src/vanGenuchten-omp/main.cpp | 1 + src/vanGenuchten-sycl/main.cpp | 1 + src/vol2col-cuda/main.cu | 2 ++ src/vol2col-hip/main.cu | 2 ++ src/vol2col-omp/main.cpp | 2 ++ src/vol2col-sycl/main.cpp | 2 ++ src/warpexchange-cuda/main.cu | 1 + src/warpexchange-hip/main.cu | 1 + src/warpexchange-sycl/main.cpp | 1 + src/warpsort-cuda/main.cpp | 4 ++++ src/warpsort-hip/main.cpp | 4 ++++ src/warpsort-sycl/main.cpp | 4 ++++ src/wedford-cuda/main.cu | 1 + src/wedford-hip/main.cu | 1 + src/wedford-omp/main.cpp | 1 + src/wedford-sycl/main.cpp | 1 + src/winograd-cuda/main.cu | 2 ++ src/winograd-hip/main.cu | 2 ++ src/winograd-omp/main.cpp | 2 ++ src/winograd-sycl/main.cpp | 2 ++ src/wmma-cuda/reference.h | 1 + src/wmma-hip/reference.h | 1 + src/wmma-sycl/reference.h | 1 + src/wordcount-sycl/main.cpp | 2 ++ src/wyllie-cuda/main.cu | 1 + src/wyllie-hip/main.cu | 1 + src/wyllie-omp/main.cpp | 1 + src/wyllie-sycl/main.cpp | 1 + src/zerocopy-cuda/main.cu | 1 + src/zerocopy-hip/main.cu | 1 + src/zerocopy-sycl/main.cpp | 1 + src/zeropoint-cuda/main.cu | 1 + src/zeropoint-hip/main.cu | 1 + src/zeropoint-omp/main.cpp | 1 + src/zeropoint-sycl/main.cpp | 1 + 834 files changed, 1185 insertions(+) diff --git a/src/accuracy-cuda/main.cu b/src/accuracy-cuda/main.cu index 51071c0fc0..3565d70cc8 100644 --- a/src/accuracy-cuda/main.cu +++ b/src/accuracy-cuda/main.cu @@ -172,6 +172,9 @@ int main(int argc, char* argv[]) int count; cudaMemcpy(&count, d_count, sizeof(int), cudaMemcpyDeviceToHost); printf("%s\n", (count == count_ref) ? "PASS" : "FAIL"); + bool ok = (count == count_ref); + if (!ok) exit(1); + // printf("Accuracy = %f\n", (float)count / nrows); start = std::chrono::steady_clock::now(); diff --git a/src/accuracy-hip/main.cu b/src/accuracy-hip/main.cu index d2b55e4740..15efa97dc6 100644 --- a/src/accuracy-hip/main.cu +++ b/src/accuracy-hip/main.cu @@ -171,6 +171,8 @@ int main(int argc, char* argv[]) int count; hipMemcpy(&count, d_count, sizeof(int), hipMemcpyDeviceToHost); + bool ok = (count == count_ref); + if (!ok) exit(1); printf("%s\n", (count == count_ref) ? "PASS" : "FAIL"); // printf("Accuracy = %f\n", (float)count / nrows); diff --git a/src/accuracy-omp/main.cpp b/src/accuracy-omp/main.cpp index 2ffb61da87..b42219822a 100644 --- a/src/accuracy-omp/main.cpp +++ b/src/accuracy-omp/main.cpp @@ -80,6 +80,7 @@ int main(int argc, char* argv[]) #pragma omp target update from (count[0:1]) bool ok = (count[0] == count_ref); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // printf("Accuracy = %f\n", (float)count / nrows); } } diff --git a/src/accuracy-sycl/main.cpp b/src/accuracy-sycl/main.cpp index ded2b775b9..9d66f12a48 100644 --- a/src/accuracy-sycl/main.cpp +++ b/src/accuracy-sycl/main.cpp @@ -179,6 +179,8 @@ int main(int argc, char* argv[]) int count; q.memcpy(&count, d_count, sizeof(int)).wait(); + bool ok = (count == count_ref); + if (!ok) exit(1); printf("%s\n", (count == count_ref) ? "PASS" : "FAIL"); // printf("Accuracy = %f\n", (float)count / nrows); diff --git a/src/ace-cuda/main.cu b/src/ace-cuda/main.cu index 3d06a3e740..da07a44258 100644 --- a/src/ace-cuda/main.cu +++ b/src/ace-cuda/main.cu @@ -438,6 +438,7 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(phi_ref); free(u_ref); #endif diff --git a/src/ace-hip/main.cu b/src/ace-hip/main.cu index 82780d2766..7a6e7ac5d5 100644 --- a/src/ace-hip/main.cu +++ b/src/ace-hip/main.cu @@ -438,6 +438,7 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(phi_ref); free(u_ref); #endif diff --git a/src/ace-omp/main.cpp b/src/ace-omp/main.cpp index f94a973096..9d6a631b52 100644 --- a/src/ace-omp/main.cpp +++ b/src/ace-omp/main.cpp @@ -416,6 +416,7 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(phi_ref); free(u_ref); #endif diff --git a/src/ace-sycl/main.cpp b/src/ace-sycl/main.cpp index 72ed3a42af..b41a845ff3 100644 --- a/src/ace-sycl/main.cpp +++ b/src/ace-sycl/main.cpp @@ -489,6 +489,7 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(phi_ref); free(u_ref); #endif diff --git a/src/adam-cuda/main.cu b/src/adam-cuda/main.cu index ada91a2a52..dbd672fd42 100644 --- a/src/adam-cuda/main.cu +++ b/src/adam-cuda/main.cu @@ -152,6 +152,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); printf("Checksum: %lf %lf\n", cr / vector_size, cp / vector_size); free(p); diff --git a/src/adam-hip/main.cu b/src/adam-hip/main.cu index efcdd20b8c..393bf2d0b6 100644 --- a/src/adam-hip/main.cu +++ b/src/adam-hip/main.cu @@ -152,6 +152,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); printf("Checksum: %lf %lf\n", cr / vector_size, cp / vector_size); free(p); diff --git a/src/adam-omp/main.cpp b/src/adam-omp/main.cpp index d38b7782ae..8c48ef87c5 100644 --- a/src/adam-omp/main.cpp +++ b/src/adam-omp/main.cpp @@ -126,6 +126,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); printf("Checksum: %lf %lf\n", cr / vector_size, cp / vector_size); free(p); diff --git a/src/adam-sycl/main.cpp b/src/adam-sycl/main.cpp index dd822f4f7f..eeaefa2e5e 100644 --- a/src/adam-sycl/main.cpp +++ b/src/adam-sycl/main.cpp @@ -165,6 +165,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); printf("Checksum: %lf %lf\n", cr / vector_size, cp / vector_size); free(p); diff --git a/src/adamw-cuda/main.cu b/src/adamw-cuda/main.cu index 3ac5eb55ac..6b6907d1ad 100644 --- a/src/adamw-cuda/main.cu +++ b/src/adamw-cuda/main.cu @@ -136,6 +136,7 @@ int main(int argc, char* argv[]) } printf("Absolute maximum error: %f\n", absmax_error); printf("%s\n", absmax_error > 1e-3f ? "FAIL" : "PASS"); + if (absmax_error > 1e-3f) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/adamw-hip/main.cu b/src/adamw-hip/main.cu index 0f3adf01ac..0b67c463aa 100644 --- a/src/adamw-hip/main.cu +++ b/src/adamw-hip/main.cu @@ -136,6 +136,7 @@ int main(int argc, char* argv[]) } printf("Absolute maximum error: %f\n", absmax_error); printf("%s\n", absmax_error > 1e-3f ? "FAIL" : "PASS"); + if (absmax_error > 1e-3f) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/adamw-omp/main.cpp b/src/adamw-omp/main.cpp index d0c15ae250..2785cad004 100644 --- a/src/adamw-omp/main.cpp +++ b/src/adamw-omp/main.cpp @@ -123,6 +123,7 @@ int main(int argc, char* argv[]) } printf("Absolute maximum error: %f\n", absmax_error); printf("%s\n", absmax_error > 1e-3f ? "FAIL" : "PASS"); + if (absmax_error > 1e-3f) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/adamw-sycl/main.cpp b/src/adamw-sycl/main.cpp index 5500bc1e60..a0469dbdd4 100644 --- a/src/adamw-sycl/main.cpp +++ b/src/adamw-sycl/main.cpp @@ -135,6 +135,7 @@ int main(int argc, char* argv[]) } printf("Absolute maximum error: %f\n", absmax_error); printf("%s\n", absmax_error > 1e-3f ? "FAIL" : "PASS"); + if (absmax_error > 1e-3f) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/adjacent-cuda/main.cu b/src/adjacent-cuda/main.cu index debfeda46f..0244f5d445 100644 --- a/src/adjacent-cuda/main.cu +++ b/src/adjacent-cuda/main.cu @@ -30,6 +30,7 @@ #include #include #include +#include //--------------------------------------------------------------------- // Kernels @@ -131,6 +132,7 @@ void Test(int num_items, int repeat) int compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); + if (compare) exit(1); // verify the SubtractRight cudaMemcpy(d_in, h_in, sizeof(int) * num_items, cudaMemcpyHostToDevice); @@ -148,6 +150,7 @@ void Test(int num_items, int repeat) } compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); + if (compare) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/adjacent-hip/main.cu b/src/adjacent-hip/main.cu index 2b3c7e2b94..159afc51c9 100644 --- a/src/adjacent-hip/main.cu +++ b/src/adjacent-hip/main.cu @@ -30,6 +30,7 @@ #include #include #include +#include //--------------------------------------------------------------------- // Kernels @@ -131,6 +132,7 @@ void Test(int num_items, int repeat) int compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); + if (compare) exit(1); // verify the SubtractRight hipMemcpy(d_in, h_in, sizeof(int) * num_items, hipMemcpyHostToDevice); @@ -148,6 +150,7 @@ void Test(int num_items, int repeat) } compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); + if (compare) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/adjacent-omp/main.cpp b/src/adjacent-omp/main.cpp index d9c2fe525e..25b50eb0a3 100644 --- a/src/adjacent-omp/main.cpp +++ b/src/adjacent-omp/main.cpp @@ -30,6 +30,7 @@ #include #include #include +#include /** * Simple kernel for performing a block-wide adjacent difference. @@ -100,6 +101,7 @@ void Test(int num_items, int repeat) int compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); + if (compare) exit(1); for (int i = 0; i < repeat; i++) { BlockAdjDiffKernel(h_in, h_out, false, num_items); @@ -116,6 +118,7 @@ void Test(int num_items, int repeat) compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); + if (compare) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/adjacent-sycl/main.cpp b/src/adjacent-sycl/main.cpp index 8baf1cd372..9d6464549e 100644 --- a/src/adjacent-sycl/main.cpp +++ b/src/adjacent-sycl/main.cpp @@ -31,6 +31,7 @@ #include #include #include "block.h" +#include //--------------------------------------------------------------------- // Kernels @@ -137,6 +138,7 @@ void Test(sycl::queue &q, int num_items, int repeat) int compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); + if (compare) exit(1); q.memcpy(d_in, h_in, sizeof(int) * num_items); for (int i = 0; i < repeat; i++) { @@ -157,6 +159,7 @@ void Test(sycl::queue &q, int num_items, int repeat) compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); + if (compare) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/aidw-cuda/main.cu b/src/aidw-cuda/main.cu index ffb8bd1ea5..8e4564ed60 100644 --- a/src/aidw-cuda/main.cu +++ b/src/aidw-cuda/main.cu @@ -237,6 +237,7 @@ int main(int argc, char *argv[]) if (check) { bool ok = verify (iz.data(), h_iz.data(), inum, EPS); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } AIDW_Kernel_Tiled<<>>( @@ -246,6 +247,7 @@ int main(int argc, char *argv[]) if (check) { bool ok = verify (iz.data(), h_iz.data(), inum, EPS); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } auto start = std::chrono::steady_clock::now(); diff --git a/src/aidw-hip/main.cu b/src/aidw-hip/main.cu index 7938536e3b..acd442f354 100644 --- a/src/aidw-hip/main.cu +++ b/src/aidw-hip/main.cu @@ -237,6 +237,7 @@ int main(int argc, char *argv[]) if (check) { bool ok = verify (iz.data(), h_iz.data(), inum, EPS); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } AIDW_Kernel_Tiled<<>>( @@ -246,6 +247,7 @@ int main(int argc, char *argv[]) if (check) { bool ok = verify (iz.data(), h_iz.data(), inum, EPS); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } auto start = std::chrono::steady_clock::now(); diff --git a/src/aidw-omp/main.cpp b/src/aidw-omp/main.cpp index 18d292b134..29cc761db4 100644 --- a/src/aidw-omp/main.cpp +++ b/src/aidw-omp/main.cpp @@ -229,6 +229,7 @@ int main(int argc, char *argv[]) if (check) { bool ok = verify (iz.data(), h_iz.data(), inum, EPS); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } AIDW_Kernel_Tiled(d_dx, d_dy, d_dz, dnum, d_ix, d_iy, d_iz, inum, area, d_avg_dist); @@ -236,6 +237,7 @@ int main(int argc, char *argv[]) if (check) { bool ok = verify (iz.data(), h_iz.data(), inum, EPS); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } auto start = std::chrono::steady_clock::now(); diff --git a/src/aidw-sycl/main.cpp b/src/aidw-sycl/main.cpp index be1e708b6c..6b525abc1d 100644 --- a/src/aidw-sycl/main.cpp +++ b/src/aidw-sycl/main.cpp @@ -258,6 +258,7 @@ int main(int argc, char *argv[]) if (check) { bool ok = verify (iz.data(), h_iz.data(), inum, EPS); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } q.submit([&] (sycl::handler &cgh) { @@ -287,6 +288,7 @@ int main(int argc, char *argv[]) if (check) { bool ok = verify (iz.data(), h_iz.data(), inum, EPS); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } auto start = std::chrono::steady_clock::now(); diff --git a/src/aligned-types-cuda/main.cu b/src/aligned-types-cuda/main.cu index e0274784a3..26f5ca8eb8 100644 --- a/src/aligned-types-cuda/main.cu +++ b/src/aligned-types-cuda/main.cu @@ -242,6 +242,7 @@ template int runTest( packedElementSize); printf("\tTEST %s\n", flag ? "PASS" : "FAIL"); + if (!flag) exit(1); return !flag; } diff --git a/src/aligned-types-hip/main.cu b/src/aligned-types-hip/main.cu index 5a519b1085..35de20a602 100644 --- a/src/aligned-types-hip/main.cu +++ b/src/aligned-types-hip/main.cu @@ -242,6 +242,7 @@ template int runTest( packedElementSize); printf("\tTEST %s\n", flag ? "PASS" : "FAIL"); + if (!flag) exit(1); return !flag; } diff --git a/src/aligned-types-omp/main.cpp b/src/aligned-types-omp/main.cpp index 77b8693aa2..9e1485bca0 100644 --- a/src/aligned-types-omp/main.cpp +++ b/src/aligned-types-omp/main.cpp @@ -219,6 +219,7 @@ template int runTest( packedElementSize); printf("\tTEST %s\n", flag ? "PASS" : "FAIL"); + if (!flag) exit(1); return !flag; } diff --git a/src/aligned-types-sycl/main.cpp b/src/aligned-types-sycl/main.cpp index 0d06ca32f4..a29ad5d41e 100644 --- a/src/aligned-types-sycl/main.cpp +++ b/src/aligned-types-sycl/main.cpp @@ -243,6 +243,7 @@ int runTest( packedElementSize); printf("\tTEST %s\n", flag ? "PASS" : "FAIL"); + if (!flag) exit(1); return !flag; } diff --git a/src/all-pairs-distance-cuda/main.cu b/src/all-pairs-distance-cuda/main.cu index 575c7244e9..d5976e499e 100644 --- a/src/all-pairs-distance-cuda/main.cu +++ b/src/all-pairs-distance-cuda/main.cu @@ -265,6 +265,7 @@ int main(int argc, char **argv) { status = memcmp(cpu_distance, gpu_distance, INSTANCES * INSTANCES * sizeof(int)); if (status != 0) printf("FAIL\n"); else printf("PASS\n"); + if (status != 0) exit(1); elapsedTime = 0; for (int n = 0; n < iterations; n++) { @@ -290,6 +291,7 @@ int main(int argc, char **argv) { status = memcmp(cpu_distance, gpu_distance, INSTANCES * INSTANCES * sizeof(int)); if (status != 0) printf("FAIL\n"); else printf("PASS\n"); + if (status != 0) exit(1); elapsedTime = 0; for (int n = 0; n < iterations; n++) { @@ -315,6 +317,7 @@ int main(int argc, char **argv) { status = memcmp(cpu_distance, gpu_distance, INSTANCES * INSTANCES * sizeof(int)); if (status != 0) printf("FAIL\n"); else printf("PASS\n"); + if (status != 0) exit(1); free(cpu_distance); free(gpu_distance); diff --git a/src/all-pairs-distance-hip/main.cu b/src/all-pairs-distance-hip/main.cu index 9f7adc927b..f3421fb0f8 100644 --- a/src/all-pairs-distance-hip/main.cu +++ b/src/all-pairs-distance-hip/main.cu @@ -265,6 +265,7 @@ int main(int argc, char **argv) { status = memcmp(cpu_distance, gpu_distance, INSTANCES * INSTANCES * sizeof(int)); if (status != 0) printf("FAIL\n"); else printf("PASS\n"); + if (status != 0) exit(1); elapsedTime = 0; for (int n = 0; n < iterations; n++) { @@ -290,6 +291,7 @@ int main(int argc, char **argv) { status = memcmp(cpu_distance, gpu_distance, INSTANCES * INSTANCES * sizeof(int)); if (status != 0) printf("FAIL\n"); else printf("PASS\n"); + if (status != 0) exit(1); elapsedTime = 0; for (int n = 0; n < iterations; n++) { @@ -315,6 +317,7 @@ int main(int argc, char **argv) { status = memcmp(cpu_distance, gpu_distance, INSTANCES * INSTANCES * sizeof(int)); if (status != 0) printf("FAIL\n"); else printf("PASS\n"); + if (status != 0) exit(1); free(cpu_distance); free(gpu_distance); diff --git a/src/all-pairs-distance-omp/main.cpp b/src/all-pairs-distance-omp/main.cpp index 5ab508818a..51e40f0e44 100644 --- a/src/all-pairs-distance-omp/main.cpp +++ b/src/all-pairs-distance-omp/main.cpp @@ -137,6 +137,7 @@ int main(int argc, char **argv) { status = memcmp(cpu_distance, gpu_distance, INSTANCES * INSTANCES * sizeof(int)); if (status != 0) printf("FAIL\n"); else printf("PASS\n"); + if (status != 0) exit(1); elapsedTime = 0; for (int n = 0; n < iterations; n++) { @@ -216,6 +217,7 @@ int main(int argc, char **argv) { status = memcmp(cpu_distance, gpu_distance, INSTANCES * INSTANCES * sizeof(int)); if (status != 0) printf("FAIL\n"); else printf("PASS\n"); + if (status != 0) exit(1); } free(cpu_distance); diff --git a/src/all-pairs-distance-sycl/main.cpp b/src/all-pairs-distance-sycl/main.cpp index 6ef741ca67..c17dfebdcb 100644 --- a/src/all-pairs-distance-sycl/main.cpp +++ b/src/all-pairs-distance-sycl/main.cpp @@ -161,6 +161,7 @@ int main(int argc, char **argv) { status = memcmp(cpu_distance, gpu_distance, INSTANCES * INSTANCES * sizeof(int)); if (status != 0) printf("FAIL\n"); else printf("PASS\n"); + if (status != 0) exit(1); elapsedTime = 0; for (int n = 0; n < iterations; n++) { @@ -244,6 +245,7 @@ int main(int argc, char **argv) { status = memcmp(cpu_distance, gpu_distance, INSTANCES * INSTANCES * sizeof(int)); if (status != 0) printf("FAIL\n"); else printf("PASS\n"); + if (status != 0) exit(1); elapsedTime = 0; for (int n = 0; n < iterations; n++) { @@ -299,6 +301,7 @@ int main(int argc, char **argv) { status = memcmp(cpu_distance, gpu_distance, INSTANCES * INSTANCES * sizeof(int)); if (status != 0) printf("FAIL\n"); else printf("PASS\n"); + if (status != 0) exit(1); free(cpu_distance); free(gpu_distance); diff --git a/src/asmooth-cuda/reference.h b/src/asmooth-cuda/reference.h index d766e3ad60..6e6d3b0092 100644 --- a/src/asmooth-cuda/reference.h +++ b/src/asmooth-cuda/reference.h @@ -91,6 +91,7 @@ void verify ( } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); if (ok) { printf("Distribution of box sizes:\n"); for (int j = 1; j < MaxRad; j++) diff --git a/src/asta-cuda/main.cu b/src/asta-cuda/main.cu index 99ca6c1231..fb4f4067c2 100644 --- a/src/asta-cuda/main.cu +++ b/src/asta-cuda/main.cu @@ -43,6 +43,7 @@ #include "support/common.h" #include "support/verify.h" +#include // GPU kernel __global__ void PTTWAC_soa_asta(const int A, @@ -283,6 +284,7 @@ int main(int argc, char **argv) { // Verify int status = verify(h_in_out, h_in_backup, tiled_n * p.s, p.m, p.s); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); + if (!(status == 0)) exit(1); // Free memory free(h_in_out); diff --git a/src/asta-hip/main.cu b/src/asta-hip/main.cu index 91b5518894..a9d9e7c113 100644 --- a/src/asta-hip/main.cu +++ b/src/asta-hip/main.cu @@ -43,6 +43,7 @@ #include "support/common.h" #include "support/verify.h" +#include // GPU kernel __global__ void PTTWAC_soa_asta(const int A, @@ -283,6 +284,7 @@ int main(int argc, char **argv) { // Verify int status = verify(h_in_out, h_in_backup, tiled_n * p.s, p.m, p.s); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); + if (!(status == 0)) exit(1); // Free memory free(h_in_out); diff --git a/src/asta-omp/main.cpp b/src/asta-omp/main.cpp index d0397a925f..d1e486943b 100644 --- a/src/asta-omp/main.cpp +++ b/src/asta-omp/main.cpp @@ -43,6 +43,7 @@ #include "support/common.h" #include "support/verify.h" +#include // Params --------------------------------------------------------------------- @@ -286,6 +287,7 @@ int main(int argc, char **argv) { // Verify int status = verify(h_in_out, h_in_backup, tiled_n * p.s, p.m, p.s); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); + if (!(status == 0)) exit(1); // Free memory free(h_in_out); diff --git a/src/asta-sycl/main.cpp b/src/asta-sycl/main.cpp index fcade1d97e..113b9f23d0 100644 --- a/src/asta-sycl/main.cpp +++ b/src/asta-sycl/main.cpp @@ -43,6 +43,7 @@ #include "support/common.h" #include "support/verify.h" +#include // Params --------------------------------------------------------------------- @@ -298,6 +299,7 @@ int main(int argc, char **argv) { // Verify int status = verify(h_in_out, h_in_backup, tiled_n * p.s, p.m, p.s); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); + if (!(status == 0)) exit(1); // Free memory free(h_in_out); diff --git a/src/atomicAggregate-cuda/main.cu b/src/atomicAggregate-cuda/main.cu index 01c50629ca..b7f254cf41 100644 --- a/src/atomicAggregate-cuda/main.cu +++ b/src/atomicAggregate-cuda/main.cu @@ -1,6 +1,7 @@ #include #include #include +#include // reference // https://stackoverflow.com/questions/59879285/whats-the-alternative-for-match-any-sync-on-compute-capability-6 @@ -72,6 +73,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_d); delete [] h_d; } diff --git a/src/atomicAggregate-hip/main.cu b/src/atomicAggregate-hip/main.cu index e1698403c2..bfa9523b78 100644 --- a/src/atomicAggregate-hip/main.cu +++ b/src/atomicAggregate-hip/main.cu @@ -1,6 +1,7 @@ #include #include #include +#include // reference // https://stackoverflow.com/questions/59879285/whats-the-alternative-for-match-any-sync-on-compute-capability-6 @@ -106,6 +107,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_d); delete [] h_d; } diff --git a/src/atomicAggregate-sycl/main.cpp b/src/atomicAggregate-sycl/main.cpp index e69fe241f4..704af48282 100644 --- a/src/atomicAggregate-sycl/main.cpp +++ b/src/atomicAggregate-sycl/main.cpp @@ -1,6 +1,7 @@ #include #include #include +#include // reference // https://stackoverflow.com/questions/59879285/whats-the-alternative-for-match-any-sync-on-compute-capability-6 @@ -139,6 +140,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_d, q); delete [] h_d; } diff --git a/src/atomicCAS-cuda/main.cu b/src/atomicCAS-cuda/main.cu index 794b9b6763..6b6474c5cf 100644 --- a/src/atomicCAS-cuda/main.cu +++ b/src/atomicCAS-cuda/main.cu @@ -125,6 +125,7 @@ int main(int argc, char** argv) { printf("atomic add results: %llu %lld %lf\n", res_u64[2], res_s64[2], res_f64[2]); } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); cudaFree(d_res_u64); cudaFree(d_res_s64); diff --git a/src/atomicCAS-hip/main.cu b/src/atomicCAS-hip/main.cu index f89e54c543..ea7300494f 100644 --- a/src/atomicCAS-hip/main.cu +++ b/src/atomicCAS-hip/main.cu @@ -125,6 +125,7 @@ int main(int argc, char** argv) { printf("atomic add results: %llu %lld %lf\n", res_u64[2], res_s64[2], res_f64[2]); } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); hipFree(d_res_u64); hipFree(d_res_s64); diff --git a/src/atomicCAS-sycl/main.cpp b/src/atomicCAS-sycl/main.cpp index 4ca7e184c1..f91588f047 100644 --- a/src/atomicCAS-sycl/main.cpp +++ b/src/atomicCAS-sycl/main.cpp @@ -213,6 +213,7 @@ int main(int argc, char** argv) { printf("atomic add results: %llu %lld %lf\n", res_u64[2], res_s64[2], res_f64[2]); } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); sycl::free(d_res_u64, q); sycl::free(d_res_s64, q); diff --git a/src/atomicCost-cuda/main.cu b/src/atomicCost-cuda/main.cu index d6faa56a5a..f71bd75d44 100644 --- a/src/atomicCost-cuda/main.cu +++ b/src/atomicCost-cuda/main.cu @@ -85,6 +85,7 @@ void atomicCost (int length, int size, int repeat) int diff = memcmp(result_wi, result_wo, result_size); printf("%s\n", diff ? "FAIL" : "PASS"); + if (diff) exit(1); free(result_wi); free(result_wo); diff --git a/src/atomicCost-hip/main.cu b/src/atomicCost-hip/main.cu index 1c6b5345f8..4f3a0a59e2 100644 --- a/src/atomicCost-hip/main.cu +++ b/src/atomicCost-hip/main.cu @@ -85,6 +85,7 @@ void atomicCost (int length, int size, int repeat) int diff = memcmp(result_wi, result_wo, result_size); printf("%s\n", diff ? "FAIL" : "PASS"); + if (diff) exit(1); free(result_wi); free(result_wo); diff --git a/src/atomicCost-omp/main.cpp b/src/atomicCost-omp/main.cpp index feb7aa938f..6c6f76ef96 100644 --- a/src/atomicCost-omp/main.cpp +++ b/src/atomicCost-omp/main.cpp @@ -75,6 +75,7 @@ void atomicCost (int length, int size, int repeat) int diff = memcmp(result_wi, result_wo, result_size); printf("%s\n", diff ? "FAIL" : "PASS"); + if (diff) exit(1); } free(result_wi); diff --git a/src/atomicCost-sycl/main.cpp b/src/atomicCost-sycl/main.cpp index b9b2209ca7..326b63547a 100644 --- a/src/atomicCost-sycl/main.cpp +++ b/src/atomicCost-sycl/main.cpp @@ -104,6 +104,7 @@ void atomicCost (int length, int size, int repeat) int diff = memcmp(result_wi, result_wo, result_size); printf("%s\n", diff ? "FAIL" : "PASS"); + if (diff) exit(1); free(result_wi); free(result_wo); diff --git a/src/atomicIntrinsics-cuda/reference.h b/src/atomicIntrinsics-cuda/reference.h index 935178b2b8..2c7e5e56b5 100644 --- a/src/atomicIntrinsics-cuda/reference.h +++ b/src/atomicIntrinsics-cuda/reference.h @@ -128,4 +128,5 @@ void computeGold(T *gpuData, const size_t len) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } diff --git a/src/atomicPerf-cuda/main.cu b/src/atomicPerf-cuda/main.cu index 5cf7522e84..9020b8ae95 100644 --- a/src/atomicPerf-cuda/main.cu +++ b/src/atomicPerf-cuda/main.cu @@ -118,6 +118,7 @@ void atomicPerf (int n, int t, int repeat) BlockRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); CHECK_ERROR( cudaMemcpy(d_data, data, data_size, cudaMemcpyHostToDevice) ); CHECK_ERROR( cudaDeviceSynchronize() ); @@ -138,6 +139,7 @@ void atomicPerf (int n, int t, int repeat) WarpRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); CHECK_ERROR( cudaMemcpy(d_data, data, data_size, cudaMemcpyHostToDevice) ); CHECK_ERROR( cudaDeviceSynchronize() ); @@ -158,6 +160,7 @@ void atomicPerf (int n, int t, int repeat) SingleRangeAtomicOnGlobalMem_ref(r_data, i % BLOCK_SIZE, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); CHECK_ERROR( cudaMemcpy(d_data, data, data_size, cudaMemcpyHostToDevice) ); CHECK_ERROR( cudaDeviceSynchronize() ); @@ -175,6 +178,7 @@ void atomicPerf (int n, int t, int repeat) CHECK_ERROR( cudaMemcpy(h_data, d_data, data_size, cudaMemcpyDeviceToHost) ); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); CHECK_ERROR( cudaMemcpy(d_data, data, data_size, cudaMemcpyHostToDevice) ); CHECK_ERROR( cudaDeviceSynchronize() ); @@ -192,6 +196,7 @@ void atomicPerf (int n, int t, int repeat) CHECK_ERROR( cudaMemcpy(h_data, d_data, data_size, cudaMemcpyDeviceToHost) ); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); CHECK_ERROR( cudaMemcpy(d_data, data, data_size, cudaMemcpyHostToDevice) ); CHECK_ERROR( cudaDeviceSynchronize() ); @@ -209,6 +214,7 @@ void atomicPerf (int n, int t, int repeat) CHECK_ERROR( cudaMemcpy(h_data, d_data, data_size, cudaMemcpyDeviceToHost) ); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); free(data); free(h_data); diff --git a/src/atomicPerf-hip/main.cu b/src/atomicPerf-hip/main.cu index 299070a219..6c8e1ca7d9 100644 --- a/src/atomicPerf-hip/main.cu +++ b/src/atomicPerf-hip/main.cu @@ -118,6 +118,7 @@ void atomicPerf (int n, int t, int repeat) BlockRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); CHECK_ERROR( hipMemcpy(d_data, data, data_size, hipMemcpyHostToDevice) ); CHECK_ERROR( hipDeviceSynchronize() ); @@ -138,6 +139,7 @@ void atomicPerf (int n, int t, int repeat) WarpRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); CHECK_ERROR( hipMemcpy(d_data, data, data_size, hipMemcpyHostToDevice) ); CHECK_ERROR( hipDeviceSynchronize() ); @@ -158,6 +160,7 @@ void atomicPerf (int n, int t, int repeat) SingleRangeAtomicOnGlobalMem_ref(r_data, i % BLOCK_SIZE, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); CHECK_ERROR( hipMemcpy(d_data, data, data_size, hipMemcpyHostToDevice) ); CHECK_ERROR( hipDeviceSynchronize() ); @@ -175,6 +178,7 @@ void atomicPerf (int n, int t, int repeat) CHECK_ERROR( hipMemcpy(h_data, d_data, data_size, hipMemcpyDeviceToHost) ); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); CHECK_ERROR( hipMemcpy(d_data, data, data_size, hipMemcpyHostToDevice) ); CHECK_ERROR( hipDeviceSynchronize() ); @@ -192,6 +196,7 @@ void atomicPerf (int n, int t, int repeat) CHECK_ERROR( hipMemcpy(h_data, d_data, data_size, hipMemcpyDeviceToHost) ); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); CHECK_ERROR( hipMemcpy(d_data, data, data_size, hipMemcpyHostToDevice) ); CHECK_ERROR( hipDeviceSynchronize() ); @@ -209,6 +214,7 @@ void atomicPerf (int n, int t, int repeat) CHECK_ERROR( hipMemcpy(h_data, d_data, data_size, hipMemcpyDeviceToHost) ); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); free(data); free(h_data); diff --git a/src/atomicPerf-omp/main.cpp b/src/atomicPerf-omp/main.cpp index 75083a83a2..f0903a73b0 100644 --- a/src/atomicPerf-omp/main.cpp +++ b/src/atomicPerf-omp/main.cpp @@ -139,6 +139,7 @@ void atomicPerf (int n, int t, int repeat) BlockRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); memcpy(data, h_data, data_size); #pragma omp target update to (data[0:t]) @@ -158,6 +159,7 @@ void atomicPerf (int n, int t, int repeat) WarpRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); memcpy(data, h_data, data_size); #pragma omp target update to (data[0:t]) @@ -177,6 +179,7 @@ void atomicPerf (int n, int t, int repeat) SingleRangeAtomicOnGlobalMem_ref(r_data, i % BLOCK_SIZE, n); fail = memcmp(data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); memcpy(data, h_data, data_size); #pragma omp target update to (data[0:t]) @@ -193,6 +196,7 @@ void atomicPerf (int n, int t, int repeat) #pragma omp target update from (data[0:t]) fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); memcpy(data, h_data, data_size); #pragma omp target update to (data[0:t]) @@ -209,6 +213,7 @@ void atomicPerf (int n, int t, int repeat) #pragma omp target update from (data[0:t]) fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); memcpy(data, h_data, data_size); #pragma omp target update to (data[0:t]) @@ -225,6 +230,7 @@ void atomicPerf (int n, int t, int repeat) #pragma omp target update from (data[0:t]) fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); } free(data); diff --git a/src/atomicPerf-sycl/main.cpp b/src/atomicPerf-sycl/main.cpp index 01bbb1a6fd..41cc4cf46f 100644 --- a/src/atomicPerf-sycl/main.cpp +++ b/src/atomicPerf-sycl/main.cpp @@ -149,6 +149,7 @@ void atomicPerf (int n, int t, int repeat) BlockRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); q.memcpy(d_data, data, data_size).wait(); start = std::chrono::steady_clock::now(); @@ -172,6 +173,7 @@ void atomicPerf (int n, int t, int repeat) WarpRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); q.memcpy(d_data, data, data_size).wait(); start = std::chrono::steady_clock::now(); @@ -195,6 +197,7 @@ void atomicPerf (int n, int t, int repeat) SingleRangeAtomicOnGlobalMem_ref(r_data, i % BLOCK_SIZE, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); q.memcpy(d_data, data, data_size).wait(); start = std::chrono::steady_clock::now(); @@ -216,6 +219,7 @@ void atomicPerf (int n, int t, int repeat) q.memcpy(h_data, d_data, data_size).wait(); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); q.memcpy(d_data, data, data_size).wait(); start = std::chrono::steady_clock::now(); @@ -237,6 +241,7 @@ void atomicPerf (int n, int t, int repeat) q.memcpy(h_data, d_data, data_size).wait(); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); q.memcpy(d_data, data, data_size).wait(); start = std::chrono::steady_clock::now(); @@ -259,6 +264,7 @@ void atomicPerf (int n, int t, int repeat) q.memcpy(h_data, d_data, data_size).wait(); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); free(data); free(h_data); diff --git a/src/attention-cuda/main.cu b/src/attention-cuda/main.cu index 51abb62433..be9884d1f2 100644 --- a/src/attention-cuda/main.cu +++ b/src/attention-cuda/main.cu @@ -165,6 +165,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(key); free(value); diff --git a/src/attention-hip/main.cu b/src/attention-hip/main.cu index bf13062788..f2dd74bbe8 100644 --- a/src/attention-hip/main.cu +++ b/src/attention-hip/main.cu @@ -178,6 +178,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(key); free(value); diff --git a/src/attention-omp/main.cpp b/src/attention-omp/main.cpp index e3601f8d9f..7877f850e7 100644 --- a/src/attention-omp/main.cpp +++ b/src/attention-omp/main.cpp @@ -101,6 +101,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(key); free(value); diff --git a/src/attention-paged-cuda/main.cu b/src/attention-paged-cuda/main.cu index 5fd6fb0875..f2b6c9972d 100644 --- a/src/attention-paged-cuda/main.cu +++ b/src/attention-paged-cuda/main.cu @@ -24,6 +24,7 @@ #include "attention_kernels.cuh" #include "kvcache.h" #include "reference.h" +#include #define LAUNCH_PAGED_ATTENTION_V1(HEAD_SIZE) \ @@ -284,6 +285,7 @@ void attention_page (int num_seqs, } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(query_h); free(out_h); diff --git a/src/attention-paged-hip/main.cu b/src/attention-paged-hip/main.cu index 8f4a6d8f4d..56054c5954 100644 --- a/src/attention-paged-hip/main.cu +++ b/src/attention-paged-hip/main.cu @@ -24,6 +24,7 @@ #include "cuda_compat.h" #include "kvcache.h" #include "reference.h" +#include #define LAUNCH_PAGED_ATTENTION_V1(HEAD_SIZE) \ @@ -284,6 +285,7 @@ void attention_page (int num_seqs, } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(query_h); free(out_h); diff --git a/src/attention-paged-sycl/main.cpp b/src/attention-paged-sycl/main.cpp index 833c13ab91..ae089f559d 100644 --- a/src/attention-paged-sycl/main.cpp +++ b/src/attention-paged-sycl/main.cpp @@ -23,6 +23,7 @@ #include "attention_kernels.h" #include "kvcache.h" #include "reference.h" +#include // Add a template parameter WARP_SIZE #define LAUNCH_PAGED_ATTENTION_V1(HEAD_SIZE) \ @@ -312,6 +313,7 @@ void attention_page(sycl::queue &Q, int num_seqs, int num_query_heads, int num_k } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(query_h); free(out_h); diff --git a/src/attention-sycl/main.cpp b/src/attention-sycl/main.cpp index 149a3b815e..5ec78079b6 100644 --- a/src/attention-sycl/main.cpp +++ b/src/attention-sycl/main.cpp @@ -239,6 +239,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(key); free(value); diff --git a/src/attentionMultiHead-cuda/main.cu b/src/attentionMultiHead-cuda/main.cu index ceb7fcc9df..cae03f270a 100644 --- a/src/attentionMultiHead-cuda/main.cu +++ b/src/attentionMultiHead-cuda/main.cu @@ -238,6 +238,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(hq); free(hk); diff --git a/src/attentionMultiHead-hip/main.cu b/src/attentionMultiHead-hip/main.cu index ee3b7c1697..594663c431 100644 --- a/src/attentionMultiHead-hip/main.cu +++ b/src/attentionMultiHead-hip/main.cu @@ -220,6 +220,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(hq); free(hk); diff --git a/src/attentionMultiHead-sycl/main.cpp b/src/attentionMultiHead-sycl/main.cpp index b33dbd3818..3c631b962c 100644 --- a/src/attentionMultiHead-sycl/main.cpp +++ b/src/attentionMultiHead-sycl/main.cpp @@ -232,6 +232,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(hq); free(hk); diff --git a/src/axpby-cuda/main.cu b/src/axpby-cuda/main.cu index 9cdf43dfd3..489f73e0ec 100644 --- a/src/axpby-cuda/main.cu +++ b/src/axpby-cuda/main.cu @@ -179,6 +179,7 @@ int main(int argc, char* argv[]) if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } cudaFree(d_noop); diff --git a/src/axpby-hip/main.cu b/src/axpby-hip/main.cu index 072430d93e..e9f53a6a46 100644 --- a/src/axpby-hip/main.cu +++ b/src/axpby-hip/main.cu @@ -179,6 +179,7 @@ int main(int argc, char* argv[]) if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } hipFree(d_noop); diff --git a/src/axpby-sycl/main.cpp b/src/axpby-sycl/main.cpp index f42032fa82..c9d952b5d7 100644 --- a/src/axpby-sycl/main.cpp +++ b/src/axpby-sycl/main.cpp @@ -194,6 +194,7 @@ int main(int argc, char* argv[]) if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } sycl::free(d_noop, q); diff --git a/src/background-subtract-cuda/main.cu b/src/background-subtract-cuda/main.cu index 18987cbcb4..6ae7563ffb 100644 --- a/src/background-subtract-cuda/main.cu +++ b/src/background-subtract-cuda/main.cu @@ -183,6 +183,7 @@ int main(int argc, char* argv[]) { printf("Max error is %d\n", max_error); printf("%s\n", max_error ? "FAIL" : "PASS"); + if (max_error) exit(1); free(Img); free(Img1); diff --git a/src/background-subtract-hip/main.cu b/src/background-subtract-hip/main.cu index 586f8c2019..548c582c40 100644 --- a/src/background-subtract-hip/main.cu +++ b/src/background-subtract-hip/main.cu @@ -183,6 +183,7 @@ int main(int argc, char* argv[]) { printf("Max error is %d\n", max_error); printf("%s\n", max_error ? "FAIL" : "PASS"); + if (max_error) exit(1); free(Img); free(Img1); diff --git a/src/background-subtract-omp/main.cpp b/src/background-subtract-omp/main.cpp index 5c25edb303..d4a3249963 100644 --- a/src/background-subtract-omp/main.cpp +++ b/src/background-subtract-omp/main.cpp @@ -170,6 +170,7 @@ int main(int argc, char* argv[]) { printf("Max error is %d\n", max_error); printf("%s\n", max_error ? "FAIL" : "PASS"); + if (max_error) exit(1); free(Img); free(Img1); diff --git a/src/background-subtract-sycl/main.cpp b/src/background-subtract-sycl/main.cpp index 5a4f6e96e8..2b98a25c1a 100644 --- a/src/background-subtract-sycl/main.cpp +++ b/src/background-subtract-sycl/main.cpp @@ -213,6 +213,7 @@ int main(int argc, char* argv[]) { printf("Max error is %d\n", max_error); printf("%s\n", max_error ? "FAIL" : "PASS"); + if (max_error) exit(1); free(Img); free(Img1); diff --git a/src/backprop-cuda/main.cu b/src/backprop-cuda/main.cu index 454c8c244b..1a7fabce0e 100644 --- a/src/backprop-cuda/main.cu +++ b/src/backprop-cuda/main.cu @@ -139,6 +139,7 @@ int bpnn_train_kernel(BPNN *net, float *eo, float *eh) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef OUTPUT for (int i = 0; i < (in+1); i++) diff --git a/src/backprop-hip/main.cu b/src/backprop-hip/main.cu index 4d04e438a8..eadbfb0194 100644 --- a/src/backprop-hip/main.cu +++ b/src/backprop-hip/main.cu @@ -139,6 +139,7 @@ int bpnn_train_kernel(BPNN *net, float *eo, float *eh) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef OUTPUT for (int i = 0; i < (in+1); i++) diff --git a/src/backprop-omp/main.cpp b/src/backprop-omp/main.cpp index 3e76561ef4..2ef63bc2f1 100644 --- a/src/backprop-omp/main.cpp +++ b/src/backprop-omp/main.cpp @@ -180,6 +180,7 @@ int bpnn_train_kernel(BPNN *net, float *eo, float *eh) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef OUTPUT for (int i = 0; i < (in+1); i++) diff --git a/src/backprop-sycl/main.cpp b/src/backprop-sycl/main.cpp index 6e7ddfb30b..95f1593af4 100644 --- a/src/backprop-sycl/main.cpp +++ b/src/backprop-sycl/main.cpp @@ -152,6 +152,7 @@ int bpnn_train_kernel(BPNN *net, float *eo, float *eh) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef OUTPUT for (int i = 0; i < (in+1); i++) diff --git a/src/bezier-surface-cuda/main.cu b/src/bezier-surface-cuda/main.cu index 0e13b40c47..26cefec836 100644 --- a/src/bezier-surface-cuda/main.cu +++ b/src/bezier-surface-cuda/main.cu @@ -40,6 +40,7 @@ #include #include #include +#include #if DOUBLE_PRECISION @@ -286,6 +287,7 @@ void run(XYZ *in, int in_size_i, int in_size_j, int out_size_i, int out_size_j, // Verify int status = compare_output(gpu_out, cpu_out, in_size_i, in_size_j, out_size_i, out_size_j); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); + if (!(status == 0)) exit(1); free(cpu_out); free(gpu_out); diff --git a/src/bezier-surface-hip/main.cu b/src/bezier-surface-hip/main.cu index 8ce5a69c00..b77d639c13 100644 --- a/src/bezier-surface-hip/main.cu +++ b/src/bezier-surface-hip/main.cu @@ -40,6 +40,7 @@ #include #include #include +#include #if DOUBLE_PRECISION @@ -286,6 +287,7 @@ void run(XYZ *in, int in_size_i, int in_size_j, int out_size_i, int out_size_j, // Verify int status = compare_output(gpu_out, cpu_out, in_size_i, in_size_j, out_size_i, out_size_j); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); + if (!(status == 0)) exit(1); free(cpu_out); free(gpu_out); diff --git a/src/bezier-surface-omp/main.cpp b/src/bezier-surface-omp/main.cpp index e4e4441c92..5f0cd5f670 100644 --- a/src/bezier-surface-omp/main.cpp +++ b/src/bezier-surface-omp/main.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #if DOUBLE_PRECISION @@ -270,6 +271,7 @@ void run(XYZ *in, int in_size_i, int in_size_j, int out_size_i, int out_size_j, // Verify int status = compare_output(gpu_out, cpu_out, in_size_i, in_size_j, out_size_i, out_size_j); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); + if (!(status == 0)) exit(1); free(cpu_out); free(gpu_out); diff --git a/src/bezier-surface-sycl/main.cpp b/src/bezier-surface-sycl/main.cpp index af22cedadf..cbee3622fa 100644 --- a/src/bezier-surface-sycl/main.cpp +++ b/src/bezier-surface-sycl/main.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #if DOUBLE_PRECISION @@ -288,6 +289,7 @@ void run(XYZ *in, int in_size_i, int in_size_j, int out_size_i, int out_size_j, // Verify int status = compare_output(gpu_out, cpu_out, in_size_i, in_size_j, out_size_i, out_size_j); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); + if (!(status == 0)) exit(1); free(cpu_out); free(gpu_out); diff --git a/src/bilateral-cuda/main.cu b/src/bilateral-cuda/main.cu index 10b605eeb0..233ecee0cb 100644 --- a/src/bilateral-cuda/main.cu +++ b/src/bilateral-cuda/main.cu @@ -181,6 +181,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(h_dst); free(r_dst); diff --git a/src/bilateral-hip/main.cu b/src/bilateral-hip/main.cu index 2982f9bbc4..fc1779c4fc 100644 --- a/src/bilateral-hip/main.cu +++ b/src/bilateral-hip/main.cu @@ -181,6 +181,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(h_dst); free(r_dst); diff --git a/src/bilateral-omp/main.cpp b/src/bilateral-omp/main.cpp index dcc95252e8..e0736b7203 100644 --- a/src/bilateral-omp/main.cpp +++ b/src/bilateral-omp/main.cpp @@ -166,6 +166,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } free(h_dst); diff --git a/src/bilateral-sycl/main.cpp b/src/bilateral-sycl/main.cpp index 33286b9b36..7ff5397e2f 100644 --- a/src/bilateral-sycl/main.cpp +++ b/src/bilateral-sycl/main.cpp @@ -207,6 +207,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(h_dst); free(r_dst); diff --git a/src/bitonic-sort-cuda/main.cu b/src/bitonic-sort-cuda/main.cu index 413732b76e..03bd26d01c 100644 --- a/src/bitonic-sort-cuda/main.cu +++ b/src/bitonic-sort-cuda/main.cu @@ -40,6 +40,7 @@ #include #include #include +#include #define BLOCK_SIZE 256 @@ -217,6 +218,7 @@ int main(int argc, char *argv[]) { // Verify int unequal = memcmp(data_gpu, data_cpu, size_bytes); std::cout << (unequal ? "FAIL" : "PASS") << std::endl; + if (unequal) exit(1); // Clean CPU memory. free(data_cpu); diff --git a/src/bitonic-sort-hip/main.cu b/src/bitonic-sort-hip/main.cu index 6f97dcbe80..44fdfb9b26 100644 --- a/src/bitonic-sort-hip/main.cu +++ b/src/bitonic-sort-hip/main.cu @@ -40,6 +40,7 @@ #include #include #include +#include #define BLOCK_SIZE 256 @@ -216,6 +217,7 @@ int main(int argc, char *argv[]) { // Verify int unequal = memcmp(data_gpu, data_cpu, size_bytes); std::cout << (unequal ? "FAIL" : "PASS") << std::endl; + if (unequal) exit(1); // Clean CPU memory. free(data_cpu); diff --git a/src/bitonic-sort-omp/main.cpp b/src/bitonic-sort-omp/main.cpp index 05226b5082..914ca9c4f2 100644 --- a/src/bitonic-sort-omp/main.cpp +++ b/src/bitonic-sort-omp/main.cpp @@ -40,6 +40,7 @@ #include #include #include +#include void ParallelBitonicSort(int input[], int n) { @@ -211,6 +212,7 @@ int main(int argc, char *argv[]) { // Verify int unequal = memcmp(data_gpu, data_cpu, size_bytes); std::cout << (unequal ? "FAIL" : "PASS") << std::endl; + if (unequal) exit(1); // Clean CPU memory. free(data_cpu); diff --git a/src/bitonic-sort-sycl/main.cpp b/src/bitonic-sort-sycl/main.cpp index 8c78e7bdc8..4a71156b70 100644 --- a/src/bitonic-sort-sycl/main.cpp +++ b/src/bitonic-sort-sycl/main.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #define BLOCK_SIZE 256 @@ -229,6 +230,7 @@ int main(int argc, char *argv[]) { // Verify int unequal = memcmp(data_gpu, data_cpu, size_bytes); std::cout << (unequal ? "FAIL" : "PASS") << std::endl; + if (unequal) exit(1); // Clean CPU memory. free(data_cpu); diff --git a/src/bitpacking-cuda/main.cu b/src/bitpacking-cuda/main.cu index f872a015fe..e3a02472d6 100644 --- a/src/bitpacking-cuda/main.cu +++ b/src/bitpacking-cuda/main.cu @@ -1,4 +1,5 @@ #include "utils.h" +#include template void toGPU(T* const output, T const* const input, size_t const num) @@ -143,6 +144,7 @@ int main() { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } free(inputHost); diff --git a/src/bitpacking-hip/main.cu b/src/bitpacking-hip/main.cu index f82840136c..00c82febc0 100644 --- a/src/bitpacking-hip/main.cu +++ b/src/bitpacking-hip/main.cu @@ -1,4 +1,5 @@ #include "utils.h" +#include template void toGPU(T* const output, T const* const input, size_t const num) @@ -144,6 +145,7 @@ int main() { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } free(inputHost); diff --git a/src/bitpacking-sycl/main.cpp b/src/bitpacking-sycl/main.cpp index 640fc01cb4..97aebb23da 100644 --- a/src/bitpacking-sycl/main.cpp +++ b/src/bitpacking-sycl/main.cpp @@ -1,4 +1,5 @@ #include "utils.h" +#include template void toGPU(sycl::queue &q, T* const output, T const* const input, size_t const num) @@ -150,6 +151,7 @@ int main() { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } free(inputHost); diff --git a/src/bitpermute-cuda/main.cu b/src/bitpermute-cuda/main.cu index c2a0fa7b2c..7fcab1b27f 100644 --- a/src/bitpermute-cuda/main.cu +++ b/src/bitpermute-cuda/main.cu @@ -9,6 +9,7 @@ #include #include "kernels.h" #include "reference.h" +#include void cuda_check(cudaError_t error, const char *file, int line) { if (error != cudaSuccess) { @@ -71,6 +72,7 @@ void bit_permute(const int lg_domain_size, const int repeat) cudaCheck(cudaMemcpy(inout, d_inout, domain_size_bytes, cudaMemcpyDeviceToHost)); int error = memcmp(out, inout, domain_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/bitpermute-hip/main.cu b/src/bitpermute-hip/main.cu index 874b5c154b..584714e494 100644 --- a/src/bitpermute-hip/main.cu +++ b/src/bitpermute-hip/main.cu @@ -9,6 +9,7 @@ #include #include "kernels.h" #include "reference.h" +#include void hip_check(hipError_t error, const char *file, int line) { if (error != hipSuccess) { @@ -69,6 +70,7 @@ void bit_permute(const int lg_domain_size, const int repeat) hipCheck(hipMemcpy(inout, d_inout, domain_size_bytes, hipMemcpyDeviceToHost)); int error = memcmp(out, inout, domain_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/bitpermute-sycl/main.cpp b/src/bitpermute-sycl/main.cpp index 10c7bd5ee9..5fe3bfb6e4 100644 --- a/src/bitpermute-sycl/main.cpp +++ b/src/bitpermute-sycl/main.cpp @@ -9,6 +9,7 @@ #include #include "kernels.h" #include "reference.h" +#include static void bit_rev(sycl::queue &q, fr_t* d_out, const fr_t* d_inp, uint32_t lg_domain_size) { @@ -86,6 +87,7 @@ void bit_permute(sycl::queue &q, const int lg_domain_size, const int repeat) q.memcpy(inout, d_inout, domain_size_bytes).wait(); int error = memcmp(out, inout, domain_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/blas-dot-cuda/main.cu b/src/blas-dot-cuda/main.cu index a8924f5616..e31c1604fe 100644 --- a/src/blas-dot-cuda/main.cu +++ b/src/blas-dot-cuda/main.cu @@ -79,6 +79,7 @@ void dot (const size_t iNumElements, const int iNumIterations) cudaMemcpy(&dst, d_dst, sizeof(T), cudaMemcpyDeviceToHost); printf("Host: %lf Device: %lf\n", sum, double(dst)); printf("%s\n\n", (fabs(double(dst) - sum) < 1e-1) ? "PASS" : "FAIL"); + if (!(fabs(double(dst) - sum) < 1e-1)) exit(1); cudaFree(d_dst); cudaFree(d_srcA); diff --git a/src/blas-dot-hip/main.cu b/src/blas-dot-hip/main.cu index 3df7cab299..29a6d29733 100644 --- a/src/blas-dot-hip/main.cu +++ b/src/blas-dot-hip/main.cu @@ -79,6 +79,7 @@ void dot (const size_t iNumElements, const int iNumIterations) hipMemcpy(&dst, d_dst, sizeof(T), hipMemcpyDeviceToHost); printf("Host: %lf Device: %lf\n", sum, double(dst)); printf("%s\n\n", (fabs(double(dst) - sum) < 1e-1) ? "PASS" : "FAIL"); + if (!(fabs(double(dst) - sum) < 1e-1)) exit(1); hipFree(d_dst); hipFree(d_srcA); diff --git a/src/blas-dot-sycl/main.cpp b/src/blas-dot-sycl/main.cpp index 9526fec8f4..87bea9d954 100644 --- a/src/blas-dot-sycl/main.cpp +++ b/src/blas-dot-sycl/main.cpp @@ -60,6 +60,7 @@ void dot (const size_t iNumElements, const int iNumIterations) q.memcpy(&dst, d_dst, sizeof(T)).wait(); printf("Host: %lf Device: %lf\n", sum, double(dst)); printf("%s\n\n", (fabs(double(dst) - sum) < 1e-1) ? "PASS" : "FAIL"); + if (!(fabs(double(dst) - sum) < 1e-1)) exit(1); sycl::free(d_dst, q); sycl::free(d_srcA, q); diff --git a/src/blas-gemm-cuda/main.cu b/src/blas-gemm-cuda/main.cu index 42e4f03172..4f97eb6dc8 100644 --- a/src/blas-gemm-cuda/main.cu +++ b/src/blas-gemm-cuda/main.cu @@ -99,6 +99,7 @@ void run_gemm_example(int m, int k, int n, int repeat) { cudaMemcpy(r, dr, C_size, cudaMemcpyDeviceToHost); int error = memcmp(c, r, C_size); std::cout << (error ? "FAIL" : "PASS") << std::endl; + if (error) exit(1); cudaDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); diff --git a/src/blas-gemm-hip/main.cu b/src/blas-gemm-hip/main.cu index 276be22650..7c2bcd0494 100644 --- a/src/blas-gemm-hip/main.cu +++ b/src/blas-gemm-hip/main.cu @@ -100,6 +100,7 @@ void run_gemm_example(int m, int k, int n, int repeat) { hipMemcpy(r, dr, C_size, hipMemcpyDeviceToHost); int error = memcmp(c, r, C_size); std::cout << (error ? "FAIL" : "PASS") << std::endl; + if (error) exit(1); hipDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); diff --git a/src/blas-gemm-sycl/main.cpp b/src/blas-gemm-sycl/main.cpp index 50eca277cd..4cebdcbc60 100644 --- a/src/blas-gemm-sycl/main.cpp +++ b/src/blas-gemm-sycl/main.cpp @@ -141,6 +141,7 @@ void run_gemm_example(MKL_INT m, MKL_INT k, MKL_INT n, int repeat) { q.memcpy(r, dr, C_size).wait(); int error = memcmp(c, r, C_size); std::cout << (error ? "FAIL" : "PASS") << std::endl; + if (error) exit(1); q.wait(); auto start = std::chrono::steady_clock::now(); diff --git a/src/blockAccess-cuda/main.cu b/src/blockAccess-cuda/main.cu index 72cce7973d..04ba9cda93 100644 --- a/src/blockAccess-cuda/main.cu +++ b/src/blockAccess-cuda/main.cu @@ -124,6 +124,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/blockAccess-hip/main.cu b/src/blockAccess-hip/main.cu index 7ffcc96440..fc202287c1 100644 --- a/src/blockAccess-hip/main.cu +++ b/src/blockAccess-hip/main.cu @@ -125,6 +125,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/blockAccess-sycl/main.cpp b/src/blockAccess-sycl/main.cpp index a2693dff74..502b120566 100644 --- a/src/blockAccess-sycl/main.cpp +++ b/src/blockAccess-sycl/main.cpp @@ -189,6 +189,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/blockScan-cuda/main.cu b/src/blockScan-cuda/main.cu index decd822ca8..9d768f8b73 100644 --- a/src/blockScan-cuda/main.cu +++ b/src/blockScan-cuda/main.cu @@ -31,6 +31,7 @@ #include #include #include +#include using namespace cub; @@ -190,11 +191,13 @@ void Test() printf("\tOutput items: "); int compare = CompareDeviceResults(h_reference, d_out, TILE_SIZE); printf("%s\n", compare ? "FAIL" : "PASS"); + if (compare) exit(1); // Check total aggregate printf("\tAggregate: "); compare = CompareDeviceResults(&h_aggregate, d_out + TILE_SIZE, 1); printf("%s\n", compare ? "FAIL" : "PASS"); + if (compare) exit(1); } } GPU_CHECK(cudaDeviceSynchronize()); diff --git a/src/blockScan-hip/main.cu b/src/blockScan-hip/main.cu index 9556d349bf..eb24fb57e5 100644 --- a/src/blockScan-hip/main.cu +++ b/src/blockScan-hip/main.cu @@ -32,6 +32,7 @@ #include #include #include +#include using namespace hipcub; @@ -191,11 +192,13 @@ void Test() printf("\tOutput items: "); int compare = CompareDeviceResults(h_reference, d_out, TILE_SIZE); printf("%s\n", compare ? "FAIL" : "PASS"); + if (compare) exit(1); // Check total aggregate printf("\tAggregate: "); compare = CompareDeviceResults(&h_aggregate, d_out + TILE_SIZE, 1); printf("%s\n", compare ? "FAIL" : "PASS"); + if (compare) exit(1); } } GPU_CHECK(hipDeviceSynchronize()); diff --git a/src/blockScan-sycl/main.cpp b/src/blockScan-sycl/main.cpp index faca744059..e8277ce818 100644 --- a/src/blockScan-sycl/main.cpp +++ b/src/blockScan-sycl/main.cpp @@ -32,6 +32,7 @@ #include "block_load.hpp" #include "block_store.hpp" #include "block_scan.hpp" +#include int grid_size = 1; int repeat = 100; @@ -181,11 +182,13 @@ void Test(sycl::queue &q) try { printf("\tOutput items: "); int compare = CompareDeviceResults(q, h_reference, d_out, TILE_SIZE); printf("%s\n", compare ? "FAIL" : "PASS"); + if (compare) exit(1); // Check total aggregate printf("\tAggregate: "); compare = CompareDeviceResults(q, &h_aggregate, d_out + TILE_SIZE, 1); printf("%s\n", compare ? "FAIL" : "PASS"); + if (compare) exit(1); } } q.wait(); diff --git a/src/blockexchange-cuda/main.cu b/src/blockexchange-cuda/main.cu index 1b6785f732..bdc6f16ed9 100644 --- a/src/blockexchange-cuda/main.cu +++ b/src/blockexchange-cuda/main.cu @@ -121,6 +121,7 @@ int main(int argc, char* argv[]) } stop: printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } cudaFree(d_A); diff --git a/src/blockexchange-hip/main.cu b/src/blockexchange-hip/main.cu index 465b388237..2606ebcf3e 100644 --- a/src/blockexchange-hip/main.cu +++ b/src/blockexchange-hip/main.cu @@ -121,6 +121,7 @@ int main(int argc, char* argv[]) } stop: printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } hipFree(d_A); diff --git a/src/blockexchange-sycl/main.cpp b/src/blockexchange-sycl/main.cpp index 6a7df2a0f7..5590b222d5 100644 --- a/src/blockexchange-sycl/main.cpp +++ b/src/blockexchange-sycl/main.cpp @@ -142,6 +142,7 @@ int main(int argc, char* argv[]) } stop: printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } sycl::free(d_A, q); diff --git a/src/boxfilter-cuda/main.cu b/src/boxfilter-cuda/main.cu index ae1b370fbf..81068e1db0 100644 --- a/src/boxfilter-cuda/main.cu +++ b/src/boxfilter-cuda/main.cu @@ -15,6 +15,7 @@ #include #include "shrUtils.h" #include "helper_math.h" +#include extern void BoxFilterHost(unsigned int* uiInputImage, unsigned int* uiTempImage, unsigned int* uiOutputImage, int uiWidth, int uiHeight, int iRadius, float fScale ); @@ -284,6 +285,7 @@ int main(int argc, char** argv) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(uiInput); free(uiTmp); diff --git a/src/boxfilter-hip/main.cu b/src/boxfilter-hip/main.cu index 0de8d309c6..47eed8516e 100644 --- a/src/boxfilter-hip/main.cu +++ b/src/boxfilter-hip/main.cu @@ -14,6 +14,7 @@ #include #include #include "shrUtils.h" +#include extern void BoxFilterHost(unsigned int* uiInputImage, unsigned int* uiTempImage, unsigned int* uiOutputImage, int uiWidth, int uiHeight, int iRadius, float fScale ); @@ -283,6 +284,7 @@ int main(int argc, char** argv) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(uiInput); free(uiTmp); diff --git a/src/boxfilter-omp/main.cpp b/src/boxfilter-omp/main.cpp index c3809848f9..a417b11373 100644 --- a/src/boxfilter-omp/main.cpp +++ b/src/boxfilter-omp/main.cpp @@ -14,6 +14,7 @@ #include #include #include "shrUtils.h" +#include typedef struct __attribute__((__aligned__(4))) { @@ -282,6 +283,7 @@ int main(int argc, char** argv) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(uiInput); free(uiTmp); diff --git a/src/boxfilter-sycl/main.cpp b/src/boxfilter-sycl/main.cpp index 22986aeb67..de21beb3d0 100644 --- a/src/boxfilter-sycl/main.cpp +++ b/src/boxfilter-sycl/main.cpp @@ -14,6 +14,7 @@ #include #include #include "shrUtils.h" +#include extern void BoxFilterHost( unsigned int* uiInputImage, unsigned int* uiTempImage, unsigned int* uiOutputImage, @@ -262,6 +263,7 @@ int main(int argc, char** argv) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(uiInput); free(uiTmp); diff --git a/src/bscan-cuda/main.cu b/src/bscan-cuda/main.cu index 99f7a3ec35..113266d727 100644 --- a/src/bscan-cuda/main.cu +++ b/src/bscan-cuda/main.cu @@ -10,6 +10,7 @@ #include #include #include +#include __device__ __inline__ int warp_scan(int val, volatile int *s_data) { @@ -156,6 +157,7 @@ void bscan (const int repeat) printf("Block size = %d, ratio of valid elements = %f, verify = %s\n", N, valid_count * 1.f / (N * repeat), ok ? "PASS" : "FAIL"); + if (!ok) exit(1); if (ok) { printf("Average execution time: %f (us)\n", (time * 1e-3f) / repeat); diff --git a/src/bscan-hip/main-wave64.cu b/src/bscan-hip/main-wave64.cu index 38b3e2cbab..77bc46745f 100644 --- a/src/bscan-hip/main-wave64.cu +++ b/src/bscan-hip/main-wave64.cu @@ -12,6 +12,7 @@ #include #include #include +#include __device__ __inline__ int warp_scan(int val, volatile int *s_data) { @@ -145,6 +146,7 @@ void bscan (const int repeat) printf("Block size = %d, ratio of valid elements = %f, verify = %s\n", N, valid_count * 1.f / (N * repeat), ok ? "PASS" : "FAIL"); + if (!ok) exit(1); if (ok) { printf("Average execution time: %f (us)\n", (time * 1e-3f) / repeat); diff --git a/src/bscan-hip/main.cu b/src/bscan-hip/main.cu index e15986a9b5..9f234b3bfa 100644 --- a/src/bscan-hip/main.cu +++ b/src/bscan-hip/main.cu @@ -10,6 +10,7 @@ #include #include #include +#include __device__ __inline__ int warp_scan(int val, volatile int *s_data) { @@ -145,6 +146,7 @@ void bscan (const int repeat) printf("Block size = %d, ratio of valid elements = %f, verify = %s\n", N, valid_count * 1.f / (N * repeat), ok ? "PASS" : "FAIL"); + if (!ok) exit(1); if (ok) { printf("Average execution time: %f (us)\n", (time * 1e-3f) / repeat); diff --git a/src/bscan-sycl/main-wave64.cpp b/src/bscan-sycl/main-wave64.cpp index 6054a82031..8d15e57731 100644 --- a/src/bscan-sycl/main-wave64.cpp +++ b/src/bscan-sycl/main-wave64.cpp @@ -10,6 +10,7 @@ #include #include #include +#include inline int warp_scan(sycl::nd_item<1> &item, int val, volatile int *s_data) { @@ -161,6 +162,7 @@ void bscan (const int repeat) printf("Block size = %d, ratio of valid elements = %f, verify = %s\n", N, valid_count * 1.f / (N * repeat), ok ? "PASS" : "FAIL"); + if (!ok) exit(1); if (ok) { printf("Average execution time: %f (us)\n", (time * 1e-3f) / repeat); diff --git a/src/bscan-sycl/main.cpp b/src/bscan-sycl/main.cpp index d53c1d422d..b715a48f76 100644 --- a/src/bscan-sycl/main.cpp +++ b/src/bscan-sycl/main.cpp @@ -9,6 +9,7 @@ #include #include #include +#include inline int warp_scan(sycl::nd_item<1> &item, int val, volatile int *s_data) { @@ -162,6 +163,7 @@ void bscan (const int repeat) printf("Block size = %d, ratio of valid elements = %f, verify = %s\n", N, valid_count * 1.f / (N * repeat), ok ? "PASS" : "FAIL"); + if (!ok) exit(1); if (ok) { printf("Average execution time: %f (us)\n", (time * 1e-3f) / repeat); diff --git a/src/bspline-vgh-cuda/main.cu b/src/bspline-vgh-cuda/main.cu index 6d8c82877c..8c96ec1716 100644 --- a/src/bspline-vgh-cuda/main.cu +++ b/src/bspline-vgh-cuda/main.cu @@ -263,6 +263,7 @@ int main(int argc, char ** argv) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(Af); free(dAf); diff --git a/src/bspline-vgh-hip/main.cu b/src/bspline-vgh-hip/main.cu index eb0f9a9881..7eb600648e 100644 --- a/src/bspline-vgh-hip/main.cu +++ b/src/bspline-vgh-hip/main.cu @@ -264,6 +264,7 @@ int main(int argc, char ** argv) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(Af); free(dAf); diff --git a/src/bspline-vgh-omp/main.cpp b/src/bspline-vgh-omp/main.cpp index 8e86fe3655..037b870397 100644 --- a/src/bspline-vgh-omp/main.cpp +++ b/src/bspline-vgh-omp/main.cpp @@ -284,6 +284,7 @@ int main(int argc, char ** argv) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(Af); free(dAf); diff --git a/src/bspline-vgh-sycl/main.cpp b/src/bspline-vgh-sycl/main.cpp index 5ab8e91a0f..2018e2a085 100644 --- a/src/bspline-vgh-sycl/main.cpp +++ b/src/bspline-vgh-sycl/main.cpp @@ -325,6 +325,7 @@ int main(int argc, char ** argv) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(Af); free(dAf); diff --git a/src/burger-cuda/main.cu b/src/burger-cuda/main.cu index 14324353ee..ad4627ecd9 100644 --- a/src/burger-cuda/main.cu +++ b/src/burger-cuda/main.cu @@ -185,6 +185,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(x); free(y); diff --git a/src/burger-hip/main.cu b/src/burger-hip/main.cu index 271d49dd1f..9a070740e7 100644 --- a/src/burger-hip/main.cu +++ b/src/burger-hip/main.cu @@ -185,6 +185,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(x); free(y); diff --git a/src/burger-omp/main.cpp b/src/burger-omp/main.cpp index c0f84ae930..0fa376eccb 100644 --- a/src/burger-omp/main.cpp +++ b/src/burger-omp/main.cpp @@ -191,6 +191,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(x); free(y); diff --git a/src/burger-sycl/main.cpp b/src/burger-sycl/main.cpp index c0b6656095..9369214ea1 100644 --- a/src/burger-sycl/main.cpp +++ b/src/burger-sycl/main.cpp @@ -238,6 +238,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(x); free(y); diff --git a/src/bwt-cuda/main.cpp b/src/bwt-cuda/main.cpp index ea7f9ff141..82a7781331 100644 --- a/src/bwt-cuda/main.cpp +++ b/src/bwt-cuda/main.cpp @@ -69,6 +69,7 @@ int main(int argc, char const *argv[]) std::cout << "PASS\n"; } else { std::cout << "FAIL\n"; + exit(1); } free(sequence); diff --git a/src/cbsfil-cuda/main.cu b/src/cbsfil-cuda/main.cu index f90a8704a0..1d2f1ad205 100644 --- a/src/cbsfil-cuda/main.cu +++ b/src/cbsfil-cuda/main.cu @@ -73,6 +73,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); for (int i = 0; i < repeat; i++) { diff --git a/src/cbsfil-hip/main.cu b/src/cbsfil-hip/main.cu index fef538f5c2..f5bb73ef67 100644 --- a/src/cbsfil-hip/main.cu +++ b/src/cbsfil-hip/main.cu @@ -73,6 +73,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); for (int i = 0; i < repeat; i++) { diff --git a/src/cbsfil-omp/main.cpp b/src/cbsfil-omp/main.cpp index f03e0339f8..2621419fef 100644 --- a/src/cbsfil-omp/main.cpp +++ b/src/cbsfil-omp/main.cpp @@ -65,6 +65,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); for (int i = 0; i < repeat; i++) { diff --git a/src/cbsfil-sycl/main.cpp b/src/cbsfil-sycl/main.cpp index aa74b81fb2..eee538cbd6 100644 --- a/src/cbsfil-sycl/main.cpp +++ b/src/cbsfil-sycl/main.cpp @@ -88,6 +88,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); for (int i = 0; i < repeat; i++) { diff --git a/src/cc-cuda/main.cu b/src/cc-cuda/main.cu index b22b252fa8..1fac145ae4 100644 --- a/src/cc-cuda/main.cu +++ b/src/cc-cuda/main.cu @@ -432,6 +432,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFreeHost(nodestatus); freeECLgraph(g); diff --git a/src/cc-hip/main.cu b/src/cc-hip/main.cu index 56ac4aad9b..a7595b349c 100644 --- a/src/cc-hip/main.cu +++ b/src/cc-hip/main.cu @@ -431,6 +431,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipHostFree(nodestatus); freeECLgraph(g); diff --git a/src/cc-sycl/main.cpp b/src/cc-sycl/main.cpp index e5444c644a..50a38c21e6 100644 --- a/src/cc-sycl/main.cpp +++ b/src/cc-sycl/main.cpp @@ -508,6 +508,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(nodestatus); freeECLgraph(g); diff --git a/src/ccl-cuda/main.cu b/src/ccl-cuda/main.cu index bc72a02e7a..8d358d9f35 100644 --- a/src/ccl-cuda/main.cu +++ b/src/ccl-cuda/main.cu @@ -145,6 +145,7 @@ int main(int argc, char* argv[]) free(h_recvbuff); printf("MPI Rank %d: %s\n", mpi_rank, ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } // NCCL cleanup diff --git a/src/ccl-hip/main.cu b/src/ccl-hip/main.cu index 94b3eab58e..b27a47c200 100644 --- a/src/ccl-hip/main.cu +++ b/src/ccl-hip/main.cu @@ -145,6 +145,7 @@ int main(int argc, char* argv[]) free(h_recvbuff); printf("MPI Rank %d: %s\n", mpi_rank, ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } // NCCL cleanup diff --git a/src/ccl-sycl/main.cpp b/src/ccl-sycl/main.cpp index bc993be1c4..0cefb423b6 100644 --- a/src/ccl-sycl/main.cpp +++ b/src/ccl-sycl/main.cpp @@ -138,6 +138,7 @@ int main(int argc, char *argv[]) { free(h_recvbuff); printf("MPI Rank %d: %s\n", mpi_rank, ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } return 0; diff --git a/src/ccsd-trpdrv-cuda/main.cu b/src/ccsd-trpdrv-cuda/main.cu index 21a13d8f99..82cd21463d 100644 --- a/src/ccsd-trpdrv-cuda/main.cu +++ b/src/ccsd-trpdrv-cuda/main.cu @@ -193,6 +193,7 @@ maxed_out: bool ok = fabs(emp4_r - emp4) < 1e-6 && fabs(emp5_r - emp5) < 1e-6; printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(eorb); free(f1n ); diff --git a/src/ccsd-trpdrv-omp/main.cpp b/src/ccsd-trpdrv-omp/main.cpp index bf3abb7c8b..5b3d75f43b 100644 --- a/src/ccsd-trpdrv-omp/main.cpp +++ b/src/ccsd-trpdrv-omp/main.cpp @@ -192,6 +192,7 @@ int main(int argc, char* argv[]) bool ok = fabs(emp4_r - emp4) < 1e-6 && fabs(emp5_r - emp5) < 1e-6; printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(eorb); free(f1n ); diff --git a/src/ccsd-trpdrv-sycl/main.cpp b/src/ccsd-trpdrv-sycl/main.cpp index a6229e8780..e68d878b12 100644 --- a/src/ccsd-trpdrv-sycl/main.cpp +++ b/src/ccsd-trpdrv-sycl/main.cpp @@ -208,6 +208,7 @@ int main(int argc, char* argv[]) bool ok = fabs(emp4_r - emp4) < 1e-6 && fabs(emp5_r - emp5) < 1e-6; printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(eorb); free(f1n ); diff --git a/src/chacha20-cuda/main.cu b/src/chacha20-cuda/main.cu index 0f59ea56ce..2d3845d7f0 100644 --- a/src/chacha20-cuda/main.cu +++ b/src/chacha20-cuda/main.cu @@ -114,6 +114,7 @@ int main(int argc, char* argv[]) int error = memcmp(result, raw_keystream, result_len); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(result); free(raw_keystream); diff --git a/src/chacha20-hip/main.cu b/src/chacha20-hip/main.cu index 5ee76eb1c7..7c7b0494e8 100644 --- a/src/chacha20-hip/main.cu +++ b/src/chacha20-hip/main.cu @@ -114,6 +114,7 @@ int main(int argc, char* argv[]) int error = memcmp(result, raw_keystream, result_len); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(result); free(raw_keystream); diff --git a/src/chacha20-omp/main.cpp b/src/chacha20-omp/main.cpp index e5ee7ccdd4..5f95609bd6 100644 --- a/src/chacha20-omp/main.cpp +++ b/src/chacha20-omp/main.cpp @@ -101,6 +101,7 @@ int main(int argc, char* argv[]) int error = memcmp(result, raw_keystream, result_len); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(result); free(raw_keystream); diff --git a/src/chacha20-sycl/main.cpp b/src/chacha20-sycl/main.cpp index ff2c79706f..8b1db2010d 100644 --- a/src/chacha20-sycl/main.cpp +++ b/src/chacha20-sycl/main.cpp @@ -129,6 +129,7 @@ int main(int argc, char* argv[]) int error = memcmp(result, raw_keystream, result_len); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(result); free(raw_keystream); diff --git a/src/channelSum-cuda/main.cu b/src/channelSum-cuda/main.cu index db54e0d2c4..71769d5e64 100644 --- a/src/channelSum-cuda/main.cu +++ b/src/channelSum-cuda/main.cu @@ -211,6 +211,7 @@ int main(int argc, char* argv[]) printf("Average time of channel sum (nhwc): %f (ms)\n", (time * 1e-6f) / repeat); printf("Verification %s for channel sum (nhwc)\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); ComputeChannelSumNCHW (N, C, W*H, d_X, d_sum, d_sumsq, time, repeat); @@ -220,6 +221,7 @@ int main(int argc, char* argv[]) printf("Average time of channel sum (nchw): %f (ms)\n", (time * 1e-6f) / repeat); printf("Verification %s for channel sum (nchw)\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_X); cudaFree(d_sum); diff --git a/src/channelSum-hip/main.cu b/src/channelSum-hip/main.cu index 33a8a8786c..afddafaedc 100644 --- a/src/channelSum-hip/main.cu +++ b/src/channelSum-hip/main.cu @@ -210,6 +210,7 @@ int main(int argc, char* argv[]) printf("Average time of channel sum (nhwc): %f (ms)\n", (time * 1e-6f) / repeat); printf("Verification %s for channel sum (nhwc)\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); ComputeChannelSumNCHW (N, C, W*H, d_X, d_sum, d_sumsq, time, repeat); @@ -219,6 +220,7 @@ int main(int argc, char* argv[]) printf("Average time of channel sum (nchw): %f (ms)\n", (time * 1e-6f) / repeat); printf("Verification %s for channel sum (nchw)\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_X); hipFree(d_sum); diff --git a/src/channelSum-omp/main.cpp b/src/channelSum-omp/main.cpp index ad9ac2c1ea..2066052055 100644 --- a/src/channelSum-omp/main.cpp +++ b/src/channelSum-omp/main.cpp @@ -141,6 +141,7 @@ int main(int argc, char* argv[]) printf("Average time of channel sum (nhwc): %f (ms)\n", (time * 1e-6f) / repeat); printf("Verification %s for channel sum (nhwc)\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); ComputeChannelSumNCHW (N, C, W*H, h_X, h_sum, h_sumsq, time, repeat); @@ -150,6 +151,7 @@ int main(int argc, char* argv[]) printf("Average time of channel sum (nchw): %f (ms)\n", (time * 1e-6f) / repeat); printf("Verification %s for channel sum (nchw)\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } free(h_X); diff --git a/src/channelSum-sycl/main.cpp b/src/channelSum-sycl/main.cpp index 51952daec9..a34169365e 100644 --- a/src/channelSum-sycl/main.cpp +++ b/src/channelSum-sycl/main.cpp @@ -230,6 +230,7 @@ int main(int argc, char *argv[]) { printf("Average time of channel sum (nhwc): %f (ms)\n", (time * 1e-6f) / repeat); printf("Verification %s for channel sum (nhwc)\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); ComputeChannelSumNCHW (q, N, C, W*H, d_X, d_sum, d_sumsq, time, repeat); @@ -239,6 +240,7 @@ int main(int argc, char *argv[]) { printf("Average time of channel sum (nchw): %f (ms)\n", (time * 1e-6f) / repeat); printf("Verification %s for channel sum (nchw)\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_X, q); sycl::free(d_sum, q); diff --git a/src/chi2-cuda/chi2.cu b/src/chi2-cuda/chi2.cu index 001b0068ae..8db772b686 100644 --- a/src/chi2-cuda/chi2.cu +++ b/src/chi2-cuda/chi2.cu @@ -153,6 +153,7 @@ int main(int argc, char* argv[]) { if (fabs(cpu_results[k] - h_results[k]) > 1e-4) error++; } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(dataT); free(h_results); diff --git a/src/chi2-hip/chi2.cu b/src/chi2-hip/chi2.cu index 9e6c201ea1..806b973152 100644 --- a/src/chi2-hip/chi2.cu +++ b/src/chi2-hip/chi2.cu @@ -153,6 +153,7 @@ int main(int argc, char* argv[]) { if (fabs(cpu_results[k] - h_results[k]) > 1e-4) error++; } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(dataT); free(h_results); diff --git a/src/chi2-omp/chi2.cpp b/src/chi2-omp/chi2.cpp index 80fbee9b48..46de7643dc 100644 --- a/src/chi2-omp/chi2.cpp +++ b/src/chi2-omp/chi2.cpp @@ -121,6 +121,7 @@ int main(int argc, char* argv[]) { if (fabs(cpu_results[k] - h_results[k]) > 1e-4) error++; } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(dataT); free(h_results); diff --git a/src/chi2-sycl/chi2.cpp b/src/chi2-sycl/chi2.cpp index bf2f75354a..1d18dff592 100644 --- a/src/chi2-sycl/chi2.cpp +++ b/src/chi2-sycl/chi2.cpp @@ -153,6 +153,7 @@ int main(int argc, char* argv[]) { if (std::fabs(cpu_results[k] - h_results[k]) > 1e-4) error++; } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(dataT); free(h_results); diff --git a/src/clink-cuda/reference.h b/src/clink-cuda/reference.h index 45e0b6bba3..ac45ca6276 100644 --- a/src/clink-cuda/reference.h +++ b/src/clink-cuda/reference.h @@ -1,4 +1,5 @@ #include +#include void reference ( const float*__restrict__ d_x, @@ -77,6 +78,7 @@ void reference ( } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(h_y); } diff --git a/src/cmembench-cuda/main.cu b/src/cmembench-cuda/main.cu index 4a6b4b44f3..6d9c8f846b 100644 --- a/src/cmembench-cuda/main.cu +++ b/src/cmembench-cuda/main.cu @@ -128,6 +128,7 @@ int test_case (int *a, long gridsize, int repeat) { // verify cudaMemcpy(&c, cd, sizeof(int), cudaMemcpyDeviceToHost); printf("%s\t", (c == VECTOR_SIZE) ? "PASS" : "FAIL"); + if (!(c == VECTOR_SIZE)) exit(1); cudaFree(cd); diff --git a/src/cmembench-hip/main.cu b/src/cmembench-hip/main.cu index 84161bcd1a..ae0bb74050 100644 --- a/src/cmembench-hip/main.cu +++ b/src/cmembench-hip/main.cu @@ -128,6 +128,7 @@ int test_case (int *a, long gridsize, int repeat) { // verify hipMemcpy(&c, cd, sizeof(int), hipMemcpyDeviceToHost); printf("%s\t", (c == VECTOR_SIZE) ? "PASS" : "FAIL"); + if (!(c == VECTOR_SIZE)) exit(1); hipFree(cd); diff --git a/src/columnarSolver-cuda/main.cu b/src/columnarSolver-cuda/main.cu index 78154e0ac9..6376bb9ee1 100644 --- a/src/columnarSolver-cuda/main.cu +++ b/src/columnarSolver-cuda/main.cu @@ -133,6 +133,7 @@ int main(int argc, char* argv[]) { //printf("Best candidate score: %f\n", bestScore); bool pass = verify(&decrypted[ENCRYPTEDLEN*bestCandidate]); printf("%s\n", pass ? "PASS" : "FAIL"); + if (!pass) exit(1); cudaFree(d_scores); cudaFree(d_encrypted); diff --git a/src/columnarSolver-hip/main.cu b/src/columnarSolver-hip/main.cu index 58c7c89a9a..f39ccc5953 100644 --- a/src/columnarSolver-hip/main.cu +++ b/src/columnarSolver-hip/main.cu @@ -133,6 +133,7 @@ int main(int argc, char* argv[]) { //printf("Best candidate score: %f\n", bestScore); bool pass = verify(&decrypted[ENCRYPTEDLEN*bestCandidate]); printf("%s\n", pass ? "PASS" : "FAIL"); + if (!pass) exit(1); hipFree(d_scores); hipFree(d_encrypted); diff --git a/src/columnarSolver-omp/main.cpp b/src/columnarSolver-omp/main.cpp index e7b829afb1..51663d0944 100644 --- a/src/columnarSolver-omp/main.cpp +++ b/src/columnarSolver-omp/main.cpp @@ -137,6 +137,7 @@ int main(int argc, char* argv[]) { //printf("Best candidate score: %f\n", bestScore); bool pass = verify(&decrypted[ENCRYPTEDLEN*bestCandidate]); printf("%s\n", pass ? "PASS" : "FAIL"); + if (!pass) exit(1); delete[] decrypted; delete[] scoreHistory; diff --git a/src/columnarSolver-sycl/main.cpp b/src/columnarSolver-sycl/main.cpp index a1ebbe919a..efa52f7965 100644 --- a/src/columnarSolver-sycl/main.cpp +++ b/src/columnarSolver-sycl/main.cpp @@ -156,6 +156,7 @@ int main(int argc, char* argv[]) { //printf("Best candidate score: %f\n", bestScore); bool pass = verify(&decrypted[ENCRYPTEDLEN*bestCandidate]); printf("%s\n", pass ? "PASS" : "FAIL"); + if (!pass) exit(1); sycl::free(d_scores, q); sycl::free(d_encrypted, q); diff --git a/src/complex-cuda/main.cu b/src/complex-cuda/main.cu index 4b66c71b04..1ee5a87448 100644 --- a/src/complex-cuda/main.cu +++ b/src/complex-cuda/main.cu @@ -103,6 +103,7 @@ int main(int argc, char* argv[]) { printf("%s\n", (complex_float_check && complex_double_check) ? "PASS" : "FAIL"); + if (!(complex_float_check && complex_double_check)) exit(1); cudaFree(d_cs); free(cs); diff --git a/src/complex-hip/main.cu b/src/complex-hip/main.cu index a8c1e75018..9786e46f51 100644 --- a/src/complex-hip/main.cu +++ b/src/complex-hip/main.cu @@ -103,6 +103,7 @@ int main(int argc, char* argv[]) { printf("%s\n", (complex_float_check && complex_double_check) ? "PASS" : "FAIL"); + if (!(complex_float_check && complex_double_check)) exit(1); hipFree(d_cs); free(cs); diff --git a/src/complex-omp/main.cpp b/src/complex-omp/main.cpp index 404eb759e5..34f6c88b87 100644 --- a/src/complex-omp/main.cpp +++ b/src/complex-omp/main.cpp @@ -64,6 +64,7 @@ int main(int argc, char* argv[]) { printf("%s\n", (complex_float_check && complex_double_check) ? "PASS" : "FAIL"); + if (!(complex_float_check && complex_double_check)) exit(1); } free(cs); diff --git a/src/complex-sycl/main.cpp b/src/complex-sycl/main.cpp index 9b995042b0..add9181229 100644 --- a/src/complex-sycl/main.cpp +++ b/src/complex-sycl/main.cpp @@ -131,6 +131,7 @@ int main(int argc, char* argv[]) { printf("%s\n", (complex_float_check && complex_double_check) ? "PASS" : "FAIL"); + if (!(complex_float_check && complex_double_check)) exit(1); sycl::free(d_cs, q); free(cs); diff --git a/src/concat-cuda/main.cu b/src/concat-cuda/main.cu index 6908e99d32..e8dd03d772 100644 --- a/src/concat-cuda/main.cu +++ b/src/concat-cuda/main.cu @@ -109,6 +109,7 @@ int main(int argc, char* argv[]) cudaMemcpy (outp, d_outp, outp_size_bytes, cudaMemcpyDeviceToHost); int error = memcmp(outp_ref, outp, outp_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/concat-hip/main.cu b/src/concat-hip/main.cu index 88e9acd249..799d1eb868 100644 --- a/src/concat-hip/main.cu +++ b/src/concat-hip/main.cu @@ -109,6 +109,7 @@ int main(int argc, char* argv[]) hipMemcpy (outp, d_outp, outp_size_bytes, hipMemcpyDeviceToHost); int error = memcmp(outp_ref, outp, outp_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/concat-omp/main.cpp b/src/concat-omp/main.cpp index 803496661b..5d24ade7f2 100644 --- a/src/concat-omp/main.cpp +++ b/src/concat-omp/main.cpp @@ -97,6 +97,7 @@ int main(int argc, char* argv[]) inp1, inp2, outp_ref, batch_size * beam_size * nhead, head_dim, sl1, sl2); int error = memcmp(outp_ref, outp, outp_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/concat-sycl/main.cpp b/src/concat-sycl/main.cpp index 141abc59f6..59e781eb47 100644 --- a/src/concat-sycl/main.cpp +++ b/src/concat-sycl/main.cpp @@ -119,6 +119,7 @@ int main(int argc, char* argv[]) q.memcpy (outp, d_outp, outp_size_bytes).wait(); int error = memcmp(outp_ref, outp, outp_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/concurrentKernels-cuda/main.cu b/src/concurrentKernels-cuda/main.cu index a75638577a..a8ef904159 100644 --- a/src/concurrentKernels-cuda/main.cu +++ b/src/concurrentKernels-cuda/main.cu @@ -156,6 +156,7 @@ int main(int argc, char **argv) { long sum = 0; for (int i = 0; i < time_clocks; i++) sum += i % 3; printf("%s\n", a[0] == nkernels * sum ? "PASS" : "FAIL"); + if (a[0] != nkernels * sum) exit(1); // release resources for (int i = 0; i < nkernels; i++) { diff --git a/src/concurrentKernels-hip/main.cu b/src/concurrentKernels-hip/main.cu index 59893fd598..866c923a28 100644 --- a/src/concurrentKernels-hip/main.cu +++ b/src/concurrentKernels-hip/main.cu @@ -153,6 +153,7 @@ int main(int argc, char **argv) { long sum = 0; for (int i = 0; i < time_clocks; i++) sum += i % 3; printf("%s\n", a[0] == nkernels * sum ? "PASS" : "FAIL"); + if (a[0] != nkernels * sum) exit(1); // release resources for (int i = 0; i < nkernels; i++) { diff --git a/src/concurrentKernels-sycl/main.cpp b/src/concurrentKernels-sycl/main.cpp index d4cc0b2dde..5a65294cab 100644 --- a/src/concurrentKernels-sycl/main.cpp +++ b/src/concurrentKernels-sycl/main.cpp @@ -140,6 +140,7 @@ int main(int argc, char **argv) { long sum = 0; for (int i = 0; i < time_clocks; i++) sum += i % 3; printf("%s\n", a[0] == nkernels * sum ? "PASS" : "FAIL"); + if (a[0] != nkernels * sum) exit(1); sycl::free(a, q); sycl::free(d_a, q); diff --git a/src/convolution1D-cuda/main.cu b/src/convolution1D-cuda/main.cu index faa705a9de..fd080c0b08 100644 --- a/src/convolution1D-cuda/main.cu +++ b/src/convolution1D-cuda/main.cu @@ -133,6 +133,7 @@ void reference(const T *h_in, } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } template diff --git a/src/convolution1D-hip/main.cu b/src/convolution1D-hip/main.cu index 319815f029..8760b8dcb6 100644 --- a/src/convolution1D-hip/main.cu +++ b/src/convolution1D-hip/main.cu @@ -133,6 +133,7 @@ void reference(const T *h_in, } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } template diff --git a/src/convolution1D-omp/main.cpp b/src/convolution1D-omp/main.cpp index 3323de9131..309c83a01c 100644 --- a/src/convolution1D-omp/main.cpp +++ b/src/convolution1D-omp/main.cpp @@ -139,6 +139,7 @@ void reference(const T *h_in, } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } template diff --git a/src/convolution1D-sycl/main.cpp b/src/convolution1D-sycl/main.cpp index 112a89ea22..733e5626c2 100644 --- a/src/convolution1D-sycl/main.cpp +++ b/src/convolution1D-sycl/main.cpp @@ -136,6 +136,7 @@ void reference(const T *h_in, } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } template diff --git a/src/convolution3D-cuda/main.cu b/src/convolution3D-cuda/main.cu index 6a46cb76a1..d9f5dd2d39 100644 --- a/src/convolution3D-cuda/main.cu +++ b/src/convolution3D-cuda/main.cu @@ -42,6 +42,7 @@ void verify (const T* Y, T* Y_ref, size_t Y_size) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } template diff --git a/src/convolution3D-hip/main.cu b/src/convolution3D-hip/main.cu index edb14f465b..fade38d01e 100644 --- a/src/convolution3D-hip/main.cu +++ b/src/convolution3D-hip/main.cu @@ -42,6 +42,7 @@ void verify (const T* Y, T* Y_ref, size_t Y_size) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } template diff --git a/src/convolution3D-omp/main.cpp b/src/convolution3D-omp/main.cpp index 7f5a1af593..7e28c07281 100644 --- a/src/convolution3D-omp/main.cpp +++ b/src/convolution3D-omp/main.cpp @@ -112,6 +112,7 @@ void conv3D(const int N, const int C, const int M, const int Win, const int Hin, } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(X); free(W); diff --git a/src/convolution3D-sycl/main.cpp b/src/convolution3D-sycl/main.cpp index d0a154b682..e9727c3ccd 100644 --- a/src/convolution3D-sycl/main.cpp +++ b/src/convolution3D-sycl/main.cpp @@ -36,6 +36,7 @@ void verify (const T* Y, T* Y_ref, size_t Y_size) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } template diff --git a/src/convolutionSeparable-cuda/main.cu b/src/convolutionSeparable-cuda/main.cu index 101aeb7565..7148ac80b1 100644 --- a/src/convolutionSeparable-cuda/main.cu +++ b/src/convolutionSeparable-cuda/main.cu @@ -120,5 +120,6 @@ int main(int argc, char **argv) cudaFree(d_Output); printf("%s\n", L2norm < 1e-6 ? "PASS" : "FAIL"); + if (L2norm >= 1e-6) exit(1); return 0; } diff --git a/src/convolutionSeparable-hip/main.cu b/src/convolutionSeparable-hip/main.cu index 86be805ec3..b66b628620 100644 --- a/src/convolutionSeparable-hip/main.cu +++ b/src/convolutionSeparable-hip/main.cu @@ -120,5 +120,6 @@ int main(int argc, char **argv) hipFree(d_Output); printf("%s\n", L2norm < 1e-6 ? "PASS" : "FAIL"); + if (L2norm >= 1e-6) exit(1); return 0; } diff --git a/src/convolutionSeparable-omp/main.cpp b/src/convolutionSeparable-omp/main.cpp index edee973c31..21879112e0 100644 --- a/src/convolutionSeparable-omp/main.cpp +++ b/src/convolutionSeparable-omp/main.cpp @@ -102,5 +102,6 @@ int main(int argc, char **argv) free(h_Kernel); printf("%s\n", L2norm < 1e-6 ? "PASS" : "FAIL"); + if (L2norm >= 1e-6) exit(1); return 0; } diff --git a/src/convolutionSeparable-sycl/main.cpp b/src/convolutionSeparable-sycl/main.cpp index 62d2161149..2cff5e5c19 100644 --- a/src/convolutionSeparable-sycl/main.cpp +++ b/src/convolutionSeparable-sycl/main.cpp @@ -129,5 +129,6 @@ int main(int argc, char **argv) sycl::free(d_Kernel, q); printf("%s\n", L2norm < 1e-6 ? "PASS" : "FAIL"); + if (L2norm >= 1e-6) exit(1); return 0; } diff --git a/src/cooling-cuda/main.cu b/src/cooling-cuda/main.cu index 103563e1dc..8a29502323 100644 --- a/src/cooling-cuda/main.cu +++ b/src/cooling-cuda/main.cu @@ -183,6 +183,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); cudaFree(d_T); cudaFree(d_r); diff --git a/src/cooling-hip/main.cu b/src/cooling-hip/main.cu index f51fd3a45f..9b5b28103b 100644 --- a/src/cooling-hip/main.cu +++ b/src/cooling-hip/main.cu @@ -183,6 +183,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); hipFree(d_T); hipFree(d_r); diff --git a/src/cooling-omp/main.cpp b/src/cooling-omp/main.cpp index 01463f6069..d70d5a51ec 100644 --- a/src/cooling-omp/main.cpp +++ b/src/cooling-omp/main.cpp @@ -175,6 +175,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(T); free(h_r); diff --git a/src/cooling-sycl/main.cpp b/src/cooling-sycl/main.cpp index ad681bb9ea..b099b3b136 100644 --- a/src/cooling-sycl/main.cpp +++ b/src/cooling-sycl/main.cpp @@ -218,6 +218,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); sycl::free(d_T, q); sycl::free(d_r, q); diff --git a/src/coordinates-cuda/main.cu b/src/coordinates-cuda/main.cu index 7d1653f184..d8ff22eeee 100644 --- a/src/coordinates-cuda/main.cu +++ b/src/coordinates-cuda/main.cu @@ -59,6 +59,7 @@ void coordinates_transform(const int num_coords, const int repeat) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } int main(int argc, char* argv[]) diff --git a/src/coordinates-hip/main.cu b/src/coordinates-hip/main.cu index e92eea6092..eb61a2506c 100644 --- a/src/coordinates-hip/main.cu +++ b/src/coordinates-hip/main.cu @@ -59,6 +59,7 @@ void coordinates_transform(const int num_coords, const int repeat) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } int main(int argc, char* argv[]) diff --git a/src/coordinates-sycl/main.cpp b/src/coordinates-sycl/main.cpp index c017306b9b..058f1b0d37 100644 --- a/src/coordinates-sycl/main.cpp +++ b/src/coordinates-sycl/main.cpp @@ -69,6 +69,7 @@ void coordinates_transform(sycl::queue &q, const int num_coords, const int repea } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } int main(int argc, char* argv[]) diff --git a/src/cross-cuda/main.cu b/src/cross-cuda/main.cu index 6a5fa81e4b..34509c93f3 100644 --- a/src/cross-cuda/main.cu +++ b/src/cross-cuda/main.cu @@ -185,6 +185,7 @@ void eval(const int nrows, const int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_a); cudaFree(d_b); diff --git a/src/cross-hip/main.cu b/src/cross-hip/main.cu index 28faa98a9b..f03e2d1d81 100644 --- a/src/cross-hip/main.cu +++ b/src/cross-hip/main.cu @@ -185,6 +185,7 @@ void eval(const int nrows, const int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_a); hipFree(d_b); diff --git a/src/cross-omp/main.cpp b/src/cross-omp/main.cpp index b64dc198b2..5cef455717 100644 --- a/src/cross-omp/main.cpp +++ b/src/cross-omp/main.cpp @@ -168,6 +168,7 @@ void eval(const int nrows, const int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(a); free(b); diff --git a/src/cross-sycl/main.cpp b/src/cross-sycl/main.cpp index b2108bedd9..329a779138 100644 --- a/src/cross-sycl/main.cpp +++ b/src/cross-sycl/main.cpp @@ -218,6 +218,7 @@ void eval(const int nrows, const int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_a, q); sycl::free(d_b, q); diff --git a/src/crossEntropy-cuda/main.cu b/src/crossEntropy-cuda/main.cu index 06d4a6baa2..0e9c6fa0fe 100644 --- a/src/crossEntropy-cuda/main.cu +++ b/src/crossEntropy-cuda/main.cu @@ -304,18 +304,21 @@ int main(int argc, char** argv) { LossNLL_BWD<__half, __half>(repeat); printf("%s\n", (errors == 0) ? "PASS" : "FAIL"); + if (!(errors == 0)) exit(1); printf("=========== Data type is FP32 ==========\n"); LossNLL_BWD(repeat); printf("%s\n", (errors == 0) ? "PASS" : "FAIL"); + if (!(errors == 0)) exit(1); printf("=========== Data type is FP64 ==========\n"); LossNLL_BWD(repeat); printf("%s\n", (errors == 0) ? "PASS" : "FAIL"); + if (!(errors == 0)) exit(1); return 0; } diff --git a/src/crossEntropy-hip/main.cu b/src/crossEntropy-hip/main.cu index eb57d1c59b..7667622752 100644 --- a/src/crossEntropy-hip/main.cu +++ b/src/crossEntropy-hip/main.cu @@ -304,18 +304,21 @@ int main(int argc, char** argv) { LossNLL_BWD<__half, __half>(repeat); printf("%s\n", (errors == 0) ? "PASS" : "FAIL"); + if (!(errors == 0)) exit(1); printf("=========== Data type is FP32 ==========\n"); LossNLL_BWD(repeat); printf("%s\n", (errors == 0) ? "PASS" : "FAIL"); + if (!(errors == 0)) exit(1); printf("=========== Data type is FP64 ==========\n"); LossNLL_BWD(repeat); printf("%s\n", (errors == 0) ? "PASS" : "FAIL"); + if (!(errors == 0)) exit(1); return 0; } diff --git a/src/crossEntropy-sycl/main.cpp b/src/crossEntropy-sycl/main.cpp index ded0f60538..d3ebea326d 100644 --- a/src/crossEntropy-sycl/main.cpp +++ b/src/crossEntropy-sycl/main.cpp @@ -297,18 +297,21 @@ int main(int argc, char** argv) { LossNLL_BWD(q, repeat); printf("%s\n", (errors == 0) ? "PASS" : "FAIL"); + if (!(errors == 0)) exit(1); printf("=========== Data type is FP32 ==========\n"); LossNLL_BWD(q, repeat); printf("%s\n", (errors == 0) ? "PASS" : "FAIL"); + if (!(errors == 0)) exit(1); printf("=========== Data type is FP64 ==========\n"); LossNLL_BWD(q, repeat); printf("%s\n", (errors == 0) ? "PASS" : "FAIL"); + if (!(errors == 0)) exit(1); return 0; } diff --git a/src/damage-cuda/reference.h b/src/damage-cuda/reference.h index 647f2a6bc2..00ae6c8c06 100644 --- a/src/damage-cuda/reference.h +++ b/src/damage-cuda/reference.h @@ -1,4 +1,5 @@ #include +#include void validate ( const int block_size, @@ -36,6 +37,7 @@ void validate ( } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(damage_ref); free(n_neigh_ref); diff --git a/src/dct8x8-cuda/main.cu b/src/dct8x8-cuda/main.cu index f3686f55a7..0648c46fdd 100644 --- a/src/dct8x8-cuda/main.cu +++ b/src/dct8x8-cuda/main.cu @@ -49,6 +49,7 @@ void Verify(const float* h_OutputGPU, printf("PASS\n"); else printf("FAIL\n"); + if (L2norm >= 1E-6) exit(1); } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/dct8x8-hip/main.cu b/src/dct8x8-hip/main.cu index 3bb863d1fd..2a2f3a1cdf 100644 --- a/src/dct8x8-hip/main.cu +++ b/src/dct8x8-hip/main.cu @@ -49,6 +49,7 @@ void Verify(const float* h_OutputGPU, printf("PASS\n"); else printf("FAIL\n"); + if (L2norm >= 1E-6) exit(1); } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/dct8x8-omp/main.cpp b/src/dct8x8-omp/main.cpp index 7b10359241..781652ac4c 100644 --- a/src/dct8x8-omp/main.cpp +++ b/src/dct8x8-omp/main.cpp @@ -49,6 +49,7 @@ void Verify(const float* h_OutputGPU, printf("PASS\n"); else printf("FAIL\n"); + if (L2norm >= 1E-6) exit(1); } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/dct8x8-sycl/main.cpp b/src/dct8x8-sycl/main.cpp index ea1e6da405..01cfee6ef7 100644 --- a/src/dct8x8-sycl/main.cpp +++ b/src/dct8x8-sycl/main.cpp @@ -50,6 +50,7 @@ void Verify(const float* h_OutputGPU, printf("PASS\n"); else printf("FAIL\n"); + if (L2norm >= 1E-6) exit(1); } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/degrid-cuda/main.cu b/src/degrid-cuda/main.cu index 20cff4a348..1b7c95072c 100644 --- a/src/degrid-cuda/main.cu +++ b/src/degrid-cuda/main.cu @@ -131,6 +131,7 @@ int main(void) { } std::cout << (ok ? "PASS" : "FAIL") << std::endl; + if (!ok) exit(1); img -= GCF_DIM + IMG_SIZE*GCF_DIM; diff --git a/src/degrid-hip/main.cu b/src/degrid-hip/main.cu index 40511522ff..b748ca9970 100644 --- a/src/degrid-hip/main.cu +++ b/src/degrid-hip/main.cu @@ -131,6 +131,7 @@ int main(void) { } std::cout << (ok ? "PASS" : "FAIL") << std::endl; + if (!ok) exit(1); img -= GCF_DIM + IMG_SIZE*GCF_DIM; diff --git a/src/degrid-omp/main.cpp b/src/degrid-omp/main.cpp index 7d747f6428..8f0211b1f4 100644 --- a/src/degrid-omp/main.cpp +++ b/src/degrid-omp/main.cpp @@ -131,6 +131,7 @@ int main(void) { } std::cout << (ok ? "PASS" : "FAIL") << std::endl; + if (!ok) exit(1); img -= GCF_DIM + IMG_SIZE*GCF_DIM; diff --git a/src/degrid-sycl/main.cpp b/src/degrid-sycl/main.cpp index 22d32b626b..df936ab25b 100644 --- a/src/degrid-sycl/main.cpp +++ b/src/degrid-sycl/main.cpp @@ -127,6 +127,7 @@ int main(void) { } std::cout << (ok ? "PASS" : "FAIL") << std::endl; + if (!ok) exit(1); img -= GCF_DIM + IMG_SIZE*GCF_DIM; diff --git a/src/dense-embedding-cuda/main.cu b/src/dense-embedding-cuda/main.cu index 0833887bec..d6d835cf6f 100644 --- a/src/dense-embedding-cuda/main.cu +++ b/src/dense-embedding-cuda/main.cu @@ -213,6 +213,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } cudaFree(d_input); diff --git a/src/dense-embedding-hip/main.cu b/src/dense-embedding-hip/main.cu index 82bac775a4..3986c789cb 100644 --- a/src/dense-embedding-hip/main.cu +++ b/src/dense-embedding-hip/main.cu @@ -213,6 +213,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } hipFree(d_input); diff --git a/src/dense-embedding-omp/main.cpp b/src/dense-embedding-omp/main.cpp index 339237cf26..3d4a0e9fa5 100644 --- a/src/dense-embedding-omp/main.cpp +++ b/src/dense-embedding-omp/main.cpp @@ -179,6 +179,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } } diff --git a/src/dense-embedding-sycl/main.cpp b/src/dense-embedding-sycl/main.cpp index a8e75d4c63..9a1943d04c 100644 --- a/src/dense-embedding-sycl/main.cpp +++ b/src/dense-embedding-sycl/main.cpp @@ -245,6 +245,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } sycl::free(d_input, q); diff --git a/src/dp-cuda/main.cu b/src/dp-cuda/main.cu index 30b5451423..2807f1acfb 100644 --- a/src/dp-cuda/main.cu +++ b/src/dp-cuda/main.cu @@ -135,6 +135,7 @@ void dot (const size_t iNumElements, const int iNumIterations) GPU_CHECK(cudaMemcpy(&dst, d_dst, sizeof(T), cudaMemcpyDeviceToHost)); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); + if (dst != dst_ref) exit(1); cublasHandle_t h; BLAS_CHECK(cublasCreate(&h)); @@ -175,6 +176,7 @@ void dot (const size_t iNumElements, const int iNumIterations) GPU_CHECK(cudaMemcpy(&dst, d_dst, sizeof(T), cudaMemcpyDeviceToHost)); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); + if (dst != dst_ref) exit(1); // warmup for (i = 0; i < 100; i++) { @@ -193,6 +195,7 @@ void dot (const size_t iNumElements, const int iNumIterations) time = std::chrono::duration_cast(end - start).count(); printf("Average std::transform_reduce execution time %f (ms)\n", (time * 1e-6f) / iNumIterations); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); + if (dst != dst_ref) exit(1); GPU_CHECK(cudaFree(d_dst)); GPU_CHECK(cudaFree(d_srcA)); diff --git a/src/dp-hip/main.cu b/src/dp-hip/main.cu index 93417a5a6b..9b0718a486 100644 --- a/src/dp-hip/main.cu +++ b/src/dp-hip/main.cu @@ -136,6 +136,7 @@ void dot (const size_t iNumElements, const int iNumIterations) GPU_CHECK(hipMemcpy(&dst, d_dst, sizeof(T), hipMemcpyDeviceToHost)); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); + if (dst != dst_ref) exit(1); hipblasHandle_t h; BLAS_CHECK(hipblasCreate(&h)); @@ -176,6 +177,7 @@ void dot (const size_t iNumElements, const int iNumIterations) GPU_CHECK(hipMemcpy(&dst, d_dst, sizeof(T), hipMemcpyDeviceToHost)); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); + if (dst != dst_ref) exit(1); // warmup for (i = 0; i < 100; i++) { @@ -194,6 +196,7 @@ void dot (const size_t iNumElements, const int iNumIterations) time = std::chrono::duration_cast(end - start).count(); printf("Average std::transform_reduce execution time %f (ms)\n", (time * 1e-6f) / iNumIterations); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); + if (dst != dst_ref) exit(1); GPU_CHECK(hipFree(d_dst)); GPU_CHECK(hipFree(d_srcA)); diff --git a/src/dp-omp/main.cpp b/src/dp-omp/main.cpp index 76d43a2ac2..0bbb2d4818 100644 --- a/src/dp-omp/main.cpp +++ b/src/dp-omp/main.cpp @@ -90,6 +90,7 @@ void dot (const size_t iNumElements, const int iNumIterations) auto time = std::chrono::duration_cast(end - start).count(); printf("Average kernel execution time %f (ms)\n", (time * 1e-6f) / iNumIterations); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); + if (dst != dst_ref) exit(1); } // Compute and compare results for golden-host and report errors and pass/fail diff --git a/src/dp-sycl/main.cpp b/src/dp-sycl/main.cpp index 4ef0090d1b..915c961718 100644 --- a/src/dp-sycl/main.cpp +++ b/src/dp-sycl/main.cpp @@ -116,6 +116,7 @@ void dot (const size_t iNumElements, const int iNumIterations) try { printf("Average kernel execution time %f (ms)\n", (time * 1e-6f) / iNumIterations); q.memcpy(&dst, d_dst, sizeof(T)).wait(); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); + if (dst != dst_ref) exit(1); // warmup for (i = 0; i < 100; i++) { @@ -135,6 +136,7 @@ void dot (const size_t iNumElements, const int iNumIterations) try { printf("Average oneMKL::dot execution time %f (ms)\n", (time * 1e-6f) / iNumIterations); q.memcpy(&dst, d_dst, sizeof(T)).wait(); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); + if (dst != dst_ref) exit(1); // warmup for (i = 0; i < 100; i++) @@ -152,6 +154,7 @@ void dot (const size_t iNumElements, const int iNumIterations) try { time = std::chrono::duration_cast(end - start).count(); printf("Average std::transform_reduce execution time %f (ms)\n", (time * 1e-6f) / iNumIterations); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); + if (dst != dst_ref) exit(1); sycl::free(d_dst, q); sycl::free(d_srcA, q); diff --git a/src/dp4a-cuda/main.cu b/src/dp4a-cuda/main.cu index 72b8f290bb..5bda191abf 100644 --- a/src/dp4a-cuda/main.cu +++ b/src/dp4a-cuda/main.cu @@ -161,6 +161,7 @@ void dot (const size_t iNumElements, const int iNumIterations) T dst_dev = 0; for (i = 0; i < grid_size; i++) dst_dev += dst[i]; printf("%s\n\n", dst_dev == M * dst_ref ? "PASS" : "FAIL"); + if (dst_dev != M * dst_ref) exit(1); start = std::chrono::steady_clock::now(); @@ -177,6 +178,7 @@ void dot (const size_t iNumElements, const int iNumIterations) dst_dev = 0; for (i = 0; i < grid_size; i++) dst_dev += dst[i]; printf("%s\n\n", dst_dev == M * dst_ref ? "PASS" : "FAIL"); + if (dst_dev != M * dst_ref) exit(1); GPU_CHECK(cudaFree(d_dst)); GPU_CHECK(cudaFree(d_srcA)); diff --git a/src/dp4a-hip/main.cu b/src/dp4a-hip/main.cu index c4a5b88dc8..1096f8f720 100644 --- a/src/dp4a-hip/main.cu +++ b/src/dp4a-hip/main.cu @@ -205,6 +205,7 @@ void dot (const size_t iNumElements, const int iNumIterations) T dst_dev = 0; for (i = 0; i < grid_size; i++) dst_dev += dst[i]; printf("%s\n\n", dst_dev == M * dst_ref ? "PASS" : "FAIL"); + if (dst_dev != M * dst_ref) exit(1); start = std::chrono::steady_clock::now(); @@ -221,6 +222,7 @@ void dot (const size_t iNumElements, const int iNumIterations) dst_dev = 0; for (i = 0; i < grid_size; i++) dst_dev += dst[i]; printf("%s\n\n", dst_dev == M * dst_ref ? "PASS" : "FAIL"); + if (dst_dev != M * dst_ref) exit(1); GPU_CHECK(hipFree(d_dst)); GPU_CHECK(hipFree(d_srcA)); diff --git a/src/dp4a-sycl/main.cpp b/src/dp4a-sycl/main.cpp index fe62c3b750..bc258e30f5 100644 --- a/src/dp4a-sycl/main.cpp +++ b/src/dp4a-sycl/main.cpp @@ -162,6 +162,7 @@ void dot (sycl::queue &q, const size_t iNumElements, const int iNumIterations) T dst_dev = 0; for (i = 0; i < grid_size; i++) dst_dev += dst[i]; printf("%s\n\n", dst_dev == M * dst_ref ? "PASS" : "FAIL"); + if (dst_dev != M * dst_ref) exit(1); start = std::chrono::steady_clock::now(); @@ -178,6 +179,7 @@ void dot (sycl::queue &q, const size_t iNumElements, const int iNumIterations) dst_dev = 0; for (i = 0; i < grid_size; i++) dst_dev += dst[i]; printf("%s\n\n", dst_dev == M * dst_ref ? "PASS" : "FAIL"); + if (dst_dev != M * dst_ref) exit(1); sycl::free(d_dst, q); sycl::free(d_srcA, q); diff --git a/src/dxtc2-cuda/main.cu b/src/dxtc2-cuda/main.cu index 4c92a7c599..4daa45a09c 100644 --- a/src/dxtc2-cuda/main.cu +++ b/src/dxtc2-cuda/main.cu @@ -764,6 +764,7 @@ int main(int argc, char **argv) { printf("RMS(reference, result) = %f\n\n", rms); printf(rms <= ERROR_THRESHOLD ? "PASS\n" : "FAIL\n"); + if (rms > ERROR_THRESHOLD) exit(1); /* Return zero if test passed, one otherwise */ return rms > ERROR_THRESHOLD; } diff --git a/src/dxtc2-hip/main.cu b/src/dxtc2-hip/main.cu index 4414625d33..e4ab4ecab1 100644 --- a/src/dxtc2-hip/main.cu +++ b/src/dxtc2-hip/main.cu @@ -763,6 +763,7 @@ int main(int argc, char **argv) { printf("RMS(reference, result) = %f\n\n", rms); printf(rms <= ERROR_THRESHOLD ? "PASS\n" : "FAIL\n"); + if (rms > ERROR_THRESHOLD) exit(1); /* Return zero if test passed, one otherwise */ return rms > ERROR_THRESHOLD; } diff --git a/src/dxtc2-omp/main.cpp b/src/dxtc2-omp/main.cpp index 4b41e79e9e..aaa8a3548b 100644 --- a/src/dxtc2-omp/main.cpp +++ b/src/dxtc2-omp/main.cpp @@ -255,6 +255,7 @@ int main(int argc, char** argv) printf("PASS\n"); else printf("FAIL\n"); + if (rms > ERROR_THRESHOLD) exit(1); return 0; } diff --git a/src/dxtc2-sycl/main.cpp b/src/dxtc2-sycl/main.cpp index 0caef16a46..f74dd552f1 100644 --- a/src/dxtc2-sycl/main.cpp +++ b/src/dxtc2-sycl/main.cpp @@ -373,6 +373,7 @@ int main(int argc, char** argv) printf("PASS\n"); else printf("FAIL\n"); + if (rms > ERROR_THRESHOLD) exit(1); return 0; } diff --git a/src/ecdh-cuda/main.cu b/src/ecdh-cuda/main.cu index ead1e081d7..3ec9866ac7 100644 --- a/src/ecdh-cuda/main.cu +++ b/src/ecdh-cuda/main.cu @@ -71,6 +71,7 @@ int main(int argc, char **argv) bool fail_pk_x = memcmp(pk_slow_x, pk_fast_x, pk_x_size); bool fail_pk_y = memcmp(pk_slow_y, pk_fast_y, pk_x_size); printf("%s\n", (fail_pk_x || fail_pk_y) ? "FAIL" : "PASS"); + if ((fail_pk_x || fail_pk_y)) exit(1); cudaFree(d_pk_x); cudaFree(d_pk_y); diff --git a/src/ecdh-hip/main.cu b/src/ecdh-hip/main.cu index 1f40bf8511..9d3180dde4 100644 --- a/src/ecdh-hip/main.cu +++ b/src/ecdh-hip/main.cu @@ -71,6 +71,7 @@ int main(int argc, char **argv) bool fail_pk_x = memcmp(pk_slow_x, pk_fast_x, pk_x_size); bool fail_pk_y = memcmp(pk_slow_y, pk_fast_y, pk_x_size); printf("%s\n", (fail_pk_x || fail_pk_y) ? "FAIL" : "PASS"); + if ((fail_pk_x || fail_pk_y)) exit(1); hipFree(d_pk_x); hipFree(d_pk_y); diff --git a/src/ecdh-omp/main.cpp b/src/ecdh-omp/main.cpp index a455e16930..9a87280a44 100644 --- a/src/ecdh-omp/main.cpp +++ b/src/ecdh-omp/main.cpp @@ -60,6 +60,7 @@ int main(int argc, char **argv) bool fail_pk_x = memcmp(pk_slow_x, pk_fast_x, pk_x_size); bool fail_pk_y = memcmp(pk_slow_y, pk_fast_y, pk_x_size); printf("%s\n", (fail_pk_x || fail_pk_y) ? "FAIL" : "PASS"); + if ((fail_pk_x || fail_pk_y)) exit(1); free(pk_slow_x); free(pk_slow_y); diff --git a/src/ecdh-sycl/main.cpp b/src/ecdh-sycl/main.cpp index 5557fda039..74394294d8 100644 --- a/src/ecdh-sycl/main.cpp +++ b/src/ecdh-sycl/main.cpp @@ -96,6 +96,7 @@ int main(int argc, char **argv) bool fail_pk_x = memcmp(pk_slow_x, pk_fast_x, pk_x_size); bool fail_pk_y = memcmp(pk_slow_y, pk_fast_y, pk_x_size); printf("%s\n", (fail_pk_x || fail_pk_y) ? "FAIL" : "PASS"); + if ((fail_pk_x || fail_pk_y)) exit(1); sycl::free(d_pk_x, q); sycl::free(d_pk_y, q); diff --git a/src/eigenvalue-cuda/main.cu b/src/eigenvalue-cuda/main.cu index aaf02b829b..a64fd747dd 100644 --- a/src/eigenvalue-cuda/main.cu +++ b/src/eigenvalue-cuda/main.cu @@ -263,6 +263,7 @@ int main(int argc, char * argv[]) else { std::cout<<"FAIL\n" << std::endl; + exit(1); } // release program resources diff --git a/src/eigenvalue-hip/main.cu b/src/eigenvalue-hip/main.cu index fe242ea081..f2d5602c51 100644 --- a/src/eigenvalue-hip/main.cu +++ b/src/eigenvalue-hip/main.cu @@ -263,6 +263,7 @@ int main(int argc, char * argv[]) else { std::cout<<"FAIL\n" << std::endl; + exit(1); } // release program resources diff --git a/src/eigenvalue-omp/main.cpp b/src/eigenvalue-omp/main.cpp index 586f6c8667..1ee7203604 100644 --- a/src/eigenvalue-omp/main.cpp +++ b/src/eigenvalue-omp/main.cpp @@ -264,6 +264,7 @@ int main(int argc, char * argv[]) else { std::cout<<"FAIL\n" << std::endl; + exit(1); } // release program resources diff --git a/src/eigenvalue-sycl/main.cpp b/src/eigenvalue-sycl/main.cpp index eea67ce2da..2b62f999da 100644 --- a/src/eigenvalue-sycl/main.cpp +++ b/src/eigenvalue-sycl/main.cpp @@ -285,6 +285,7 @@ int main(int argc, char * argv[]) else { std::cout<<"FAIL\n" << std::endl; + exit(1); } // release program resources diff --git a/src/entropy-cuda/main.cu b/src/entropy-cuda/main.cu index 1ed49f2aa9..62f860d6ff 100644 --- a/src/entropy-cuda/main.cu +++ b/src/entropy-cuda/main.cu @@ -166,6 +166,7 @@ int main(int argc, char* argv[]) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(input); free(output); diff --git a/src/entropy-hip/main.cu b/src/entropy-hip/main.cu index 0d9845d6e1..47d5884660 100644 --- a/src/entropy-hip/main.cu +++ b/src/entropy-hip/main.cu @@ -163,6 +163,7 @@ int main(int argc, char* argv[]) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(input); free(output); diff --git a/src/entropy-omp/main.cpp b/src/entropy-omp/main.cpp index 273fb27df9..df6dc03b5d 100644 --- a/src/entropy-omp/main.cpp +++ b/src/entropy-omp/main.cpp @@ -156,6 +156,7 @@ int main(int argc, char* argv[]) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(input); free(output); diff --git a/src/entropy-sycl/main.cpp b/src/entropy-sycl/main.cpp index 3fd3bee008..14545365f3 100644 --- a/src/entropy-sycl/main.cpp +++ b/src/entropy-sycl/main.cpp @@ -159,6 +159,7 @@ int main(int argc, char* argv[]) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(input); free(output); diff --git a/src/epistasis-cuda/main.cu b/src/epistasis-cuda/main.cu index 64267c8afe..4242e75204 100644 --- a/src/epistasis-cuda/main.cu +++ b/src/epistasis-cuda/main.cu @@ -8,6 +8,7 @@ #include #include #include "reference.h" +#include using namespace std::chrono; typedef high_resolution_clock myclock; @@ -351,6 +352,7 @@ int main(int argc, char **argv) bool ok = (p1 == p2) && (fabsf(scores[p1] - scores_ref[p2]) < 1e-3f); std::cout << (ok ? "PASS" : "FAIL") << std::endl; + if (!ok) exit(1); cudaFree(d_data_zeros); cudaFree(d_data_ones); diff --git a/src/epistasis-hip/main.cu b/src/epistasis-hip/main.cu index 8ef7f959fa..1b6f3925bc 100644 --- a/src/epistasis-hip/main.cu +++ b/src/epistasis-hip/main.cu @@ -8,6 +8,7 @@ #include #include #include "reference.h" +#include using namespace std::chrono; typedef high_resolution_clock myclock; @@ -351,6 +352,7 @@ int main(int argc, char **argv) bool ok = (p1 == p2) && (fabsf(scores[p1] - scores_ref[p2]) < 1e-3f); std::cout << (ok ? "PASS" : "FAIL") << std::endl; + if (!ok) exit(1); hipFree(d_data_zeros); hipFree(d_data_ones); diff --git a/src/epistasis-omp/main.cpp b/src/epistasis-omp/main.cpp index aa6ff83193..0baa245e11 100644 --- a/src/epistasis-omp/main.cpp +++ b/src/epistasis-omp/main.cpp @@ -5,6 +5,7 @@ #include #include #include "reference.h" +#include using namespace std::chrono; typedef high_resolution_clock myclock; @@ -322,6 +323,7 @@ int main(int argc, char **argv) bool ok = (p1 == p2) && (fabsf(scores[p1] - scores_ref[p2]) < 1e-3f); std::cout << (ok ? "PASS" : "FAIL") << std::endl; + if (!ok) exit(1); mem_free(bin_data_zeros); mem_free(bin_data_ones); diff --git a/src/epistasis-sycl/main.cpp b/src/epistasis-sycl/main.cpp index e840e574ea..97c606cf8e 100644 --- a/src/epistasis-sycl/main.cpp +++ b/src/epistasis-sycl/main.cpp @@ -4,6 +4,7 @@ #include #include #include "reference.h" +#include using namespace std::chrono; typedef high_resolution_clock myclock; @@ -352,6 +353,7 @@ int main(int argc, char **argv) bool ok = (p1 == p2) && (fabsf(scores[p1] - scores_ref[p2]) < 1e-3f); std::cout << (ok ? "PASS" : "FAIL") << std::endl; + if (!ok) exit(1); sycl::free(d_data_zeros, q); sycl::free(d_data_ones, q); diff --git a/src/f16max-cuda/main.cu b/src/f16max-cuda/main.cu index 5b139363ea..680efed849 100644 --- a/src/f16max-cuda/main.cu +++ b/src/f16max-cuda/main.cu @@ -118,6 +118,7 @@ int main(int argc, char *argv[]) } } printf("fp16_hmax2 %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); for (int i = 0; i < repeat; i++) hmax<<>>( @@ -154,6 +155,7 @@ int main(int argc, char *argv[]) } printf("fp16_hmax %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_a); cudaFree(d_b); diff --git a/src/f16max-hip/main.cu b/src/f16max-hip/main.cu index 57c9773779..a08346fa37 100644 --- a/src/f16max-hip/main.cu +++ b/src/f16max-hip/main.cu @@ -118,6 +118,7 @@ int main(int argc, char *argv[]) } } printf("fp16_hmax2 %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); for (int i = 0; i < repeat; i++) hmax<<>>( @@ -154,6 +155,7 @@ int main(int argc, char *argv[]) } printf("fp16_hmax %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_a); hipFree(d_b); diff --git a/src/f16max-sycl/main.cpp b/src/f16max-sycl/main.cpp index 4e96a13ca0..3d346125de 100644 --- a/src/f16max-sycl/main.cpp +++ b/src/f16max-sycl/main.cpp @@ -150,6 +150,7 @@ int main(int argc, char *argv[]) } } printf("fp16_hmax2 %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // run hmax (the size is doubled) for (int i = 0; i < repeat; i++) { @@ -197,6 +198,7 @@ int main(int argc, char *argv[]) } printf("fp16_hmax %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_a, q); sycl::free(d_b, q); diff --git a/src/f8cast-cuda/main.cu b/src/f8cast-cuda/main.cu index b1273742b3..726585b56d 100644 --- a/src/f8cast-cuda/main.cu +++ b/src/f8cast-cuda/main.cu @@ -6,6 +6,7 @@ #include #include "kernels.h" #include "utils.h" +#include #define CUDA_CHECK(ans) \ { \ @@ -111,6 +112,7 @@ void convert(bool isE4M3, int nelems, int niters) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); CUDA_CHECK(cudaFree(src)); CUDA_CHECK(cudaFree(dst)); diff --git a/src/f8cast-hip/main.cu b/src/f8cast-hip/main.cu index 2f4770ad11..1504bfa2fb 100644 --- a/src/f8cast-hip/main.cu +++ b/src/f8cast-hip/main.cu @@ -6,6 +6,7 @@ #include #include "kernels.h" #include "utils.h" +#include #define HIP_CHECK(ans) \ { \ @@ -111,6 +112,7 @@ void convert(bool isE4M3, int nelems, int niters) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); HIP_CHECK(hipFree(src)); HIP_CHECK(hipFree(dst)); diff --git a/src/f8cast-sycl/main.cpp b/src/f8cast-sycl/main.cpp index eff5dd65f1..8e9bd07f69 100644 --- a/src/f8cast-sycl/main.cpp +++ b/src/f8cast-sycl/main.cpp @@ -5,6 +5,7 @@ #include #include "kernels.h" #include "utils.h" +#include template void convert(sycl::queue &q, bool isE4M3, int nelems, int niters) @@ -110,6 +111,7 @@ void convert(sycl::queue &q, bool isE4M3, int nelems, int niters) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(src, q); sycl::free(dst, q); diff --git a/src/fdtd3d-cuda/main.cu b/src/fdtd3d-cuda/main.cu index ce29dbbdf2..5c61e95195 100644 --- a/src/fdtd3d-cuda/main.cu +++ b/src/fdtd3d-cuda/main.cu @@ -16,6 +16,7 @@ #include "FDTD3dGPU.h" #include "shrUtils.h" #include "cmd_arg_reader.h" +#include // Forward declarations bool runTest(int argc, const char **argv); @@ -37,6 +38,7 @@ int main(int argc, char **argv) printf("PASS\n"); else printf("FAIL\n"); + if (bTestResult != true) exit(1); return 0; } diff --git a/src/fdtd3d-hip/main.cu b/src/fdtd3d-hip/main.cu index ce29dbbdf2..5c61e95195 100644 --- a/src/fdtd3d-hip/main.cu +++ b/src/fdtd3d-hip/main.cu @@ -16,6 +16,7 @@ #include "FDTD3dGPU.h" #include "shrUtils.h" #include "cmd_arg_reader.h" +#include // Forward declarations bool runTest(int argc, const char **argv); @@ -37,6 +38,7 @@ int main(int argc, char **argv) printf("PASS\n"); else printf("FAIL\n"); + if (bTestResult != true) exit(1); return 0; } diff --git a/src/fdtd3d-omp/main.cpp b/src/fdtd3d-omp/main.cpp index ce29dbbdf2..5c61e95195 100644 --- a/src/fdtd3d-omp/main.cpp +++ b/src/fdtd3d-omp/main.cpp @@ -16,6 +16,7 @@ #include "FDTD3dGPU.h" #include "shrUtils.h" #include "cmd_arg_reader.h" +#include // Forward declarations bool runTest(int argc, const char **argv); @@ -37,6 +38,7 @@ int main(int argc, char **argv) printf("PASS\n"); else printf("FAIL\n"); + if (bTestResult != true) exit(1); return 0; } diff --git a/src/fdtd3d-sycl/main.cpp b/src/fdtd3d-sycl/main.cpp index a9c0c718d9..0444c74939 100644 --- a/src/fdtd3d-sycl/main.cpp +++ b/src/fdtd3d-sycl/main.cpp @@ -16,6 +16,7 @@ #include "FDTD3dGPU.h" #include "shrUtils.h" #include "cmd_arg_reader.h" +#include // Forward declarations bool runTest(int argc, const char **argv); @@ -37,6 +38,7 @@ int main(int argc, char **argv) printf("PASS\n"); else printf("FAIL\n"); + if (bTestResult != true) exit(1); return 0; } diff --git a/src/fft-cuda/main.cu b/src/fft-cuda/main.cu index 63eaf6c4aa..acd309c97e 100644 --- a/src/fft-cuda/main.cu +++ b/src/fft-cuda/main.cu @@ -170,6 +170,7 @@ int main(int argc, char** argv) } } std::cout << "FFT " << (error ? "FAIL" : "PASS") << std::endl; + if (error) exit(1); // execute iFFT ifft1D_512<<>>(d_source); @@ -189,6 +190,7 @@ int main(int argc, char** argv) } } std::cout << "iFFT " << (error ? "FAIL" : "PASS") << std::endl; + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/fft-hip/main.cu b/src/fft-hip/main.cu index c6f1e2caab..88c5c806a3 100644 --- a/src/fft-hip/main.cu +++ b/src/fft-hip/main.cu @@ -170,6 +170,7 @@ int main(int argc, char** argv) } } std::cout << "FFT " << (error ? "FAIL" : "PASS") << std::endl; + if (error) exit(1); // execute iFFT ifft1D_512<<>>(d_source); @@ -189,6 +190,7 @@ int main(int argc, char** argv) } } std::cout << "iFFT " << (error ? "FAIL" : "PASS") << std::endl; + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/fft-omp/main.cpp b/src/fft-omp/main.cpp index 1a90bb1af2..6f858fd5d9 100644 --- a/src/fft-omp/main.cpp +++ b/src/fft-omp/main.cpp @@ -345,6 +345,7 @@ int main(int argc, char** argv) } } std::cout << "FFT " << (error ? "FAIL" : "PASS") << std::endl; + if (error) exit(1); ifft1D_512(source, n_ffts); @@ -363,6 +364,7 @@ int main(int argc, char** argv) } } std::cout << "iFFT " << (error ? "FAIL" : "PASS") << std::endl; + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/fft-sycl/main.cpp b/src/fft-sycl/main.cpp index 25bb89ab62..79d41e052c 100644 --- a/src/fft-sycl/main.cpp +++ b/src/fft-sycl/main.cpp @@ -177,6 +177,7 @@ int main(int argc, char** argv) } } std::cout << "FFT " << (error ? "FAIL" : "PASS") << std::endl; + if (error) exit(1); auto ifft_kernel = [&](sycl::handler& cgh) { sycl::local_accessor smem (sycl::range<1>(8*8*9), cgh); @@ -203,6 +204,7 @@ int main(int argc, char** argv) } } std::cout << "iFFT " << (error ? "FAIL" : "PASS") << std::endl; + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/filter-cuda/main.cu b/src/filter-cuda/main.cu index f81601672e..42c47007d5 100644 --- a/src/filter-cuda/main.cu +++ b/src/filter-cuda/main.cu @@ -158,6 +158,7 @@ int main(int argc, char **argv) { bool match = check(d_nres, d_output, h_flt_count, h_output); printf("%s\n", match ? "PASS" : "FAIL"); + if (!match) exit(1); start = std::chrono::steady_clock::now(); @@ -174,6 +175,7 @@ int main(int argc, char **argv) { match = check(d_nres, d_output, h_flt_count, h_output); printf("%s\n", match ? "PASS" : "FAIL"); + if (!match) exit(1); cudaFree(d_input); cudaFree(d_output); diff --git a/src/filter-hip/main.cu b/src/filter-hip/main.cu index 0698050972..e254008f23 100644 --- a/src/filter-hip/main.cu +++ b/src/filter-hip/main.cu @@ -157,6 +157,7 @@ int main(int argc, char **argv) { bool match = check(d_nres, d_output, h_flt_count, h_output); printf("%s\n", match ? "PASS" : "FAIL"); + if (!match) exit(1); start = std::chrono::steady_clock::now(); @@ -173,6 +174,7 @@ int main(int argc, char **argv) { match = check(d_nres, d_output, h_flt_count, h_output); printf("%s\n", match ? "PASS" : "FAIL"); + if (!match) exit(1); hipFree(d_input); hipFree(d_output); diff --git a/src/filter-omp/main.cpp b/src/filter-omp/main.cpp index de10b3276d..f962ebbe7d 100644 --- a/src/filter-omp/main.cpp +++ b/src/filter-omp/main.cpp @@ -110,6 +110,7 @@ int main(int argc, char **argv) { printf("\nFilter using shared memory %s \n", equal ? "PASS" : "FAIL"); + if (!equal) exit(1); return 0; } diff --git a/src/filter-sycl/main.cpp b/src/filter-sycl/main.cpp index 2481a93b2b..c9232e6a97 100644 --- a/src/filter-sycl/main.cpp +++ b/src/filter-sycl/main.cpp @@ -181,6 +181,7 @@ int main(int argc, char **argv) { bool match = check(q, d_nres, d_output, h_flt_count, h_output); printf("%s\n", match ? "PASS" : "FAIL"); + if (!match) exit(1); start = std::chrono::steady_clock::now(); @@ -202,6 +203,7 @@ int main(int argc, char **argv) { match = check(q, d_nres, d_output, h_flt_count, h_output); printf("%s\n", match ? "PASS" : "FAIL"); + if (!match) exit(1); sycl::free(d_input, q); sycl::free(d_output, q); diff --git a/src/flip-cuda/main.cu b/src/flip-cuda/main.cu index 6a2134ed84..332c71c9f0 100644 --- a/src/flip-cuda/main.cu +++ b/src/flip-cuda/main.cu @@ -138,6 +138,7 @@ void flip (const int64_t num_dims, const int64_t num_flip_dims, cudaMemcpy(output, d_output, output_size_bytes, cudaMemcpyDeviceToHost); int error = memcmp(output, output_ref, output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); #ifdef EXAMPLE for (int i = 0; i < n; i++) { diff --git a/src/flip-hip/main.cu b/src/flip-hip/main.cu index 997d7efabe..a1beaea899 100644 --- a/src/flip-hip/main.cu +++ b/src/flip-hip/main.cu @@ -138,6 +138,7 @@ void flip (const int64_t num_dims, const int64_t num_flip_dims, hipMemcpy(output, d_output, output_size_bytes, hipMemcpyDeviceToHost); int error = memcmp(output, output_ref, output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); #ifdef EXAMPLE for (int i = 0; i < n; i++) { diff --git a/src/flip-omp/main.cpp b/src/flip-omp/main.cpp index 1f2a3222a8..75118949d5 100644 --- a/src/flip-omp/main.cpp +++ b/src/flip-omp/main.cpp @@ -126,6 +126,7 @@ void flip (const int64_t num_dims, const int64_t num_flip_dims, #pragma omp target update from (d_output[0:n]) int error = memcmp(output, output_ref, output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); #ifdef EXAMPLE for (int i = 0; i < n; i++) { diff --git a/src/flip-sycl/main.cpp b/src/flip-sycl/main.cpp index 95548ba9fb..a167ed86a1 100644 --- a/src/flip-sycl/main.cpp +++ b/src/flip-sycl/main.cpp @@ -160,6 +160,7 @@ void flip (const int64_t num_dims, const int64_t num_flip_dims, q.memcpy(output, d_output, output_size_bytes).wait(); int error = memcmp(output, output_ref, output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); #ifdef EXAMPLE for (int i = 0; i < n; i++) { diff --git a/src/floydwarshall-cuda/main.cu b/src/floydwarshall-cuda/main.cu index ad7e5c24ba..c4be87e522 100644 --- a/src/floydwarshall-cuda/main.cu +++ b/src/floydwarshall-cuda/main.cu @@ -272,6 +272,7 @@ int main(int argc, char** argv) { else { printf("FAIL\n"); + exit(1); if (numNodes <= 8) { for (unsigned int i = 0; i < numNodes; i++) { diff --git a/src/floydwarshall-hip/main.cu b/src/floydwarshall-hip/main.cu index 7c79c5bd0c..ceece16881 100644 --- a/src/floydwarshall-hip/main.cu +++ b/src/floydwarshall-hip/main.cu @@ -272,6 +272,7 @@ int main(int argc, char** argv) { else { printf("FAIL\n"); + exit(1); if (numNodes <= 8) { for (unsigned int i = 0; i < numNodes; i++) { diff --git a/src/floydwarshall-omp/main.cpp b/src/floydwarshall-omp/main.cpp index 5c1408d7d4..f65cf14d8a 100644 --- a/src/floydwarshall-omp/main.cpp +++ b/src/floydwarshall-omp/main.cpp @@ -255,6 +255,7 @@ int main(int argc, char** argv) { else { printf("FAIL\n"); + exit(1); if (numNodes <= 8) { for (unsigned int i = 0; i < numNodes; i++) { diff --git a/src/floydwarshall-sycl/main.cpp b/src/floydwarshall-sycl/main.cpp index cd46552198..49c38661c7 100644 --- a/src/floydwarshall-sycl/main.cpp +++ b/src/floydwarshall-sycl/main.cpp @@ -275,6 +275,7 @@ int main(int argc, char** argv) { else { printf("FAIL\n"); + exit(1); if (numNodes <= 8) { for (unsigned int i = 0; i < numNodes; i++) { diff --git a/src/fluidSim-cuda/reference.h b/src/fluidSim-cuda/reference.h index 4c29202bec..3e74b2aabe 100644 --- a/src/fluidSim-cuda/reference.h +++ b/src/fluidSim-cuda/reference.h @@ -277,6 +277,7 @@ void verify( bool ok = true; if(flag0 || flag1234 || flag5678) ok = false; printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } #endif diff --git a/src/fma-cuda/main.cu b/src/fma-cuda/main.cu index 4c4fe8dbf2..286c11c54a 100644 --- a/src/fma-cuda/main.cu +++ b/src/fma-cuda/main.cu @@ -80,6 +80,7 @@ void fma(int NA, int NC, int C, int num_ops, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); double time = 0; for (int i = 0; i < repeat; i++) { diff --git a/src/fma-hip/main.cu b/src/fma-hip/main.cu index 9fd7dc6d56..3eb73c1355 100644 --- a/src/fma-hip/main.cu +++ b/src/fma-hip/main.cu @@ -80,6 +80,7 @@ void fma(int NA, int NC, int C, int num_ops, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); double time = 0; for (int i = 0; i < repeat; i++) { diff --git a/src/fma-sycl/main.cpp b/src/fma-sycl/main.cpp index 8e562adf8b..bfc0461cc0 100644 --- a/src/fma-sycl/main.cpp +++ b/src/fma-sycl/main.cpp @@ -80,6 +80,7 @@ void fma(sycl::queue &q, int NA, int NC, int C, int num_ops, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); double time = 0; for (int i = 0; i < repeat; i++) { diff --git a/src/fpc-cuda/main.cu b/src/fpc-cuda/main.cu index 75d0ef2418..9db0e71072 100644 --- a/src/fpc-cuda/main.cu +++ b/src/fpc-cuda/main.cu @@ -335,6 +335,7 @@ int main(int argc, char** argv) { printf("fpc2: average device offload time %f (s)\n", (time * 1e-9f) / repeat); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(values); free(cbuffer); diff --git a/src/fpc-hip/main.cu b/src/fpc-hip/main.cu index 4bbf63ed8c..ae7cbee6a8 100644 --- a/src/fpc-hip/main.cu +++ b/src/fpc-hip/main.cu @@ -335,6 +335,7 @@ int main(int argc, char** argv) { printf("fpc2: average device offload time %f (s)\n", (time * 1e-9f) / repeat); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(values); free(cbuffer); diff --git a/src/fpc-omp/main.cpp b/src/fpc-omp/main.cpp index 9e8fc6add9..c98e934dab 100644 --- a/src/fpc-omp/main.cpp +++ b/src/fpc-omp/main.cpp @@ -313,6 +313,7 @@ int main(int argc, char** argv) { printf("fpc2: average device offload time %f (s)\n", (time * 1e-9f) / repeat); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(values); free(cbuffer); diff --git a/src/fpc-sycl/main.cpp b/src/fpc-sycl/main.cpp index 27730e8300..170836516d 100644 --- a/src/fpc-sycl/main.cpp +++ b/src/fpc-sycl/main.cpp @@ -349,6 +349,7 @@ int main(int argc, char** argv) { printf("fpc2: average device offload time %f (s)\n", (time * 1e-9f) / repeat); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(values); free(cbuffer); diff --git a/src/fresnel-cuda/main.cu b/src/fresnel-cuda/main.cu index eba9b63a80..aa872fccca 100644 --- a/src/fresnel-cuda/main.cu +++ b/src/fresnel-cuda/main.cu @@ -74,6 +74,7 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_x); cudaFree(d_output); diff --git a/src/fresnel-hip/main.cu b/src/fresnel-hip/main.cu index 2c3b3a34be..8c76a2e215 100644 --- a/src/fresnel-hip/main.cu +++ b/src/fresnel-hip/main.cu @@ -74,6 +74,7 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_x); hipFree(d_output); diff --git a/src/fresnel-omp/main.cpp b/src/fresnel-omp/main.cpp index e667e294c7..25d161b63a 100644 --- a/src/fresnel-omp/main.cpp +++ b/src/fresnel-omp/main.cpp @@ -57,6 +57,7 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(x); free(output); diff --git a/src/fresnel-sycl/main.cpp b/src/fresnel-sycl/main.cpp index d03b9a3cd9..d87bbc0f45 100644 --- a/src/fresnel-sycl/main.cpp +++ b/src/fresnel-sycl/main.cpp @@ -76,6 +76,7 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_x, q); sycl::free(d_output, q); diff --git a/src/fsm-cuda/main.cu b/src/fsm-cuda/main.cu index a2b8cc3c26..c85e238a3c 100644 --- a/src/fsm-cuda/main.cu +++ b/src/fsm-cuda/main.cu @@ -160,6 +160,7 @@ int main(int argc, char *argv[]) bool ok = ((length - misses) == besthits); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG // print FSM state assignment in R's ncol format diff --git a/src/fsm-hip/main.cu b/src/fsm-hip/main.cu index 5b6d61d7f1..28b4848a96 100644 --- a/src/fsm-hip/main.cu +++ b/src/fsm-hip/main.cu @@ -160,6 +160,7 @@ int main(int argc, char *argv[]) bool ok = ((length - misses) == besthits); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG // print FSM state assignment in R's ncol format diff --git a/src/fsm-sycl/main.cpp b/src/fsm-sycl/main.cpp index 03d84d4d68..31d60aaa40 100644 --- a/src/fsm-sycl/main.cpp +++ b/src/fsm-sycl/main.cpp @@ -187,6 +187,7 @@ int main(int argc, char *argv[]) bool ok = ((length - misses) == besthits); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG // print FSM state assignment in R's ncol format diff --git a/src/fwt-cuda/main.cu b/src/fwt-cuda/main.cu index 4c2f3230e9..345fdf02e0 100644 --- a/src/fwt-cuda/main.cu +++ b/src/fwt-cuda/main.cu @@ -142,4 +142,5 @@ int main(int argc, char *argv[]) printf("L2 norm: %E\n", L2norm); printf(L2norm < 1e-6 ? "PASS\n" : "FAIL\n"); + if (L2norm >= 1e-6) exit(1); } diff --git a/src/fwt-hip/main.cu b/src/fwt-hip/main.cu index b922c4387a..d5c8f40c38 100644 --- a/src/fwt-hip/main.cu +++ b/src/fwt-hip/main.cu @@ -142,4 +142,5 @@ int main(int argc, char *argv[]) printf("L2 norm: %E\n", L2norm); printf(L2norm < 1e-6 ? "PASS\n" : "FAIL\n"); + if (L2norm >= 1e-6) exit(1); } diff --git a/src/fwt-omp/main.cpp b/src/fwt-omp/main.cpp index 07071deb14..1ae515fc2f 100644 --- a/src/fwt-omp/main.cpp +++ b/src/fwt-omp/main.cpp @@ -143,4 +143,5 @@ int main(int argc, char *argv[]) printf("L2 norm: %E\n", L2norm); printf(L2norm < 1e-6 ? "PASS\n" : "FAIL\n"); + if (L2norm >= 1e-6) exit(1); } diff --git a/src/fwt-sycl/main.cpp b/src/fwt-sycl/main.cpp index df15e139eb..6a4c2b1fdf 100644 --- a/src/fwt-sycl/main.cpp +++ b/src/fwt-sycl/main.cpp @@ -147,4 +147,5 @@ int main(int argc, char *argv[]) printf("L2 norm: %E\n", L2norm); printf(L2norm < 1e-6 ? "PASS\n" : "FAIL\n"); + if (L2norm >= 1e-6) exit(1); } diff --git a/src/ga-cuda/main.cu b/src/ga-cuda/main.cu index cecf3ded15..f03c11b059 100644 --- a/src/ga-cuda/main.cu +++ b/src/ga-cuda/main.cu @@ -116,6 +116,7 @@ int main(int argc, char* argv[]) } printf("Total kernel execution time %f (s)\n", total_time * 1e-9f); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); cudaFree(d_target); cudaFree(d_query); diff --git a/src/ga-hip/main.cu b/src/ga-hip/main.cu index 4ce2dd197b..533f0c357a 100644 --- a/src/ga-hip/main.cu +++ b/src/ga-hip/main.cu @@ -116,6 +116,7 @@ int main(int argc, char* argv[]) } printf("Total kernel execution time %f (s)\n", total_time * 1e-9f); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); hipFree(d_target); hipFree(d_query); diff --git a/src/ga-omp/main.cpp b/src/ga-omp/main.cpp index 95e26847cf..01d506b374 100644 --- a/src/ga-omp/main.cpp +++ b/src/ga-omp/main.cpp @@ -113,5 +113,6 @@ int main(int argc, char* argv[]) } printf("Total kernel execution time %f (s)\n", total_time * 1e-9f); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); return 0; } diff --git a/src/ga-sycl/main.cpp b/src/ga-sycl/main.cpp index f13d41281c..57d411d06f 100644 --- a/src/ga-sycl/main.cpp +++ b/src/ga-sycl/main.cpp @@ -133,6 +133,7 @@ int main(int argc, char* argv[]) } printf("Total kernel execution time %f (s)\n", total_time * 1e-9f); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); sycl::free(d_target, q); sycl::free(d_query, q); diff --git a/src/gabor-cuda/main.cu b/src/gabor-cuda/main.cu index 2114abb8fa..61fd763101 100644 --- a/src/gabor-cuda/main.cu +++ b/src/gabor-cuda/main.cu @@ -113,6 +113,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(h_filter); free(d_filter); } diff --git a/src/gabor-hip/main.cu b/src/gabor-hip/main.cu index 659a8c4762..aecd35e9b7 100644 --- a/src/gabor-hip/main.cu +++ b/src/gabor-hip/main.cu @@ -113,6 +113,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(h_filter); free(d_filter); } diff --git a/src/gabor-omp/main.cpp b/src/gabor-omp/main.cpp index acc02ac507..d8873c647a 100644 --- a/src/gabor-omp/main.cpp +++ b/src/gabor-omp/main.cpp @@ -77,6 +77,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(h_filter); free(d_filter); } diff --git a/src/gabor-sycl/main.cpp b/src/gabor-sycl/main.cpp index 21369e2b70..077a1392bf 100644 --- a/src/gabor-sycl/main.cpp +++ b/src/gabor-sycl/main.cpp @@ -127,6 +127,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(h_filter); free(d_filter); } diff --git a/src/gamma-correction-cuda/main.cu b/src/gamma-correction-cuda/main.cu index e11763cfd7..6ff202fa49 100644 --- a/src/gamma-correction-cuda/main.cu +++ b/src/gamma-correction-cuda/main.cu @@ -9,6 +9,7 @@ #include #include #include "utils.hpp" +#include __global__ void gamma_correction(ImgPixel* pixel) { @@ -99,6 +100,7 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; } else { std::cout << "FAIL\n"; + exit(1); } #ifdef DEBUG diff --git a/src/gamma-correction-hip/main.cu b/src/gamma-correction-hip/main.cu index c560ad8490..528e5dcecc 100644 --- a/src/gamma-correction-hip/main.cu +++ b/src/gamma-correction-hip/main.cu @@ -9,6 +9,7 @@ #include #include #include "utils.hpp" +#include __global__ void gamma_correction(ImgPixel* pixel) { @@ -99,6 +100,7 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; } else { std::cout << "FAIL\n"; + exit(1); } #ifdef DEBUG diff --git a/src/gamma-correction-omp/main.cpp b/src/gamma-correction-omp/main.cpp index 93d0b579c6..0eb5de7a2b 100644 --- a/src/gamma-correction-omp/main.cpp +++ b/src/gamma-correction-omp/main.cpp @@ -9,6 +9,7 @@ #include #include #include "utils.hpp" +#include int main(int argc, char* argv[]) { if (argc != 5) { @@ -88,6 +89,7 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; } else { std::cout << "FAIL\n"; + exit(1); } #ifdef DEBUG diff --git a/src/gamma-correction-sycl/main.cpp b/src/gamma-correction-sycl/main.cpp index c9abff9c44..058a8b6919 100644 --- a/src/gamma-correction-sycl/main.cpp +++ b/src/gamma-correction-sycl/main.cpp @@ -9,6 +9,7 @@ #include #include #include "utils.hpp" +#include int main(int argc, char* argv[]) { if (argc != 5) { @@ -101,6 +102,7 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; } else { std::cout << "FAIL\n"; + exit(1); } #ifdef DEBUG diff --git a/src/gaussian-cuda/gaussianElim.cu b/src/gaussian-cuda/gaussianElim.cu index 0dd4e47439..443a34d916 100644 --- a/src/gaussian-cuda/gaussianElim.cu +++ b/src/gaussian-cuda/gaussianElim.cu @@ -2,6 +2,7 @@ #include #include #include "gaussianElim.h" +#include #define BLOCK_SIZE_0 256 #define BLOCK_SIZE_1_X 16 @@ -162,6 +163,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(m); free(a); diff --git a/src/gaussian-hip/gaussianElim.cu b/src/gaussian-hip/gaussianElim.cu index 81e73b92c2..8015950e4f 100644 --- a/src/gaussian-hip/gaussianElim.cu +++ b/src/gaussian-hip/gaussianElim.cu @@ -2,6 +2,7 @@ #include #include #include "gaussianElim.h" +#include #define BLOCK_SIZE_0 256 #define BLOCK_SIZE_1_X 16 @@ -162,6 +163,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(m); free(a); diff --git a/src/gaussian-omp/gaussianElim.cpp b/src/gaussian-omp/gaussianElim.cpp index 515d57b08c..0bce428c61 100644 --- a/src/gaussian-omp/gaussianElim.cpp +++ b/src/gaussian-omp/gaussianElim.cpp @@ -1,6 +1,7 @@ #include #include #include "gaussianElim.h" +#include #define BLOCK_SIZE_0 256 @@ -157,6 +158,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(m); free(a); diff --git a/src/gaussian-sycl/gaussianElim.cpp b/src/gaussian-sycl/gaussianElim.cpp index bad34dfb0b..87c8575a59 100644 --- a/src/gaussian-sycl/gaussianElim.cpp +++ b/src/gaussian-sycl/gaussianElim.cpp @@ -2,6 +2,7 @@ #include #include #include "gaussianElim.h" +#include #define BLOCK_SIZE_0 256 #define BLOCK_SIZE_1_X 16 @@ -163,6 +164,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(m); free(a); diff --git a/src/gc-cuda/main.cu b/src/gc-cuda/main.cu index e393855a81..a7d83f1b83 100644 --- a/src/gc-cuda/main.cu +++ b/src/gc-cuda/main.cu @@ -423,6 +423,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); if (ok) { const int vals = 16; diff --git a/src/gc-hip/main.cu b/src/gc-hip/main.cu index 599ca6efcd..fd93516b63 100644 --- a/src/gc-hip/main.cu +++ b/src/gc-hip/main.cu @@ -421,6 +421,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); if (ok) { const int vals = 16; diff --git a/src/gc-omp/main.cpp b/src/gc-omp/main.cpp index 99365da922..689920d715 100644 --- a/src/gc-omp/main.cpp +++ b/src/gc-omp/main.cpp @@ -373,6 +373,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); const int vals = 16; int c[vals]; diff --git a/src/gc-sycl/main.cpp b/src/gc-sycl/main.cpp index 39dd67078d..dbed2fb424 100644 --- a/src/gc-sycl/main.cpp +++ b/src/gc-sycl/main.cpp @@ -464,6 +464,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); if (ok) { const int vals = 16; diff --git a/src/gd-cuda/reference.h b/src/gd-cuda/reference.h index ecc9c4da51..cc6705991f 100644 --- a/src/gd-cuda/reference.h +++ b/src/gd-cuda/reference.h @@ -1,4 +1,5 @@ #include +#include void L2_norm_ref (const float *x, float &l2_norm, int n) { @@ -123,6 +124,7 @@ void reference (Classification_Data_CRS &A, bool ok = (fabsf(obj_val - h_obj_val) < 1e-3f) && (fabsf(train_error - h_train_error) < 1e-3f); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(h_row_ptr); free(h_col_index); diff --git a/src/ge-spmm-cuda/main.cu b/src/ge-spmm-cuda/main.cu index 624fb133a5..2565d74840 100644 --- a/src/ge-spmm-cuda/main.cu +++ b/src/ge-spmm-cuda/main.cu @@ -224,6 +224,7 @@ int main(int argc, char** argv) { CLEANUP(""); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/ge-spmm-hip/main.cu b/src/ge-spmm-hip/main.cu index b5ef414514..27e1fa298e 100644 --- a/src/ge-spmm-hip/main.cu +++ b/src/ge-spmm-hip/main.cu @@ -215,6 +215,7 @@ int main(int argc, char** argv) { CLEANUP(""); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/ge-spmm-sycl/main.cpp b/src/ge-spmm-sycl/main.cpp index 7d4613b5f8..8ec9700f15 100644 --- a/src/ge-spmm-sycl/main.cpp +++ b/src/ge-spmm-sycl/main.cpp @@ -244,6 +244,7 @@ int main(int argc, char** argv) { CLEANUP(""); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/geam-cuda/main.cu b/src/geam-cuda/main.cu index 2729efd87c..798f1e12ba 100644 --- a/src/geam-cuda/main.cu +++ b/src/geam-cuda/main.cu @@ -78,6 +78,7 @@ void transpose_f64(int nrow, int ncol, int repeat) { } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); cublasDestroy(handle); free(h_matrixT); @@ -158,6 +159,7 @@ void transpose_f32(int nrow, int ncol, int repeat) { } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); cublasDestroy(handle); free(matrixT); diff --git a/src/geam-hip/main.cu b/src/geam-hip/main.cu index 3cd8c6cb8f..f22317e2b4 100644 --- a/src/geam-hip/main.cu +++ b/src/geam-hip/main.cu @@ -78,6 +78,7 @@ void transpose_f64(int nrow, int ncol, int repeat) { } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); hipblasDestroy(handle); free(h_matrixT); @@ -158,6 +159,7 @@ void transpose_f32(int nrow, int ncol, int repeat) { } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); hipblasDestroy(handle); free(matrixT); diff --git a/src/geam-sycl/main.cpp b/src/geam-sycl/main.cpp index 2ff8f29572..531f854902 100644 --- a/src/geam-sycl/main.cpp +++ b/src/geam-sycl/main.cpp @@ -77,6 +77,7 @@ void transpose(sycl::queue &q, int nrow, int ncol, int repeat) { } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); sycl::free(d_matrix, q); sycl::free(d_matrixT, q); diff --git a/src/geglu-cuda/main.cu b/src/geglu-cuda/main.cu index 35b9dd517a..d8b576df71 100644 --- a/src/geglu-cuda/main.cu +++ b/src/geglu-cuda/main.cu @@ -138,6 +138,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(x_and_gate); free(output); free(output_ref); diff --git a/src/geglu-hip/main.cu b/src/geglu-hip/main.cu index 9e8f2fecf1..fa0bf4e9c2 100644 --- a/src/geglu-hip/main.cu +++ b/src/geglu-hip/main.cu @@ -138,6 +138,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(x_and_gate); free(output); free(output_ref); diff --git a/src/geglu-omp/main.cpp b/src/geglu-omp/main.cpp index 107f25b09c..14e205b37f 100644 --- a/src/geglu-omp/main.cpp +++ b/src/geglu-omp/main.cpp @@ -74,6 +74,7 @@ int main(int argc, char *argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(x_and_gate); free(output); free(output_ref); diff --git a/src/geglu-sycl/main.cpp b/src/geglu-sycl/main.cpp index b226429465..726b004349 100644 --- a/src/geglu-sycl/main.cpp +++ b/src/geglu-sycl/main.cpp @@ -139,6 +139,7 @@ int main(int argc, char *argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(x_and_gate); free(output); free(output_ref); diff --git a/src/gelu-cuda/main.cu b/src/gelu-cuda/main.cu index 02dba8cfc8..49c8ffd401 100644 --- a/src/gelu-cuda/main.cu +++ b/src/gelu-cuda/main.cu @@ -122,6 +122,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaMemcpy(d_output, input, src_size_bytes, cudaMemcpyHostToDevice); gelu_bias_loop <<>> (d_output, d_bias, hidden_dim, seq_len); @@ -135,6 +136,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); diff --git a/src/gelu-hip/main.cu b/src/gelu-hip/main.cu index 9a2f162599..3c5b3a1b9d 100644 --- a/src/gelu-hip/main.cu +++ b/src/gelu-hip/main.cu @@ -122,6 +122,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipMemcpy(d_output, input, src_size_bytes, hipMemcpyHostToDevice); gelu_bias_loop <<>> (d_output, d_bias, hidden_dim, seq_len); @@ -135,6 +136,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); diff --git a/src/gelu-sycl/main.cpp b/src/gelu-sycl/main.cpp index 2175ad9c38..814e1f10bb 100644 --- a/src/gelu-sycl/main.cpp +++ b/src/gelu-sycl/main.cpp @@ -150,6 +150,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); ok = true; q.memcpy(d_output, input, src_size_bytes).wait(); @@ -166,6 +167,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); q.wait(); auto start = std::chrono::steady_clock::now(); diff --git a/src/glu-cuda/main.cu b/src/glu-cuda/main.cu index 02454c3675..6a2702f415 100644 --- a/src/glu-cuda/main.cu +++ b/src/glu-cuda/main.cu @@ -116,6 +116,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } free(X); diff --git a/src/glu-hip/main.cu b/src/glu-hip/main.cu index c2d4d96bb3..95c77e0c1f 100644 --- a/src/glu-hip/main.cu +++ b/src/glu-hip/main.cu @@ -116,6 +116,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } free(X); diff --git a/src/glu-omp/main.cpp b/src/glu-omp/main.cpp index 4edb53dbba..2a0bb7d40f 100644 --- a/src/glu-omp/main.cpp +++ b/src/glu-omp/main.cpp @@ -106,6 +106,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } } diff --git a/src/glu-sycl/main.cpp b/src/glu-sycl/main.cpp index b35ba0bdbd..1bd5617340 100644 --- a/src/glu-sycl/main.cpp +++ b/src/glu-sycl/main.cpp @@ -125,6 +125,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } free(X); diff --git a/src/goulash-cuda/main.cu b/src/goulash-cuda/main.cu index 70c96412ca..8ca68330ad 100644 --- a/src/goulash-cuda/main.cu +++ b/src/goulash-cuda/main.cu @@ -116,6 +116,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); if (m_gate != NULL) free(m_gate); if (m_gate_h != NULL) free(m_gate_h); diff --git a/src/goulash-hip/main.cu b/src/goulash-hip/main.cu index 23e9fa0c4b..b620ddf487 100644 --- a/src/goulash-hip/main.cu +++ b/src/goulash-hip/main.cu @@ -116,6 +116,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); if (m_gate != NULL) free(m_gate); if (m_gate_h != NULL) free(m_gate_h); diff --git a/src/goulash-omp/main.cpp b/src/goulash-omp/main.cpp index 6661325ac5..55e5456784 100644 --- a/src/goulash-omp/main.cpp +++ b/src/goulash-omp/main.cpp @@ -99,6 +99,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); if (m_gate != NULL) free(m_gate); if (m_gate_h != NULL) free(m_gate_h); diff --git a/src/goulash-sycl/main.cpp b/src/goulash-sycl/main.cpp index 2601bab7f3..817d26543c 100644 --- a/src/goulash-sycl/main.cpp +++ b/src/goulash-sycl/main.cpp @@ -122,6 +122,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); if (m_gate != NULL) free(m_gate); if (m_gate_h != NULL) free(m_gate_h); diff --git a/src/haccmk-cuda/haccmk.cu b/src/haccmk-cuda/haccmk.cu index 245192c4c1..4f378f10df 100644 --- a/src/haccmk-cuda/haccmk.cu +++ b/src/haccmk-cuda/haccmk.cu @@ -276,6 +276,7 @@ int main( int argc, char *argv[] ) free(vz2_hw); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); return 0; } diff --git a/src/haccmk-hip/haccmk.cu b/src/haccmk-hip/haccmk.cu index 30b7f24939..47fde6478c 100644 --- a/src/haccmk-hip/haccmk.cu +++ b/src/haccmk-hip/haccmk.cu @@ -276,6 +276,7 @@ int main( int argc, char *argv[] ) free(vz2_hw); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); return 0; } diff --git a/src/haccmk-omp/haccmk.cpp b/src/haccmk-omp/haccmk.cpp index 83d0c0b608..e8ea5e5834 100644 --- a/src/haccmk-omp/haccmk.cpp +++ b/src/haccmk-omp/haccmk.cpp @@ -233,6 +233,7 @@ int main( int argc, char *argv[] ) free(vz2_hw); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); return 0; } diff --git a/src/haccmk-sycl/haccmk.cpp b/src/haccmk-sycl/haccmk.cpp index 17e05ae748..5133ba1c70 100644 --- a/src/haccmk-sycl/haccmk.cpp +++ b/src/haccmk-sycl/haccmk.cpp @@ -277,6 +277,7 @@ int main( int argc, char *argv[] ) free(vz2_hw); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); return 0; } diff --git a/src/hadamard-cuda/main.cu b/src/hadamard-cuda/main.cu index c689de7883..8919b2fad5 100644 --- a/src/hadamard-cuda/main.cu +++ b/src/hadamard-cuda/main.cu @@ -299,6 +299,7 @@ void hadamard_transform(int batch_size, int dim, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); GPU_CHECK(cudaFree(d_x)); GPU_CHECK(cudaFree(d_out)); diff --git a/src/hadamard-hip/main.cu b/src/hadamard-hip/main.cu index 084b13332d..90f39b423c 100644 --- a/src/hadamard-hip/main.cu +++ b/src/hadamard-hip/main.cu @@ -303,6 +303,7 @@ void hadamard_transform(int batch_size, int dim, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); GPU_CHECK(hipFree(d_x)); GPU_CHECK(hipFree(d_out)); diff --git a/src/hadamard-sycl/main.cpp b/src/hadamard-sycl/main.cpp index acc8803098..14cc99d334 100644 --- a/src/hadamard-sycl/main.cpp +++ b/src/hadamard-sycl/main.cpp @@ -310,6 +310,7 @@ void hadamard_transform(sycl::queue &q, int batch_size, int dim, int repeat) try } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_x, q); sycl::free(d_out, q); diff --git a/src/hausdorff-cuda/main.cu b/src/hausdorff-cuda/main.cu index 97027367b8..dbb0a0deb3 100644 --- a/src/hausdorff-cuda/main.cu +++ b/src/hausdorff-cuda/main.cu @@ -115,6 +115,7 @@ int main(int argc, char* argv[]) { bool error = (fabsf(t_distance - r_distance)) > 1e-3f; printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(h_Apoints); free(h_Bpoints); diff --git a/src/hausdorff-hip/main.cu b/src/hausdorff-hip/main.cu index 1ae01be04e..fae6db3ea8 100644 --- a/src/hausdorff-hip/main.cu +++ b/src/hausdorff-hip/main.cu @@ -103,6 +103,7 @@ int main(int argc, char* argv[]) { bool error = (fabsf(t_distance - r_distance)) > 1e-3f; printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(h_Apoints); free(h_Bpoints); diff --git a/src/hausdorff-omp/main.cpp b/src/hausdorff-omp/main.cpp index 00fba3c5ab..8e5abf27e4 100644 --- a/src/hausdorff-omp/main.cpp +++ b/src/hausdorff-omp/main.cpp @@ -92,6 +92,7 @@ int main(int argc, char* argv[]) { bool error = (fabsf(t_distance - r_distance)) > 1e-3f; printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(h_Apoints); free(h_Bpoints); diff --git a/src/hausdorff-sycl/main.cpp b/src/hausdorff-sycl/main.cpp index 5f2d1d8b82..49c1f2f059 100644 --- a/src/hausdorff-sycl/main.cpp +++ b/src/hausdorff-sycl/main.cpp @@ -130,6 +130,7 @@ int main(int argc, char* argv[]) { bool error = (fabsf(t_distance - r_distance)) > 1e-3f; printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(h_Apoints); free(h_Bpoints); diff --git a/src/heat2d-cuda/main.cu b/src/heat2d-cuda/main.cu index 1bbb8ee335..569fb9ae08 100644 --- a/src/heat2d-cuda/main.cu +++ b/src/heat2d-cuda/main.cu @@ -150,6 +150,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_in); cudaFree(d_out); diff --git a/src/heat2d-hip/main.cu b/src/heat2d-hip/main.cu index 81d57c0ae1..a50cf25e3f 100644 --- a/src/heat2d-hip/main.cu +++ b/src/heat2d-hip/main.cu @@ -150,6 +150,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_in); hipFree(d_out); diff --git a/src/heat2d-omp/main.cpp b/src/heat2d-omp/main.cpp index 1b579ea799..a962dbe793 100644 --- a/src/heat2d-omp/main.cpp +++ b/src/heat2d-omp/main.cpp @@ -138,6 +138,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(buffer); free(h_out); diff --git a/src/heat2d-sycl/main.cpp b/src/heat2d-sycl/main.cpp index dd71d952b3..3996f74bf4 100644 --- a/src/heat2d-sycl/main.cpp +++ b/src/heat2d-sycl/main.cpp @@ -161,6 +161,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_in, q); sycl::free(d_out, q); diff --git a/src/hellinger-cuda/verify.h b/src/hellinger-cuda/verify.h index 12bd59e8cf..15e7815ae6 100644 --- a/src/hellinger-cuda/verify.h +++ b/src/hellinger-cuda/verify.h @@ -1,5 +1,6 @@ #ifdef VERIFY #include +#include /** * Perform matrix multiplication on host to verify results from device. @@ -57,6 +58,7 @@ void VerifyResult(FP (*a_host)[N], FP (*b_host)[P], std::cout << "PASS\n"; } else { std::cout << "FAIL\n"; + exit(1); } } #endif diff --git a/src/histogram-cuda/histogram_compare.cu b/src/histogram-cuda/histogram_compare.cu index 42817594de..b6c59d6c6a 100644 --- a/src/histogram-cuda/histogram_compare.cu +++ b/src/histogram-cuda/histogram_compare.cu @@ -73,6 +73,7 @@ __device__ __forceinline__ void DecodePixel(uchar1 pixel, unsigned int (&bins)[A #include "histogram_gmem_atomics.h" #include "histogram_smem_atomics.h" +#include //--------------------------------------------------------------------- // Globals, constants, and type declarations //--------------------------------------------------------------------- @@ -408,6 +409,7 @@ void RunTest( int compare = CompareDeviceResults(h_hist, d_hist, ACTIVE_CHANNELS * NUM_BINS, true, g_verbose); if (!g_report) printf("\t%s\n", compare ? "FAIL" : "PASS"); fflush(stdout); + if (compare) exit(1); double elapsed_ms = 0; for (int i = 0; i < timing_iterations; i++) diff --git a/src/histogram-hip/histogram_compare.cu b/src/histogram-hip/histogram_compare.cu index e181ecb894..d6b6cbdf0e 100644 --- a/src/histogram-hip/histogram_compare.cu +++ b/src/histogram-hip/histogram_compare.cu @@ -73,6 +73,7 @@ __device__ __forceinline__ void DecodePixel(uchar1 pixel, unsigned int (&bins)[A #include "histogram_gmem_atomics.h" #include "histogram_smem_atomics.h" +#include //--------------------------------------------------------------------- // Globals, constants, and type declarations //--------------------------------------------------------------------- @@ -408,6 +409,7 @@ void RunTest( int compare = CompareDeviceResults(h_hist, d_hist, ACTIVE_CHANNELS * NUM_BINS, true, g_verbose); if (!g_report) printf("\t%s\n", compare ? "FAIL" : "PASS"); fflush(stdout); + if (compare) exit(1); double elapsed_ms = 0; for (int i = 0; i < timing_iterations; i++) diff --git a/src/histogram-omp/histogram_compare_base.cpp b/src/histogram-omp/histogram_compare_base.cpp index bf4bddf927..682b9671ca 100644 --- a/src/histogram-omp/histogram_compare_base.cpp +++ b/src/histogram-omp/histogram_compare_base.cpp @@ -87,6 +87,7 @@ inline void DecodePixel(uchar1 pixel, unsigned int (&bins)[ACTIVE_CHANNELS]) #include "histogram_gmem_atomics.hpp" #include "histogram_smem_atomics.hpp" +#include struct less_than_value { @@ -419,6 +420,7 @@ void RunTest( int compare = CompareDeviceResults(h_hist, d_hist, ACTIVE_CHANNELS * NUM_BINS, true, g_verbose); if (!g_report) printf("\t%s\n", compare ? "FAIL" : "PASS"); fflush(stdout); + if (compare) exit(1); double elapsed_ms = 0; for (int i = 0; i < timing_iterations; i++) diff --git a/src/histogram-sycl/histogram_compare_base.cpp b/src/histogram-sycl/histogram_compare_base.cpp index f2ae3fd64f..ff7cf28964 100644 --- a/src/histogram-sycl/histogram_compare_base.cpp +++ b/src/histogram-sycl/histogram_compare_base.cpp @@ -96,6 +96,7 @@ class hist_smem_accum; #include "histogram_gmem_atomics.hpp" #include "histogram_smem_atomics.hpp" +#include struct less_than_value { @@ -430,6 +431,7 @@ void RunTest( int compare = CompareDeviceResults(q, h_hist, d_hist, ACTIVE_CHANNELS * NUM_BINS, true, g_verbose); if (!g_report) printf("\t%s\n", compare ? "FAIL" : "PASS"); fflush(stdout); + if (compare) exit(1); double elapsed_ms = 0; for (int i = 0; i < timing_iterations; i++) diff --git a/src/hogbom-cuda/main.cpp b/src/hogbom-cuda/main.cpp index a7cf206445..cb37b8fde6 100644 --- a/src/hogbom-cuda/main.cpp +++ b/src/hogbom-cuda/main.cpp @@ -85,6 +85,7 @@ int main(int argc, char* argv[]) const bool modelDiff = compare(goldenModel, deviceModel); if (!modelDiff) { std::cout << "FAIL" << std::endl; + exit(1); } else { std::cout << "PASS" << std::endl; } @@ -93,6 +94,7 @@ int main(int argc, char* argv[]) const bool residualDiff = compare(goldenResidual, deviceResidual); if (!residualDiff) { std::cout << "FAIL" << std::endl; + exit(1); } else { std::cout << "PASS" << std::endl; } diff --git a/src/hwt1d-cuda/main.cu b/src/hwt1d-cuda/main.cu index 634e705e2d..c94debd392 100644 --- a/src/hwt1d-cuda/main.cu +++ b/src/hwt1d-cuda/main.cu @@ -15,6 +15,7 @@ ********************************************************************/ #include "hwt.h" +#include // rounds to a power of 2 template @@ -119,6 +120,7 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!ok) exit(1); return 0; } diff --git a/src/hwt1d-hip/main.cu b/src/hwt1d-hip/main.cu index b3bf500aae..4e53ee16da 100644 --- a/src/hwt1d-hip/main.cu +++ b/src/hwt1d-hip/main.cu @@ -15,6 +15,7 @@ ********************************************************************/ #include "hwt.h" +#include // rounds to a power of 2 template @@ -119,6 +120,7 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!ok) exit(1); return 0; } diff --git a/src/hwt1d-omp/main.cpp b/src/hwt1d-omp/main.cpp index 78f8e38420..a8af0ed7e7 100644 --- a/src/hwt1d-omp/main.cpp +++ b/src/hwt1d-omp/main.cpp @@ -15,6 +15,7 @@ ********************************************************************/ #include "hwt.h" +#include // rounds to a power of 2 template @@ -239,6 +240,7 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!ok) exit(1); return 0; } diff --git a/src/hwt1d-sycl/main.cpp b/src/hwt1d-sycl/main.cpp index 07e1f32e3b..3414989c35 100644 --- a/src/hwt1d-sycl/main.cpp +++ b/src/hwt1d-sycl/main.cpp @@ -15,6 +15,7 @@ ********************************************************************/ #include "hwt.h" +#include // rounds to a power of 2 template @@ -120,6 +121,7 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!ok) exit(1); return 0; } diff --git a/src/hybridsort-cuda/hybridsort.cu b/src/hybridsort-cuda/hybridsort.cu index a9c2cfff07..17df23309b 100644 --- a/src/hybridsort-cuda/hybridsort.cu +++ b/src/hybridsort-cuda/hybridsort.cu @@ -161,6 +161,7 @@ int main(int argc, char** argv) } if(count == 0) printf("PASSED.\n"); else printf("FAILED.\n"); + if (count != 0) exit(1); #ifdef OUTPUT FILE *tp1; diff --git a/src/hybridsort-hip/hybridsort.cu b/src/hybridsort-hip/hybridsort.cu index a9c2cfff07..17df23309b 100644 --- a/src/hybridsort-hip/hybridsort.cu +++ b/src/hybridsort-hip/hybridsort.cu @@ -161,6 +161,7 @@ int main(int argc, char** argv) } if(count == 0) printf("PASSED.\n"); else printf("FAILED.\n"); + if (count != 0) exit(1); #ifdef OUTPUT FILE *tp1; diff --git a/src/hybridsort-omp/hybridsort.c b/src/hybridsort-omp/hybridsort.c index 1e7af02e26..16aecc8de0 100644 --- a/src/hybridsort-omp/hybridsort.c +++ b/src/hybridsort-omp/hybridsort.c @@ -159,6 +159,7 @@ int main(int argc, char** argv) } if(count == 0) printf("PASSED.\n"); else printf("FAILED.\n"); + if (count != 0) exit(1); #ifdef OUTPUT FILE *tp1; diff --git a/src/hybridsort-sycl/hybridsort.c b/src/hybridsort-sycl/hybridsort.c index adefbf6843..6294354afa 100644 --- a/src/hybridsort-sycl/hybridsort.c +++ b/src/hybridsort-sycl/hybridsort.c @@ -170,6 +170,7 @@ int main(int argc, char** argv) } if(count == 0) printf("PASSED.\n"); else printf("FAILED.\n"); + if (count != 0) exit(1); #ifdef OUTPUT FILE *tp1; diff --git a/src/interval-cuda/main.cu b/src/interval-cuda/main.cu index 7a612caab2..b5f0268603 100644 --- a/src/interval-cuda/main.cu +++ b/src/interval-cuda/main.cu @@ -40,6 +40,7 @@ #include "interval.h" #include "gpu_interval.h" #include "cpu_interval.h" +#include int main(int argc, char *argv[]) { if (argc != 3) { @@ -119,6 +120,7 @@ int main(int argc, char *argv[]) { bool bTestResult = checkAgainstHost(h_nresults, h_nresults_cpu, h_result, h_result_cpu); std::cout << (bTestResult ? "PASS" : "FAIL") << "\n"; + if (!bTestResult) exit(1); delete[] h_result_cpu; delete[] h_nresults_cpu; diff --git a/src/interval-hip/main.cu b/src/interval-hip/main.cu index 11a21cf2ed..3413828844 100644 --- a/src/interval-hip/main.cu +++ b/src/interval-hip/main.cu @@ -41,6 +41,7 @@ #include "interval.h" #include "gpu_interval.h" #include "cpu_interval.h" +#include int main(int argc, char *argv[]) { if (argc != 3) { @@ -120,6 +121,7 @@ int main(int argc, char *argv[]) { bool bTestResult = checkAgainstHost(h_nresults, h_nresults_cpu, h_result, h_result_cpu); std::cout << (bTestResult ? "PASS" : "FAIL") << "\n"; + if (!bTestResult) exit(1); delete[] h_result_cpu; delete[] h_nresults_cpu; diff --git a/src/interval-omp/main.cpp b/src/interval-omp/main.cpp index c45cac9f33..db71bc966d 100644 --- a/src/interval-omp/main.cpp +++ b/src/interval-omp/main.cpp @@ -42,6 +42,7 @@ #include "interval.h" #include "gpu_interval.h" #include "cpu_interval.h" +#include int main(int argc, char *argv[]) { if (argc != 3) { @@ -135,6 +136,7 @@ int main(int argc, char *argv[]) { bool bTestResult = checkAgainstHost(h_nresults, h_nresults_cpu, h_result, h_result_cpu); std::cout << (bTestResult ? "PASS" : "FAIL") << "\n"; + if (!bTestResult) exit(1); delete[] h_result_cpu; delete[] h_nresults_cpu; diff --git a/src/interval-sycl/main.cpp b/src/interval-sycl/main.cpp index ceac3a1aa8..e34d3957a1 100644 --- a/src/interval-sycl/main.cpp +++ b/src/interval-sycl/main.cpp @@ -41,6 +41,7 @@ #include "interval.h" #include "gpu_interval.h" #include "cpu_interval.h" +#include int main(int argc, char *argv[]) { if (argc != 3) { @@ -129,6 +130,7 @@ int main(int argc, char *argv[]) { bool bTestResult = checkAgainstHost(h_nresults, h_nresults_cpu, h_result, h_result_cpu); std::cout << (bTestResult ? "PASS" : "FAIL") << "\n"; + if (!bTestResult) exit(1); delete[] h_result_cpu; delete[] h_nresults_cpu; diff --git a/src/inversek2j-cuda/main.cu b/src/inversek2j-cuda/main.cu index 56b5932630..478e899da2 100644 --- a/src/inversek2j-cuda/main.cu +++ b/src/inversek2j-cuda/main.cu @@ -310,6 +310,7 @@ int main(int argc, char* argv[]) cout << "FAIL\n"; else cout << "PASS\n"; + if (error) exit(1); return 0; } diff --git a/src/inversek2j-hip/main.cu b/src/inversek2j-hip/main.cu index 9785dbed91..899bea1d2b 100644 --- a/src/inversek2j-hip/main.cu +++ b/src/inversek2j-hip/main.cu @@ -311,6 +311,7 @@ int main(int argc, char* argv[]) cout << "FAIL\n"; else cout << "PASS\n"; + if (error) exit(1); return 0; } diff --git a/src/inversek2j-omp/main.cpp b/src/inversek2j-omp/main.cpp index fff58327cc..30cdb83ec4 100644 --- a/src/inversek2j-omp/main.cpp +++ b/src/inversek2j-omp/main.cpp @@ -275,6 +275,7 @@ int main(int argc, char* argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; + if (error) exit(1); return 0; } diff --git a/src/inversek2j-sycl/main.cpp b/src/inversek2j-sycl/main.cpp index d7cf8a29f4..82f8e262fb 100644 --- a/src/inversek2j-sycl/main.cpp +++ b/src/inversek2j-sycl/main.cpp @@ -310,6 +310,7 @@ int main(int argc, char* argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; + if (error) exit(1); return 0; } diff --git a/src/is-cuda/main.cu b/src/is-cuda/main.cu index ea736ea669..ab4ca428b2 100644 --- a/src/is-cuda/main.cu +++ b/src/is-cuda/main.cu @@ -349,6 +349,7 @@ int main(int argc, char** argv){ /* the final printout */ if(passed_verification != 5*MAX_ITERATIONS+1) {passed_verification = 0;} printf("%s\n", passed_verification ? "PASS" : "FAIL"); + if (!passed_verification) exit(1); cudaFree(key_array_device); cudaFree(key_buff1_device); diff --git a/src/is-hip/main.cu b/src/is-hip/main.cu index 88e627ec50..1b4269f1cc 100644 --- a/src/is-hip/main.cu +++ b/src/is-hip/main.cu @@ -335,6 +335,7 @@ int main(int argc, char** argv){ /* the final printout */ if(passed_verification != 5*MAX_ITERATIONS+1) {passed_verification = 0;} printf("%s\n", passed_verification ? "PASS" : "FAIL"); + if (!passed_verification) exit(1); hipFree(key_array_device); hipFree(key_buff1_device); diff --git a/src/is-sycl/main.cpp b/src/is-sycl/main.cpp index 015432488e..ed0ea0a04e 100644 --- a/src/is-sycl/main.cpp +++ b/src/is-sycl/main.cpp @@ -427,6 +427,7 @@ int main(int argc, char** argv){ /* the final printout */ if(passed_verification != 5*MAX_ITERATIONS+1) {passed_verification = 0;} printf("%s\n", passed_verification ? "PASS" : "FAIL"); + if (!passed_verification) exit(1); sycl::free(key_array_device, q); sycl::free(key_buff1_device, q); diff --git a/src/ising-cuda/main.cu b/src/ising-cuda/main.cu index 54e6df43b4..8c486ebcde 100644 --- a/src/ising-cuda/main.cu +++ b/src/ising-cuda/main.cu @@ -34,6 +34,7 @@ #endif #include "cudamacro.h" +#include #define TCRIT 2.26918531421f #define THREADS 128 @@ -301,6 +302,7 @@ int main(int argc, char **argv) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifndef CURAND free(randvals_host); diff --git a/src/ising-hip/main.cu b/src/ising-hip/main.cu index 2c9c4a7daf..d716d85aa3 100644 --- a/src/ising-hip/main.cu +++ b/src/ising-hip/main.cu @@ -34,6 +34,7 @@ #endif #include "hipmacro.h" +#include #define TCRIT 2.26918531421f #define THREADS 128 @@ -301,6 +302,7 @@ int main(int argc, char **argv) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifndef HIPRAND free(randvals_host); diff --git a/src/ising-omp/main.cpp b/src/ising-omp/main.cpp index 511d1abea5..1d23a7e870 100644 --- a/src/ising-omp/main.cpp +++ b/src/ising-omp/main.cpp @@ -27,6 +27,7 @@ #include #include #include "reference.h" +#include #define TCRIT 2.26918531421f #define THREADS 128 @@ -249,6 +250,7 @@ int main(int argc, char **argv) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(randvals); free(lattice_b); free(lattice_w); diff --git a/src/ising-sycl/main.cpp b/src/ising-sycl/main.cpp index 52947e5037..2406c8f816 100644 --- a/src/ising-sycl/main.cpp +++ b/src/ising-sycl/main.cpp @@ -33,6 +33,7 @@ #include #include "reference.h" +#include #define TCRIT 2.26918531421f #define THREADS 128 @@ -341,6 +342,7 @@ int main(int argc, char **argv) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifndef MKLRAND free(randvals_host); diff --git a/src/iso2dfd-cuda/iso2dfd.cu b/src/iso2dfd-cuda/iso2dfd.cu index ebe7773f90..8c55d58a1a 100644 --- a/src/iso2dfd-cuda/iso2dfd.cu +++ b/src/iso2dfd-cuda/iso2dfd.cu @@ -20,6 +20,7 @@ #include #include #include "iso2dfd.h" +#include #define BLOCK_SIZE 16 #define MIN(a, b) (a) < (b) ? (a) : (b) @@ -296,6 +297,7 @@ int main(int argc, char* argv[]) { << std::endl; error = within_epsilon(next_base, next_cpu, nRows, nCols, HALF_LENGTH, 0.1f); std::cout << (error ? "FAIL" : "PASS") << std::endl; + if (error) exit(1); // Output final wavefield (computed by CPU) to binary file outFile.open("wavefield_snapshot_cpu.bin", std::ios::out | std::ios::binary); diff --git a/src/iso2dfd-hip/iso2dfd.cu b/src/iso2dfd-hip/iso2dfd.cu index b502bf1836..d65f11534b 100644 --- a/src/iso2dfd-hip/iso2dfd.cu +++ b/src/iso2dfd-hip/iso2dfd.cu @@ -20,6 +20,7 @@ #include #include #include "iso2dfd.h" +#include #define BLOCK_SIZE 16 #define MIN(a, b) (a) < (b) ? (a) : (b) @@ -296,6 +297,7 @@ int main(int argc, char* argv[]) { << std::endl; error = within_epsilon(next_base, next_cpu, nRows, nCols, HALF_LENGTH, 0.1f); std::cout << (error ? "FAIL" : "PASS") << std::endl; + if (error) exit(1); // Output final wavefield (computed by CPU) to binary file outFile.open("wavefield_snapshot_cpu.bin", std::ios::out | std::ios::binary); diff --git a/src/iso2dfd-omp/iso2dfd.cpp b/src/iso2dfd-omp/iso2dfd.cpp index 6e16630f73..49f499396a 100644 --- a/src/iso2dfd-omp/iso2dfd.cpp +++ b/src/iso2dfd-omp/iso2dfd.cpp @@ -20,6 +20,7 @@ #include #include #include "iso2dfd.h" +#include #define MIN(a, b) (a) < (b) ? (a) : (b) @@ -264,6 +265,7 @@ int main(int argc, char* argv[]) { << std::endl; error = within_epsilon(next_base, next_cpu, nRows, nCols, HALF_LENGTH, 0.1f); std::cout << (error ? "FAIL" : "PASS") << std::endl; + if (error) exit(1); // Output final wavefield (computed by CPU) to binary file outFile.open("wavefield_snapshot_cpu.bin", std::ios::out | std::ios::binary); diff --git a/src/iso2dfd-sycl/iso2dfd.cpp b/src/iso2dfd-sycl/iso2dfd.cpp index 332f1fdea5..abeefbf895 100644 --- a/src/iso2dfd-sycl/iso2dfd.cpp +++ b/src/iso2dfd-sycl/iso2dfd.cpp @@ -20,6 +20,7 @@ #include #include #include "iso2dfd.h" +#include #define MIN(a, b) (a) < (b) ? (a) : (b) @@ -303,6 +304,7 @@ int main(int argc, char* argv[]) { << std::endl; error = within_epsilon(next_base, next_cpu, nRows, nCols, HALF_LENGTH, 0.1f); std::cout << (error ? "FAIL" : "PASS") << std::endl; + if (error) exit(1); // Output final wavefield (computed by CPU) to binary file outFile.open("wavefield_snapshot_cpu.bin", std::ios::out | std::ios::binary); diff --git a/src/jaccard-cuda/main.cu b/src/jaccard-cuda/main.cu index 4cda9944e4..7129fba8cc 100644 --- a/src/jaccard-cuda/main.cu +++ b/src/jaccard-cuda/main.cu @@ -21,6 +21,7 @@ #include #include #include +#include using namespace std; @@ -370,6 +371,7 @@ void jaccard_weight (const int iteration, const int n, const int e, if (error > 1e-5) { for (int i = 0; i < e; i++) printf("wj: %d %f\n", i, weight_j[i]); printf("FAIL"); + exit(1); } else { printf("PASS"); } diff --git a/src/jaccard-hip/main.cu b/src/jaccard-hip/main.cu index f281105479..98d511860f 100644 --- a/src/jaccard-hip/main.cu +++ b/src/jaccard-hip/main.cu @@ -21,6 +21,7 @@ #include #include #include +#include using namespace std; @@ -369,6 +370,7 @@ void jaccard_weight (const int iteration, const int n, const int e, if (error > 1e-5) { for (int i = 0; i < e; i++) printf("wj: %d %f\n", i, weight_j[i]); printf("FAILED"); + exit(1); } else { printf("PASSED"); } diff --git a/src/jaccard-sycl/main.cpp b/src/jaccard-sycl/main.cpp index 7f982ee046..e5d5b895f9 100644 --- a/src/jaccard-sycl/main.cpp +++ b/src/jaccard-sycl/main.cpp @@ -21,6 +21,7 @@ #include #include #include +#include using namespace std; @@ -393,6 +394,7 @@ void jaccard_weight (sycl::queue &q, const int iteration, const int n, const int if (error > 1e-5) { for (int i = 0; i < e; i++) printf("wj: %d %f\n", i, weight_j[i]); printf("FAIL"); + exit(1); } else { printf("PASS"); } diff --git a/src/jacobi-cuda/main.cu b/src/jacobi-cuda/main.cu index e2bf44752e..e0f9fb8782 100644 --- a/src/jacobi-cuda/main.cu +++ b/src/jacobi-cuda/main.cu @@ -19,6 +19,7 @@ #include #include #include +#include // A multiple of thread block size #define N 2048 @@ -203,6 +204,7 @@ int main () { } else { std::cout << "FAIL" << std::endl; + exit(1); return -1; } diff --git a/src/jacobi-hip/main.cu b/src/jacobi-hip/main.cu index 1dce5e8f1f..3b93df6151 100644 --- a/src/jacobi-hip/main.cu +++ b/src/jacobi-hip/main.cu @@ -19,6 +19,7 @@ #include #include #include +#include // A multiple of thread block size #define N 2048 @@ -203,6 +204,7 @@ int main () { } else { std::cout << "FAIL" << std::endl; + exit(1); return -1; } diff --git a/src/jacobi-omp/main.cpp b/src/jacobi-omp/main.cpp index 5362aa65df..9007ce2165 100644 --- a/src/jacobi-omp/main.cpp +++ b/src/jacobi-omp/main.cpp @@ -19,6 +19,7 @@ #include #include #include +#include // A multiple of thread block size #define N 2048 @@ -124,6 +125,7 @@ int main () { } else { std::cout << "FAIL" << std::endl; + exit(1); return -1; } diff --git a/src/jacobi-sycl/main.cpp b/src/jacobi-sycl/main.cpp index 4a461966fa..376bda2a4b 100644 --- a/src/jacobi-sycl/main.cpp +++ b/src/jacobi-sycl/main.cpp @@ -19,6 +19,7 @@ #include #include #include +#include // A multiple of thread block size #define N 2048 @@ -223,6 +224,7 @@ int main() { } else { std::cout << "FAIL" << std::endl; + exit(1); return -1; } diff --git a/src/jenkins-hash-cuda/main.cu b/src/jenkins-hash-cuda/main.cu index 712151a43b..89b2ec2278 100644 --- a/src/jenkins-hash-cuda/main.cu +++ b/src/jenkins-hash-cuda/main.cu @@ -306,6 +306,7 @@ int main(int argc, char** argv) { } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(keys); free(lens); diff --git a/src/jenkins-hash-hip/main.cu b/src/jenkins-hash-hip/main.cu index 0294ea0b1f..fa13c1f57d 100644 --- a/src/jenkins-hash-hip/main.cu +++ b/src/jenkins-hash-hip/main.cu @@ -307,6 +307,7 @@ int main(int argc, char** argv) { } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(keys); free(lens); diff --git a/src/jenkins-hash-omp/main.cpp b/src/jenkins-hash-omp/main.cpp index 83ad031046..e2be7ed23b 100644 --- a/src/jenkins-hash-omp/main.cpp +++ b/src/jenkins-hash-omp/main.cpp @@ -278,6 +278,7 @@ int main(int argc, char** argv) { } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(keys); free(lens); diff --git a/src/jenkins-hash-sycl/main.cpp b/src/jenkins-hash-sycl/main.cpp index 4e2811f5e2..6c1ac1f131 100644 --- a/src/jenkins-hash-sycl/main.cpp +++ b/src/jenkins-hash-sycl/main.cpp @@ -306,6 +306,7 @@ int main(int argc, char** argv) { } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(keys); free(lens); diff --git a/src/kalman-cuda/reference.h b/src/kalman-cuda/reference.h index 4529f96242..d553c25a90 100644 --- a/src/kalman-cuda/reference.h +++ b/src/kalman-cuda/reference.h @@ -277,6 +277,7 @@ void reference ( } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(fc); free(F_fc); diff --git a/src/keccaktreehash-cuda/Test.cu b/src/keccaktreehash-cuda/Test.cu index 049a5a531d..a345b1cfa6 100644 --- a/src/keccaktreehash-cuda/Test.cu +++ b/src/keccaktreehash-cuda/Test.cu @@ -194,4 +194,5 @@ void Print_Param(void) void Verify_results(void) { printf("%s\n", isEqual_KS(Kstate_cpu, Kstate_gpu) ? "PASS" : "FAIL"); + if (!(Kstate_gpu))) exit(1); } diff --git a/src/keccaktreehash-hip/Test.cu b/src/keccaktreehash-hip/Test.cu index c6554f2fb7..ad82900dae 100644 --- a/src/keccaktreehash-hip/Test.cu +++ b/src/keccaktreehash-hip/Test.cu @@ -194,4 +194,5 @@ void Print_Param(void) void Verify_results(void) { printf("%s\n", isEqual_KS(Kstate_cpu, Kstate_gpu) ? "PASS" : "FAIL"); + if (!(Kstate_gpu))) exit(1); } diff --git a/src/keccaktreehash-omp/Test.cpp b/src/keccaktreehash-omp/Test.cpp index c12fb231f8..e9e13524b6 100644 --- a/src/keccaktreehash-omp/Test.cpp +++ b/src/keccaktreehash-omp/Test.cpp @@ -182,4 +182,5 @@ void Print_Param(void) void Verify_results(void) { printf("%s\n", isEqual_KS(Kstate_cpu, Kstate_gpu) ? "PASS" : "FAIL"); + if (!(Kstate_gpu))) exit(1); } diff --git a/src/keccaktreehash-sycl/Test.cpp b/src/keccaktreehash-sycl/Test.cpp index 90991c765e..44a6faca3b 100644 --- a/src/keccaktreehash-sycl/Test.cpp +++ b/src/keccaktreehash-sycl/Test.cpp @@ -188,6 +188,7 @@ void Print_Param(void) void Verify_results(void) { printf("%s\n", isEqual_KS(Kstate_cpu, Kstate_gpu) ? "PASS" : "FAIL"); + if (!(Kstate_gpu))) exit(1); } diff --git a/src/keogh-cuda/main.cu b/src/keogh-cuda/main.cu index 962e126928..fde08bb398 100644 --- a/src/keogh-cuda/main.cu +++ b/src/keogh-cuda/main.cu @@ -125,6 +125,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_lb); cudaFree(d_avgs); diff --git a/src/keogh-hip/main.cu b/src/keogh-hip/main.cu index 68144a16ca..0a7e1a05f0 100644 --- a/src/keogh-hip/main.cu +++ b/src/keogh-hip/main.cu @@ -124,6 +124,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_lb); hipFree(d_avgs); diff --git a/src/keogh-omp/main.cpp b/src/keogh-omp/main.cpp index 5d439cf6e7..9324804be7 100644 --- a/src/keogh-omp/main.cpp +++ b/src/keogh-omp/main.cpp @@ -86,6 +86,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(lb); free(lb_h); diff --git a/src/keogh-sycl/main.cpp b/src/keogh-sycl/main.cpp index 699c360e22..fcd96c4b16 100644 --- a/src/keogh-sycl/main.cpp +++ b/src/keogh-sycl/main.cpp @@ -125,6 +125,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_lb, q); sycl::free(d_avgs, q); diff --git a/src/knn-cuda/main.cu b/src/knn-cuda/main.cu index e346ec3563..12c7404e8b 100644 --- a/src/knn-cuda/main.cu +++ b/src/knn-cuda/main.cu @@ -485,6 +485,7 @@ int main(int argc, char* argv[]) { float index_accuracy = nb_correct_indexes / ((float)query_nb * k); printf("Precision accuracy %f\nIndex accuracy %f\n", precision_accuracy, index_accuracy); printf("%s\n", (precision_accuracy == 1.f) ? "PASS" : "FAIL"); + if (!(precision_accuracy == 1.f)) exit(1); free(ind); free(dist); diff --git a/src/knn-hip/main.cu b/src/knn-hip/main.cu index 8b3d602cfe..3c2ac85a4e 100644 --- a/src/knn-hip/main.cu +++ b/src/knn-hip/main.cu @@ -486,6 +486,7 @@ int main(int argc, char* argv[]) { float index_accuracy = nb_correct_indexes / ((float)query_nb * k); printf("Precision accuracy %f\nIndex accuracy %f\n", precision_accuracy, index_accuracy); printf("%s\n", (precision_accuracy == 1.f) ? "PASS" : "FAIL"); + if (!(precision_accuracy == 1.f)) exit(1); free(ind); free(dist); diff --git a/src/knn-omp/main.cpp b/src/knn-omp/main.cpp index c3ad0a4088..8b44f6ff7d 100644 --- a/src/knn-omp/main.cpp +++ b/src/knn-omp/main.cpp @@ -334,6 +334,7 @@ int main(int argc, char* argv[]) { float index_accuracy = nb_correct_indexes / ((float)query_nb * k); printf("Precision accuracy %f\nIndex accuracy %f\n", precision_accuracy, index_accuracy); printf("%s\n", (precision_accuracy == 1.f) ? "PASS" : "FAIL"); + if (!(precision_accuracy == 1.f)) exit(1); free(ind); free(dist); diff --git a/src/knn-sycl/main.cpp b/src/knn-sycl/main.cpp index 8d993bcd81..0453228500 100644 --- a/src/knn-sycl/main.cpp +++ b/src/knn-sycl/main.cpp @@ -422,6 +422,7 @@ int main(int argc, char* argv[]) { float index_accuracy = nb_correct_indexes / ((float)query_nb * k); printf("Precision accuracy %f\nIndex accuracy %f\n", precision_accuracy, index_accuracy); printf("%s\n", (precision_accuracy == 1.f) ? "PASS" : "FAIL"); + if (!(precision_accuracy == 1.f)) exit(1); free(ind); free(dist); diff --git a/src/laplace-cuda/main.cu b/src/laplace-cuda/main.cu index 4b22882c6f..f5cf38eb1e 100644 --- a/src/laplace-cuda/main.cu +++ b/src/laplace-cuda/main.cu @@ -286,6 +286,7 @@ int main (void) { fclose(pfile); printf("%s\n", count == 0 ? "PASS" : "FAIL"); + if (count != 0) exit(1); cudaFree(aP_d); cudaFree(aW_d); diff --git a/src/laplace-hip/main.cu b/src/laplace-hip/main.cu index 9944ac796f..abc7aef3d8 100644 --- a/src/laplace-hip/main.cu +++ b/src/laplace-hip/main.cu @@ -286,6 +286,7 @@ int main (void) { fclose(pfile); printf("%s\n", count == 0 ? "PASS" : "FAIL"); + if (count != 0) exit(1); hipFree(aP_d); hipFree(aW_d); diff --git a/src/laplace-omp/main.cpp b/src/laplace-omp/main.cpp index b5b37b6676..c17d47c437 100644 --- a/src/laplace-omp/main.cpp +++ b/src/laplace-omp/main.cpp @@ -295,6 +295,7 @@ int main (void) { fclose(pfile); printf("%s\n", count == 0 ? "PASS" : "FAIL"); + if (count != 0) exit(1); free(aP); free(aW); diff --git a/src/laplace-sycl/main.cpp b/src/laplace-sycl/main.cpp index 682af4f470..75dcf72e6a 100644 --- a/src/laplace-sycl/main.cpp +++ b/src/laplace-sycl/main.cpp @@ -287,6 +287,7 @@ int main(void) { fclose(pfile); printf("%s\n", count == 0 ? "PASS" : "FAIL"); + if (count != 0) exit(1); sycl::free(aP_d, q); sycl::free(aW_d, q); diff --git a/src/laplace3d-cuda/main.cu b/src/laplace3d-cuda/main.cu index 0284616be0..2df95e834a 100644 --- a/src/laplace3d-cuda/main.cu +++ b/src/laplace3d-cuda/main.cu @@ -124,6 +124,7 @@ int main(int argc, char **argv){ } printf("\n RMS error = %f \n", sqrtf(err/ NX*NY*NZ)); printf(" %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } // Release GPU and CPU memory diff --git a/src/laplace3d-hip/main.cu b/src/laplace3d-hip/main.cu index 0c2e04f033..c8d32cbde7 100644 --- a/src/laplace3d-hip/main.cu +++ b/src/laplace3d-hip/main.cu @@ -124,6 +124,7 @@ int main(int argc, char **argv){ } printf("\n RMS error = %f \n", sqrtf(err/ NX*NY*NZ)); printf(" %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } // Release GPU and CPU memory diff --git a/src/laplace3d-omp/main.cpp b/src/laplace3d-omp/main.cpp index 388f250721..31723372eb 100644 --- a/src/laplace3d-omp/main.cpp +++ b/src/laplace3d-omp/main.cpp @@ -108,6 +108,7 @@ int main(int argc, char **argv){ } printf("\n RMS error = %f \n", sqrtf(err/ NX*NY*NZ)); printf(" %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } // Release CPU memory diff --git a/src/laplace3d-sycl/main.cpp b/src/laplace3d-sycl/main.cpp index 51cc83e2c8..c98cee84dc 100644 --- a/src/laplace3d-sycl/main.cpp +++ b/src/laplace3d-sycl/main.cpp @@ -142,6 +142,7 @@ int main(int argc, char **argv){ } printf("\n RMS error = %f \n", sqrtf(err/ NX*NY*NZ)); printf(" %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } // Release GPU and CPU memory diff --git a/src/layout-cuda/main.cu b/src/layout-cuda/main.cu index 2ee1a77eb1..9ce2079e9c 100644 --- a/src/layout-cuda/main.cu +++ b/src/layout-cuda/main.cu @@ -152,6 +152,7 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; + if (fail) exit(1); //initialize soa data for (int i = 0; i < treeNumber; i++) @@ -187,6 +188,7 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; + if (fail) exit(1); cudaFree(inputBuffer); cudaFree(outputBuffer); diff --git a/src/layout-hip/main.cu b/src/layout-hip/main.cu index 7904143d3d..4462a0a985 100644 --- a/src/layout-hip/main.cu +++ b/src/layout-hip/main.cu @@ -152,6 +152,7 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; + if (fail) exit(1); //initialize soa data for (int i = 0; i < treeNumber; i++) @@ -187,6 +188,7 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; + if (fail) exit(1); hipFree(inputBuffer); hipFree(outputBuffer); diff --git a/src/layout-omp/main.cpp b/src/layout-omp/main.cpp index b0d64f2900..90da362729 100644 --- a/src/layout-omp/main.cpp +++ b/src/layout-omp/main.cpp @@ -127,6 +127,7 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; + if (fail) exit(1); //initialize soa data for (int i = 0; i < treeNumber; i++) @@ -172,6 +173,7 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; + if (fail) exit(1); } diff --git a/src/layout-sycl/main.cpp b/src/layout-sycl/main.cpp index cfec85df91..a30308703b 100644 --- a/src/layout-sycl/main.cpp +++ b/src/layout-sycl/main.cpp @@ -159,6 +159,7 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; + if (fail) exit(1); //initialize soa data for (int i = 0; i < treeNumber; i++) @@ -199,6 +200,7 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; + if (fail) exit(1); sycl::free(inputBuffer, q); sycl::free(outputBuffer, q); diff --git a/src/lebesgue-cuda/main.cpp b/src/lebesgue-cuda/main.cpp index 7b1e93e7c9..a453483e98 100644 --- a/src/lebesgue-cuda/main.cpp +++ b/src/lebesgue-cuda/main.cpp @@ -48,6 +48,7 @@ void test01 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -102,6 +103,7 @@ void test02 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -156,6 +158,7 @@ void test03 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -210,6 +213,7 @@ void test04 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -264,6 +268,7 @@ void test05 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -318,6 +323,7 @@ void test06 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -372,6 +378,7 @@ void test07 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -426,6 +433,7 @@ void test08 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -480,6 +488,7 @@ void test09 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, diff --git a/src/lebesgue-sycl/main.cpp b/src/lebesgue-sycl/main.cpp index 7172f318c0..e4c8d4edee 100644 --- a/src/lebesgue-sycl/main.cpp +++ b/src/lebesgue-sycl/main.cpp @@ -48,6 +48,7 @@ void test01 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -102,6 +103,7 @@ void test02 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -156,6 +158,7 @@ void test03 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -210,6 +213,7 @@ void test04 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -264,6 +268,7 @@ void test05 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -318,6 +323,7 @@ void test06 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -372,6 +378,7 @@ void test07 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -426,6 +433,7 @@ void test08 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -480,6 +488,7 @@ void test09 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, diff --git a/src/lfib4-cuda/main.cu b/src/lfib4-cuda/main.cu index 60bbb5e0d4..fb522bdee1 100644 --- a/src/lfib4-cuda/main.cu +++ b/src/lfib4-cuda/main.cu @@ -1,6 +1,7 @@ #include #include #include +#include #define P1 55 #define P2 119 @@ -258,6 +259,7 @@ int main(int argc, char**argv) { } } printf("check = %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(z); cudaFree(x_d); diff --git a/src/lfib4-hip/main.cu b/src/lfib4-hip/main.cu index 21e13bbd8b..2b0d31ed38 100644 --- a/src/lfib4-hip/main.cu +++ b/src/lfib4-hip/main.cu @@ -1,6 +1,7 @@ #include #include #include +#include #define P1 55 #define P2 119 @@ -258,6 +259,7 @@ int main(int argc, char**argv) { } } printf("check = %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(z); hipFree(x_d); diff --git a/src/lfib4-sycl/main.cpp b/src/lfib4-sycl/main.cpp index 7832ef0c08..5f6282d1c3 100644 --- a/src/lfib4-sycl/main.cpp +++ b/src/lfib4-sycl/main.cpp @@ -294,6 +294,7 @@ int main(int argc, char **argv) { } } printf("check = %s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(z); sycl::free(x_d, q); diff --git a/src/libor-cuda/main.cu b/src/libor-cuda/main.cu index 2980061952..9ccb4298f5 100644 --- a/src/libor-cuda/main.cu +++ b/src/libor-cuda/main.cu @@ -444,6 +444,7 @@ int main(int argc, char **argv) { free(h_Lb); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/libor-hip/main.cu b/src/libor-hip/main.cu index a5130c0d5c..6903d92fb6 100644 --- a/src/libor-hip/main.cu +++ b/src/libor-hip/main.cu @@ -442,6 +442,7 @@ int main(int argc, char **argv) { free(h_Lb); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/libor-sycl/main.cpp b/src/libor-sycl/main.cpp index ed8103444a..92fb2401ef 100644 --- a/src/libor-sycl/main.cpp +++ b/src/libor-sycl/main.cpp @@ -400,6 +400,7 @@ int main(int argc, char **argv) free(h_Lb); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/lif-cuda/main.cu b/src/lif-cuda/main.cu index 369d4f77be..f737c75587 100644 --- a/src/lif-cuda/main.cu +++ b/src/lif-cuda/main.cu @@ -185,6 +185,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(encode_result); free(voltage); diff --git a/src/lif-hip/main.cu b/src/lif-hip/main.cu index 0767314360..d2f455532c 100644 --- a/src/lif-hip/main.cu +++ b/src/lif-hip/main.cu @@ -185,6 +185,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(encode_result); free(voltage); diff --git a/src/lif-omp/main.cpp b/src/lif-omp/main.cpp index b3e0986fce..7187f0346d 100644 --- a/src/lif-omp/main.cpp +++ b/src/lif-omp/main.cpp @@ -168,6 +168,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(encode_result); free(voltage); diff --git a/src/lif-sycl/main.cpp b/src/lif-sycl/main.cpp index dd2278cc5e..9dd7c2a681 100644 --- a/src/lif-sycl/main.cpp +++ b/src/lif-sycl/main.cpp @@ -196,6 +196,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_encode_result, q); sycl::free(d_voltage, q); diff --git a/src/linearprobing-cuda/main.cu b/src/linearprobing-cuda/main.cu index bbd27e4c8f..9995c2d02a 100644 --- a/src/linearprobing-cuda/main.cu +++ b/src/linearprobing-cuda/main.cu @@ -7,6 +7,7 @@ #include #include #include "linearprobing.h" +#include // Create random keys/values in the range [0, kEmpty) // kEmpty is used to indicate an empty slot @@ -173,6 +174,7 @@ int main(int argc, char* argv[]) bool ok = test_correctness(insert_kvs, delete_kvs, kvs); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/linearprobing-hip/main.cu b/src/linearprobing-hip/main.cu index 8a3861913a..ae14e5dd1e 100644 --- a/src/linearprobing-hip/main.cu +++ b/src/linearprobing-hip/main.cu @@ -7,6 +7,7 @@ #include #include #include "linearprobing.h" +#include // Create random keys/values in the range [0, kEmpty) // kEmpty is used to indicate an empty slot @@ -173,6 +174,7 @@ int main(int argc, char* argv[]) bool ok = test_correctness(insert_kvs, delete_kvs, kvs); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); printf("Success\n"); diff --git a/src/linearprobing-omp/main.cpp b/src/linearprobing-omp/main.cpp index ae83c94f7c..ed38bcfee7 100644 --- a/src/linearprobing-omp/main.cpp +++ b/src/linearprobing-omp/main.cpp @@ -8,6 +8,7 @@ #include #include #include "linearprobing.h" +#include // Create random keys/values in the range [0, kEmpty) // kEmpty is used to indicate an empty slot @@ -173,6 +174,7 @@ int main(int argc, char* argv[]) bool ok = test_correctness(insert_kvs, delete_kvs, kvs); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } free(pHashTable); diff --git a/src/linearprobing-sycl/main.cpp b/src/linearprobing-sycl/main.cpp index ef95f30ca9..71eb4fbc49 100644 --- a/src/linearprobing-sycl/main.cpp +++ b/src/linearprobing-sycl/main.cpp @@ -7,6 +7,7 @@ #include #include #include "linearprobing.h" +#include // Create random keys/values in the range [0, kEmpty) // kEmpty is used to indicate an empty slot @@ -179,6 +180,7 @@ int main(int argc, char* argv[]) bool ok = test_correctness(insert_kvs, delete_kvs, kvs); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/logprob-cuda/main.cu b/src/logprob-cuda/main.cu index 9f6f302490..0d74e048f0 100644 --- a/src/logprob-cuda/main.cu +++ b/src/logprob-cuda/main.cu @@ -252,6 +252,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); cudaDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); diff --git a/src/logprob-hip/main.cu b/src/logprob-hip/main.cu index 69f0327cd2..5e24254fcd 100644 --- a/src/logprob-hip/main.cu +++ b/src/logprob-hip/main.cu @@ -252,6 +252,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); hipDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); diff --git a/src/logprob-sycl/main.cpp b/src/logprob-sycl/main.cpp index a5be732130..f34f482c5a 100644 --- a/src/logprob-sycl/main.cpp +++ b/src/logprob-sycl/main.cpp @@ -309,6 +309,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); q.wait(); auto start = std::chrono::steady_clock::now(); diff --git a/src/lombscargle-cuda/main.cu b/src/lombscargle-cuda/main.cu index 0d83fa82ac..bc841aaccc 100644 --- a/src/lombscargle-cuda/main.cu +++ b/src/lombscargle-cuda/main.cu @@ -201,6 +201,7 @@ int main(int argc, char* argv[]) { } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); cudaFree(d_x); cudaFree(d_y); diff --git a/src/lombscargle-hip/main.cu b/src/lombscargle-hip/main.cu index ae258a48dd..9714cafc80 100644 --- a/src/lombscargle-hip/main.cu +++ b/src/lombscargle-hip/main.cu @@ -201,6 +201,7 @@ int main(int argc, char* argv[]) { } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); hipFree(d_x); hipFree(d_y); diff --git a/src/lombscargle-omp/main.cpp b/src/lombscargle-omp/main.cpp index 2b4081d6b5..2d245d01f2 100644 --- a/src/lombscargle-omp/main.cpp +++ b/src/lombscargle-omp/main.cpp @@ -173,6 +173,7 @@ int main(int argc, char* argv[]) { } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(x); free(y); diff --git a/src/lombscargle-sycl/main.cpp b/src/lombscargle-sycl/main.cpp index d4aeb6aa25..bc82ceba15 100644 --- a/src/lombscargle-sycl/main.cpp +++ b/src/lombscargle-sycl/main.cpp @@ -196,6 +196,7 @@ int main(int argc, char* argv[]) { } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); sycl::free(d_x, q); sycl::free(d_y, q); diff --git a/src/marchingCubes-cuda/main.cu b/src/marchingCubes-cuda/main.cu index 07ada3d195..c152f8dbc2 100644 --- a/src/marchingCubes-cuda/main.cu +++ b/src/marchingCubes-cuda/main.cu @@ -7,6 +7,7 @@ #include #include #include "tables.h" +#include // problem size constexpr unsigned int N(1024); @@ -555,6 +556,7 @@ int main(int argc, char* argv[]) bool ok = (countedBlockNumLv1 == 8296 && countedBlockNumLv2 == 240380 && countedVerticesNum == 4856560 && countedTrianglesNum == 6101640); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(minMaxLv1Device); cudaFree(blockIndicesLv1Device); diff --git a/src/marchingCubes-hip/main.cu b/src/marchingCubes-hip/main.cu index f9ff501dc8..3be08102e2 100644 --- a/src/marchingCubes-hip/main.cu +++ b/src/marchingCubes-hip/main.cu @@ -7,6 +7,7 @@ #include #include #include "tables.h" +#include // problem size constexpr unsigned int N(1024); @@ -555,6 +556,7 @@ int main(int argc, char* argv[]) bool ok = (countedBlockNumLv1 == 8296 && countedBlockNumLv2 == 240380 && countedVerticesNum == 4856560 && countedTrianglesNum == 6101640); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(minMaxLv1Device); hipFree(blockIndicesLv1Device); diff --git a/src/marchingCubes-sycl/main.cpp b/src/marchingCubes-sycl/main.cpp index 79163f318a..4bfba51480 100644 --- a/src/marchingCubes-sycl/main.cpp +++ b/src/marchingCubes-sycl/main.cpp @@ -9,6 +9,7 @@ using uchar4 = sycl::uchar4; #include "tables.h" +#include // problem size constexpr unsigned int N(1024); @@ -605,6 +606,7 @@ int main(int argc, char* argv[]) bool ok = (countedBlockNumLv1 == 8296 && countedBlockNumLv2 == 240380 && countedVerticesNum == 4856560 && countedTrianglesNum == 6101640); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(minMaxLv1Device, q); sycl::free(blockIndicesLv1Device, q); diff --git a/src/mask-cuda/main.cu b/src/mask-cuda/main.cu index c44bcf0e9e..ab72b4e14e 100644 --- a/src/mask-cuda/main.cu +++ b/src/mask-cuda/main.cu @@ -171,6 +171,7 @@ void print_mask_ratio (T *h_out, T *d_out, T fill_val, int data_size) { if (h_out[i] == fill_val) cnt_fill++; } printf("%s, Mask ratio: %f\n", (error ? "FAIL" : "PASS"), + if ((error) exit(1); (float) cnt_fill / data_size); free(out); } diff --git a/src/mask-hip/main.cu b/src/mask-hip/main.cu index a9784769cc..cd2b40486f 100644 --- a/src/mask-hip/main.cu +++ b/src/mask-hip/main.cu @@ -171,6 +171,7 @@ void print_mask_ratio (T *h_out, T *d_out, T fill_val, int data_size) { if (h_out[i] == fill_val) cnt_fill++; } printf("%s, Mask ratio: %f\n", (error ? "FAIL" : "PASS"), + if ((error) exit(1); (float) cnt_fill / data_size); free(out); } diff --git a/src/mask-omp/main.cpp b/src/mask-omp/main.cpp index 68cc391023..b420e97b64 100644 --- a/src/mask-omp/main.cpp +++ b/src/mask-omp/main.cpp @@ -193,6 +193,7 @@ void print_mask_ratio (T *h_out, T *out_ref, T fill_val, int data_size) { if (h_out[i] == fill_val) cnt_fill++; } printf("%s, Mask ratio: %f\n", (error ? "FAIL" : "PASS"), + if ((error) exit(1); (float) cnt_fill / data_size); } diff --git a/src/mask-sycl/main.cpp b/src/mask-sycl/main.cpp index c274831567..6833de9b39 100644 --- a/src/mask-sycl/main.cpp +++ b/src/mask-sycl/main.cpp @@ -177,6 +177,7 @@ void print_mask_ratio (sycl::queue &q, T *h_out, T *d_out, T fill_val, int data_ if (h_out[i] == fill_val) cnt_fill++; } printf("%s, Mask ratio: %f\n", (error ? "FAIL" : "PASS"), + if ((error) exit(1); (float) cnt_fill / data_size); } diff --git a/src/matern-cuda/main.cu b/src/matern-cuda/main.cu index 01eb05fab4..5c71bb5703 100644 --- a/src/matern-cuda/main.cu +++ b/src/matern-cuda/main.cu @@ -144,6 +144,7 @@ int main(int argc, char* argv[]) } } printf("Length scale = %.1e check = %s\n", l, ok ? "PASS" : "FAIL"); + if (!ok) exit(1); l = l * 10.f; } diff --git a/src/matern-hip/main.cu b/src/matern-hip/main.cu index 92c36c5610..5133702cd6 100644 --- a/src/matern-hip/main.cu +++ b/src/matern-hip/main.cu @@ -145,6 +145,7 @@ int main(int argc, char* argv[]) } } printf("Length scale = %.1e check = %s\n", l, ok ? "PASS" : "FAIL"); + if (!ok) exit(1); l = l * 10.f; } diff --git a/src/matern-omp/main.cpp b/src/matern-omp/main.cpp index 2f1a28475a..bfcfdac463 100644 --- a/src/matern-omp/main.cpp +++ b/src/matern-omp/main.cpp @@ -172,6 +172,7 @@ int main(int argc, char* argv[]) } } printf("Length scale = %.1e check = %s\n", l, ok ? "PASS" : "FAIL"); + if (!ok) exit(1); l = l * 10.f; } diff --git a/src/matern-sycl/main.cpp b/src/matern-sycl/main.cpp index 04a6834d03..a1abce3057 100644 --- a/src/matern-sycl/main.cpp +++ b/src/matern-sycl/main.cpp @@ -162,6 +162,7 @@ int main(int argc, char* argv[]) } } printf("Length scale = %.1e check = %s\n", l, ok ? "PASS" : "FAIL"); + if (!ok) exit(1); l = l * 10.f; } diff --git a/src/matrix-rotate-cuda/main.cu b/src/matrix-rotate-cuda/main.cu index 8edcba8acc..212f8eebf1 100644 --- a/src/matrix-rotate-cuda/main.cu +++ b/src/matrix-rotate-cuda/main.cu @@ -99,6 +99,7 @@ int main(int argc, char** argv) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(serial_res); free(parallel_res); diff --git a/src/matrix-rotate-hip/main.cu b/src/matrix-rotate-hip/main.cu index c9f0e44bef..90406c9308 100644 --- a/src/matrix-rotate-hip/main.cu +++ b/src/matrix-rotate-hip/main.cu @@ -99,6 +99,7 @@ int main(int argc, char** argv) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(serial_res); free(parallel_res); diff --git a/src/matrix-rotate-omp/main.cpp b/src/matrix-rotate-omp/main.cpp index a67ddc5afe..3d89fa0e3a 100644 --- a/src/matrix-rotate-omp/main.cpp +++ b/src/matrix-rotate-omp/main.cpp @@ -93,6 +93,7 @@ int main(int argc, char** argv) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(serial_res); free(parallel_res); diff --git a/src/matrix-rotate-sycl/main.cpp b/src/matrix-rotate-sycl/main.cpp index 1eb9262338..a912df4d68 100644 --- a/src/matrix-rotate-sycl/main.cpp +++ b/src/matrix-rotate-sycl/main.cpp @@ -105,6 +105,7 @@ int main(int argc, char** argv) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(serial_res); free(matrix); diff --git a/src/matrixT-cuda/main.cu b/src/matrixT-cuda/main.cu index dec9a48511..648c5fe9d8 100644 --- a/src/matrixT-cuda/main.cu +++ b/src/matrixT-cuda/main.cu @@ -503,6 +503,7 @@ int main(int argc, char **argv) } printf("%s\n", success ? "PASS" : "FAIL"); + if (!success) exit(1); // cleanup free(h_idata); diff --git a/src/matrixT-hip/main.cu b/src/matrixT-hip/main.cu index 19afb06a8a..e9f6d93df0 100644 --- a/src/matrixT-hip/main.cu +++ b/src/matrixT-hip/main.cu @@ -503,6 +503,7 @@ int main(int argc, char **argv) } printf("%s\n", success ? "PASS" : "FAIL"); + if (!success) exit(1); // cleanup free(h_idata); diff --git a/src/matrixT-sycl/main.cpp b/src/matrixT-sycl/main.cpp index 5f39515ae2..98b544af50 100644 --- a/src/matrixT-sycl/main.cpp +++ b/src/matrixT-sycl/main.cpp @@ -657,6 +657,7 @@ int main(int argc, char **argv) } printf("%s\n", success ? "PASS" : "FAIL"); + if (!success) exit(1); // cleanup free(h_idata); diff --git a/src/maxpool3d-cuda/main.cu b/src/maxpool3d-cuda/main.cu index ed4638491e..ea76f8608b 100644 --- a/src/maxpool3d-cuda/main.cu +++ b/src/maxpool3d-cuda/main.cu @@ -135,6 +135,7 @@ int main(int argc, char** argv) int status = memcmp(h_output, d_output, sizeof(DTYPE)*i_img_count*o_img_width*o_img_height); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); + if (!(status == 0)) exit(1); free(h_image); free(h_output); diff --git a/src/maxpool3d-hip/main.cu b/src/maxpool3d-hip/main.cu index d74faca48a..17467c723f 100644 --- a/src/maxpool3d-hip/main.cu +++ b/src/maxpool3d-hip/main.cu @@ -135,6 +135,7 @@ int main(int argc, char** argv) int status = memcmp(h_output, d_output, sizeof(DTYPE)*i_img_count*o_img_width*o_img_height); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); + if (!(status == 0)) exit(1); free(h_image); free(h_output); diff --git a/src/maxpool3d-omp/main.cpp b/src/maxpool3d-omp/main.cpp index 3fd2da3719..ff062a9085 100644 --- a/src/maxpool3d-omp/main.cpp +++ b/src/maxpool3d-omp/main.cpp @@ -106,6 +106,7 @@ int main(int argc, char** argv) int status = memcmp(h_output, d_output, sizeof(DTYPE)*i_img_count*o_img_height*o_img_width); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); + if (!(status == 0)) exit(1); free(h_image); free(h_output); diff --git a/src/maxpool3d-sycl/main.cpp b/src/maxpool3d-sycl/main.cpp index 90f601e4d3..a2bfe3941f 100644 --- a/src/maxpool3d-sycl/main.cpp +++ b/src/maxpool3d-sycl/main.cpp @@ -147,6 +147,7 @@ int main(int argc, char** argv) int status = memcmp(h_output, d_output, sizeof(DTYPE)*i_img_count*o_img_width*o_img_height); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); + if (!(status == 0)) exit(1); free(h_image); free(h_output); diff --git a/src/mcpr-cuda/reference.h b/src/mcpr-cuda/reference.h index 0a1e45f585..18af8a8ffc 100644 --- a/src/mcpr-cuda/reference.h +++ b/src/mcpr-cuda/reference.h @@ -7,6 +7,7 @@ void verify(const double *probs, const double *probs_ref, int alphas_size) { } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); } void reference( diff --git a/src/md5hash-cuda/MD5Hash.cu b/src/md5hash-cuda/MD5Hash.cu index febae10b42..994838bc59 100644 --- a/src/md5hash-cuda/MD5Hash.cu +++ b/src/md5hash-cuda/MD5Hash.cu @@ -5,6 +5,7 @@ #include #include #include +#include using namespace std; @@ -613,6 +614,7 @@ int main(int argc, char** argv) cout << endl; } cout << ((rate == FLT_MAX) ? "FAIL" : "PASS") << endl; + if (rate == FLT_MAX) exit(1); } } diff --git a/src/md5hash-hip/MD5Hash.cu b/src/md5hash-hip/MD5Hash.cu index 29db1d8d52..83deb2c755 100644 --- a/src/md5hash-hip/MD5Hash.cu +++ b/src/md5hash-hip/MD5Hash.cu @@ -5,6 +5,7 @@ #include #include #include +#include using namespace std; @@ -613,6 +614,7 @@ int main(int argc, char** argv) cout << endl; } cout << ((rate == FLT_MAX) ? "FAIL" : "PASS") << endl; + if (rate == FLT_MAX) exit(1); } } diff --git a/src/md5hash-omp/MD5Hash.cpp b/src/md5hash-omp/MD5Hash.cpp index e93ca14811..a66a688ef5 100644 --- a/src/md5hash-omp/MD5Hash.cpp +++ b/src/md5hash-omp/MD5Hash.cpp @@ -575,6 +575,7 @@ int main(int argc, char** argv) std::cout << std::endl; } std::cout << ((rate == FLT_MAX) ? "FAIL" : "PASS") << std::endl; + if (rate == FLT_MAX) exit(1); } } diff --git a/src/md5hash-sycl/MD5Hash.cpp b/src/md5hash-sycl/MD5Hash.cpp index 4a781f390a..3e35432e9f 100644 --- a/src/md5hash-sycl/MD5Hash.cpp +++ b/src/md5hash-sycl/MD5Hash.cpp @@ -593,6 +593,7 @@ int main(int argc, char** argv) std::cout << std::endl; } std::cout << ((rate == FLT_MAX) ? "FAIL" : "PASS") << std::endl; + if (rate == FLT_MAX) exit(1); } } diff --git a/src/mdh-cuda/main.cu b/src/mdh-cuda/main.cu index 504530b9b8..96b65bee35 100644 --- a/src/mdh-cuda/main.cu +++ b/src/mdh-cuda/main.cu @@ -55,6 +55,7 @@ void compare(const float *arr, const float *arr2, int ngrid) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } __global__ void mdh ( diff --git a/src/mdh-hip/main.cu b/src/mdh-hip/main.cu index 551e66521f..f485fa05d2 100644 --- a/src/mdh-hip/main.cu +++ b/src/mdh-hip/main.cu @@ -74,6 +74,7 @@ void compare(const float *arr, const float *arr2, int ngrid) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } __global__ void mdh ( diff --git a/src/mdh-omp/main.cpp b/src/mdh-omp/main.cpp index 25d2001045..02ac5434e1 100644 --- a/src/mdh-omp/main.cpp +++ b/src/mdh-omp/main.cpp @@ -54,6 +54,7 @@ void compare(const float *arr, const float *arr2, int ngrid) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } void run_gpu_kernel( diff --git a/src/mdh-sycl/main.cpp b/src/mdh-sycl/main.cpp index 31470697bb..78595f9345 100644 --- a/src/mdh-sycl/main.cpp +++ b/src/mdh-sycl/main.cpp @@ -54,6 +54,7 @@ void compare(const float *arr, const float *arr2, int ngrid) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } void run_gpu_kernel( diff --git a/src/meanshift-cuda/main.cu b/src/meanshift-cuda/main.cu index a863e8cf45..c6601e17b0 100644 --- a/src/meanshift-cuda/main.cu +++ b/src/meanshift-cuda/main.cu @@ -4,6 +4,7 @@ #include #include "utils.h" #include "constants.h" +#include namespace mean_shift::gpu { __global__ void mean_shift(const float *data, float *data_next) { @@ -142,6 +143,7 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (centroids.size() != M && are_close) exit(1); // Reset device data cudaMemcpy(d_data, data.data(), data_bytes, cudaMemcpyHostToDevice); @@ -166,6 +168,7 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (centroids.size() != M && are_close) exit(1); cudaFree(d_data); cudaFree(d_data_next); diff --git a/src/meanshift-hip/main.cu b/src/meanshift-hip/main.cu index 9dc46001e6..8baff2e88a 100644 --- a/src/meanshift-hip/main.cu +++ b/src/meanshift-hip/main.cu @@ -4,6 +4,7 @@ #include #include "utils.h" #include "constants.h" +#include namespace mean_shift::gpu { __global__ void mean_shift(const float *data, float *data_next) { @@ -141,6 +142,7 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (centroids.size() != M && are_close) exit(1); // Reset device data hipMemcpy(d_data, data.data(), data_bytes, hipMemcpyHostToDevice); @@ -164,6 +166,7 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (centroids.size() != M && are_close) exit(1); hipFree(d_data); diff --git a/src/meanshift-omp/main.cpp b/src/meanshift-omp/main.cpp index 26417bff78..debf02ee21 100644 --- a/src/meanshift-omp/main.cpp +++ b/src/meanshift-omp/main.cpp @@ -5,6 +5,7 @@ #include #include "utils.h" #include "constants.h" +#include namespace mean_shift::gpu { void mean_shift(const float *data, float *data_next, @@ -146,6 +147,7 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (centroids.size() != M && are_close) exit(1); // Reset device data result = data; @@ -169,6 +171,7 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (centroids.size() != M && are_close) exit(1); } free(d_data_next); diff --git a/src/meanshift-sycl/main.cpp b/src/meanshift-sycl/main.cpp index fe3b1572a1..db8ab91b55 100644 --- a/src/meanshift-sycl/main.cpp +++ b/src/meanshift-sycl/main.cpp @@ -4,6 +4,7 @@ #include #include "utils.h" #include "constants.h" +#include namespace mean_shift::gpu { void mean_shift(sycl::nd_item<1> &item, const float *data, float *data_next) { @@ -155,6 +156,7 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (centroids.size() != M && are_close) exit(1); // Reset device data q.memcpy(d_data, data.data(), data_bytes).wait(); @@ -185,6 +187,7 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (centroids.size() != M && are_close) exit(1); sycl::free(d_data, q); sycl::free(d_data_next, q); diff --git a/src/medianfilter-cuda/main.cu b/src/medianfilter-cuda/main.cu index 651007e4c1..b020300693 100644 --- a/src/medianfilter-cuda/main.cu +++ b/src/medianfilter-cuda/main.cu @@ -9,6 +9,7 @@ #include #include "shrUtils.h" #include "MedianFilter.cu" +#include #ifndef min #define min(a,b) (a < b ? a : b) @@ -113,6 +114,7 @@ int main(int argc, char** argv) printf("PASS\n"); else printf("FAIL\n"); + if (bMatch != shrTRUE) exit(1); return EXIT_SUCCESS; } diff --git a/src/medianfilter-hip/main.cu b/src/medianfilter-hip/main.cu index 2507798495..bd1ee323b2 100644 --- a/src/medianfilter-hip/main.cu +++ b/src/medianfilter-hip/main.cu @@ -9,6 +9,7 @@ #include #include "shrUtils.h" #include "MedianFilter.cu" +#include #ifndef min #define min(a,b) (a < b ? a : b) @@ -113,6 +114,7 @@ int main(int argc, char** argv) printf("PASS\n"); else printf("FAIL\n"); + if (bMatch != shrTRUE) exit(1); return EXIT_SUCCESS; } diff --git a/src/medianfilter-omp/main.cpp b/src/medianfilter-omp/main.cpp index eedf9383fb..6018308c5e 100644 --- a/src/medianfilter-omp/main.cpp +++ b/src/medianfilter-omp/main.cpp @@ -12,6 +12,7 @@ #include #include #include "shrUtils.h" +#include typedef struct __attribute__((__aligned__(4))) { @@ -118,6 +119,7 @@ int main(int argc, char** argv) printf("PASS\n"); else printf("FAIL\n"); + if (bMatch != shrTRUE) exit(1); return EXIT_SUCCESS; } diff --git a/src/medianfilter-sycl/main.cpp b/src/medianfilter-sycl/main.cpp index fd8c4a173c..29fb67de55 100644 --- a/src/medianfilter-sycl/main.cpp +++ b/src/medianfilter-sycl/main.cpp @@ -13,6 +13,7 @@ #include #include "shrUtils.h" #include "MedianFilter.cpp" +#include #ifndef min #define min(a,b) (a < b ? a : b) @@ -121,6 +122,7 @@ int main(int argc, char** argv) printf("PASS\n"); else printf("FAIL\n"); + if (bMatch != shrTRUE) exit(1); return EXIT_SUCCESS; } diff --git a/src/merge-cuda/main.cu b/src/merge-cuda/main.cu index a8825eefe0..eb63b90546 100644 --- a/src/merge-cuda/main.cu +++ b/src/merge-cuda/main.cu @@ -110,6 +110,7 @@ void mergeType(const uint64_t size, const uint32_t runs) { PV(errors); // Print error info printf("%s. ", errors ? "FAIL" : "PASS"); + if (errors) exit(1); if (timing) printf("Average kernel execution time: %f (us).\n", (total_time * 1e-3f) / runs); diff --git a/src/merge-hip/main.cu b/src/merge-hip/main.cu index a11967c74e..eea5d4c7ad 100644 --- a/src/merge-hip/main.cu +++ b/src/merge-hip/main.cu @@ -109,6 +109,7 @@ void mergeType(const uint64_t size, const uint32_t runs) { PV(errors); // Print error info printf("%s. ", errors ? "FAIL" : "PASS"); + if (errors) exit(1); if (timing) printf("Average kernel execution time: %f (us).\n", (total_time * 1e-3f) / runs); diff --git a/src/merge-omp/main.cpp b/src/merge-omp/main.cpp index 1879aeb47e..1d113718f1 100644 --- a/src/merge-omp/main.cpp +++ b/src/merge-omp/main.cpp @@ -103,6 +103,7 @@ void mergeType(const uint64_t size, const uint32_t runs) { PV(errors); // Print error info printf("%s. ", errors ? "FAIL" : "PASS"); + if (errors) exit(1); if (timing) printf("Average kernel execution time: %f (us).\n", (total_time * 1e-3f) / runs); diff --git a/src/merge-sycl/main.cpp b/src/merge-sycl/main.cpp index f244a8b1ec..9c509357fb 100644 --- a/src/merge-sycl/main.cpp +++ b/src/merge-sycl/main.cpp @@ -144,6 +144,7 @@ void mergeType(sycl::queue &q, const uint64_t size, const uint32_t runs) { PV(errors); // Print error info printf("%s. ", errors ? "FAIL" : "PASS"); + if (errors) exit(1); if (timing) printf("Average kernel execution time: %f (us).\n", (total_time * 1e-3f) / runs); diff --git a/src/miniWeather-cuda/main.cu b/src/miniWeather-cuda/main.cu index 08ea671a03..9e508d1922 100644 --- a/src/miniWeather-cuda/main.cu +++ b/src/miniWeather-cuda/main.cu @@ -774,6 +774,7 @@ int main(int argc, char **argv) { printf("d_te: %le\n" , d_te); bool ok = check_output(d_mass, d_te); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); finalize(); diff --git a/src/miniWeather-hip/main.cu b/src/miniWeather-hip/main.cu index c465fac609..f113506b4e 100644 --- a/src/miniWeather-hip/main.cu +++ b/src/miniWeather-hip/main.cu @@ -774,6 +774,7 @@ int main(int argc, char **argv) { printf("d_te: %le\n" , d_te); bool ok = check_output(d_mass, d_te); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); finalize(); diff --git a/src/miniWeather-omp/main.cpp b/src/miniWeather-omp/main.cpp index 100d4a4a23..ba6f1fbee8 100644 --- a/src/miniWeather-omp/main.cpp +++ b/src/miniWeather-omp/main.cpp @@ -177,6 +177,7 @@ int main(int argc, char **argv) { printf("d_te: %le\n" , d_te); bool ok = check_output(d_mass, d_te); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); finalize(); } diff --git a/src/miniWeather-sycl/main.cpp b/src/miniWeather-sycl/main.cpp index 5e241b74db..40da66c8fd 100644 --- a/src/miniWeather-sycl/main.cpp +++ b/src/miniWeather-sycl/main.cpp @@ -1007,6 +1007,7 @@ int main(int argc, char **argv) { printf("d_te: %le\n" , d_te); bool ok = check_output(d_mass, d_te); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); finalize(); diff --git a/src/minisweep-cuda/main.cu b/src/minisweep-cuda/main.cu index 5d562ecd32..48905df6d9 100644 --- a/src/minisweep-cuda/main.cu +++ b/src/minisweep-cuda/main.cu @@ -397,6 +397,7 @@ int main( int argc, char** argv ) normsq, normsqdiff, normsqdiff== (P)0 ? "PASS" : "FAIL", + if (normsqdiff != (P)0) exit(1); time * 1e-6, ktime * 1e-6); printf( "GF/s (host): %.3f\nGF/s (device): %.3f\n", floprate_h, floprate_d ); diff --git a/src/minisweep-hip/main.cu b/src/minisweep-hip/main.cu index 2ed8f3565f..9e28eec5d8 100644 --- a/src/minisweep-hip/main.cu +++ b/src/minisweep-hip/main.cu @@ -397,6 +397,7 @@ int main( int argc, char** argv ) normsq, normsqdiff, normsqdiff== (P)0 ? "PASS" : "FAIL", + if (normsqdiff != (P)0) exit(1); time * 1e-6, ktime * 1e-6); printf( "GF/s (host): %.3f\nGF/s (device): %.3f\n", floprate_h, floprate_d ); diff --git a/src/minisweep-omp/main.cpp b/src/minisweep-omp/main.cpp index 8a2281972e..d6409947b0 100644 --- a/src/minisweep-omp/main.cpp +++ b/src/minisweep-omp/main.cpp @@ -464,6 +464,7 @@ int main( int argc, char** argv ) normsq, normsqdiff, normsqdiff== (P)0 ? "PASS" : "FAIL", + if (normsqdiff != (P)0) exit(1); time * 1e-6, ktime * 1e-6); printf( "GF/s (host): %.3f\nGF/s (device): %.3f\n", floprate_h, floprate_d ); diff --git a/src/minisweep-sycl/main.cpp b/src/minisweep-sycl/main.cpp index dc8d41dd47..a3ba4ac44c 100644 --- a/src/minisweep-sycl/main.cpp +++ b/src/minisweep-sycl/main.cpp @@ -407,6 +407,7 @@ int main( int argc, char** argv ) normsq, normsqdiff, normsqdiff== (P)0 ? "PASS" : "FAIL", + if (normsqdiff != (P)0) exit(1); time * 1e-6, ktime * 1e-6); printf( "GF/s (host): %.3f\nGF/s (device): %.3f\n", floprate_h, floprate_d ); diff --git a/src/minkowski-cuda/verify.cpp b/src/minkowski-cuda/verify.cpp index ba90a80dc7..cdef530a81 100644 --- a/src/minkowski-cuda/verify.cpp +++ b/src/minkowski-cuda/verify.cpp @@ -55,6 +55,7 @@ void VerifyResult(float (*a_host)[N], float (*b_host)[K], cout << "PASS\n"; } else { cout << "FAIL\n"; + exit(1); } } #endif diff --git a/src/minmax-cuda/main.cu b/src/minmax-cuda/main.cu index d80ef629af..b54bf80fa6 100644 --- a/src/minmax-cuda/main.cu +++ b/src/minmax-cuda/main.cu @@ -22,6 +22,7 @@ #include #include "vec_2d.hpp" #include "utils.hpp" +#include template struct compare @@ -88,6 +89,7 @@ void eval (const T bounding_box_size, const int repeat) { bool ok = (min_point[0] == r_min_point) && (max_point[0] == r_max_point); ok &= (min_point[1] == r_min_point) && (max_point[1] == r_max_point); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } int main(int argc, char* argv[]) diff --git a/src/minmax-sycl/main.cpp b/src/minmax-sycl/main.cpp index 34d98fce28..7a168d0e10 100644 --- a/src/minmax-sycl/main.cpp +++ b/src/minmax-sycl/main.cpp @@ -22,6 +22,7 @@ #include #include "vec_2d.hpp" #include "utils.hpp" +#include template struct compare @@ -97,6 +98,7 @@ template void eval(const T bounding_box_size, const int repeat) { bool ok = (min_point[0] == r_min_point) && (max_point[0] == r_max_point); ok &= (min_point[1] == r_min_point) && (max_point[1] == r_max_point); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } int main(int argc, char* argv[]) diff --git a/src/mixbench-cuda/main.cu b/src/mixbench-cuda/main.cu index ac831af62b..9601a21d1b 100644 --- a/src/mixbench-cuda/main.cu +++ b/src/mixbench-cuda/main.cu @@ -92,6 +92,7 @@ void mixbenchGPU(long size, int compute_iterations, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(cd); cudaFree(d_cd); diff --git a/src/mixbench-hip/main.cu b/src/mixbench-hip/main.cu index 994624d480..5480ae8233 100644 --- a/src/mixbench-hip/main.cu +++ b/src/mixbench-hip/main.cu @@ -92,6 +92,7 @@ void mixbenchGPU(long size, int compute_iterations, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(cd); hipFree(d_cd); diff --git a/src/mixbench-omp/main.cpp b/src/mixbench-omp/main.cpp index 1dbff51f2e..36360b6bc0 100644 --- a/src/mixbench-omp/main.cpp +++ b/src/mixbench-omp/main.cpp @@ -91,6 +91,7 @@ void mixbenchGPU(long size, int compute_iterations, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(cd); } diff --git a/src/mixbench-sycl/main.cpp b/src/mixbench-sycl/main.cpp index 3946a39bf9..3b20355567 100644 --- a/src/mixbench-sycl/main.cpp +++ b/src/mixbench-sycl/main.cpp @@ -106,6 +106,7 @@ void mixbenchGPU(long size, int compute_iterations, int repeat) { free(cd); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } diff --git a/src/moe-align-cuda/main.cu b/src/moe-align-cuda/main.cu index ba8388ad89..d02dc36892 100644 --- a/src/moe-align-cuda/main.cu +++ b/src/moe-align-cuda/main.cu @@ -650,6 +650,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); GPU_CHECK(cudaFree(topk_ids)); GPU_CHECK(cudaFree(sorted_ids)); diff --git a/src/moe-align-hip/main.cu b/src/moe-align-hip/main.cu index 4a9f8890a2..9fdd0b9525 100644 --- a/src/moe-align-hip/main.cu +++ b/src/moe-align-hip/main.cu @@ -654,6 +654,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); GPU_CHECK(hipFree(topk_ids)); GPU_CHECK(hipFree(sorted_ids)); diff --git a/src/moe-align-sycl/main.cpp b/src/moe-align-sycl/main.cpp index 4fb8b2b45a..9b39511ec4 100644 --- a/src/moe-align-sycl/main.cpp +++ b/src/moe-align-sycl/main.cpp @@ -663,6 +663,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(topk_ids, q); sycl::free(sorted_ids, q); diff --git a/src/moe-cuda/main.cu b/src/moe-cuda/main.cu index fa2a649f0a..1f617e190e 100644 --- a/src/moe-cuda/main.cu +++ b/src/moe-cuda/main.cu @@ -109,6 +109,7 @@ void topk_softmax(int num_tokens, int num_experts, int topk, int repeat) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/moe-hip/main.cu b/src/moe-hip/main.cu index 13e14e94a7..126c5bb55f 100644 --- a/src/moe-hip/main.cu +++ b/src/moe-hip/main.cu @@ -110,6 +110,7 @@ void topk_softmax(int num_tokens, int num_experts, int topk, int repeat) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/moe-sum-cuda/main.cu b/src/moe-sum-cuda/main.cu index c86d0e295d..e1f5aa83e0 100644 --- a/src/moe-sum-cuda/main.cu +++ b/src/moe-sum-cuda/main.cu @@ -176,6 +176,7 @@ int main(int argc, char* argv[]) int32_t rc = memcmp(output, output_vec4, output_size_bytes); printf("%s\n", rc ? "FAIL" : "PASS"); + if (rc) exit(1); GPU_CHECK(cudaFree(d_input)); free(input); diff --git a/src/moe-sum-hip/main.cu b/src/moe-sum-hip/main.cu index 8678b0f8d7..dbf93d2089 100644 --- a/src/moe-sum-hip/main.cu +++ b/src/moe-sum-hip/main.cu @@ -176,6 +176,7 @@ int main(int argc, char* argv[]) int32_t rc = memcmp(output, output_vec4, output_size_bytes); printf("%s\n", rc ? "FAIL" : "PASS"); + if (rc) exit(1); GPU_CHECK(hipFree(d_input)); free(input); diff --git a/src/moe-sum-sycl/main.cpp b/src/moe-sum-sycl/main.cpp index be78489230..81e5783c18 100644 --- a/src/moe-sum-sycl/main.cpp +++ b/src/moe-sum-sycl/main.cpp @@ -184,6 +184,7 @@ int main(int argc, char* argv[]) int32_t rc = memcmp(output, output_vec4, output_size_bytes); printf("%s\n", rc ? "FAIL" : "PASS"); + if (rc) exit(1); sycl::free(d_input, q); free(input); diff --git a/src/moe-sycl/main.cpp b/src/moe-sycl/main.cpp index 970942eff3..042d9d8fe0 100644 --- a/src/moe-sycl/main.cpp +++ b/src/moe-sycl/main.cpp @@ -110,6 +110,7 @@ void topk_softmax(int num_tokens, int num_experts, int topk, int repeat) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/morphology-cuda/main.cu b/src/morphology-cuda/main.cu index f6f0e8829f..fb8a69ecc7 100644 --- a/src/morphology-cuda/main.cu +++ b/src/morphology-cuda/main.cu @@ -1,4 +1,5 @@ #include "morphology.h" +#include void display(unsigned char *img, const int height, const int width) { @@ -55,6 +56,7 @@ int main(int argc, char* argv[]) int s = 0; for (unsigned int i = 0; i < memSize; i++) s += srcImg[i]; printf("%s\n", s == WHITE ? "PASS" : "FAIL"); + if (s != WHITE) exit(1); cudaFree(img_d); cudaFree(tmp_d); diff --git a/src/morphology-hip/main.cu b/src/morphology-hip/main.cu index bea947938a..b648b4a85b 100644 --- a/src/morphology-hip/main.cu +++ b/src/morphology-hip/main.cu @@ -1,4 +1,5 @@ #include "morphology.h" +#include void display(unsigned char *img, const int height, const int width) { @@ -55,6 +56,7 @@ int main(int argc, char* argv[]) int s = 0; for (unsigned int i = 0; i < memSize; i++) s += srcImg[i]; printf("%s\n", s == WHITE ? "PASS" : "FAIL"); + if (s != WHITE) exit(1); hipFree(img_d); hipFree(tmp_d); diff --git a/src/morphology-omp/main.cpp b/src/morphology-omp/main.cpp index 8203b6bb99..3c3ef1cb0f 100644 --- a/src/morphology-omp/main.cpp +++ b/src/morphology-omp/main.cpp @@ -1,4 +1,5 @@ #include "morphology.h" +#include void display(unsigned char *img, const int height, const int width) { @@ -51,6 +52,7 @@ int main(int argc, char* argv[]) int s = 0; for (unsigned int i = 0; i < memSize; i++) s += srcImg[i]; printf("%s\n", s == WHITE ? "PASS" : "FAIL"); + if (s != WHITE) exit(1); free(srcImg); free(tmpImg); diff --git a/src/morphology-sycl/main.cpp b/src/morphology-sycl/main.cpp index ed031d7d2f..c38ba108b8 100644 --- a/src/morphology-sycl/main.cpp +++ b/src/morphology-sycl/main.cpp @@ -1,4 +1,5 @@ #include "morphology.h" +#include void display(unsigned char *img, const int height, const int width) { @@ -58,6 +59,7 @@ int main(int argc, char* argv[]) int s = 0; for (unsigned int i = 0; i < memSize; i++) s += srcImg[i]; printf("%s\n", s == WHITE ? "PASS" : "FAIL"); + if (s != WHITE) exit(1); sycl::free(img_d, q); sycl::free(tmp_d, q); diff --git a/src/mr-cuda/main.cu b/src/mr-cuda/main.cu index 0809b4f2c5..d078b9b13f 100644 --- a/src/mr-cuda/main.cu +++ b/src/mr-cuda/main.cu @@ -99,6 +99,7 @@ void run_benchmark(const int repeat) printf("Total kernel execution time (mr32_simple ): %f (ms)\n", mr32_sf_time * 1e-6); printf("Total kernel execution time (mr32_efficent): %f (ms)\n", mr32_eff_time * 1e-6); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // device results are not included print_results(bits32, SIZES_CNT32, BASES_CNT32, time_vals); diff --git a/src/mr-hip/main.cu b/src/mr-hip/main.cu index 865007aae3..452debf23f 100644 --- a/src/mr-hip/main.cu +++ b/src/mr-hip/main.cu @@ -99,6 +99,7 @@ void run_benchmark(const int repeat) printf("Total kernel execution time (mr32_simple ): %f (ms)\n", mr32_sf_time * 1e-6); printf("Total kernel execution time (mr32_efficent): %f (ms)\n", mr32_eff_time * 1e-6); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // device results are not included print_results(bits32, SIZES_CNT32, BASES_CNT32, time_vals); diff --git a/src/mr-omp/main.cpp b/src/mr-omp/main.cpp index 9d0191ee72..2d713d0258 100644 --- a/src/mr-omp/main.cpp +++ b/src/mr-omp/main.cpp @@ -105,6 +105,7 @@ void run_benchmark(const int repeat) printf("Total kernel execution time (mr32_simple ): %f (ms)\n", mr32_sf_time * 1e-6); printf("Total kernel execution time (mr32_efficent): %f (ms)\n", mr32_eff_time * 1e-6); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // device results are not included print_results(bits32, SIZES_CNT32, BASES_CNT32, time_vals); diff --git a/src/mr-sycl/main.cpp b/src/mr-sycl/main.cpp index 97eaba824b..9321730ae8 100644 --- a/src/mr-sycl/main.cpp +++ b/src/mr-sycl/main.cpp @@ -107,6 +107,7 @@ void run_benchmark(sycl::queue &q, const int repeat) printf("Total kernel execution time (mr32_simple ): %f (ms)\n", mr32_sf_time * 1e-6); printf("Total kernel execution time (mr32_efficent): %f (ms)\n", mr32_eff_time * 1e-6); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // device results are not included print_results(bits32, SIZES_CNT32, BASES_CNT32, time_vals); diff --git a/src/mrc-cuda/main.cu b/src/mrc-cuda/main.cu index 111c27d62e..b2dfa81d32 100644 --- a/src/mrc-cuda/main.cu +++ b/src/mrc-cuda/main.cu @@ -190,6 +190,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_X1); cudaFree(d_X2); diff --git a/src/mrc-hip/main.cu b/src/mrc-hip/main.cu index 5326d7b4dc..3766eca6cf 100644 --- a/src/mrc-hip/main.cu +++ b/src/mrc-hip/main.cu @@ -190,6 +190,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_X1); hipFree(d_X2); diff --git a/src/mrc-omp/main.cpp b/src/mrc-omp/main.cpp index f264430da8..f652433157 100644 --- a/src/mrc-omp/main.cpp +++ b/src/mrc-omp/main.cpp @@ -107,6 +107,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(h_X1); free(h_X2); diff --git a/src/mrc-sycl/main.cpp b/src/mrc-sycl/main.cpp index c6af3d27b1..a88d958cd9 100644 --- a/src/mrc-sycl/main.cpp +++ b/src/mrc-sycl/main.cpp @@ -213,6 +213,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_X1, q); sycl::free(d_X2, q); diff --git a/src/mrg32k3a-cuda/main.cu b/src/mrg32k3a-cuda/main.cu index 8b6df637eb..3822af66f5 100644 --- a/src/mrg32k3a-cuda/main.cu +++ b/src/mrg32k3a-cuda/main.cu @@ -33,6 +33,7 @@ #include #include #include +#include // CUDA API error checking #define CUDA_CHECK(err) \ @@ -183,6 +184,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return EXIT_SUCCESS; } diff --git a/src/mrg32k3a-hip/main.cu b/src/mrg32k3a-hip/main.cu index 5b47264f5f..cd14e5b54f 100644 --- a/src/mrg32k3a-hip/main.cu +++ b/src/mrg32k3a-hip/main.cu @@ -33,6 +33,7 @@ #include #include #include +#include // HIP API error checking #define HIP_CHECK(err) \ @@ -183,6 +184,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return EXIT_SUCCESS; } diff --git a/src/mrg32k3a-sycl/main.cpp b/src/mrg32k3a-sycl/main.cpp index 7b9af7758b..3de4698bad 100644 --- a/src/mrg32k3a-sycl/main.cpp +++ b/src/mrg32k3a-sycl/main.cpp @@ -33,6 +33,7 @@ #include #include #include "oneapi/mkl.hpp" +#include using namespace oneapi::mkl::rng; @@ -174,6 +175,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return EXIT_SUCCESS; } diff --git a/src/mt-cuda/MT.cu b/src/mt-cuda/MT.cu index 64bca5df37..01212736ab 100644 --- a/src/mt-cuda/MT.cu +++ b/src/mt-cuda/MT.cu @@ -30,6 +30,7 @@ extern "C" void BoxMullerRef(float *h_Rand, int nPerRng); #endif #include +#include using namespace std::chrono; /////////////////////////////////////////////////////////////////////////////// @@ -216,6 +217,7 @@ int main(int argc, const char **argv) // finish printf("%s\n", (L1norm < 1e-6) ? "PASS" : "FAIL"); + if (!(L1norm < 1e-6)) exit(1); return 0; } diff --git a/src/mt-hip/MT.cu b/src/mt-hip/MT.cu index f513e02915..77fb0b705e 100644 --- a/src/mt-hip/MT.cu +++ b/src/mt-hip/MT.cu @@ -30,6 +30,7 @@ extern "C" void BoxMullerRef(float *h_Rand, int nPerRng); #endif #include +#include using namespace std::chrono; /////////////////////////////////////////////////////////////////////////////// @@ -216,6 +217,7 @@ int main(int argc, const char **argv) // finish printf("%s\n", (L1norm < 1e-6) ? "PASS" : "FAIL"); + if (!(L1norm < 1e-6)) exit(1); return 0; } diff --git a/src/mt-omp/MT.cpp b/src/mt-omp/MT.cpp index c7e1481198..6592db5b06 100644 --- a/src/mt-omp/MT.cpp +++ b/src/mt-omp/MT.cpp @@ -30,6 +30,7 @@ extern "C" void BoxMullerRef(float *h_Rand, int nPerRng); #endif #include +#include using namespace std::chrono; /////////////////////////////////////////////////////////////////////////////// @@ -198,6 +199,7 @@ int main(int argc, const char **argv) // finish printf("%s\n", (L1norm < 1e-6) ? "PASS" : "FAIL"); + if (!(L1norm < 1e-6)) exit(1); return 0; } diff --git a/src/mt-sycl/MT.cpp b/src/mt-sycl/MT.cpp index ea6ca44aa2..694400d2fe 100644 --- a/src/mt-sycl/MT.cpp +++ b/src/mt-sycl/MT.cpp @@ -31,6 +31,7 @@ extern "C" void BoxMullerRef(float *h_Rand, int nPerRng); #endif #include +#include using namespace std::chrono; /////////////////////////////////////////////////////////////////////////////// @@ -219,6 +220,7 @@ int main(int argc, const char **argv) // finish printf("%s\n", (L1norm < 1e-6) ? "PASS" : "FAIL"); + if (!(L1norm < 1e-6)) exit(1); return 0; } diff --git a/src/mtf-sycl/main.cpp b/src/mtf-sycl/main.cpp index 0d82f3ecb9..ce8b05951d 100644 --- a/src/mtf-sycl/main.cpp +++ b/src/mtf-sycl/main.cpp @@ -97,6 +97,7 @@ int main(int argc, char *argv[]) else { printf("FAIL\n"); + exit(1); // output MTF result if (len < 16) { printf("host: "); diff --git a/src/multinomial-cuda/main.cu b/src/multinomial-cuda/main.cu index 848367ae2c..cba5d2c75b 100644 --- a/src/multinomial-cuda/main.cu +++ b/src/multinomial-cuda/main.cu @@ -206,6 +206,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); cudaDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); diff --git a/src/multinomial-hip/main.cu b/src/multinomial-hip/main.cu index 3234203746..5803c34920 100644 --- a/src/multinomial-hip/main.cu +++ b/src/multinomial-hip/main.cu @@ -206,6 +206,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); hipDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); diff --git a/src/multinomial-sycl/main.cpp b/src/multinomial-sycl/main.cpp index e628fdd306..7135f74aad 100644 --- a/src/multinomial-sycl/main.cpp +++ b/src/multinomial-sycl/main.cpp @@ -226,6 +226,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); q.wait(); auto start = std::chrono::steady_clock::now(); diff --git a/src/murmurhash3-cuda/murmurhash3.cu b/src/murmurhash3-cuda/murmurhash3.cu index d7610214ea..a77d7930ac 100644 --- a/src/murmurhash3-cuda/murmurhash3.cu +++ b/src/murmurhash3-cuda/murmurhash3.cu @@ -226,6 +226,7 @@ int main(int argc, char** argv) } if (error) printf("FAIL\n"); else printf("SUCCESS\n"); + if (error) exit(1); for (uint32_t i = 0; i < numKeys; i++) { free(out[i]); diff --git a/src/murmurhash3-hip/murmurhash3.cu b/src/murmurhash3-hip/murmurhash3.cu index 86020910b5..0dd21bdf4e 100644 --- a/src/murmurhash3-hip/murmurhash3.cu +++ b/src/murmurhash3-hip/murmurhash3.cu @@ -226,6 +226,7 @@ int main(int argc, char** argv) } if (error) printf("FAIL\n"); else printf("SUCCESS\n"); + if (error) exit(1); for (uint32_t i = 0; i < numKeys; i++) { free(out[i]); diff --git a/src/murmurhash3-omp/murmurhash3.cpp b/src/murmurhash3-omp/murmurhash3.cpp index 6f7c0d0e4b..f089aa4793 100644 --- a/src/murmurhash3-omp/murmurhash3.cpp +++ b/src/murmurhash3-omp/murmurhash3.cpp @@ -203,6 +203,7 @@ int main(int argc, char** argv) } if (error) printf("FAIL\n"); else printf("SUCCESS\n"); + if (error) exit(1); for (uint32_t i = 0; i < numKeys; i++) { free(out[i]); diff --git a/src/murmurhash3-sycl/murmurhash3.cpp b/src/murmurhash3-sycl/murmurhash3.cpp index 8a79be4a19..756889f86d 100644 --- a/src/murmurhash3-sycl/murmurhash3.cpp +++ b/src/murmurhash3-sycl/murmurhash3.cpp @@ -219,6 +219,7 @@ int main(int argc, char** argv) } if (error) printf("FAIL\n"); else printf("SUCCESS\n"); + if (error) exit(1); for (uint32_t i = 0; i < numKeys; i++) { free(out[i]); diff --git a/src/mxfp4-cuda/verify.h b/src/mxfp4-cuda/verify.h index 04360d97e2..48b7ff6d17 100644 --- a/src/mxfp4-cuda/verify.h +++ b/src/mxfp4-cuda/verify.h @@ -85,4 +85,5 @@ void verify(T *src, T *dst, int numel) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } diff --git a/src/nlll-cuda/main.cu b/src/nlll-cuda/main.cu index 51e8068b4b..b037eaa138 100644 --- a/src/nlll-cuda/main.cu +++ b/src/nlll-cuda/main.cu @@ -143,6 +143,7 @@ void eval(const int64_t nframe, ok = false; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_output); cudaFree(d_total_weight); diff --git a/src/nlll-hip/main.cu b/src/nlll-hip/main.cu index 2ca6a89093..4e8aea7626 100644 --- a/src/nlll-hip/main.cu +++ b/src/nlll-hip/main.cu @@ -143,6 +143,7 @@ void eval(const int64_t nframe, ok = false; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_output); hipFree(d_total_weight); diff --git a/src/nlll-omp/main.cpp b/src/nlll-omp/main.cpp index 31bc35bc68..b6bfaadeac 100644 --- a/src/nlll-omp/main.cpp +++ b/src/nlll-omp/main.cpp @@ -119,6 +119,7 @@ void eval(const int64_t nframe, ok = false; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } template diff --git a/src/nlll-sycl/main.cpp b/src/nlll-sycl/main.cpp index 9660782730..76761da194 100644 --- a/src/nlll-sycl/main.cpp +++ b/src/nlll-sycl/main.cpp @@ -154,6 +154,7 @@ void eval(const int64_t nframe, ok = false; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_output, q); sycl::free(d_total_weight, q); diff --git a/src/nonzero-cuda/main.cu b/src/nonzero-cuda/main.cu index 3666f51e79..dcb50c3b4d 100644 --- a/src/nonzero-cuda/main.cu +++ b/src/nonzero-cuda/main.cu @@ -207,6 +207,7 @@ void nonzero (int nrows, int ncols, int repeat) { idx_time * 1e-3 / repeat); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } int main(int argc, char* argv[]) diff --git a/src/nonzero-hip/main.cu b/src/nonzero-hip/main.cu index 3b724b2f3d..cd5acca467 100644 --- a/src/nonzero-hip/main.cu +++ b/src/nonzero-hip/main.cu @@ -197,6 +197,7 @@ void nonzero (int nrows, int ncols, int repeat) { idx_time * 1e-3 / repeat); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } int main(int argc, char* argv[]) diff --git a/src/nonzero-sycl/main.cpp b/src/nonzero-sycl/main.cpp index e332b3d11c..2e60b4b066 100644 --- a/src/nonzero-sycl/main.cpp +++ b/src/nonzero-sycl/main.cpp @@ -213,6 +213,7 @@ template void nonzero(int nrows, int ncols, int repeat) { idx_time * 1e-3 / repeat); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } int main(int argc, char* argv[]) diff --git a/src/norm2-cuda/main.cu b/src/norm2-cuda/main.cu index 871c616463..9d301fc077 100644 --- a/src/norm2-cuda/main.cu +++ b/src/norm2-cuda/main.cu @@ -113,5 +113,6 @@ int main (int argc, char* argv[]){ } if (ok) printf("PASS\n"); + if (!ok) exit(1); return 0; } diff --git a/src/norm2-hip/main.cu b/src/norm2-hip/main.cu index 7e94b6fa1a..a2914558a4 100644 --- a/src/norm2-hip/main.cu +++ b/src/norm2-hip/main.cu @@ -113,5 +113,6 @@ int main (int argc, char* argv[]){ } if (ok) printf("PASS\n"); + if (!ok) exit(1); return 0; } diff --git a/src/norm2-omp/main.cpp b/src/norm2-omp/main.cpp index ca4da41864..8f6bc61399 100644 --- a/src/norm2-omp/main.cpp +++ b/src/norm2-omp/main.cpp @@ -78,5 +78,6 @@ int main(int argc, char *argv[]) { free(h_result); if (ok) printf("PASS\n"); + if (!ok) exit(1); return 0; } diff --git a/src/norm2-sycl/main.cpp b/src/norm2-sycl/main.cpp index e049aa7996..83b654dd19 100644 --- a/src/norm2-sycl/main.cpp +++ b/src/norm2-sycl/main.cpp @@ -106,5 +106,6 @@ int main(int argc, char *argv[]) { sycl::free(d_result, q); if (ok) printf("PASS\n"); + if (!ok) exit(1); return 0; } diff --git a/src/nosync-cuda/main.cu b/src/nosync-cuda/main.cu index e581e48802..5f39d014ee 100644 --- a/src/nosync-cuda/main.cu +++ b/src/nosync-cuda/main.cu @@ -6,6 +6,7 @@ #include #include #include +#include // This example shows how to execute a Thrust device algorithm on an explicit // CUDA stream. The simple program below fills a vector with the numbers @@ -115,6 +116,7 @@ int main(int argc, char* argv[]) // Print the sum: std::cout << ((sum == 0) ? "PASS" : "FAIL") << "\n"; + if (sum != 0) exit(1); return 0; } diff --git a/src/nosync-hip/main.cu b/src/nosync-hip/main.cu index 0ffd2cb754..8081d79242 100644 --- a/src/nosync-hip/main.cu +++ b/src/nosync-hip/main.cu @@ -6,6 +6,7 @@ #include #include #include +#include // This example shows how to execute a Thrust device algorithm on an explicit @@ -110,6 +111,7 @@ int main(int argc, char* argv[]) // Print the sum: std::cout << ((sum == 0) ? "PASS" : "FAIL") << "\n"; + if (sum != 0) exit(1); return 0; } diff --git a/src/nosync-sycl/main.cpp b/src/nosync-sycl/main.cpp index afbb286672..7cf8fee35e 100644 --- a/src/nosync-sycl/main.cpp +++ b/src/nosync-sycl/main.cpp @@ -8,6 +8,7 @@ #include #include #include +#include int main(int argc, char *argv[]) try { if (argc != 3) { @@ -85,6 +86,7 @@ int main(int argc, char *argv[]) try { // Print the sum: std::cout << ((sum == 0) ? "PASS" : "FAIL") << "\n"; + if (sum != 0) exit(1); return 0; } diff --git a/src/nqueen-cuda/main.cu b/src/nqueen-cuda/main.cu index 5a301e627f..0905f68116 100644 --- a/src/nqueen-cuda/main.cu +++ b/src/nqueen-cuda/main.cu @@ -258,6 +258,7 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); + if (qtd_sols_global != 2279184 && tree_size == 171129071) exit(1); } free(root_prefixes_h); diff --git a/src/nqueen-hip/main.cu b/src/nqueen-hip/main.cu index ae32bba5b7..f6fc659bf2 100644 --- a/src/nqueen-hip/main.cu +++ b/src/nqueen-hip/main.cu @@ -259,6 +259,7 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); + if (qtd_sols_global != 2279184 && tree_size == 171129071) exit(1); } free(root_prefixes_h); diff --git a/src/nqueen-omp/main.cpp b/src/nqueen-omp/main.cpp index 7529563826..47dc393c54 100644 --- a/src/nqueen-omp/main.cpp +++ b/src/nqueen-omp/main.cpp @@ -233,6 +233,7 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); + if (qtd_sols_global != 2279184 && tree_size == 171129071) exit(1); } free(root_prefixes_h); diff --git a/src/nqueen-sycl/main.cpp b/src/nqueen-sycl/main.cpp index dd1a8dff3b..4364038c3e 100644 --- a/src/nqueen-sycl/main.cpp +++ b/src/nqueen-sycl/main.cpp @@ -260,6 +260,7 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); + if (qtd_sols_global != 2279184 && tree_size == 171129071) exit(1); } free(root_prefixes_h); diff --git a/src/nw-cuda/nw.cu b/src/nw-cuda/nw.cu index adb03aa2cb..8f1a078d2f 100644 --- a/src/nw-cuda/nw.cu +++ b/src/nw-cuda/nw.cu @@ -345,6 +345,7 @@ int main(int argc, char **argv){ nw_host(input_itemsets, reference, max_cols, penalty); int err = memcmp(input_itemsets, output_itemsets, max_cols * max_rows * sizeof(int)); printf("%s\n", err ? "FAIL" : "PASS"); + if (err) exit(1); #ifdef TRACEBACK diff --git a/src/nw-hip/nw.cu b/src/nw-hip/nw.cu index 2a967fc5e0..1c781bff92 100644 --- a/src/nw-hip/nw.cu +++ b/src/nw-hip/nw.cu @@ -345,6 +345,7 @@ int main(int argc, char **argv){ nw_host(input_itemsets, reference, max_cols, penalty); int err = memcmp(input_itemsets, output_itemsets, max_cols * max_rows * sizeof(int)); printf("%s\n", err ? "FAIL" : "PASS"); + if (err) exit(1); #ifdef TRACEBACK diff --git a/src/nw-omp/nw.cpp b/src/nw-omp/nw.cpp index c5488e8a0d..2f8f909c8a 100644 --- a/src/nw-omp/nw.cpp +++ b/src/nw-omp/nw.cpp @@ -320,6 +320,7 @@ int main(int argc, char **argv){ nw_host(h_input_itemsets, reference, max_cols, penalty); int err = memcmp(input_itemsets, h_input_itemsets, max_cols * max_rows * sizeof(int)); printf("%s\n", err ? "FAIL" : "PASS"); + if (err) exit(1); #ifdef TRACEBACK int *output_itemsets = input_itemsets; diff --git a/src/nw-sycl/nw.cpp b/src/nw-sycl/nw.cpp index 9456a1241b..5f18b118f8 100644 --- a/src/nw-sycl/nw.cpp +++ b/src/nw-sycl/nw.cpp @@ -234,6 +234,7 @@ int main(int argc, char **argv){ nw_host(input_itemsets, reference, max_cols, penalty); int err = memcmp(input_itemsets, output_itemsets, max_cols * max_rows * sizeof(int)); printf("%s\n", err ? "FAIL" : "PASS"); + if (err) exit(1); #ifdef TRACEBACK diff --git a/src/openmp-cuda/main.cu b/src/openmp-cuda/main.cu index 29e4bf43ee..1ee5e32d13 100644 --- a/src/openmp-cuda/main.cu +++ b/src/openmp-cuda/main.cu @@ -103,6 +103,7 @@ int main(int argc, char *argv[]) { // check the result bool bResult = correctResult(a, nwords, b, repeat); printf("%s\n", bResult ? "PASS" : "FAIL"); + if (!bResult) exit(1); } } printf("Runtime overhead of first run is %f seconds\n", overhead); diff --git a/src/openmp-hip/main.cu b/src/openmp-hip/main.cu index e1d33a4137..09f37568d0 100644 --- a/src/openmp-hip/main.cu +++ b/src/openmp-hip/main.cu @@ -103,6 +103,7 @@ int main(int argc, char *argv[]) { // check the result bool bResult = correctResult(a, nwords, b, repeat); printf("%s\n", bResult ? "PASS" : "FAIL"); + if (!bResult) exit(1); } } printf("Runtime overhead of first run is %f seconds\n", overhead); diff --git a/src/openmp-omp/main.cpp b/src/openmp-omp/main.cpp index 879aa4a6dc..3f5464e12f 100644 --- a/src/openmp-omp/main.cpp +++ b/src/openmp-omp/main.cpp @@ -91,6 +91,7 @@ int main(int argc, char *argv[]) { // check the result bool bResult = correctResult(a, nwords, b, repeat); printf("%s\n", bResult ? "PASS" : "FAIL"); + if (!bResult) exit(1); } } printf("Runtime overhead of first run is %f seconds\n", overhead); diff --git a/src/openmp-sycl/main.cpp b/src/openmp-sycl/main.cpp index cd3b71ccfd..1ba86ddc62 100644 --- a/src/openmp-sycl/main.cpp +++ b/src/openmp-sycl/main.cpp @@ -108,6 +108,7 @@ int main(int argc, char *argv[]) { // check the result bool bResult = correctResult(a, nwords, b, repeat); printf("%s\n", bResult ? "PASS" : "FAIL"); + if (!bResult) exit(1); } } printf("Runtime overhead of first run is %f seconds\n", overhead); diff --git a/src/overlap-cuda/main.cu b/src/overlap-cuda/main.cu index 9eed0cfe14..4c47aec22d 100644 --- a/src/overlap-cuda/main.cu +++ b/src/overlap-cuda/main.cu @@ -110,6 +110,7 @@ int main(int argc, char *argv[]) { // Verify the results, we will use the results for final output bool bResults = check(); printf("\n%s\n", bResults ? "PASS" : "FAIL"); + if (!bResults) exit(1); // Free resources for (int i = 0; i < STREAM_COUNT; ++i) { diff --git a/src/overlap-hip/main.cu b/src/overlap-hip/main.cu index 88b7c144ab..28151cb333 100644 --- a/src/overlap-hip/main.cu +++ b/src/overlap-hip/main.cu @@ -110,6 +110,7 @@ int main(int argc, char *argv[]) { // Verify the results, we will use the results for final output bool bResults = check(); printf("\n%s\n", bResults ? "PASS" : "FAIL"); + if (!bResults) exit(1); // Free resources for (int i = 0; i < STREAM_COUNT; ++i) { diff --git a/src/overlap-sycl/main.cpp b/src/overlap-sycl/main.cpp index 501e83f920..c98c9cd016 100644 --- a/src/overlap-sycl/main.cpp +++ b/src/overlap-sycl/main.cpp @@ -121,6 +121,7 @@ int main(int argc, char *argv[]) { // Verify the results, we will use the results for final output bool bResults = check(); printf("\n%s\n", bResults ? "PASS" : "FAIL"); + if (!bResults) exit(1); // Free resources for (int i = 0; i < STREAM_COUNT; ++i) { diff --git a/src/overlay-cuda/main.cu b/src/overlay-cuda/main.cu index e359060844..e7ecbbaf17 100644 --- a/src/overlay-cuda/main.cu +++ b/src/overlay-cuda/main.cu @@ -146,6 +146,7 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_input); cudaFree(d_output); diff --git a/src/overlay-hip/main.cu b/src/overlay-hip/main.cu index c85917bf5b..3eca836d82 100644 --- a/src/overlay-hip/main.cu +++ b/src/overlay-hip/main.cu @@ -146,6 +146,7 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_input); hipFree(d_output); diff --git a/src/overlay-omp/main.cpp b/src/overlay-omp/main.cpp index d3ead13c93..5c347e9d86 100644 --- a/src/overlay-omp/main.cpp +++ b/src/overlay-omp/main.cpp @@ -140,6 +140,7 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(input); free(output); diff --git a/src/overlay-sycl/main.cpp b/src/overlay-sycl/main.cpp index d7aedb04f5..0f21808f12 100644 --- a/src/overlay-sycl/main.cpp +++ b/src/overlay-sycl/main.cpp @@ -162,6 +162,7 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_input, q); sycl::free(d_output, q); diff --git a/src/p4-cuda/reference.h b/src/p4-cuda/reference.h index c576c6ff4c..5a0e11c1ee 100644 --- a/src/p4-cuda/reference.h +++ b/src/p4-cuda/reference.h @@ -1,4 +1,5 @@ #include +#include int reference ( const float *__restrict__ cls_input, @@ -175,6 +176,7 @@ void verify ( } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(score_output_r); free(bndbox_output_r); } diff --git a/src/page-rank-cuda/main.cu b/src/page-rank-cuda/main.cu index bc9df5b716..b8747dc633 100644 --- a/src/page-rank-cuda/main.cu +++ b/src/page-rank-cuda/main.cu @@ -261,6 +261,7 @@ int main(int argc, char *argv[]) { } bool ok = fabsf(max_diff - max_diff_ref) < 1e-3f; printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(pages); free(maps); diff --git a/src/page-rank-hip/main.cu b/src/page-rank-hip/main.cu index fefbd6fca0..c2675bac54 100644 --- a/src/page-rank-hip/main.cu +++ b/src/page-rank-hip/main.cu @@ -261,6 +261,7 @@ int main(int argc, char *argv[]) { } bool ok = fabsf(max_diff - max_diff_ref) < 1e-3f; printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(pages); free(maps); diff --git a/src/page-rank-omp/main.cpp b/src/page-rank-omp/main.cpp index aa0e460446..535b53c500 100644 --- a/src/page-rank-omp/main.cpp +++ b/src/page-rank-omp/main.cpp @@ -210,6 +210,7 @@ int main(int argc, char *argv[]) { } bool ok = fabsf(max_diff - max_diff_ref) < 1e-3f; printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(pages); free(maps); diff --git a/src/page-rank-sycl/main.cpp b/src/page-rank-sycl/main.cpp index 121b2668ae..cca05d6c4d 100644 --- a/src/page-rank-sycl/main.cpp +++ b/src/page-rank-sycl/main.cpp @@ -257,6 +257,7 @@ int main(int argc, char *argv[]) { } bool ok = fabsf(max_diff - max_diff_ref) < 1e-3f; printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(pages); free(maps); diff --git a/src/particle-diffusion-cuda/motionsim.cu b/src/particle-diffusion-cuda/motionsim.cu index 42f6383136..cd983e268a 100644 --- a/src/particle-diffusion-cuda/motionsim.cu +++ b/src/particle-diffusion-cuda/motionsim.cu @@ -302,6 +302,7 @@ int main(int argc, char* argv[]) { count++; } std::cout << (count <= 2 ? "PASS" : "FAIL") << std::endl; + if (count > 2) exit(1); #ifdef DEBUG // Displays final grid only if grid small. diff --git a/src/particle-diffusion-hip/motionsim.cu b/src/particle-diffusion-hip/motionsim.cu index 6bb5d801b0..f77a4bf67f 100644 --- a/src/particle-diffusion-hip/motionsim.cu +++ b/src/particle-diffusion-hip/motionsim.cu @@ -301,6 +301,7 @@ int main(int argc, char* argv[]) { if (map[i] != map_ref[i]) count++; } std::cout << (count <= 2 ? "PASS" : "FAIL") << std::endl; + if (count > 2) exit(1); #ifdef DEBUG // Displays final grid only if grid small. diff --git a/src/particle-diffusion-omp/motionsim.cpp b/src/particle-diffusion-omp/motionsim.cpp index e0ddf16772..0a96805685 100644 --- a/src/particle-diffusion-omp/motionsim.cpp +++ b/src/particle-diffusion-omp/motionsim.cpp @@ -253,6 +253,7 @@ int main(int argc, char* argv[]) { if (map[i] != map_ref[i]) count++; } std::cout << (count <= 2 ? "PASS" : "FAIL") << std::endl; + if (count > 2) exit(1); #ifdef DEBUG // Displays final grid only if grid small. diff --git a/src/particle-diffusion-sycl/motionsim.cpp b/src/particle-diffusion-sycl/motionsim.cpp index 6c3cc77fcc..1d9aa3d82b 100644 --- a/src/particle-diffusion-sycl/motionsim.cpp +++ b/src/particle-diffusion-sycl/motionsim.cpp @@ -290,6 +290,7 @@ int main(int argc, char* argv[]) { if (map[i] != map_ref[i]) count++; } std::cout << (count <= 2 ? "PASS" : "FAIL") << std::endl; + if (count > 2) exit(1); #ifdef DEBUG // Displays final grid only if grid small. diff --git a/src/perplexity-cuda/main.cu b/src/perplexity-cuda/main.cu index 1b116492e6..2dbd356750 100644 --- a/src/perplexity-cuda/main.cu +++ b/src/perplexity-cuda/main.cu @@ -160,6 +160,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_distance); cudaFree(d_data); diff --git a/src/perplexity-hip/main.cu b/src/perplexity-hip/main.cu index 699d71f009..6bea845956 100644 --- a/src/perplexity-hip/main.cu +++ b/src/perplexity-hip/main.cu @@ -160,6 +160,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_distance); hipFree(d_data); diff --git a/src/perplexity-omp/main.cpp b/src/perplexity-omp/main.cpp index 89c2f0a2aa..466195bdc0 100644 --- a/src/perplexity-omp/main.cpp +++ b/src/perplexity-omp/main.cpp @@ -135,6 +135,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/perplexity-sycl/main.cpp b/src/perplexity-sycl/main.cpp index b23edb7b23..4440b8c8f5 100644 --- a/src/perplexity-sycl/main.cpp +++ b/src/perplexity-sycl/main.cpp @@ -172,6 +172,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_distance, q); sycl::free(d_data, q); diff --git a/src/pnpoly-cuda/main.cu b/src/pnpoly-cuda/main.cu index 4dcd715dfa..839a0e381e 100644 --- a/src/pnpoly-cuda/main.cu +++ b/src/pnpoly-cuda/main.cu @@ -153,6 +153,7 @@ int main(int argc, char* argv[]) { printf("Checksum: %d\n", checksum); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); cudaFree(d_vertex); cudaFree(d_point); diff --git a/src/pnpoly-hip/main.cu b/src/pnpoly-hip/main.cu index af81d01e59..718c732a71 100644 --- a/src/pnpoly-hip/main.cu +++ b/src/pnpoly-hip/main.cu @@ -153,6 +153,7 @@ int main(int argc, char* argv[]) { printf("Checksum: %d\n", checksum); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); hipFree(d_vertex); hipFree(d_point); diff --git a/src/pnpoly-omp/main.cpp b/src/pnpoly-omp/main.cpp index 8336307f68..784f72e71b 100644 --- a/src/pnpoly-omp/main.cpp +++ b/src/pnpoly-omp/main.cpp @@ -134,6 +134,7 @@ int main(int argc, char* argv[]) { printf("Checksum: %d\n", checksum); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(vertex); free(point); diff --git a/src/pnpoly-sycl/main.cpp b/src/pnpoly-sycl/main.cpp index 6f8599976c..842fa1f937 100644 --- a/src/pnpoly-sycl/main.cpp +++ b/src/pnpoly-sycl/main.cpp @@ -194,6 +194,7 @@ int main(int argc, char* argv[]) { printf("Checksum: %d\n", checksum); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); sycl::free(d_vertex, q); sycl::free(d_point, q); diff --git a/src/pool-cuda/main.cu b/src/pool-cuda/main.cu index ecc1fb1378..7fb1f5a3aa 100644 --- a/src/pool-cuda/main.cu +++ b/src/pool-cuda/main.cu @@ -27,6 +27,7 @@ class MaxPoolGrad { }; #include "reference.h" +#include template template template void KernelPool2DGrad( @@ -202,6 +203,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); delete[] input; delete[] output; diff --git a/src/pool-sycl/main.cpp b/src/pool-sycl/main.cpp index e1e003cf22..31d7d499b5 100644 --- a/src/pool-sycl/main.cpp +++ b/src/pool-sycl/main.cpp @@ -25,6 +25,7 @@ class MaxPoolGrad { }; #include "reference.h" +#include // forward declaration template @@ -232,6 +233,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); delete[] input; delete[] output; diff --git a/src/prefetch-cuda/main.cu b/src/prefetch-cuda/main.cu index 6931cbd58b..adc714b2fa 100644 --- a/src/prefetch-cuda/main.cu +++ b/src/prefetch-cuda/main.cu @@ -21,6 +21,7 @@ #include #include #include +#include #define CUDACHECK(error) \ { \ @@ -92,6 +93,7 @@ void prefetch (const int gpuDeviceId, const int numElements, const int repeat) bool testResult = (maxError == 0.0f); printf("%s\n", testResult ? "PASS" : "FAIL"); + if (!testResult) exit(1); } void naive (const int numElements, const int repeat) @@ -137,6 +139,7 @@ void naive (const int numElements, const int repeat) bool testResult = (maxError == 0.0f); printf("%s\n", testResult ? "PASS" : "FAIL"); + if (!testResult) exit(1); } int main(int argc, char *argv[]) diff --git a/src/prefetch-hip/main.cu b/src/prefetch-hip/main.cu index b5231a8d1f..1115a1a3f1 100644 --- a/src/prefetch-hip/main.cu +++ b/src/prefetch-hip/main.cu @@ -21,6 +21,7 @@ #include #include #include +#include #define HIPCHECK(error) \ { \ @@ -88,6 +89,7 @@ void prefetch (const int gpuDeviceId, const int numElements, const int repeat) bool testResult = (maxError == 0.0f); printf("%s\n", testResult ? "PASS" : "FAIL"); + if (!testResult) exit(1); } void naive (const int numElements, const int repeat) @@ -133,6 +135,7 @@ void naive (const int numElements, const int repeat) bool testResult = (maxError == 0.0f); printf("%s\n", testResult ? "PASS" : "FAIL"); + if (!testResult) exit(1); } int main(int argc, char *argv[]) diff --git a/src/prefetch-sycl/main.cpp b/src/prefetch-sycl/main.cpp index 2642a01c69..e2479d2335 100644 --- a/src/prefetch-sycl/main.cpp +++ b/src/prefetch-sycl/main.cpp @@ -21,6 +21,7 @@ #include #include #include +#include //constexpr int MEM_ADVISE_READ_MOSTLY = PI_MEM_ADVICE_CUDA_SET_READ_MOSTLY; @@ -84,6 +85,7 @@ void prefetch(sycl::queue &q, const int numElements, const int repeat) bool testResult = (maxError == 0.0f); printf("%s\n", testResult ? "PASS" : "FAIL"); + if (!testResult) exit(1); } void naive(sycl::queue &q, const int numElements, const int repeat) @@ -130,6 +132,7 @@ void naive(sycl::queue &q, const int numElements, const int repeat) bool testResult = (maxError == 0.0f); printf("%s\n", testResult ? "PASS" : "FAIL"); + if (!testResult) exit(1); } int main(int argc, char *argv[]) diff --git a/src/present-cuda/main.cu b/src/present-cuda/main.cu index b1a43d5cd4..35ed87de5c 100644 --- a/src/present-cuda/main.cu +++ b/src/present-cuda/main.cu @@ -574,6 +574,7 @@ int main(int argc, char** argv) { printf("FAIL\n"); else printf("PASS\n"); + if (h_checksum != d_checksum) exit(1); free(h_plain); free(h_key); diff --git a/src/present-hip/main.cu b/src/present-hip/main.cu index d15fe0ad50..5c2e6b03f7 100644 --- a/src/present-hip/main.cu +++ b/src/present-hip/main.cu @@ -574,6 +574,7 @@ int main(int argc, char** argv) { printf("FAIL\n"); else printf("PASS\n"); + if (h_checksum != d_checksum) exit(1); free(h_plain); free(h_key); diff --git a/src/present-omp/main.cpp b/src/present-omp/main.cpp index ff83a672bf..671c02d740 100644 --- a/src/present-omp/main.cpp +++ b/src/present-omp/main.cpp @@ -541,6 +541,7 @@ int main(int argc, char** argv) { printf("FAIL\n"); else printf("PASS\n"); + if (h_checksum != d_checksum) exit(1); free(h_plain); free(h_key); diff --git a/src/present-sycl/main.cpp b/src/present-sycl/main.cpp index 58360285fa..20f34ef242 100644 --- a/src/present-sycl/main.cpp +++ b/src/present-sycl/main.cpp @@ -591,6 +591,7 @@ int main(int argc, char **argv) { printf("FAIL\n"); else printf("PASS\n"); + if (h_checksum != d_checksum) exit(1); free(h_plain); free(h_key); diff --git a/src/projectile-cuda/Projectile.cu b/src/projectile-cuda/Projectile.cu index 69bdd5f8ca..d0fd0d95f3 100644 --- a/src/projectile-cuda/Projectile.cu +++ b/src/projectile-cuda/Projectile.cu @@ -99,5 +99,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/projectile-hip/Projectile.cu b/src/projectile-hip/Projectile.cu index 5823756aaa..a8785f73b8 100644 --- a/src/projectile-hip/Projectile.cu +++ b/src/projectile-hip/Projectile.cu @@ -99,5 +99,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/projectile-omp/Projectile.cpp b/src/projectile-omp/Projectile.cpp index 0c096a3500..e2de2405f2 100644 --- a/src/projectile-omp/Projectile.cpp +++ b/src/projectile-omp/Projectile.cpp @@ -82,5 +82,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/projectile-sycl/Projectile.cpp b/src/projectile-sycl/Projectile.cpp index dae06132f1..5dd97bc44c 100644 --- a/src/projectile-sycl/Projectile.cpp +++ b/src/projectile-sycl/Projectile.cpp @@ -104,5 +104,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/pso-cuda/main.cpp b/src/pso-cuda/main.cpp index 91136360b9..ddcfc97e09 100644 --- a/src/pso-cuda/main.cpp +++ b/src/pso-cuda/main.cpp @@ -1,4 +1,5 @@ #include "kernel.h" +#include int main(int argc, char* argv[]) { @@ -57,6 +58,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(positions); free(velocities); diff --git a/src/qem-cuda/main.cu b/src/qem-cuda/main.cu index d664af3b2d..7f0f7b6801 100644 --- a/src/qem-cuda/main.cu +++ b/src/qem-cuda/main.cu @@ -5,6 +5,7 @@ #include "reference.h" #include "gpu_solver.h" +#include void generate_data(int size, int min, int max, float *data) { std::mt19937_64 generator{1993764}; @@ -98,6 +99,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); avg = 0; @@ -126,6 +128,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); checkCuda(cudaFreeHost(A)); checkCuda(cudaFreeHost(B)); diff --git a/src/qem-hip/main.cu b/src/qem-hip/main.cu index cf4ff3ea4c..4e71db02f9 100644 --- a/src/qem-hip/main.cu +++ b/src/qem-hip/main.cu @@ -5,6 +5,7 @@ #include "reference.h" #include "gpu_solver.h" +#include void generate_data(int size, int min, int max, float *data) { std::mt19937_64 generator{1993764}; @@ -98,6 +99,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); avg = 0; @@ -125,6 +127,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); checkHip(hipHostFree(A)); checkHip(hipHostFree(B)); diff --git a/src/qem-sycl/main.cpp b/src/qem-sycl/main.cpp index fc651a572d..cbcf858b03 100644 --- a/src/qem-sycl/main.cpp +++ b/src/qem-sycl/main.cpp @@ -5,6 +5,7 @@ #include "gpu_solver.h" #include "reference.h" +#include void generate_data(int size, int min, int max, float *data) { std::mt19937_64 generator{1993764}; @@ -103,6 +104,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); avg = 0; @@ -131,6 +133,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(A, q); sycl::free(B, q); diff --git a/src/qrg-cuda/main.cu b/src/qrg-cuda/main.cu index efb7b412b1..4bbcbf69f9 100644 --- a/src/qrg-cuda/main.cu +++ b/src/qrg-cuda/main.cu @@ -258,6 +258,7 @@ int main(int argc, const char **argv) printf("PASS\n"); else printf("FAIL\n"); + if (!bPassFlag) exit(1); free(h_OutputGPU); cudaFree(d_Output); diff --git a/src/qrg-hip/main.cu b/src/qrg-hip/main.cu index 6f43c5a883..24a20688de 100644 --- a/src/qrg-hip/main.cu +++ b/src/qrg-hip/main.cu @@ -258,6 +258,7 @@ int main(int argc, const char **argv) printf("PASS\n"); else printf("FAIL\n"); + if (!bPassFlag) exit(1); free(h_OutputGPU); hipFree(d_Output); diff --git a/src/qrg-omp/main.cpp b/src/qrg-omp/main.cpp index 0fb570643d..e7343225ec 100644 --- a/src/qrg-omp/main.cpp +++ b/src/qrg-omp/main.cpp @@ -233,6 +233,7 @@ int main(int argc, const char **argv) printf("PASS\n"); else printf("FAIL\n"); + if (!bPassFlag) exit(1); free(output); } diff --git a/src/qrg-sycl/main.cpp b/src/qrg-sycl/main.cpp index bd459263d2..fcfc810200 100644 --- a/src/qrg-sycl/main.cpp +++ b/src/qrg-sycl/main.cpp @@ -258,6 +258,7 @@ int main(int argc, const char **argv) printf("PASS\n"); else printf("FAIL\n"); + if (!bPassFlag) exit(1); free(h_OutputGPU); sycl::free(d_Output, q); diff --git a/src/quant3MatMul-cuda/main.cu b/src/quant3MatMul-cuda/main.cu index 576e61c895..6c8a23d1be 100644 --- a/src/quant3MatMul-cuda/main.cu +++ b/src/quant3MatMul-cuda/main.cu @@ -89,6 +89,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // verify vecquant3matmul_faster cudaMemset(d_output, 0, sizeof(scalar_t) * mul_size); @@ -103,6 +104,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/quant3MatMul-hip/main.cu b/src/quant3MatMul-hip/main.cu index 5e825ef723..a473030735 100644 --- a/src/quant3MatMul-hip/main.cu +++ b/src/quant3MatMul-hip/main.cu @@ -89,6 +89,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // verify vecquant3matmul_faster hipMemset(d_output, 0, sizeof(scalar_t) * mul_size); @@ -103,6 +104,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/quant3MatMul-sycl/main.cpp b/src/quant3MatMul-sycl/main.cpp index 6e2526f17b..ba4af95bb3 100644 --- a/src/quant3MatMul-sycl/main.cpp +++ b/src/quant3MatMul-sycl/main.cpp @@ -96,6 +96,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // verify vecquant3matmul_faster q.memset(d_output, 0, sizeof(scalar_t) * mul_size); @@ -110,6 +111,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/quantBnB-cuda/main.cu b/src/quantBnB-cuda/main.cu index ce47700fd9..14d150affe 100644 --- a/src/quantBnB-cuda/main.cu +++ b/src/quantBnB-cuda/main.cu @@ -185,6 +185,7 @@ int main(int argc, char* argv[]) cudaMemcpy(out.data(), d_out, out_size, cudaMemcpyDeviceToHost); printf("%s\n", out == ref ? "PASS" : "FAIL"); + if (out != ref) exit(1); cudaFree(d_A); cudaFree(d_code); diff --git a/src/quantBnB-hip/main.cu b/src/quantBnB-hip/main.cu index f4ce100e82..e8f1ccde87 100644 --- a/src/quantBnB-hip/main.cu +++ b/src/quantBnB-hip/main.cu @@ -185,6 +185,7 @@ int main(int argc, char* argv[]) hipMemcpy(out.data(), d_out, out_size, hipMemcpyDeviceToHost); printf("%s\n", out == ref ? "PASS" : "FAIL"); + if (out != ref) exit(1); hipFree(d_A); hipFree(d_code); diff --git a/src/quantBnB-omp/main.cpp b/src/quantBnB-omp/main.cpp index b52336c828..546c6b9fef 100644 --- a/src/quantBnB-omp/main.cpp +++ b/src/quantBnB-omp/main.cpp @@ -129,6 +129,7 @@ int main(int argc, char* argv[]) } printf("%s\n", memcmp(out, ref, out_size) ? "FAIL" : "PASS"); + if (out_size)) exit(1); free(A); free(out); diff --git a/src/quantBnB-sycl/main.cpp b/src/quantBnB-sycl/main.cpp index 4a86bb6cd3..c0fa352921 100644 --- a/src/quantBnB-sycl/main.cpp +++ b/src/quantBnB-sycl/main.cpp @@ -205,6 +205,7 @@ int main(int argc, char* argv[]) q.memcpy(out.data(), d_out, out_size).wait(); printf("%s\n", out == ref ? "PASS" : "FAIL"); + if (out != ref) exit(1); sycl::free(d_A, q); sycl::free(d_code, q); diff --git a/src/quantVLLM-cuda/main.cu b/src/quantVLLM-cuda/main.cu index 4e6c2df155..87aa8d1f0e 100644 --- a/src/quantVLLM-cuda/main.cu +++ b/src/quantVLLM-cuda/main.cu @@ -8,6 +8,7 @@ #include #include "utils.h" #include "reference.h" +#include template __global__ void static_scaled_int8_quant_kernel( @@ -265,6 +266,7 @@ void quant(int num_tokens, int hidden_size, int repeat) { error += memcmp(h_output, h_output_r, output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); cudaFree(d_input); cudaFree(d_output); diff --git a/src/quantVLLM-hip/main.cu b/src/quantVLLM-hip/main.cu index 5a38c21e26..e14a2ec38b 100644 --- a/src/quantVLLM-hip/main.cu +++ b/src/quantVLLM-hip/main.cu @@ -7,6 +7,7 @@ #include #include "utils.h" #include "reference.h" +#include template __global__ void static_scaled_int8_quant_kernel( @@ -264,6 +265,7 @@ void quant(int num_tokens, int hidden_size, int repeat) { error += memcmp(h_output, h_output_r, output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); hipFree(d_input); hipFree(d_output); diff --git a/src/quantVLLM-sycl/main.cpp b/src/quantVLLM-sycl/main.cpp index 0bc449cd88..05c353c860 100644 --- a/src/quantVLLM-sycl/main.cpp +++ b/src/quantVLLM-sycl/main.cpp @@ -4,6 +4,7 @@ #include #include "utils.h" #include "reference.h" +#include template void static_scaled_int8_quant_kernel( @@ -285,6 +286,7 @@ void quant(sycl::queue &q, int num_tokens, int hidden_size, int repeat) { error += memcmp(h_output, h_output_r, output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); sycl::free(d_input, q); sycl::free(d_output, q); diff --git a/src/radixsort-cuda/main.cu b/src/radixsort-cuda/main.cu index 770c83b48c..40dcd991f7 100644 --- a/src/radixsort-cuda/main.cu +++ b/src/radixsort-cuda/main.cu @@ -12,6 +12,7 @@ #include #include "RadixSort.h" #include "Scan.h" +#include void makeRandomUintVector(unsigned int *a, unsigned int numElements, unsigned int keybits); bool verifySortUint(unsigned int *keysSorted, @@ -115,6 +116,7 @@ int main(int argc, const char **argv) printf("PASS\n"); else printf("FAIL\n"); + if (!passed) exit(1); return 0; } diff --git a/src/radixsort-hip/main.cu b/src/radixsort-hip/main.cu index e5fbb0ccb0..5281fd787b 100644 --- a/src/radixsort-hip/main.cu +++ b/src/radixsort-hip/main.cu @@ -12,6 +12,7 @@ #include #include "RadixSort.h" #include "Scan.h" +#include void makeRandomUintVector(unsigned int *a, unsigned int numElements, unsigned int keybits); bool verifySortUint(unsigned int *keysSorted, @@ -115,6 +116,7 @@ int main(int argc, const char **argv) printf("PASS\n"); else printf("FAIL\n"); + if (!passed) exit(1); return 0; } diff --git a/src/radixsort-omp/main.cpp b/src/radixsort-omp/main.cpp index 79cc6e8c11..99046ce343 100644 --- a/src/radixsort-omp/main.cpp +++ b/src/radixsort-omp/main.cpp @@ -12,6 +12,7 @@ #include #include "RadixSort.h" #include "Scan.h" +#include void makeRandomUintVector(unsigned int *a, unsigned int numElements, unsigned int keybits); bool verifySortUint(unsigned int *keysSorted, @@ -105,6 +106,7 @@ int main(int argc, const char **argv) printf("PASS\n"); else printf("FAIL\n"); + if (!passed) exit(1); return 0; } diff --git a/src/radixsort-sycl/main.cpp b/src/radixsort-sycl/main.cpp index 2d0d840424..1f402b0589 100644 --- a/src/radixsort-sycl/main.cpp +++ b/src/radixsort-sycl/main.cpp @@ -12,6 +12,7 @@ #include #include "RadixSort.h" #include "Scan.h" +#include void makeRandomUintVector(uint *a, uint numElements, uint keybits); bool verifySortUint(uint *keysSorted, @@ -105,6 +106,7 @@ int main(int argc, const char **argv) printf("PASS\n"); else printf("FAIL\n"); + if (!passed) exit(1); return 0; } diff --git a/src/radixsort2-cuda/main.cu b/src/radixsort2-cuda/main.cu index fa51bcc35e..ca78d217f0 100644 --- a/src/radixsort2-cuda/main.cu +++ b/src/radixsort2-cuda/main.cu @@ -9,6 +9,7 @@ #include #include "helper_string.h" +#include template @@ -140,4 +141,5 @@ int main(int argc, char **argv) { bTestResult = testSort(argc, argv); printf(bTestResult ? "PASS\n" : "FAIL\n"); + if (!bTestResult) exit(1); } diff --git a/src/radixsort2-hip/main.cu b/src/radixsort2-hip/main.cu index c5de34e98b..7ba4920f44 100644 --- a/src/radixsort2-hip/main.cu +++ b/src/radixsort2-hip/main.cu @@ -9,6 +9,7 @@ #include #include "helper_string.h" +#include template @@ -140,4 +141,5 @@ int main(int argc, char **argv) { bTestResult = testSort(argc, argv); printf(bTestResult ? "PASS\n" : "FAIL\n"); + if (!bTestResult) exit(1); } diff --git a/src/radixsort2-sycl/main.cpp b/src/radixsort2-sycl/main.cpp index bb312b4b28..c6bc10a440 100644 --- a/src/radixsort2-sycl/main.cpp +++ b/src/radixsort2-sycl/main.cpp @@ -6,6 +6,7 @@ #include #include #include "helper_string.h" +#include template bool testSort(int argc, char **argv) { int cmdVal; @@ -148,4 +149,5 @@ int main(int argc, char **argv) { bTestResult = testSort(argc, argv); printf(bTestResult ? "PASS\n" : "FAIL\n"); + if (!bTestResult) exit(1); } diff --git a/src/rainflow-cuda/main.cu b/src/rainflow-cuda/main.cu index 25dc5f38d0..77fedb2dbd 100644 --- a/src/rainflow-cuda/main.cu +++ b/src/rainflow-cuda/main.cu @@ -248,6 +248,7 @@ int main(int argc, char* argv[]) { int error = memcmp(ref_result_lengths, result_lengths, num_history * sizeof(int)); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); cudaFree(d_history); cudaFree(d_history_lengths); diff --git a/src/rainflow-hip/main.cu b/src/rainflow-hip/main.cu index b5d2e02021..cd19ffee0b 100644 --- a/src/rainflow-hip/main.cu +++ b/src/rainflow-hip/main.cu @@ -248,6 +248,7 @@ int main(int argc, char* argv[]) { int error = memcmp(ref_result_lengths, result_lengths, num_history * sizeof(int)); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); hipFree(d_history); hipFree(d_history_lengths); diff --git a/src/rainflow-omp/main.cpp b/src/rainflow-omp/main.cpp index 7b001c78d9..e23d94e2e7 100644 --- a/src/rainflow-omp/main.cpp +++ b/src/rainflow-omp/main.cpp @@ -207,6 +207,7 @@ int main(int argc, char* argv[]) { int error = memcmp(ref_result_lengths, result_lengths, num_history * sizeof(int)); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(history); free(history_lengths); diff --git a/src/rainflow-sycl/main.cpp b/src/rainflow-sycl/main.cpp index 6716bd8b6e..f51e205516 100644 --- a/src/rainflow-sycl/main.cpp +++ b/src/rainflow-sycl/main.cpp @@ -255,6 +255,7 @@ int main(int argc, char* argv[]) { int error = memcmp(ref_result_lengths, result_lengths, num_history * sizeof(int)); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); sycl::free(d_history, q); sycl::free(d_history_lengths, q); diff --git a/src/randomAccess-cuda/main.cu b/src/randomAccess-cuda/main.cu index e55268d06d..0b8e4c4300 100644 --- a/src/randomAccess-cuda/main.cu +++ b/src/randomAccess-cuda/main.cu @@ -143,6 +143,7 @@ int main(int argc, char** argv) { fprintf(stdout, "Found %llu errors in %llu locations (%s).\n", temp, TableSize, (temp <= 0.01*TableSize) ? "PASS" : "FAIL"); + if (temp > 0.01*TableSize) exit(1); if (temp <= 0.01*TableSize) failure = 0; else failure = 1; diff --git a/src/randomAccess-hip/main.cu b/src/randomAccess-hip/main.cu index e991aa93bc..d1eda15926 100644 --- a/src/randomAccess-hip/main.cu +++ b/src/randomAccess-hip/main.cu @@ -143,6 +143,7 @@ int main(int argc, char** argv) { fprintf(stdout, "Found %llu errors in %llu locations (%s).\n", temp, TableSize, (temp <= 0.01*TableSize) ? "PASS" : "FAIL"); + if (temp > 0.01*TableSize) exit(1); if (temp <= 0.01*TableSize) failure = 0; else failure = 1; diff --git a/src/randomAccess-omp/main.cpp b/src/randomAccess-omp/main.cpp index 99738c5f82..c51ac5c010 100644 --- a/src/randomAccess-omp/main.cpp +++ b/src/randomAccess-omp/main.cpp @@ -136,6 +136,7 @@ int main(int argc, char** argv) { fprintf( stdout, "Found %llu errors in %llu locations (%s).\n", temp, TableSize, (temp <= 0.01*TableSize) ? "PASS" : "FAIL"); + if (temp > 0.01*TableSize) exit(1); if (temp <= 0.01*TableSize) failure = 0; else failure = 1; diff --git a/src/randomAccess-sycl/main.cpp b/src/randomAccess-sycl/main.cpp index bb322cfe92..d0c2fd1380 100644 --- a/src/randomAccess-sycl/main.cpp +++ b/src/randomAccess-sycl/main.cpp @@ -161,6 +161,7 @@ int main(int argc, char** argv) { fprintf(stdout, "Found %llu errors in %llu locations (%s).\n", temp, TableSize, (temp <= 0.01*TableSize) ? "PASS" : "FAIL"); + if (temp > 0.01*TableSize) exit(1); if (temp <= 0.01*TableSize) failure = 0; else failure = 1; diff --git a/src/relu-cuda/main.cu b/src/relu-cuda/main.cu index 3a5d1f330a..223ec1ecd1 100644 --- a/src/relu-cuda/main.cu +++ b/src/relu-cuda/main.cu @@ -236,6 +236,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); half_count = divup(count, VectorSize); kBlock = divup(half_count, kThreadInBlock); @@ -264,6 +265,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); //------------------------------------------------------------------------------- // RELU @@ -308,6 +310,7 @@ int main(int argc, char* argv[]) fail = memcmp(h_out, r_out, size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); start = std::chrono::steady_clock::now(); @@ -324,6 +327,7 @@ int main(int argc, char* argv[]) fail = memcmp(h_out, r_out, size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); cudaFree(d_out); cudaFree(d_in); diff --git a/src/relu-hip/main.cu b/src/relu-hip/main.cu index 4b36cdda37..33c0fd9058 100644 --- a/src/relu-hip/main.cu +++ b/src/relu-hip/main.cu @@ -238,6 +238,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); half_count = divup(count, VectorSize); kBlock = divup(half_count, kThreadInBlock); @@ -266,6 +267,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); //------------------------------------------------------------------------------- // RELU @@ -310,6 +312,7 @@ int main(int argc, char* argv[]) fail = memcmp(h_out, r_out, size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); /* start = std::chrono::steady_clock::now(); @@ -327,6 +330,7 @@ int main(int argc, char* argv[]) fail = memcmp(h_out, r_out, size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); */ hipFree(d_out); diff --git a/src/relu-sycl/main.cpp b/src/relu-sycl/main.cpp index 390df21cd0..dcade708d9 100644 --- a/src/relu-sycl/main.cpp +++ b/src/relu-sycl/main.cpp @@ -267,6 +267,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); half_count = divup(count, VectorSize); kBlock = divup(half_count, kThreadInBlock); @@ -303,6 +304,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); int *h_in, *h_out, *r_out; size = count * sizeof(int); @@ -351,6 +353,7 @@ int main(int argc, char* argv[]) fail = memcmp(h_out, r_out, size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); start = std::chrono::steady_clock::now(); @@ -373,6 +376,7 @@ int main(int argc, char* argv[]) fail = memcmp(h_out, r_out, size); printf("%s\n", fail ? "FAIL" : "PASS"); + if (fail) exit(1); sycl::free(d_out, q); sycl::free(d_in, q); diff --git a/src/reverse-cuda/main.cu b/src/reverse-cuda/main.cu index 172e4af3fc..4b58be7eae 100644 --- a/src/reverse-cuda/main.cu +++ b/src/reverse-cuda/main.cu @@ -77,6 +77,7 @@ int main(int argc, char* argv[]) { printf("Total kernel execution time: %f (s)\n", time * 1e-9f); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); cudaFree(d_test); return 0; diff --git a/src/reverse-hip/main.cu b/src/reverse-hip/main.cu index f31dbed943..b3a082a89f 100644 --- a/src/reverse-hip/main.cu +++ b/src/reverse-hip/main.cu @@ -77,6 +77,7 @@ int main(int argc, char* argv[]) { printf("Total kernel execution time: %f (s)\n", time * 1e-9f); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); hipFree(d_test); return 0; diff --git a/src/reverse-omp/main.cpp b/src/reverse-omp/main.cpp index 37b8074e45..8770d2d804 100644 --- a/src/reverse-omp/main.cpp +++ b/src/reverse-omp/main.cpp @@ -78,6 +78,7 @@ int main(int argc, char* argv[]) { printf("Total kernel execution time: %f (s)\n", time * 1e-9f); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); return 0; } diff --git a/src/reverse-sycl/main.cpp b/src/reverse-sycl/main.cpp index 95f3f9c280..aeacd655d7 100644 --- a/src/reverse-sycl/main.cpp +++ b/src/reverse-sycl/main.cpp @@ -84,6 +84,7 @@ int main(int argc, char* argv[]) { printf("Total kernel execution time: %f (s)\n", time * 1e-9f); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(d_test, q); diff --git a/src/rfs-cuda/main.cu b/src/rfs-cuda/main.cu index f34df80625..0cbb855154 100644 --- a/src/rfs-cuda/main.cu +++ b/src/rfs-cuda/main.cu @@ -158,6 +158,7 @@ int main(int argc, char* argv[]) { cudaMemcpy(result, d_result, narray_size, cudaMemcpyDeviceToHost); bool ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); start = std::chrono::steady_clock::now(); @@ -173,6 +174,7 @@ int main(int argc, char* argv[]) { cudaMemcpy(result, d_result, narray_size, cudaMemcpyDeviceToHost); ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_arrays); cudaFree(d_maxVal); diff --git a/src/rfs-hip/main.cu b/src/rfs-hip/main.cu index 8daacf2e31..5eed445d6f 100644 --- a/src/rfs-hip/main.cu +++ b/src/rfs-hip/main.cu @@ -158,6 +158,7 @@ int main(int argc, char* argv[]) { hipMemcpy(result, d_result, narray_size, hipMemcpyDeviceToHost); bool ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); start = std::chrono::steady_clock::now(); @@ -173,6 +174,7 @@ int main(int argc, char* argv[]) { hipMemcpy(result, d_result, narray_size, hipMemcpyDeviceToHost); ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_arrays); hipFree(d_maxVal); diff --git a/src/rfs-omp/main.cpp b/src/rfs-omp/main.cpp index 9b66389c8f..e4ec399c5e 100644 --- a/src/rfs-omp/main.cpp +++ b/src/rfs-omp/main.cpp @@ -152,6 +152,7 @@ int main(int argc, char* argv[]) { #pragma omp target update from (result[0:nArrays]) ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); start = std::chrono::steady_clock::now(); @@ -166,6 +167,7 @@ int main(int argc, char* argv[]) { #pragma omp target update from (result[0:nArrays]) ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } free(arrays); diff --git a/src/rfs-sycl/main.cpp b/src/rfs-sycl/main.cpp index fb81134f1c..7b8d84de02 100644 --- a/src/rfs-sycl/main.cpp +++ b/src/rfs-sycl/main.cpp @@ -175,6 +175,7 @@ int main(int argc, char* argv[]) { bool ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); start = std::chrono::steady_clock::now(); @@ -195,6 +196,7 @@ int main(int argc, char* argv[]) { ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_arrays, q); sycl::free(d_maxVal, q); diff --git a/src/ring-cuda/main.cu b/src/ring-cuda/main.cu index a12a7a5f9c..cba072c956 100644 --- a/src/ring-cuda/main.cu +++ b/src/ring-cuda/main.cu @@ -4,6 +4,7 @@ #include // iota #include #include +#include // Send data in a circular manner in all GPU devices (non-P2P) // Original author: Thomas Applencourt @@ -82,6 +83,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); for (int i = 0; i < num_devices; i++) { cudaFree(device_ptr[i]); diff --git a/src/ring-hip/main.cu b/src/ring-hip/main.cu index f03f272eff..8b2a97fc48 100644 --- a/src/ring-hip/main.cu +++ b/src/ring-hip/main.cu @@ -4,6 +4,7 @@ #include // iota #include #include +#include // Send data in a circular manner in all GPU devices (non-P2P) // Original author: Thomas Applencourt @@ -82,6 +83,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); for (int i = 0; i < num_devices; i++) { hipFree(device_ptr[i]); diff --git a/src/ring-sycl/main.cpp b/src/ring-sycl/main.cpp index 65be9bd91a..cdf05da8dc 100644 --- a/src/ring-sycl/main.cpp +++ b/src/ring-sycl/main.cpp @@ -4,6 +4,7 @@ #include // iota #include #include +#include // Send data in a circular manner in all GPU devices (non-P2P) // Original author: Thomas Applencourt @@ -84,6 +85,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); for (int i = 0; i < num_devices; i++) { free(device_ptr[i], queues[i]); diff --git a/src/rle-cuda/main.cu b/src/rle-cuda/main.cu index 16c699cc8f..914b4ede33 100644 --- a/src/rle-cuda/main.cu +++ b/src/rle-cuda/main.cu @@ -38,6 +38,7 @@ #include #include #include "test_util.h" +#include using namespace cub; @@ -249,12 +250,15 @@ void Test(DeviceInputIteratorT d_in, compare0 = CompareDeviceResults(h_unique_reference, d_unique_out, num_runs, true, g_verbose); printf("\t Keys %s\n", compare0 ? "FAIL" : "PASS"); + if (compare0) exit(1); compare1 = CompareDeviceResults(h_lengths_reference, d_lengths_out, num_runs, true, g_verbose); printf("\t Lengths %s\n", compare1 ? "FAIL" : "PASS"); + if (compare1) exit(1); compare2 = CompareDeviceResults(&num_runs, d_num_runs, 1, true, g_verbose); printf("\t Count %s\n", compare2 ? "FAIL" : "PASS"); + if (compare2) exit(1); // Flush any stdout/stderr fflush(stdout); diff --git a/src/rle-hip/main.cu b/src/rle-hip/main.cu index ccf616b81a..58c4ed9abf 100644 --- a/src/rle-hip/main.cu +++ b/src/rle-hip/main.cu @@ -38,6 +38,7 @@ #include #include #include "test_util.h" +#include using namespace hipcub; @@ -251,12 +252,15 @@ void Test(DeviceInputIteratorT d_in, compare0 = CompareDeviceResults(h_unique_reference, d_unique_out, num_runs, true, g_verbose); printf("\t Keys %s\n", compare0 ? "FAIL" : "PASS"); + if (compare0) exit(1); compare1 = CompareDeviceResults(h_lengths_reference, d_lengths_out, num_runs, true, g_verbose); printf("\t Lengths %s\n", compare1 ? "FAIL" : "PASS"); + if (compare1) exit(1); compare2 = CompareDeviceResults(&num_runs, d_num_runs, 1, true, g_verbose); printf("\t Count %s\n", compare2 ? "FAIL" : "PASS"); + if (compare2) exit(1); // Flush any stdout/stderr fflush(stdout); diff --git a/src/rng-wallace-cuda/main.cu b/src/rng-wallace-cuda/main.cu index 363bf3f965..c9909add96 100644 --- a/src/rng-wallace-cuda/main.cu +++ b/src/rng-wallace-cuda/main.cu @@ -81,6 +81,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); diff --git a/src/rng-wallace-hip/main.cu b/src/rng-wallace-hip/main.cu index 455cd992bf..bc3eb39eab 100644 --- a/src/rng-wallace-hip/main.cu +++ b/src/rng-wallace-hip/main.cu @@ -81,6 +81,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); diff --git a/src/rng-wallace-omp/main.cpp b/src/rng-wallace-omp/main.cpp index d9fa9aa1e8..327d533633 100644 --- a/src/rng-wallace-omp/main.cpp +++ b/src/rng-wallace-omp/main.cpp @@ -70,6 +70,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/rng-wallace-sycl/main.cpp b/src/rng-wallace-sycl/main.cpp index 3daedee073..f79a0c5295 100644 --- a/src/rng-wallace-sycl/main.cpp +++ b/src/rng-wallace-sycl/main.cpp @@ -87,6 +87,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); q.wait(); auto start = std::chrono::steady_clock::now(); diff --git a/src/romberg-cuda/main.cu b/src/romberg-cuda/main.cu index 94335d3218..f34eba7caf 100644 --- a/src/romberg-cuda/main.cu +++ b/src/romberg-cuda/main.cu @@ -118,6 +118,7 @@ int main( int argc, char** argv) double ref_sum = reference(f, A, B, ROW_SIZE, EPS); printf("%s\n", (fabs(sum - ref_sum) > EPS) ? "FAIL" : "PASS"); + if ((fabs(sum - ref_sum) > EPS)) exit(1); cudaFree(d_result); free(h_result); diff --git a/src/romberg-hip/main.cu b/src/romberg-hip/main.cu index d8d517f126..bb64492df9 100644 --- a/src/romberg-hip/main.cu +++ b/src/romberg-hip/main.cu @@ -118,6 +118,7 @@ int main( int argc, char** argv) double ref_sum = reference(f, A, B, ROW_SIZE, EPS); printf("%s\n", (fabs(sum - ref_sum) > EPS) ? "FAIL" : "PASS"); + if ((fabs(sum - ref_sum) > EPS)) exit(1); hipFree(d_result); free(h_result); diff --git a/src/romberg-omp/main.cpp b/src/romberg-omp/main.cpp index 5d2e729b95..c868ecfbf8 100644 --- a/src/romberg-omp/main.cpp +++ b/src/romberg-omp/main.cpp @@ -118,6 +118,7 @@ int main( int argc, char** argv) // verify double ref_sum = reference(f, A, B, ROW_SIZE, EPS); printf("%s\n", (fabs(d_sum - ref_sum) > EPS) ? "FAIL" : "PASS"); + if ((fabs(d_sum - ref_sum) > EPS)) exit(1); free(result); return 0; diff --git a/src/romberg-sycl/main.cpp b/src/romberg-sycl/main.cpp index 1ef31ca56a..83128fd8e0 100644 --- a/src/romberg-sycl/main.cpp +++ b/src/romberg-sycl/main.cpp @@ -133,6 +133,7 @@ int main( int argc, char** argv) double ref_sum = reference(f, A, B, ROW_SIZE, EPS); printf("%s\n", (fabs(sum - ref_sum) > EPS) ? "FAIL" : "PASS"); + if ((fabs(sum - ref_sum) > EPS)) exit(1); free(h_result); sycl::free(d_result, q); diff --git a/src/rotary-cuda/main.cu b/src/rotary-cuda/main.cu index 96ab69be96..f7921827cb 100644 --- a/src/rotary-cuda/main.cu +++ b/src/rotary-cuda/main.cu @@ -7,6 +7,7 @@ #include "Array.h" #include "FunctionTraits.h" +#include #ifndef GPU_LAMBDA #define GPU_LAMBDA __host__ __device__ @@ -309,6 +310,7 @@ void gpu_kernel_multiple_outputs_impl(const int repeat, const func_t& f) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_x1); cudaFree(d_x2); cudaFree(d_cos); diff --git a/src/rotary-hip/main.cu b/src/rotary-hip/main.cu index 7a579e7103..2172249733 100644 --- a/src/rotary-hip/main.cu +++ b/src/rotary-hip/main.cu @@ -8,6 +8,7 @@ #include "Array.h" #include "FunctionTraits.h" +#include #ifndef GPU_LAMBDA #define GPU_LAMBDA __host__ __device__ @@ -310,6 +311,7 @@ void gpu_kernel_multiple_outputs_impl(const int repeat, const func_t& f) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_x1); hipFree(d_x2); hipFree(d_cos); diff --git a/src/rotary-sycl/main.cpp b/src/rotary-sycl/main.cpp index 933a8d3ba4..dc0407aaf5 100644 --- a/src/rotary-sycl/main.cpp +++ b/src/rotary-sycl/main.cpp @@ -7,6 +7,7 @@ #include "Array.h" #include "FunctionTraits.h" #include +#include constexpr int num_threads() { return C10_WARP_SIZE * 4; @@ -328,6 +329,7 @@ void gpu_kernel_multiple_outputs_impl(const int repeat, const func_t &f) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_x1, q); sycl::free(d_x2, q); sycl::free(d_cos, q); diff --git a/src/rtm8-cuda/rtm8.cu b/src/rtm8-cuda/rtm8.cu index 275e99b5a5..ff0c09b0aa 100644 --- a/src/rtm8-cuda/rtm8.cu +++ b/src/rtm8-cuda/rtm8.cu @@ -233,6 +233,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); pt_rate = pts/dt; flop_rate = flops/dt; diff --git a/src/rtm8-hip/rtm8.cu b/src/rtm8-hip/rtm8.cu index 10997239a0..f06ff4cf18 100644 --- a/src/rtm8-hip/rtm8.cu +++ b/src/rtm8-hip/rtm8.cu @@ -233,6 +233,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); pt_rate = pts/dt; flop_rate = flops/dt; diff --git a/src/rtm8-omp/rtm8.cpp b/src/rtm8-omp/rtm8.cpp index f1f338fff4..7e1640d9d4 100644 --- a/src/rtm8-omp/rtm8.cpp +++ b/src/rtm8-omp/rtm8.cpp @@ -186,6 +186,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); pt_rate = pts/dt; flop_rate = flops/dt; diff --git a/src/rtm8-sycl/rtm8.cpp b/src/rtm8-sycl/rtm8.cpp index ba854048c9..d79e12ba07 100644 --- a/src/rtm8-sycl/rtm8.cpp +++ b/src/rtm8-sycl/rtm8.cpp @@ -215,6 +215,7 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); pt_rate = pts/dt; flop_rate = flops/dt; diff --git a/src/s8n-cuda/main.cu b/src/s8n-cuda/main.cu index d1d871e251..b99688e6cf 100644 --- a/src/s8n-cuda/main.cu +++ b/src/s8n-cuda/main.cu @@ -216,6 +216,7 @@ int main(int argc, char* argv[]) error += memcmp(h_out4, r_out4, 4 * output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(h_xyz); free(h_out); diff --git a/src/s8n-hip/main.cu b/src/s8n-hip/main.cu index bde4288645..8de05c1334 100644 --- a/src/s8n-hip/main.cu +++ b/src/s8n-hip/main.cu @@ -216,6 +216,7 @@ int main(int argc, char* argv[]) error += memcmp(h_out4, r_out4, 4 * output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(h_xyz); free(h_out); diff --git a/src/s8n-omp/main.cpp b/src/s8n-omp/main.cpp index 417b5f99d3..e12949f554 100644 --- a/src/s8n-omp/main.cpp +++ b/src/s8n-omp/main.cpp @@ -213,6 +213,7 @@ int main(int argc, char* argv[]) error += memcmp(h_out4, r_out4, 4 * output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); } free(h_xyz); diff --git a/src/s8n-sycl/main.cpp b/src/s8n-sycl/main.cpp index 558c1892ba..dc73a85eee 100644 --- a/src/s8n-sycl/main.cpp +++ b/src/s8n-sycl/main.cpp @@ -235,6 +235,7 @@ int main(int argc, char* argv[]) error += memcmp(h_out4, r_out4, 4 * output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(h_xyz); free(h_out); diff --git a/src/scan-cuda/main.cu b/src/scan-cuda/main.cu index 8fa9954599..0d3c736217 100644 --- a/src/scan-cuda/main.cu +++ b/src/scan-cuda/main.cu @@ -17,6 +17,7 @@ void verify(const T* cpu_out, const T* gpu_out, int64_t n) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); } // bank conflict aware optimization diff --git a/src/scan-hip/main.cu b/src/scan-hip/main.cu index 38f99a287a..a1b4cd07b9 100644 --- a/src/scan-hip/main.cu +++ b/src/scan-hip/main.cu @@ -17,6 +17,7 @@ void verify(const T* cpu_out, const T* gpu_out, int64_t n) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); } // bank conflict aware optimization diff --git a/src/scan-omp/main.cpp b/src/scan-omp/main.cpp index 864acde3c4..d44c9f1bfa 100644 --- a/src/scan-omp/main.cpp +++ b/src/scan-omp/main.cpp @@ -17,6 +17,7 @@ void verify(const T* ref_out, const T* out, int64_t n) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); } // bank conflict aware optimization diff --git a/src/scan-sycl/main.cpp b/src/scan-sycl/main.cpp index 7d2a8f67ee..fc81ae372b 100644 --- a/src/scan-sycl/main.cpp +++ b/src/scan-sycl/main.cpp @@ -17,6 +17,7 @@ void verify(const T* cpu_out, const T* gpu_out, int64_t n) } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); } #define LOG_MEM_BANKS 5 diff --git a/src/scan2-cuda/main.cu b/src/scan2-cuda/main.cu index 10d6c935e5..e58ed527ae 100644 --- a/src/scan2-cuda/main.cu +++ b/src/scan2-cuda/main.cu @@ -17,6 +17,7 @@ #include #include #include "scan.h" +#include /* * ScanLargeArrays : Scan is done for each block and the sum of each @@ -348,6 +349,7 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); free(input); free(output); diff --git a/src/scan2-hip/main.cu b/src/scan2-hip/main.cu index 0f77897837..fac83285fc 100644 --- a/src/scan2-hip/main.cu +++ b/src/scan2-hip/main.cu @@ -17,6 +17,7 @@ #include #include #include "scan.h" +#include /* * ScanLargeArrays : Scan is done for each block and the sum of each @@ -348,6 +349,7 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); free(input); free(output); diff --git a/src/scan2-omp/main.cpp b/src/scan2-omp/main.cpp index 103f1407c9..094c0cc873 100644 --- a/src/scan2-omp/main.cpp +++ b/src/scan2-omp/main.cpp @@ -17,6 +17,7 @@ #include #include #include "scan.h" +#include void bScan(const unsigned int blockSize, const unsigned int len, @@ -294,6 +295,7 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!(compare(outputBuffer, verificationOutput, length, (float)0.001))) exit(1); free(verificationOutput); free(inputBuffer); diff --git a/src/scan2-sycl/main.cpp b/src/scan2-sycl/main.cpp index 936c075c5c..42dd2c9b19 100644 --- a/src/scan2-sycl/main.cpp +++ b/src/scan2-sycl/main.cpp @@ -18,6 +18,7 @@ #include #include #include "scan.h" +#include void bScan(sycl::queue &q, const unsigned int blockSize, @@ -315,6 +316,7 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); free(input); free(output); diff --git a/src/scan3-cuda/main.cu b/src/scan3-cuda/main.cu index 760d5975cc..8c67cb1505 100644 --- a/src/scan3-cuda/main.cu +++ b/src/scan3-cuda/main.cu @@ -4,6 +4,7 @@ #include #include #include "scan.h" +#include // Binary sum operator, returns `t + u` struct Sum @@ -106,6 +107,7 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); // include the overhead of allocating temporary device storage start = std::chrono::steady_clock::now(); @@ -141,6 +143,7 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); cudaFree(inputBuffer); cudaFree(outputBuffer); diff --git a/src/scan3-hip/main.cu b/src/scan3-hip/main.cu index 172f174870..23eb38b777 100644 --- a/src/scan3-hip/main.cu +++ b/src/scan3-hip/main.cu @@ -4,6 +4,7 @@ #include #include #include "scan.h" +#include /* * Scan for verification @@ -96,6 +97,7 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); // include the overhead of allocating temporary device storage start = std::chrono::steady_clock::now(); @@ -131,6 +133,7 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); hipFree(inputBuffer); hipFree(outputBuffer); diff --git a/src/scan3-sycl/main.cpp b/src/scan3-sycl/main.cpp index f3a0a619a5..3690d0d0a2 100644 --- a/src/scan3-sycl/main.cpp +++ b/src/scan3-sycl/main.cpp @@ -3,6 +3,7 @@ #include #include #include "scan.h" +#include /* * Scan for verification @@ -103,6 +104,7 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); free(input); free(output); diff --git a/src/scatter-cuda/main.cu b/src/scatter-cuda/main.cu index c4e2355002..73ba74e174 100644 --- a/src/scatter-cuda/main.cu +++ b/src/scatter-cuda/main.cu @@ -107,6 +107,7 @@ void scatter(int64_t num_elems, int repeat) { } } printf("%s\n\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); CHECK_CUDA( cudaFree(d_src) ) CHECK_CUDA( cudaFree(d_idx) ) diff --git a/src/scatter-hip/main.cu b/src/scatter-hip/main.cu index d65e36150c..a7b20c54f8 100644 --- a/src/scatter-hip/main.cu +++ b/src/scatter-hip/main.cu @@ -107,6 +107,7 @@ void scatter(int64_t num_elems, int repeat) { } } printf("%s\n\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); CHECK_HIP( hipFree(d_src) ) CHECK_HIP( hipFree(d_idx) ) diff --git a/src/scatter-sycl/main.cpp b/src/scatter-sycl/main.cpp index bbcb6ee792..8d4f1e5f31 100644 --- a/src/scatter-sycl/main.cpp +++ b/src/scatter-sycl/main.cpp @@ -100,6 +100,7 @@ void scatter(sycl::queue &q, int64_t num_elems, int repeat) { } } printf("%s\n\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_src, q); sycl::free(d_idx, q); diff --git a/src/scatterAdd-cuda/main.cu b/src/scatterAdd-cuda/main.cu index e37d6e24d8..bc40f1b5f4 100644 --- a/src/scatterAdd-cuda/main.cu +++ b/src/scatterAdd-cuda/main.cu @@ -107,6 +107,7 @@ void index_accumulate (int batch_size, int output_size, int vector_dim, int repe } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); int64_t time = 0; auto start = std::chrono::steady_clock::now(); diff --git a/src/scatterAdd-hip/main.cu b/src/scatterAdd-hip/main.cu index 158e81afdf..e687ba4e93 100644 --- a/src/scatterAdd-hip/main.cu +++ b/src/scatterAdd-hip/main.cu @@ -110,6 +110,7 @@ void index_accumulate (int batch_size, int output_size, int vector_dim, int repe } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); int64_t time = 0; auto start = std::chrono::steady_clock::now(); diff --git a/src/scatterAdd-omp/main.cpp b/src/scatterAdd-omp/main.cpp index c71086c70e..66332669f2 100644 --- a/src/scatterAdd-omp/main.cpp +++ b/src/scatterAdd-omp/main.cpp @@ -84,6 +84,7 @@ void index_accumulate (int batch_size, int output_size, int vector_dim, int repe } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); int64_t time = 0; auto start = std::chrono::steady_clock::now(); diff --git a/src/scatterAdd-sycl/main.cpp b/src/scatterAdd-sycl/main.cpp index a546131dd2..50cb40b88f 100644 --- a/src/scatterAdd-sycl/main.cpp +++ b/src/scatterAdd-sycl/main.cpp @@ -120,6 +120,7 @@ void index_accumulate(int batch_size, int output_size, int vector_dim, int repea } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); int64_t time = 0; auto start = std::chrono::steady_clock::now(); diff --git a/src/scatterThrust-cuda/main.cu b/src/scatterThrust-cuda/main.cu index 97829326e2..2c920dd4c1 100644 --- a/src/scatterThrust-cuda/main.cu +++ b/src/scatterThrust-cuda/main.cu @@ -65,6 +65,7 @@ void scatter(int64_t num_elems, int repeat) { } } printf("%s\n\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); CHECK_CUDA( cudaFree(d_src) ) CHECK_CUDA( cudaFree(d_idx) ) diff --git a/src/scatterThrust-hip/main.cu b/src/scatterThrust-hip/main.cu index 37fbd49239..13f84af095 100644 --- a/src/scatterThrust-hip/main.cu +++ b/src/scatterThrust-hip/main.cu @@ -65,6 +65,7 @@ void scatter(int64_t num_elems, int repeat) { } } printf("%s\n\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); CHECK_HIP( hipFree(d_src) ) CHECK_HIP( hipFree(d_idx) ) diff --git a/src/scatterThrust-sycl/main.cpp b/src/scatterThrust-sycl/main.cpp index 8ce212d70a..f6a1a7f131 100644 --- a/src/scatterThrust-sycl/main.cpp +++ b/src/scatterThrust-sycl/main.cpp @@ -69,6 +69,7 @@ template void scatter(sycl::queue &q, int64_t num_elems, int } } printf("%s\n\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_src, q); sycl::free(d_idx, q); diff --git a/src/scel-cuda/main.cu b/src/scel-cuda/main.cu index b274f9d902..39d394e24c 100644 --- a/src/scel-cuda/main.cu +++ b/src/scel-cuda/main.cu @@ -121,6 +121,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_targets); cudaFree(d_logits); diff --git a/src/scel-hip/main.cu b/src/scel-hip/main.cu index 4840cfbf76..e59ddb34a9 100644 --- a/src/scel-hip/main.cu +++ b/src/scel-hip/main.cu @@ -121,6 +121,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_targets); hipFree(d_logits); diff --git a/src/scel-omp/main.cpp b/src/scel-omp/main.cpp index a496417382..8b16a54684 100644 --- a/src/scel-omp/main.cpp +++ b/src/scel-omp/main.cpp @@ -111,6 +111,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(h_targets); free(h_logits); diff --git a/src/scel-sycl/main.cpp b/src/scel-sycl/main.cpp index 4a96b095ea..68311eef8d 100644 --- a/src/scel-sycl/main.cpp +++ b/src/scel-sycl/main.cpp @@ -150,6 +150,7 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_targets, q); sycl::free(d_logits, q); diff --git a/src/score-cuda/main.cu b/src/score-cuda/main.cu index 4729f11655..d84fa95b79 100644 --- a/src/score-cuda/main.cu +++ b/src/score-cuda/main.cu @@ -278,6 +278,7 @@ int main(int argc, char* argv[]) } checksum += memcmp(count, count_ref, count_size_bytes); printf("%s\n", checksum == 0 ? "PASS" : "FAIL"); + if (checksum != 0) exit(1); cudaFree(d_indices); cudaFree(d_count); diff --git a/src/score-hip/main.cu b/src/score-hip/main.cu index 327834b942..8012301d24 100644 --- a/src/score-hip/main.cu +++ b/src/score-hip/main.cu @@ -283,6 +283,7 @@ int main(int argc, char* argv[]) } checksum += memcmp(count, count_ref, count_size_bytes); printf("%s\n", checksum == 0 ? "PASS" : "FAIL"); + if (checksum != 0) exit(1); hipFree(d_indices); hipFree(d_count); diff --git a/src/score-sycl/main.cpp b/src/score-sycl/main.cpp index 347bb5c691..1a5c4c305f 100644 --- a/src/score-sycl/main.cpp +++ b/src/score-sycl/main.cpp @@ -304,6 +304,7 @@ int main(int argc, char* argv[]) } checksum += memcmp(count, count_ref, count_size_bytes); printf("%s\n", checksum == 0 ? "PASS" : "FAIL"); + if (checksum != 0) exit(1); sycl::free(d_indices, q); diff --git a/src/secp256k1-cuda/main.cu b/src/secp256k1-cuda/main.cu index c8fd78d3a1..e6766c3473 100644 --- a/src/secp256k1-cuda/main.cu +++ b/src/secp256k1-cuda/main.cu @@ -2,6 +2,7 @@ #include #include #include +#include typedef struct { @@ -1259,6 +1260,7 @@ int main(int argc, char **argv) { printf("PASS\n"); else printf("FAIL\n"); + if (0 != strcmp(result, "bbde464b6355ee6de6deba5ae860f8a66524937eee81dde224a0214efd795d09")) exit(1); return 0; } diff --git a/src/secp256k1-hip/main.cu b/src/secp256k1-hip/main.cu index e4b043857e..3896a6116a 100644 --- a/src/secp256k1-hip/main.cu +++ b/src/secp256k1-hip/main.cu @@ -2,6 +2,7 @@ #include #include #include +#include typedef struct { @@ -1259,6 +1260,7 @@ int main(int argc, char **argv) { printf("PASS\n"); else printf("FAIL\n"); + if (0 != strcmp(result, "bbde464b6355ee6de6deba5ae860f8a66524937eee81dde224a0214efd795d09")) exit(1); return 0; } diff --git a/src/secp256k1-omp/main.cpp b/src/secp256k1-omp/main.cpp index b3144dcbc9..dd49f2e489 100644 --- a/src/secp256k1-omp/main.cpp +++ b/src/secp256k1-omp/main.cpp @@ -1237,5 +1237,6 @@ int main(int argc, char **argv) { printf("PASS\n"); else printf("FAIL\n"); + if (0 != strcmp(result, "bbde464b6355ee6de6deba5ae860f8a66524937eee81dde224a0214efd795d09")) exit(1); return 0; } diff --git a/src/secp256k1-sycl/main.cpp b/src/secp256k1-sycl/main.cpp index 451fc3e7cc..d65d96e526 100644 --- a/src/secp256k1-sycl/main.cpp +++ b/src/secp256k1-sycl/main.cpp @@ -2,6 +2,7 @@ #include #include #include +#include typedef struct { @@ -1253,5 +1254,6 @@ int main(int argc, char **argv) { printf("PASS\n"); else printf("FAIL\n"); + if (0 != strcmp(result, "bbde464b6355ee6de6deba5ae860f8a66524937eee81dde224a0214efd795d09")) exit(1); return 0; } diff --git a/src/shuffle-cuda/main.cu b/src/shuffle-cuda/main.cu index ef4556fcc3..31f000ac18 100644 --- a/src/shuffle-cuda/main.cu +++ b/src/shuffle-cuda/main.cu @@ -57,6 +57,7 @@ void verifyBroadcast(const int *out, const int subGroupSize, int pattern = 0) std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (errors != 0) exit(1); } void verifyTransposeMatrix(const float *TransposeMatrix, @@ -79,6 +80,7 @@ void verifyTransposeMatrix(const float *TransposeMatrix, std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (errors != 0) exit(1); } #define __shfl(v, d) __shfl_sync(0xffffffff, v, d) diff --git a/src/shuffle-hip/main.cu b/src/shuffle-hip/main.cu index c496189846..583a9dfdac 100644 --- a/src/shuffle-hip/main.cu +++ b/src/shuffle-hip/main.cu @@ -57,6 +57,7 @@ void verifyBroadcast(const int *out, const int subGroupSize, int pattern = 0) std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (errors != 0) exit(1); } void verifyTransposeMatrix(const float *TransposeMatrix, @@ -79,6 +80,7 @@ void verifyTransposeMatrix(const float *TransposeMatrix, std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (errors != 0) exit(1); } //================================================================================== diff --git a/src/shuffle-sycl/main.cpp b/src/shuffle-sycl/main.cpp index be6af6df6b..ad199d8470 100644 --- a/src/shuffle-sycl/main.cpp +++ b/src/shuffle-sycl/main.cpp @@ -57,6 +57,7 @@ void verifyBroadcast(const int *out, const int subGroupSize, int pattern = 0) std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (errors != 0) exit(1); } void verifyTransposeMatrix(const float *TransposeMatrix, const float* cpuTransposeMatrix, @@ -78,6 +79,7 @@ void verifyTransposeMatrix(const float *TransposeMatrix, const float* cpuTranspo std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (errors != 0) exit(1); } int main(int argc, char* argv[]) { diff --git a/src/slit-cuda/main.cu b/src/slit-cuda/main.cu index eaae0252e2..925795d321 100644 --- a/src/slit-cuda/main.cu +++ b/src/slit-cuda/main.cu @@ -139,6 +139,7 @@ int main(int argc, char** argv){ free(outputData_ref); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/slit-hip/main.cu b/src/slit-hip/main.cu index 1775e361e0..d289d9ddc6 100644 --- a/src/slit-hip/main.cu +++ b/src/slit-hip/main.cu @@ -139,6 +139,7 @@ int main(int argc, char** argv){ free(outputData_ref); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/slit-sycl/main.cpp b/src/slit-sycl/main.cpp index 86d24e6611..fa0fbe3827 100644 --- a/src/slit-sycl/main.cpp +++ b/src/slit-sycl/main.cpp @@ -162,6 +162,7 @@ int main(int argc, char** argv){ free(outputData_ref); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/snake-cuda/main.cu b/src/snake-cuda/main.cu index 03493e7c38..a655dd7d36 100644 --- a/src/snake-cuda/main.cu +++ b/src/snake-cuda/main.cu @@ -200,6 +200,7 @@ int main(int argc, const char * const argv[]) F_ErrorThreshold, elapsed_time / repeat, D_accepted, NumReads - D_accepted); } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(ReadSeq); free(RefSeq); diff --git a/src/snake-hip/main.cu b/src/snake-hip/main.cu index 52a1506532..d5170e6d27 100644 --- a/src/snake-hip/main.cu +++ b/src/snake-hip/main.cu @@ -200,6 +200,7 @@ int main(int argc, const char * const argv[]) F_ErrorThreshold, elapsed_time / repeat, D_accepted, NumReads - D_accepted); } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(ReadSeq); free(RefSeq); diff --git a/src/snake-omp/main.cpp b/src/snake-omp/main.cpp index 0f8b31d3b4..3454071904 100644 --- a/src/snake-omp/main.cpp +++ b/src/snake-omp/main.cpp @@ -210,6 +210,7 @@ int main(int argc, const char * const argv[]) F_ErrorThreshold, elapsed_time / repeat, D_accepted, NumReads - D_accepted); } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); } diff --git a/src/snake-sycl/main.cpp b/src/snake-sycl/main.cpp index b848eb6427..80d18ad9b0 100644 --- a/src/snake-sycl/main.cpp +++ b/src/snake-sycl/main.cpp @@ -209,6 +209,7 @@ int main(int argc, const char * const argv[]) F_ErrorThreshold, elapsed_time / repeat, D_accepted, NumReads - D_accepted); } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); free(ReadSeq); free(RefSeq); diff --git a/src/sobel-cuda/main.cu b/src/sobel-cuda/main.cu index 5eb477e6f9..ccb49035fe 100644 --- a/src/sobel-cuda/main.cu +++ b/src/sobel-cuda/main.cu @@ -18,6 +18,7 @@ #include "sobel.h" #include "SDKBitMap.h" #include "kernels.cu" +#include static bool compare(const float *refData, const float *data, const int length, const float epsilon = 1e-6f) @@ -164,6 +165,7 @@ int main(int argc, char * argv[]) printf("PASS\n"); else printf("FAIL\n"); + if (!(compare(outputReference, outputDevice, imageSize))) exit(1); free(outputDevice); free(outputReference); diff --git a/src/sobel-hip/main.cu b/src/sobel-hip/main.cu index 5561d9c746..d8bb45ce5a 100644 --- a/src/sobel-hip/main.cu +++ b/src/sobel-hip/main.cu @@ -18,6 +18,7 @@ #include "sobel.h" #include "SDKBitMap.h" #include "kernels.cu" +#include static bool compare(const float *refData, const float *data, const int length, const float epsilon = 1e-6f) @@ -164,6 +165,7 @@ int main(int argc, char * argv[]) printf("PASS\n"); else printf("FAIL\n"); + if (!(compare(outputReference, outputDevice, imageSize))) exit(1); free(outputDevice); free(outputReference); diff --git a/src/sobel-omp/main.cpp b/src/sobel-omp/main.cpp index b55ede5f86..729c3b624f 100644 --- a/src/sobel-omp/main.cpp +++ b/src/sobel-omp/main.cpp @@ -18,6 +18,7 @@ #include #include "sobel.h" #include "kernels.cpp" +#include static bool compare(const float *refData, const float *data, @@ -175,6 +176,7 @@ int main(int argc, char * argv[]) printf("PASS\n"); else printf("FAIL\n"); + if (!(compare(outputReference, outputDevice, imageSize))) exit(1); free(outputDevice); free(outputReference); diff --git a/src/sobel-sycl/main.cpp b/src/sobel-sycl/main.cpp index a9bbcae530..9eaa51d6e8 100644 --- a/src/sobel-sycl/main.cpp +++ b/src/sobel-sycl/main.cpp @@ -24,6 +24,7 @@ using float4 = sycl::float4; #include "SDKBitMap.h" #include "kernels.cpp" +#include void reference (uchar4 *verificationOutput, const uchar4 *inputImageData, @@ -185,6 +186,7 @@ int main(int argc, char * argv[]) printf("PASS\n"); else printf("FAIL\n"); + if (!(compare(outputReference, outputDevice, imageSize))) exit(1); free(outputDevice); free(outputReference); diff --git a/src/sobol-cuda/sobol.cu b/src/sobol-cuda/sobol.cu index 1ac12122c2..76c35e5b24 100644 --- a/src/sobol-cuda/sobol.cu +++ b/src/sobol-cuda/sobol.cu @@ -37,6 +37,7 @@ #include "sobol.h" #include "sobol_gold.h" #include "sobol_gpu.h" +#include #define L1ERROR_TOLERANCE (1e-6) @@ -184,6 +185,7 @@ int main(int argc, char *argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (l1error >= L1ERROR_TOLERANCE) exit(1); return 0; } diff --git a/src/sobol-hip/sobol.cu b/src/sobol-hip/sobol.cu index 62e2e5c2c0..98dbf893f7 100644 --- a/src/sobol-hip/sobol.cu +++ b/src/sobol-hip/sobol.cu @@ -37,6 +37,7 @@ #include "sobol.h" #include "sobol_gold.h" #include "sobol_gpu.h" +#include #define L1ERROR_TOLERANCE (1e-6) @@ -184,6 +185,7 @@ int main(int argc, char *argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (l1error >= L1ERROR_TOLERANCE) exit(1); return 0; } diff --git a/src/sobol-omp/sobol.cpp b/src/sobol-omp/sobol.cpp index 877d533cef..c1252eccca 100644 --- a/src/sobol-omp/sobol.cpp +++ b/src/sobol-omp/sobol.cpp @@ -37,6 +37,7 @@ #include "sobol.h" #include "sobol_gold.h" #include "sobol_gpu.h" +#include #define L1ERROR_TOLERANCE (1e-6) @@ -171,6 +172,7 @@ int main(int argc, char *argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (l1error >= L1ERROR_TOLERANCE) exit(1); return 0; } diff --git a/src/sobol-sycl/sobol.cpp b/src/sobol-sycl/sobol.cpp index 3d47393cf5..2600b19975 100644 --- a/src/sobol-sycl/sobol.cpp +++ b/src/sobol-sycl/sobol.cpp @@ -37,6 +37,7 @@ #include "sobol.h" #include "sobol_gold.h" #include "sobol_gpu.h" +#include #define L1ERROR_TOLERANCE (1e-6) @@ -186,6 +187,7 @@ int main(int argc, char *argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (l1error >= L1ERROR_TOLERANCE) exit(1); return 0; } diff --git a/src/softmax-cuda/main.cu b/src/softmax-cuda/main.cu index 5bb28c61d0..1abea59fce 100644 --- a/src/softmax-cuda/main.cu +++ b/src/softmax-cuda/main.cu @@ -144,6 +144,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(input); free(output_cpu); diff --git a/src/softmax-fused-cuda/main.cu b/src/softmax-fused-cuda/main.cu index 3771391a89..48e865b0ab 100644 --- a/src/softmax-fused-cuda/main.cu +++ b/src/softmax-fused-cuda/main.cu @@ -322,6 +322,7 @@ void fused_softmax(int batches, int attn_heads, int query_seq_len, } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); diff --git a/src/softmax-fused-hip/main.cu b/src/softmax-fused-hip/main.cu index 256e40fa30..c5e94b4432 100644 --- a/src/softmax-fused-hip/main.cu +++ b/src/softmax-fused-hip/main.cu @@ -322,6 +322,7 @@ void fused_softmax(int batches, int attn_heads, int query_seq_len, } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); diff --git a/src/softmax-fused-sycl/main.cpp b/src/softmax-fused-sycl/main.cpp index 18d54d7978..a4214a597a 100644 --- a/src/softmax-fused-sycl/main.cpp +++ b/src/softmax-fused-sycl/main.cpp @@ -336,6 +336,7 @@ void fused_softmax(int batches, int attn_heads, int query_seq_len, } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); q.wait(); auto start = std::chrono::steady_clock::now(); diff --git a/src/softmax-hip/main.cu b/src/softmax-hip/main.cu index 67b0969c3d..6c3389581f 100644 --- a/src/softmax-hip/main.cu +++ b/src/softmax-hip/main.cu @@ -155,6 +155,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(input); free(output_cpu); diff --git a/src/softmax-omp/main.cpp b/src/softmax-omp/main.cpp index 6c813ab25f..f4f6e0e861 100644 --- a/src/softmax-omp/main.cpp +++ b/src/softmax-omp/main.cpp @@ -81,6 +81,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(input); free(output_cpu); diff --git a/src/softmax-sycl/main.cpp b/src/softmax-sycl/main.cpp index 7d866d440b..d6e9dc8e6c 100644 --- a/src/softmax-sycl/main.cpp +++ b/src/softmax-sycl/main.cpp @@ -147,6 +147,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(input); free(output_cpu); diff --git a/src/sort-cuda/main.cu b/src/sort-cuda/main.cu index f72b53554b..5bec11f573 100644 --- a/src/sort-cuda/main.cu +++ b/src/sort-cuda/main.cu @@ -37,6 +37,7 @@ void verifySort(const T *keys, const size_t size) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!passed) exit(1); } int main(int argc, char** argv) diff --git a/src/sort-hip/main.cu b/src/sort-hip/main.cu index 7be3eb634a..918a99bd53 100644 --- a/src/sort-hip/main.cu +++ b/src/sort-hip/main.cu @@ -37,6 +37,7 @@ void verifySort(const T *keys, const size_t size) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!passed) exit(1); } int main(int argc, char** argv) diff --git a/src/sort-omp/main.cpp b/src/sort-omp/main.cpp index 9a6a0bec33..5d744a2988 100644 --- a/src/sort-omp/main.cpp +++ b/src/sort-omp/main.cpp @@ -36,6 +36,7 @@ void verifySort(const T *keys, const size_t size) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!passed) exit(1); } int main(int argc, char** argv) diff --git a/src/sort-sycl/main.cpp b/src/sort-sycl/main.cpp index c42bc8ce2f..8f25260db7 100644 --- a/src/sort-sycl/main.cpp +++ b/src/sort-sycl/main.cpp @@ -31,6 +31,7 @@ void verifySort(const T *keys, const size_t size) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; + if (!passed) exit(1); } int main(int argc, char** argv) diff --git a/src/sortKV-cuda/main.cu b/src/sortKV-cuda/main.cu index 91e4a5b077..1ebcc809e6 100644 --- a/src/sortKV-cuda/main.cu +++ b/src/sortKV-cuda/main.cu @@ -8,6 +8,7 @@ #include #include #include +#include template void sort_key_value (int n, int repeat, bool verify) { @@ -55,6 +56,7 @@ void sort_key_value (int n, int repeat, bool verify) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } } diff --git a/src/sortKV-hip/main.cu b/src/sortKV-hip/main.cu index 91e4a5b077..1ebcc809e6 100644 --- a/src/sortKV-hip/main.cu +++ b/src/sortKV-hip/main.cu @@ -8,6 +8,7 @@ #include #include #include +#include template void sort_key_value (int n, int repeat, bool verify) { @@ -55,6 +56,7 @@ void sort_key_value (int n, int repeat, bool verify) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } } diff --git a/src/sortKV-sycl/main.cpp b/src/sortKV-sycl/main.cpp index cdbd9deb6d..d947a808cf 100644 --- a/src/sortKV-sycl/main.cpp +++ b/src/sortKV-sycl/main.cpp @@ -8,6 +8,7 @@ #include // iota #include #include +#include template void sort_key_value (sycl::queue &q, int n, int repeat, bool verify) { @@ -50,6 +51,7 @@ void sort_key_value (sycl::queue &q, int n, int repeat, bool verify) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } } diff --git a/src/sosfil-cuda/main.cu b/src/sosfil-cuda/main.cu index 4db21c407b..c02096af1a 100644 --- a/src/sosfil-cuda/main.cu +++ b/src/sosfil-cuda/main.cu @@ -225,6 +225,7 @@ void filtering (const int repeat, bool ok = compare_results(x_ref, x, n_signals * n_samples, 1e-4, 1e-4); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaCheck(cudaDeviceSynchronize()); auto start = std::chrono::steady_clock::now(); diff --git a/src/sosfil-hip/main.cu b/src/sosfil-hip/main.cu index eb3044c62e..99bf8f94dc 100644 --- a/src/sosfil-hip/main.cu +++ b/src/sosfil-hip/main.cu @@ -225,6 +225,7 @@ void filtering (const int repeat, bool ok = compare_results(x_ref, x, n_signals * n_samples, 1e-4, 1e-4); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipCheck(hipDeviceSynchronize()); auto start = std::chrono::steady_clock::now(); diff --git a/src/sosfil-omp/main.cpp b/src/sosfil-omp/main.cpp index b6ef400ab9..ae9f184972 100644 --- a/src/sosfil-omp/main.cpp +++ b/src/sosfil-omp/main.cpp @@ -215,6 +215,7 @@ void filtering (const int repeat, const int n_signals, const int n_samples, bool ok = compare_results(x_ref, x_in, n_signals * n_samples, 1e-4, 1e-4); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/sosfil-sycl/main.cpp b/src/sosfil-sycl/main.cpp index 2b00a7421d..660ebe1a7e 100644 --- a/src/sosfil-sycl/main.cpp +++ b/src/sosfil-sycl/main.cpp @@ -213,6 +213,7 @@ void filtering (sycl::queue &q, const int repeat, bool ok = compare_results(x_ref, x, n_signals * n_samples, 1e-4, 1e-4); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); q.wait(); auto start = std::chrono::steady_clock::now(); diff --git a/src/split-cuda/main.cu b/src/split-cuda/main.cu index bca2617a8d..74fa5a529d 100644 --- a/src/split-cuda/main.cu +++ b/src/split-cuda/main.cu @@ -204,6 +204,7 @@ int main(int argc, char* argv[]) printf("PASS\n"); else printf("FAIL\n"); + if (!check) exit(1); free(keys); free(out); diff --git a/src/split-hip/main.cu b/src/split-hip/main.cu index b7dfcd0393..ed2a8f6e7c 100644 --- a/src/split-hip/main.cu +++ b/src/split-hip/main.cu @@ -204,6 +204,7 @@ int main(int argc, char* argv[]) printf("PASS\n"); else printf("FAIL\n"); + if (!check) exit(1); free(keys); free(out); diff --git a/src/split-omp/main.cpp b/src/split-omp/main.cpp index 6de51e7a44..22f83dccc0 100644 --- a/src/split-omp/main.cpp +++ b/src/split-omp/main.cpp @@ -190,6 +190,7 @@ int main(int argc, char** argv) { printf("PASS\n"); else printf("FAIL\n"); + if (!check) exit(1); free(keys); free(out); diff --git a/src/split-sycl/main.cpp b/src/split-sycl/main.cpp index f30bc47ba9..7a3c5d8cf6 100644 --- a/src/split-sycl/main.cpp +++ b/src/split-sycl/main.cpp @@ -216,6 +216,7 @@ int main(int argc, char** argv) { printf("PASS\n"); else printf("FAIL\n"); + if (!check) exit(1); free(keys); free(out); diff --git a/src/sptrsv-cuda/sptrsv_syncfree.cu b/src/sptrsv-cuda/sptrsv_syncfree.cu index 88e8a6a359..31741d874f 100644 --- a/src/sptrsv-cuda/sptrsv_syncfree.cu +++ b/src/sptrsv-cuda/sptrsv_syncfree.cu @@ -4,6 +4,7 @@ #include #include #include "sptrsv.h" +#include // reference // https://stackoverflow.com/questions/32341081/how-to-have-atomic-load-in-cuda @@ -227,6 +228,7 @@ int sptrsv_syncfree ( printf("|x-xref|/|xref| = %8.2e\n", res); printf("%s\n", (res < accuracy) ? "PASS" : "FAIL"); + if (!(res < accuracy)) exit(1); free(warp_num); cudaFree(d_csrRowPtr); diff --git a/src/sptrsv-hip/sptrsv_syncfree.cu b/src/sptrsv-hip/sptrsv_syncfree.cu index 56391344d1..04d9a27c20 100644 --- a/src/sptrsv-hip/sptrsv_syncfree.cu +++ b/src/sptrsv-hip/sptrsv_syncfree.cu @@ -4,6 +4,7 @@ #include #include #include "sptrsv.h" +#include // reference // https://stackoverflow.com/questions/32341081/how-to-have-atomic-load-in-cuda @@ -227,6 +228,7 @@ int sptrsv_syncfree ( printf("|x-xref|/|xref| = %8.2e\n", res); printf("%s\n", (res < accuracy) ? "PASS" : "FAIL"); + if (!(res < accuracy)) exit(1); free(warp_num); hipFree(d_csrRowPtr); diff --git a/src/sptrsv-omp/sptrsv_syncfree.cpp b/src/sptrsv-omp/sptrsv_syncfree.cpp index aa163b638f..317928e21d 100644 --- a/src/sptrsv-omp/sptrsv_syncfree.cpp +++ b/src/sptrsv-omp/sptrsv_syncfree.cpp @@ -4,6 +4,7 @@ #include #include #include "sptrsv.h" +#include #pragma omp declare target int atomicLoad(const int *addr) @@ -204,6 +205,7 @@ int sptrsv_syncfree ( printf("|x-xref|/|xref| = %8.2e\n", res); printf("%s\n", (res < accuracy) ? "PASS" : "FAIL"); + if (!(res < accuracy)) exit(1); free(get_value); free(warp_num); diff --git a/src/sptrsv-sycl/sptrsv_syncfree.cpp b/src/sptrsv-sycl/sptrsv_syncfree.cpp index db7ad15462..19acc842e7 100644 --- a/src/sptrsv-sycl/sptrsv_syncfree.cpp +++ b/src/sptrsv-sycl/sptrsv_syncfree.cpp @@ -4,6 +4,7 @@ #include #include #include "sptrsv.h" +#include int atomicLoad(const int *addr) { @@ -212,6 +213,7 @@ int sptrsv_syncfree ( printf("|x-xref|/|xref| = %8.2e\n", res); printf("%s\n", (res < accuracy) ? "PASS" : "FAIL"); + if (!(res < accuracy)) exit(1); free(warp_num); sycl::free(d_csrRowPtr, q); diff --git a/src/sssp-cuda/main.cu b/src/sssp-cuda/main.cu index 1820b7dd83..a5145a1bd1 100644 --- a/src/sssp-cuda/main.cu +++ b/src/sssp-cuda/main.cu @@ -41,6 +41,7 @@ #include "support/common.h" #include "support/timer.h" #include "support/verify.h" +#include // Params @@ -621,5 +622,6 @@ int main(int argc, char **argv) { timer.print("Host/Device Deallocation", 1); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/sssp-hip/main.cu b/src/sssp-hip/main.cu index 3a6b3a50e9..7d0e17ee37 100644 --- a/src/sssp-hip/main.cu +++ b/src/sssp-hip/main.cu @@ -41,6 +41,7 @@ #include "support/common.h" #include "support/timer.h" #include "support/verify.h" +#include // Params @@ -622,5 +623,6 @@ int main(int argc, char **argv) { timer.print("Host/Device Deallocation", 1); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/sssp-sycl/main.cpp b/src/sssp-sycl/main.cpp index af05ecfec6..dfe39a33d7 100644 --- a/src/sssp-sycl/main.cpp +++ b/src/sssp-sycl/main.cpp @@ -41,6 +41,7 @@ #include "support/common.h" #include "support/timer.h" #include "support/verify.h" +#include // Params struct Params { @@ -625,5 +626,6 @@ int main(int argc, char **argv) { timer.print("Host/Device Deallocation", 1); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/stddev-cuda/main.cu b/src/stddev-cuda/main.cu index 5ae9191005..247351cbf0 100644 --- a/src/stddev-cuda/main.cu +++ b/src/stddev-cuda/main.cu @@ -153,6 +153,7 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(std_ref); free(std); free(data); diff --git a/src/stddev-hip/main.cu b/src/stddev-hip/main.cu index 99f50d178e..285a0e2918 100644 --- a/src/stddev-hip/main.cu +++ b/src/stddev-hip/main.cu @@ -153,6 +153,7 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(std_ref); free(std); free(data); diff --git a/src/stddev-omp/main.cpp b/src/stddev-omp/main.cpp index 73939f0299..c5f8e382da 100644 --- a/src/stddev-omp/main.cpp +++ b/src/stddev-omp/main.cpp @@ -149,6 +149,7 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(std_ref); free(std); free(data); diff --git a/src/stddev-sycl/main.cpp b/src/stddev-sycl/main.cpp index 0be2cfb321..0fd6d3cd55 100644 --- a/src/stddev-sycl/main.cpp +++ b/src/stddev-sycl/main.cpp @@ -185,6 +185,7 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(std_ref); free(std); free(data); diff --git a/src/stencil1d-cuda/stencil_1d.cu b/src/stencil1d-cuda/stencil_1d.cu index 06a00dbd67..1514225b08 100644 --- a/src/stencil1d-cuda/stencil_1d.cu +++ b/src/stencil1d-cuda/stencil_1d.cu @@ -111,6 +111,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // Cleanup free(a); diff --git a/src/stencil1d-hip/stencil_1d.cu b/src/stencil1d-hip/stencil_1d.cu index 2dd4f10dee..dd99dc726c 100644 --- a/src/stencil1d-hip/stencil_1d.cu +++ b/src/stencil1d-hip/stencil_1d.cu @@ -111,6 +111,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // Cleanup free(a); diff --git a/src/stencil1d-omp/stencil_1d.cpp b/src/stencil1d-omp/stencil_1d.cpp index 46affbf339..bb0485f5b3 100644 --- a/src/stencil1d-omp/stencil_1d.cpp +++ b/src/stencil1d-omp/stencil_1d.cpp @@ -85,6 +85,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // Cleanup free(a); diff --git a/src/stencil1d-sycl/stencil_1d.cpp b/src/stencil1d-sycl/stencil_1d.cpp index 6b19689e83..2473c2f0b7 100644 --- a/src/stencil1d-sycl/stencil_1d.cpp +++ b/src/stencil1d-sycl/stencil_1d.cpp @@ -114,6 +114,7 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // Cleanup free(a); diff --git a/src/storeKVCache-cuda/main.cu b/src/storeKVCache-cuda/main.cu index c274641e58..c8dd725a9e 100644 --- a/src/storeKVCache-cuda/main.cu +++ b/src/storeKVCache-cuda/main.cu @@ -7,6 +7,7 @@ #include #include #include "kernels.h" +#include #define GPU_CHECK(call) \ { \ @@ -188,6 +189,7 @@ void store_kv_cache(int32_t repeat) (memcmp(r_v_cache, h_v_cache, elem_size * kvc_size) == 0); #endif printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); GPU_CHECK(cudaFree(k)); GPU_CHECK(cudaFree(v)); diff --git a/src/storeKVCache-hip/main.cu b/src/storeKVCache-hip/main.cu index 6779d2c61e..9fdf82fc6b 100644 --- a/src/storeKVCache-hip/main.cu +++ b/src/storeKVCache-hip/main.cu @@ -7,6 +7,7 @@ #include #include #include "kernels.h" +#include #define GPU_CHECK(call) \ { \ @@ -191,6 +192,7 @@ void store_kv_cache(int32_t repeat) (memcmp(r_v_cache, h_v_cache, elem_size * kvc_size) == 0); #endif printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); GPU_CHECK(hipFree(k)); GPU_CHECK(hipFree(v)); diff --git a/src/storeKVCache-omp/main.cpp b/src/storeKVCache-omp/main.cpp index 00ce54b596..b33b7c0e79 100644 --- a/src/storeKVCache-omp/main.cpp +++ b/src/storeKVCache-omp/main.cpp @@ -6,6 +6,7 @@ #include #include #include +#include template void store_kv_cache(int32_t repeat) @@ -127,6 +128,7 @@ void store_kv_cache(int32_t repeat) (memcmp(r_v_cache, h_v_cache, elem_size * kvc_size) == 0); #endif printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(h_k); free(h_v); diff --git a/src/storeKVCache-sycl/main.cpp b/src/storeKVCache-sycl/main.cpp index f1aa78dea5..f2a29bbbed 100644 --- a/src/storeKVCache-sycl/main.cpp +++ b/src/storeKVCache-sycl/main.cpp @@ -7,6 +7,7 @@ #include #include #include "kernels.h" +#include template void store_kv_cache(sycl::queue &q, int32_t repeat) try { uint32_t num_layers = 8; // H @@ -194,6 +195,7 @@ template void store_kv_cache(sycl::queue &q, int32_t repeat) try { (memcmp(r_v_cache, h_v_cache, elem_size * kvc_size) == 0); #endif printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(k, q); sycl::free(v, q); diff --git a/src/streamUM-cuda/reference.h b/src/streamUM-cuda/reference.h index faab1058c3..9e96e3a26c 100644 --- a/src/streamUM-cuda/reference.h +++ b/src/streamUM-cuda/reference.h @@ -45,4 +45,5 @@ void check(std::vector > &TaskList) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } diff --git a/src/surfel-cuda/main.cu b/src/surfel-cuda/main.cu index 8d024649c5..74124c033b 100644 --- a/src/surfel-cuda/main.cu +++ b/src/surfel-cuda/main.cu @@ -212,6 +212,7 @@ void surfelRenderTest(int n, int w, int h, int repeat) if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(r_dst); free(h_dst); diff --git a/src/surfel-hip/main.cu b/src/surfel-hip/main.cu index b38ae42841..c82b5687c3 100644 --- a/src/surfel-hip/main.cu +++ b/src/surfel-hip/main.cu @@ -212,6 +212,7 @@ void surfelRenderTest(int n, int w, int h, int repeat) if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(r_dst); free(h_dst); diff --git a/src/surfel-omp/main.cpp b/src/surfel-omp/main.cpp index 1451c878b2..e2a393d298 100644 --- a/src/surfel-omp/main.cpp +++ b/src/surfel-omp/main.cpp @@ -115,6 +115,7 @@ void surfelRenderTest(int n, int w, int h, int repeat) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(r_dst); free(h_dst); diff --git a/src/surfel-sycl/main.cpp b/src/surfel-sycl/main.cpp index f8a4997118..c6fec18884 100644 --- a/src/surfel-sycl/main.cpp +++ b/src/surfel-sycl/main.cpp @@ -229,6 +229,7 @@ void surfelRenderTest(sycl::queue &q, int n, int w, int h, int repeat) if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(r_dst); free(h_dst); diff --git a/src/svd3x3-cuda/main.cu b/src/svd3x3-cuda/main.cu index 2ab0d699e4..257ad7f37a 100644 --- a/src/svd3x3-cuda/main.cu +++ b/src/svd3x3-cuda/main.cu @@ -113,6 +113,7 @@ int main(int argc, char* argv[]) std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (!ok) exit(1); free(input); free(result); diff --git a/src/svd3x3-hip/main.cu b/src/svd3x3-hip/main.cu index 5752c2a8f3..25e7b30df1 100644 --- a/src/svd3x3-hip/main.cu +++ b/src/svd3x3-hip/main.cu @@ -113,6 +113,7 @@ int main(int argc, char* argv[]) std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (!ok) exit(1); free(input); free(result); diff --git a/src/svd3x3-omp/main.cpp b/src/svd3x3-omp/main.cpp index 40525a4a2e..e66b0b914f 100644 --- a/src/svd3x3-omp/main.cpp +++ b/src/svd3x3-omp/main.cpp @@ -112,6 +112,7 @@ int main(int argc, char* argv[]) std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (!ok) exit(1); free(input); free(result); diff --git a/src/svd3x3-sycl/main.cpp b/src/svd3x3-sycl/main.cpp index c29259fdda..d2712554fc 100644 --- a/src/svd3x3-sycl/main.cpp +++ b/src/svd3x3-sycl/main.cpp @@ -121,6 +121,7 @@ int main(int argc, char* argv[]) std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (!ok) exit(1); free(input); free(result); diff --git a/src/tensorAccessor-cuda/main.cu b/src/tensorAccessor-cuda/main.cu index 63cf2dcc91..04d3d2b6fa 100644 --- a/src/tensorAccessor-cuda/main.cu +++ b/src/tensorAccessor-cuda/main.cu @@ -149,6 +149,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(m); free(v); diff --git a/src/tensorAccessor-hip/main.cu b/src/tensorAccessor-hip/main.cu index a6d701cced..406f28f101 100644 --- a/src/tensorAccessor-hip/main.cu +++ b/src/tensorAccessor-hip/main.cu @@ -149,6 +149,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(m); free(v); diff --git a/src/tensorAccessor-sycl/main.cpp b/src/tensorAccessor-sycl/main.cpp index 009e5bc7fa..b929bdff2a 100644 --- a/src/tensorAccessor-sycl/main.cpp +++ b/src/tensorAccessor-sycl/main.cpp @@ -171,6 +171,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(m); free(v); diff --git a/src/tensorT-cuda/main.cu b/src/tensorT-cuda/main.cu index 7230446547..6b2b4ca7dc 100644 --- a/src/tensorT-cuda/main.cu +++ b/src/tensorT-cuda/main.cu @@ -32,6 +32,7 @@ void verify(double *input, double *output) { } } if (!error) printf("PASS\n"); + if (error) exit(1); } __global__ void tensor_transpose( diff --git a/src/tensorT-hip/main.cu b/src/tensorT-hip/main.cu index 2215f83cb4..0c131f3598 100644 --- a/src/tensorT-hip/main.cu +++ b/src/tensorT-hip/main.cu @@ -32,6 +32,7 @@ void verify(double *input, double *output) { } } if (!error) printf("PASS\n"); + if (error) exit(1); } __global__ void tensor_transpose( diff --git a/src/tensorT-omp/main.cpp b/src/tensorT-omp/main.cpp index b6e99d00a7..c78f3c7878 100644 --- a/src/tensorT-omp/main.cpp +++ b/src/tensorT-omp/main.cpp @@ -32,6 +32,7 @@ void verify(double *input, double *output) { } } if (!error) printf("PASS\n"); + if (error) exit(1); } int main(int argc, char **argv) { diff --git a/src/tensorT-sycl/main.cpp b/src/tensorT-sycl/main.cpp index 497b1ce89c..83a52c138c 100644 --- a/src/tensorT-sycl/main.cpp +++ b/src/tensorT-sycl/main.cpp @@ -32,6 +32,7 @@ void verify(double *input, double *output) { } } if (!error) printf("PASS\n"); + if (error) exit(1); } int main(int argc, char **argv) { diff --git a/src/threadcpy-cuda/main.cu b/src/threadcpy-cuda/main.cu index 07e92a417a..6f7a801005 100644 --- a/src/threadcpy-cuda/main.cu +++ b/src/threadcpy-cuda/main.cu @@ -2,6 +2,7 @@ #include #include #include +#include #define GPU_CHECK(x) do { \ cudaError_t err = x; \ @@ -59,6 +60,7 @@ void test_threads_copy(size_t n, int repeat) { int s = memcmp(out_h, in_h, sizeof(scalar_t) * n); std::cout << (s ? "FAIL" : "PASS") << std::endl; + if (s) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/threadcpy-hip/main.cu b/src/threadcpy-hip/main.cu index 250ad1f79b..c4bae3727c 100644 --- a/src/threadcpy-hip/main.cu +++ b/src/threadcpy-hip/main.cu @@ -2,6 +2,7 @@ #include #include #include +#include #define GPU_CHECK(x) do { \ hipError_t err = x; \ @@ -59,6 +60,7 @@ void test_threads_copy(size_t n, int repeat) { int s = memcmp(out_h, in_h, sizeof(scalar_t) * n); std::cout << (s ? "FAIL" : "PASS") << std::endl; + if (s) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/threadcpy-omp/main.cpp b/src/threadcpy-omp/main.cpp index d6404c085a..349aa7cdb6 100644 --- a/src/threadcpy-omp/main.cpp +++ b/src/threadcpy-omp/main.cpp @@ -2,6 +2,7 @@ #include #include #include +#include template struct alignas(sizeof(T) * VEC_SIZE) data_t { @@ -60,6 +61,7 @@ void test_threads_copy(size_t n, int repeat) { int s = memcmp(out, in, sizeof(scalar_t) * n); std::cout << (s ? "FAIL" : "PASS") << std::endl; + if (s) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/threadcpy-sycl/main.cpp b/src/threadcpy-sycl/main.cpp index c5284db221..e7f9eb39ab 100644 --- a/src/threadcpy-sycl/main.cpp +++ b/src/threadcpy-sycl/main.cpp @@ -2,6 +2,7 @@ #include #include #include +#include template struct alignas(sizeof(T) * VEC_SIZE) data_t { @@ -58,6 +59,7 @@ void test_threads_copy(sycl::queue &q, size_t n, int repeat) try { int s = memcmp(out_h, in_h, sizeof(scalar_t) * n); std::cout << (s ? "FAIL" : "PASS") << std::endl; + if (s) exit(1); auto start = std::chrono::steady_clock::now(); diff --git a/src/threadfence-cuda/main.cu b/src/threadfence-cuda/main.cu index 6699684169..5bb249eda2 100644 --- a/src/threadfence-cuda/main.cu +++ b/src/threadfence-cuda/main.cu @@ -135,5 +135,6 @@ int main(int argc, char** argv) { cudaFree(d_count); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/threadfence-hip/main.cu b/src/threadfence-hip/main.cu index 844c6f3d35..f252326019 100644 --- a/src/threadfence-hip/main.cu +++ b/src/threadfence-hip/main.cu @@ -134,5 +134,6 @@ int main(int argc, char** argv) { hipFree(d_count); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/threadfence-omp/main.cpp b/src/threadfence-omp/main.cpp index 929d0a9856..cd54cbb32c 100644 --- a/src/threadfence-omp/main.cpp +++ b/src/threadfence-omp/main.cpp @@ -142,5 +142,6 @@ int main(int argc, char** argv) { free(h_result); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/threadfence-sycl/main.cpp b/src/threadfence-sycl/main.cpp index 9f3cede4a9..9272b4da76 100644 --- a/src/threadfence-sycl/main.cpp +++ b/src/threadfence-sycl/main.cpp @@ -160,5 +160,6 @@ int main(int argc, char** argv) { sycl::free(d_count, q); printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/tissue-cuda/main.cu b/src/tissue-cuda/main.cu index 1ebb1617cb..0a260f7c10 100644 --- a/src/tissue-cuda/main.cu +++ b/src/tissue-cuda/main.cu @@ -167,6 +167,7 @@ int main(int argc, char** argv) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // timing kernel execution auto start = std::chrono::steady_clock::now(); diff --git a/src/tissue-hip/main.cu b/src/tissue-hip/main.cu index bea193ebab..307937a17c 100644 --- a/src/tissue-hip/main.cu +++ b/src/tissue-hip/main.cu @@ -167,6 +167,7 @@ int main(int argc, char** argv) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // timing kernel execution auto start = std::chrono::steady_clock::now(); diff --git a/src/tissue-omp/main.cpp b/src/tissue-omp/main.cpp index b24dfaaf90..f64dc2ab65 100644 --- a/src/tissue-omp/main.cpp +++ b/src/tissue-omp/main.cpp @@ -126,6 +126,7 @@ int main(int argc, char** argv) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // timing kernel execution auto start = std::chrono::steady_clock::now(); diff --git a/src/tissue-sycl/main.cpp b/src/tissue-sycl/main.cpp index ef93dcaf6a..af430dac93 100644 --- a/src/tissue-sycl/main.cpp +++ b/src/tissue-sycl/main.cpp @@ -176,6 +176,7 @@ int main(int argc, char** argv) { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); // timing kernel execution auto start = std::chrono::steady_clock::now(); diff --git a/src/topk-cuda/main.cu b/src/topk-cuda/main.cu index 9e233a5d18..26d273cf84 100644 --- a/src/topk-cuda/main.cu +++ b/src/topk-cuda/main.cu @@ -5,6 +5,7 @@ #include #include #include "topk_per_row_kernels.h" +#include __device__ __forceinline__ uint32_t xorshift32(uint32_t& state) { state ^= state << 13; @@ -139,6 +140,7 @@ int32_t main(int32_t argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); GPU_CHECK(cudaFree(d_x)); GPU_CHECK(cudaFree(d_topk_ids)); diff --git a/src/topk-hip/main.cu b/src/topk-hip/main.cu index 9b76148d00..230bf7bf33 100644 --- a/src/topk-hip/main.cu +++ b/src/topk-hip/main.cu @@ -5,6 +5,7 @@ #include #include #include "topk_per_row_kernels.h" +#include __device__ __forceinline__ uint32_t xorshift32(uint32_t& state) { state ^= state << 13; @@ -138,6 +139,7 @@ int32_t main(int32_t argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); GPU_CHECK(hipFree(d_x)); GPU_CHECK(hipFree(d_topk_ids)); diff --git a/src/topk-sycl/main.cpp b/src/topk-sycl/main.cpp index e5692693bb..aff44cf707 100644 --- a/src/topk-sycl/main.cpp +++ b/src/topk-sycl/main.cpp @@ -4,6 +4,7 @@ #include #include #include "topk_per_row_kernels.h" +#include inline uint32_t xorshift32(uint32_t &state) { state ^= state << 13; @@ -149,6 +150,7 @@ int32_t main(int32_t argc, char *argv[]) try { } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_x, q); sycl::free(d_topk_ids, q); diff --git a/src/triad-cuda/triad.cu b/src/triad-cuda/triad.cu index f6d681bf1f..81c9919d9f 100644 --- a/src/triad-cuda/triad.cu +++ b/src/triad-cuda/triad.cu @@ -5,6 +5,7 @@ #include "OptionParser.h" #include "Timer.h" #include "Utility.h" +#include // **************************************************************************** // Function: addBenchmarkSpecOptions @@ -255,6 +256,7 @@ void RunBenchmark(OptionParser &op) cout << "PASS\n"; else cout << "FAIL\n"; + if (!ok) exit(1); // Zero out the test host memory for (int j=0; j // **************************************************************************** // Function: addBenchmarkSpecOptions @@ -252,6 +253,7 @@ void RunBenchmark(OptionParser &op) cout << "PASS\n"; else cout << "FAIL\n"; + if (!ok) exit(1); // Zero out the test host memory for (int j=0; j // **************************************************************************** // Function: addBenchmarkSpecOptions @@ -221,6 +222,7 @@ void RunBenchmark(OptionParser &op) std::cout << "PASS\n"; else std::cout << "FAIL\n"; + if (!ok) exit(1); // Zero out the test host memory for (int j=0; j #include "kernels.h" #include "reference.h" +#include template void init_p(T *p_real, T *p_imag, int width, int height) { @@ -107,6 +108,7 @@ void tsa(int width, int height, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); delete[] p_real; delete[] p_imag; diff --git a/src/tsa-hip/main.cu b/src/tsa-hip/main.cu index 57e6b26999..7c1d15d294 100644 --- a/src/tsa-hip/main.cu +++ b/src/tsa-hip/main.cu @@ -7,6 +7,7 @@ #include #include "kernels.h" #include "reference.h" +#include template void init_p(T *p_real, T *p_imag, int width, int height) { @@ -108,6 +109,7 @@ void tsa(int width, int height, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); delete[] p_real; delete[] p_imag; diff --git a/src/tsa-omp/main.cpp b/src/tsa-omp/main.cpp index 370754746a..de59dac1f7 100644 --- a/src/tsa-omp/main.cpp +++ b/src/tsa-omp/main.cpp @@ -6,6 +6,7 @@ #include #include "kernels.h" #include "reference.h" +#include template static void init_p(T *p_real, T *p_imag, int width, int height) { @@ -108,6 +109,7 @@ void tsa(int width, int height, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); delete[] d_real[0]; delete[] d_imag[0]; diff --git a/src/tsa-sycl/main.cpp b/src/tsa-sycl/main.cpp index 538fed9e8b..81afc38352 100644 --- a/src/tsa-sycl/main.cpp +++ b/src/tsa-sycl/main.cpp @@ -6,6 +6,7 @@ #include #include "kernels.h" #include "reference.h" +#include template void init_p(T *p_real, T *p_imag, int width, int height) { @@ -125,6 +126,7 @@ void tsa(sycl::queue &q, int width, int height, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); delete[] p_real; delete[] p_imag; diff --git a/src/tsp-cuda/main.cu b/src/tsp-cuda/main.cu index bbe3a72cb2..29518f0b92 100644 --- a/src/tsp-cuda/main.cu +++ b/src/tsp-cuda/main.cu @@ -372,6 +372,7 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); + if (best < 38000 && best < 35002) exit(1); cudaFree(glob_d); cudaFree(best_d); diff --git a/src/tsp-hip/main.cu b/src/tsp-hip/main.cu index 1ea3925515..807f984daf 100644 --- a/src/tsp-hip/main.cu +++ b/src/tsp-hip/main.cu @@ -372,6 +372,7 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); + if (best < 38000 && best < 35002) exit(1); hipFree(glob_d); hipFree(best_d); diff --git a/src/tsp-omp/main.cpp b/src/tsp-omp/main.cpp index c90140be86..44a7acba67 100644 --- a/src/tsp-omp/main.cpp +++ b/src/tsp-omp/main.cpp @@ -374,6 +374,7 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); + if (best[0] < 38000 && best[0] < 35002) exit(1); } diff --git a/src/tsp-sycl/main.cpp b/src/tsp-sycl/main.cpp index fabca8e6d7..9e1dc4cde0 100644 --- a/src/tsp-sycl/main.cpp +++ b/src/tsp-sycl/main.cpp @@ -393,6 +393,7 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); + if (best < 38000 && best < 35002) exit(1); sycl::free(glob_d, q); sycl::free(best_d, q); diff --git a/src/unfold-cuda/main.cu b/src/unfold-cuda/main.cu index 4e17b5e20f..08ade9dac1 100644 --- a/src/unfold-cuda/main.cu +++ b/src/unfold-cuda/main.cu @@ -140,6 +140,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_grad_in); cudaFree(d_grad_out); diff --git a/src/unfold-hip/main.cu b/src/unfold-hip/main.cu index 2517e93ade..edfde77b07 100644 --- a/src/unfold-hip/main.cu +++ b/src/unfold-hip/main.cu @@ -140,6 +140,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_grad_in); hipFree(d_grad_out); diff --git a/src/unfold-sycl/main.cpp b/src/unfold-sycl/main.cpp index 12c8392bd7..76e74920f7 100644 --- a/src/unfold-sycl/main.cpp +++ b/src/unfold-sycl/main.cpp @@ -154,6 +154,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_grad_in, q); sycl::free(d_grad_out, q); diff --git a/src/urng-cuda/main.cu b/src/urng-cuda/main.cu index 2029a0fd5b..859a605575 100644 --- a/src/urng-cuda/main.cu +++ b/src/urng-cuda/main.cu @@ -129,6 +129,7 @@ int main(int argc, char** argv) else { std::cout << "FAIL\n" << std::endl; + exit(1); } #ifdef DUMP diff --git a/src/urng-hip/main.cu b/src/urng-hip/main.cu index b954abe7eb..0531c04430 100644 --- a/src/urng-hip/main.cu +++ b/src/urng-hip/main.cu @@ -129,6 +129,7 @@ int main(int argc, char** argv) else { std::cout << "FAIL\n" << std::endl; + exit(1); } #ifdef DUMP diff --git a/src/urng-omp/main.cpp b/src/urng-omp/main.cpp index 54a3f3d6f8..ba34ccbbfe 100644 --- a/src/urng-omp/main.cpp +++ b/src/urng-omp/main.cpp @@ -141,6 +141,7 @@ int main(int argc, char** argv) else { std::cout << "FAIL" << std::endl; + exit(1); } #ifdef DUMP diff --git a/src/urng-sycl/main.cpp b/src/urng-sycl/main.cpp index 9cc0150fb6..e8fd39e8f3 100644 --- a/src/urng-sycl/main.cpp +++ b/src/urng-sycl/main.cpp @@ -144,6 +144,7 @@ int main(int argc, char** argv) else { std::cout << "FAIL" << std::endl; + exit(1); } #ifdef DUMP diff --git a/src/vanGenuchten-cuda/main.cu b/src/vanGenuchten-cuda/main.cu index f40a91d555..3b4e958612 100644 --- a/src/vanGenuchten-cuda/main.cu +++ b/src/vanGenuchten-cuda/main.cu @@ -124,6 +124,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_Ksat); cudaFree(d_psi); diff --git a/src/vanGenuchten-hip/main.cu b/src/vanGenuchten-hip/main.cu index 4fc0acb219..64c56daab4 100644 --- a/src/vanGenuchten-hip/main.cu +++ b/src/vanGenuchten-hip/main.cu @@ -124,6 +124,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_Ksat); hipFree(d_psi); diff --git a/src/vanGenuchten-omp/main.cpp b/src/vanGenuchten-omp/main.cpp index 210389d38b..ca78579a5d 100644 --- a/src/vanGenuchten-omp/main.cpp +++ b/src/vanGenuchten-omp/main.cpp @@ -106,6 +106,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); delete[] Ksat; delete[] psi; diff --git a/src/vanGenuchten-sycl/main.cpp b/src/vanGenuchten-sycl/main.cpp index 7be51f2c9f..8095c784c9 100644 --- a/src/vanGenuchten-sycl/main.cpp +++ b/src/vanGenuchten-sycl/main.cpp @@ -140,6 +140,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_Ksat, q); sycl::free(d_psi, q); diff --git a/src/vol2col-cuda/main.cu b/src/vol2col-cuda/main.cu index 571ea50c02..0da312d4d6 100644 --- a/src/vol2col-cuda/main.cu +++ b/src/vol2col-cuda/main.cu @@ -236,6 +236,7 @@ void eval ( int error = memcmp(h_data_col_ref, h_data_col, col_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); cudaDeviceSynchronize(); start = std::chrono::steady_clock::now(); @@ -278,6 +279,7 @@ void eval ( } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); cudaFree(d_data_vol); cudaFree(d_data_col); diff --git a/src/vol2col-hip/main.cu b/src/vol2col-hip/main.cu index 1d4f50d7b4..a450c61b8d 100644 --- a/src/vol2col-hip/main.cu +++ b/src/vol2col-hip/main.cu @@ -236,6 +236,7 @@ void eval ( int error = memcmp(h_data_col_ref, h_data_col, col_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); hipDeviceSynchronize(); start = std::chrono::steady_clock::now(); @@ -278,6 +279,7 @@ void eval ( } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); hipFree(d_data_vol); hipFree(d_data_col); diff --git a/src/vol2col-omp/main.cpp b/src/vol2col-omp/main.cpp index c897d48ca2..ac1060a195 100644 --- a/src/vol2col-omp/main.cpp +++ b/src/vol2col-omp/main.cpp @@ -219,6 +219,7 @@ void eval ( int error = memcmp(data_col_ref, data_col, col_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); start = std::chrono::steady_clock::now(); @@ -258,6 +259,7 @@ void eval ( } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); } free(data_vol); diff --git a/src/vol2col-sycl/main.cpp b/src/vol2col-sycl/main.cpp index 13004f65aa..176f4523fe 100644 --- a/src/vol2col-sycl/main.cpp +++ b/src/vol2col-sycl/main.cpp @@ -256,6 +256,7 @@ void eval ( int error = memcmp(h_data_col_ref, h_data_col, col_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); start = std::chrono::steady_clock::now(); @@ -303,6 +304,7 @@ void eval ( } } printf("%s\n", error ? "FAIL" : "PASS"); + if (error) exit(1); sycl::free(d_data_vol, q); sycl::free(d_data_col, q); diff --git a/src/warpexchange-cuda/main.cu b/src/warpexchange-cuda/main.cu index 0f0aa5781e..7287526ced 100644 --- a/src/warpexchange-cuda/main.cu +++ b/src/warpexchange-cuda/main.cu @@ -125,6 +125,7 @@ int main(int argc, char* argv[]) } stop: printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } cudaFree(d_A); diff --git a/src/warpexchange-hip/main.cu b/src/warpexchange-hip/main.cu index 3656e92a71..dba7907155 100644 --- a/src/warpexchange-hip/main.cu +++ b/src/warpexchange-hip/main.cu @@ -125,6 +125,7 @@ int main(int argc, char* argv[]) } stop: printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } hipFree(d_A); diff --git a/src/warpexchange-sycl/main.cpp b/src/warpexchange-sycl/main.cpp index fcb171ca7f..f126d72ffa 100644 --- a/src/warpexchange-sycl/main.cpp +++ b/src/warpexchange-sycl/main.cpp @@ -146,6 +146,7 @@ int main(int argc, char* argv[]) } stop: printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); } sycl::free(d_A, q); diff --git a/src/warpsort-cuda/main.cpp b/src/warpsort-cuda/main.cpp index 23e365c501..8f0624130a 100644 --- a/src/warpsort-cuda/main.cpp +++ b/src/warpsort-cuda/main.cpp @@ -6,6 +6,7 @@ #include #include #include +#include namespace facebook { namespace cuda { @@ -180,12 +181,15 @@ int main(int argc, char** argv) { bool ok; ok = test_sort(repeat); printf("test_sort: %s\n\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); ok = test_sortInRegisters(repeat); printf("test_sortInRegisters: %s\n\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); ok = test_sortIndicesInRegisters(repeat); printf("test_sortIndicesInRegisters: %s\n\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/warpsort-hip/main.cpp b/src/warpsort-hip/main.cpp index 23e365c501..8f0624130a 100644 --- a/src/warpsort-hip/main.cpp +++ b/src/warpsort-hip/main.cpp @@ -6,6 +6,7 @@ #include #include #include +#include namespace facebook { namespace cuda { @@ -180,12 +181,15 @@ int main(int argc, char** argv) { bool ok; ok = test_sort(repeat); printf("test_sort: %s\n\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); ok = test_sortInRegisters(repeat); printf("test_sortInRegisters: %s\n\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); ok = test_sortIndicesInRegisters(repeat); printf("test_sortIndicesInRegisters: %s\n\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/warpsort-sycl/main.cpp b/src/warpsort-sycl/main.cpp index 657a3cc22f..028b787298 100644 --- a/src/warpsort-sycl/main.cpp +++ b/src/warpsort-sycl/main.cpp @@ -7,6 +7,7 @@ #include #include #include +#include namespace facebook { namespace cuda { @@ -186,12 +187,15 @@ int main(int argc, char** argv) { bool ok; ok = test_sort(q, repeat); printf("test_sort: %s\n\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); ok = test_sortInRegisters(q, repeat); printf("test_sortInRegisters: %s\n\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); ok = test_sortIndicesInRegisters(q, repeat); printf("test_sortIndicesInRegisters: %s\n\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); return 0; } diff --git a/src/wedford-cuda/main.cu b/src/wedford-cuda/main.cu index c6f5ad550d..74e5b3b6b6 100644 --- a/src/wedford-cuda/main.cu +++ b/src/wedford-cuda/main.cu @@ -173,6 +173,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_input); cudaFree(d_mean); diff --git a/src/wedford-hip/main.cu b/src/wedford-hip/main.cu index 12f04707a7..5a4277ad5d 100644 --- a/src/wedford-hip/main.cu +++ b/src/wedford-hip/main.cu @@ -173,6 +173,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_input); hipFree(d_mean); diff --git a/src/wedford-omp/main.cpp b/src/wedford-omp/main.cpp index 0092fd318b..0ab00b9cd5 100644 --- a/src/wedford-omp/main.cpp +++ b/src/wedford-omp/main.cpp @@ -134,6 +134,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(input); free(mean); diff --git a/src/wedford-sycl/main.cpp b/src/wedford-sycl/main.cpp index a92035b4b4..5331391802 100644 --- a/src/wedford-sycl/main.cpp +++ b/src/wedford-sycl/main.cpp @@ -203,6 +203,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_input, q); sycl::free(d_mean, q); diff --git a/src/winograd-cuda/main.cu b/src/winograd-cuda/main.cu index 62179a39b4..c6b1863423 100644 --- a/src/winograd-cuda/main.cu +++ b/src/winograd-cuda/main.cu @@ -1,6 +1,7 @@ #include #include #include "utils.h" +#include __global__ void winograd_conv2d( const DATA_TYPE *__restrict__ input, @@ -178,6 +179,7 @@ int main(int argc, char* argv[]) { } // sweep printf("%s\n", pass ? "PASS" : "FAIL"); + if (!pass) exit(1); cudaFree(d_A); cudaFree(d_B); diff --git a/src/winograd-hip/main.cu b/src/winograd-hip/main.cu index 668d089611..42d6bc4222 100644 --- a/src/winograd-hip/main.cu +++ b/src/winograd-hip/main.cu @@ -1,6 +1,7 @@ #include #include #include "utils.h" +#include __global__ void winograd_conv2d( const DATA_TYPE *__restrict__ input, @@ -178,6 +179,7 @@ int main(int argc, char* argv[]) { } // sweep printf("%s\n", pass ? "PASS" : "FAIL"); + if (!pass) exit(1); hipFree(d_A); hipFree(d_B); diff --git a/src/winograd-omp/main.cpp b/src/winograd-omp/main.cpp index b5b9d318cd..b6ffd5f10c 100644 --- a/src/winograd-omp/main.cpp +++ b/src/winograd-omp/main.cpp @@ -1,6 +1,7 @@ #include #include #include "utils.h" +#include int main(int argc, char* argv[]) { @@ -170,6 +171,7 @@ int main(int argc, char* argv[]) { } // #pragma printf("%s\n", pass ? "PASS" : "FAIL"); + if (!pass) exit(1); free(A); free(B); diff --git a/src/winograd-sycl/main.cpp b/src/winograd-sycl/main.cpp index 01b2a59251..c325960193 100644 --- a/src/winograd-sycl/main.cpp +++ b/src/winograd-sycl/main.cpp @@ -1,6 +1,7 @@ #include #include #include "utils.h" +#include int main(int argc, char* argv[]) { @@ -178,6 +179,7 @@ int main(int argc, char* argv[]) { } // sweep printf("%s\n", pass ? "PASS" : "FAIL"); + if (!pass) exit(1); sycl::free(d_A, q); sycl::free(d_B, q); diff --git a/src/wmma-cuda/reference.h b/src/wmma-cuda/reference.h index afe2a4453f..e9cda2e722 100644 --- a/src/wmma-cuda/reference.h +++ b/src/wmma-cuda/reference.h @@ -18,6 +18,7 @@ void compareEqual(T const *a, T const *b, uint32_t size, if (max_relative_error != max_relative_error || max_relative_error > eps * tolerance) { std::cout << "FAILED\n"; + exit(1); } else { std::cout << "PASSED\n"; } diff --git a/src/wmma-hip/reference.h b/src/wmma-hip/reference.h index afe2a4453f..e9cda2e722 100644 --- a/src/wmma-hip/reference.h +++ b/src/wmma-hip/reference.h @@ -18,6 +18,7 @@ void compareEqual(T const *a, T const *b, uint32_t size, if (max_relative_error != max_relative_error || max_relative_error > eps * tolerance) { std::cout << "FAILED\n"; + exit(1); } else { std::cout << "PASSED\n"; } diff --git a/src/wmma-sycl/reference.h b/src/wmma-sycl/reference.h index de3a3173c1..4401f86653 100644 --- a/src/wmma-sycl/reference.h +++ b/src/wmma-sycl/reference.h @@ -18,6 +18,7 @@ void compareEqual(T const *a, T const *b, uint32_t size, if (max_relative_error != max_relative_error || max_relative_error > eps * tolerance) { std::cout << "FAILED\n"; + exit(1); } else { std::cout << "PASSED\n"; } diff --git a/src/wordcount-sycl/main.cpp b/src/wordcount-sycl/main.cpp index 5cdba1ed01..fe40143417 100644 --- a/src/wordcount-sycl/main.cpp +++ b/src/wordcount-sycl/main.cpp @@ -2,6 +2,7 @@ #include #include #include +#include int word_count(const std::vector &input); int word_count_reference(const std::vector &input); @@ -51,6 +52,7 @@ int main(int argc, char* argv[]) } } std::cout << (ok ? "PASS" : "FAIL") << std::endl; + if (!ok) exit(1); // may take a few seconds to initialize const size_t len = 1024*1024*256; diff --git a/src/wyllie-cuda/main.cu b/src/wyllie-cuda/main.cu index 4c9de5dee9..3faf77173d 100644 --- a/src/wyllie-cuda/main.cu +++ b/src/wyllie-cuda/main.cu @@ -102,6 +102,7 @@ int main(int argc, char* argv[]) { #endif printf("%s\n", (h_res == d_res) ? "PASS" : "FAIL"); + if (!(h_res == d_res)) exit(1); return 0; } diff --git a/src/wyllie-hip/main.cu b/src/wyllie-hip/main.cu index 1a65af6803..1ab620b8f3 100644 --- a/src/wyllie-hip/main.cu +++ b/src/wyllie-hip/main.cu @@ -102,6 +102,7 @@ int main(int argc, char* argv[]) { #endif printf("%s\n", (h_res == d_res) ? "PASS" : "FAIL"); + if (!(h_res == d_res)) exit(1); return 0; } diff --git a/src/wyllie-omp/main.cpp b/src/wyllie-omp/main.cpp index e78f47e2ba..05296ac87b 100644 --- a/src/wyllie-omp/main.cpp +++ b/src/wyllie-omp/main.cpp @@ -96,6 +96,7 @@ int main(int argc, char* argv[]) { #endif printf("%s\n", (h_res == d_res) ? "PASS" : "FAIL"); + if (!(h_res == d_res)) exit(1); return 0; } diff --git a/src/wyllie-sycl/main.cpp b/src/wyllie-sycl/main.cpp index 47afa1f815..affc74a655 100644 --- a/src/wyllie-sycl/main.cpp +++ b/src/wyllie-sycl/main.cpp @@ -104,6 +104,7 @@ int main(int argc, char* argv[]) { #endif printf("%s\n", (h_res == d_res) ? "PASS" : "FAIL"); + if (!(h_res == d_res)) exit(1); return 0; } diff --git a/src/zerocopy-cuda/main.cu b/src/zerocopy-cuda/main.cu index 93b411284d..84e8821977 100644 --- a/src/zerocopy-cuda/main.cu +++ b/src/zerocopy-cuda/main.cu @@ -163,6 +163,7 @@ void eval (bool warmup, bool bPinGenericMemory, const int repeat) { refNorm = (float)sqrt((double)refNorm); printf("%s\n", (errorNorm / refNorm < 1.e-6f) ? "SUCCESS" : "FAILURE"); + if (!(errorNorm / refNorm < 1.e-6f)) exit(1); } // Memory clean up diff --git a/src/zerocopy-hip/main.cu b/src/zerocopy-hip/main.cu index bddb8559d0..ebb2ef0138 100644 --- a/src/zerocopy-hip/main.cu +++ b/src/zerocopy-hip/main.cu @@ -163,6 +163,7 @@ void eval (bool warmup, bool bPinGenericMemory, const int repeat) { refNorm = (float)sqrt((double)refNorm); printf("%s\n", (errorNorm / refNorm < 1.e-6f) ? "SUCCESS" : "FAILURE"); + if (!(errorNorm / refNorm < 1.e-6f)) exit(1); } // Memory clean up diff --git a/src/zerocopy-sycl/main.cpp b/src/zerocopy-sycl/main.cpp index bb762b7de4..7bccf2097b 100644 --- a/src/zerocopy-sycl/main.cpp +++ b/src/zerocopy-sycl/main.cpp @@ -140,6 +140,7 @@ void eval(sycl::queue &q, bool warmup, bool bGenericSharedMemory, const int repe refNorm = (float)sqrt((double)refNorm); printf("%s\n", (errorNorm / refNorm < 1.e-6f) ? "SUCCESS" : "FAILURE"); + if (!(errorNorm / refNorm < 1.e-6f)) exit(1); } // Memory clean up diff --git a/src/zeropoint-cuda/main.cu b/src/zeropoint-cuda/main.cu index a87ece2a77..6499d26907 100644 --- a/src/zeropoint-cuda/main.cu +++ b/src/zeropoint-cuda/main.cu @@ -164,6 +164,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); cudaFree(d_zp); cudaFree(d_scale); diff --git a/src/zeropoint-hip/main.cu b/src/zeropoint-hip/main.cu index 19db9a354c..422343fe94 100644 --- a/src/zeropoint-hip/main.cu +++ b/src/zeropoint-hip/main.cu @@ -164,6 +164,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); hipFree(d_zp); hipFree(d_scale); diff --git a/src/zeropoint-omp/main.cpp b/src/zeropoint-omp/main.cpp index 2e7aab3644..916224c6f3 100644 --- a/src/zeropoint-omp/main.cpp +++ b/src/zeropoint-omp/main.cpp @@ -145,6 +145,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); free(zp); free(scale); diff --git a/src/zeropoint-sycl/main.cpp b/src/zeropoint-sycl/main.cpp index 393441e69c..9048a27a15 100644 --- a/src/zeropoint-sycl/main.cpp +++ b/src/zeropoint-sycl/main.cpp @@ -173,6 +173,7 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); + if (!ok) exit(1); sycl::free(d_zp, q); sycl::free(d_scale, q); From e9c63af0b2488205d111510c3239cf823f66878e Mon Sep 17 00:00:00 2001 From: Paulius Velesko Date: Sat, 7 Mar 2026 17:01:38 +0200 Subject: [PATCH 2/6] Move exit(1) to after memory deallocation Relocates the failure exit from immediately after the PASS/FAIL print to just before `return 0;`, ensuring host and device memory are properly released before the process exits. Changes `exit(1)` to `return 1` in 596 files where free/cudaFree/hipFree/sycl::free calls follow the verification output. --- src/accuracy-cuda/main.cu | 1 + src/accuracy-hip/main.cu | 1 + src/accuracy-omp/main.cpp | 2 +- src/accuracy-sycl/main.cpp | 2 +- src/ace-cuda/main.cu | 2 +- src/ace-hip/main.cu | 2 +- src/ace-omp/main.cpp | 2 +- src/ace-sycl/main.cpp | 2 +- src/adam-cuda/main.cu | 2 +- src/adam-hip/main.cu | 2 +- src/adam-omp/main.cpp | 2 +- src/adam-sycl/main.cpp | 2 +- src/adamw-cuda/main.cu | 2 +- src/adamw-hip/main.cu | 2 +- src/adamw-omp/main.cpp | 2 +- src/adamw-sycl/main.cpp | 2 +- src/adjacent-cuda/main.cu | 4 ++-- src/adjacent-hip/main.cu | 4 ++-- src/adjacent-omp/main.cpp | 4 ++-- src/adjacent-sycl/main.cpp | 4 ++-- src/aidw-cuda/main.cu | 4 ++-- src/aidw-hip/main.cu | 4 ++-- src/aidw-sycl/main.cpp | 4 ++-- src/asta-cuda/main.cu | 2 +- src/asta-hip/main.cu | 2 +- src/asta-omp/main.cpp | 2 +- src/asta-sycl/main.cpp | 2 +- src/atomicAggregate-cuda/main.cu | 2 +- src/atomicAggregate-hip/main.cu | 2 +- src/atomicAggregate-sycl/main.cpp | 2 +- src/atomicCAS-cuda/main.cu | 2 +- src/atomicCAS-hip/main.cu | 2 +- src/atomicCAS-sycl/main.cpp | 2 +- src/atomicCost-cuda/main.cu | 2 +- src/atomicCost-hip/main.cu | 2 +- src/atomicCost-omp/main.cpp | 2 +- src/atomicCost-sycl/main.cpp | 2 +- src/atomicPerf-cuda/main.cu | 12 ++++++------ src/atomicPerf-hip/main.cu | 12 ++++++------ src/atomicPerf-omp/main.cpp | 12 ++++++------ src/atomicPerf-sycl/main.cpp | 12 ++++++------ src/attention-cuda/main.cu | 2 +- src/attention-hip/main.cu | 2 +- src/attention-omp/main.cpp | 2 +- src/attention-paged-cuda/main.cu | 2 +- src/attention-paged-hip/main.cu | 2 +- src/attention-paged-sycl/main.cpp | 2 +- src/attention-sycl/main.cpp | 2 +- src/attentionMultiHead-cuda/main.cu | 2 +- src/attentionMultiHead-hip/main.cu | 2 +- src/attentionMultiHead-sycl/main.cpp | 2 +- src/axpby-cuda/main.cu | 2 +- src/axpby-hip/main.cu | 2 +- src/axpby-sycl/main.cpp | 2 +- src/background-subtract-cuda/main.cu | 2 +- src/background-subtract-hip/main.cu | 2 +- src/background-subtract-omp/main.cpp | 2 +- src/background-subtract-sycl/main.cpp | 2 +- src/backprop-cuda/main.cu | 2 +- src/backprop-hip/main.cu | 2 +- src/backprop-omp/main.cpp | 2 +- src/backprop-sycl/main.cpp | 2 +- src/bezier-surface-cuda/main.cu | 2 +- src/bezier-surface-hip/main.cu | 2 +- src/bezier-surface-omp/main.cpp | 2 +- src/bezier-surface-sycl/main.cpp | 2 +- src/bilateral-cuda/main.cu | 2 +- src/bilateral-hip/main.cu | 2 +- src/bilateral-omp/main.cpp | 2 +- src/bilateral-sycl/main.cpp | 2 +- src/bitonic-sort-cuda/main.cu | 2 +- src/bitonic-sort-hip/main.cu | 2 +- src/bitonic-sort-omp/main.cpp | 2 +- src/bitonic-sort-sycl/main.cpp | 2 +- src/blas-dot-cuda/main.cu | 2 +- src/blas-dot-hip/main.cu | 2 +- src/blas-dot-sycl/main.cpp | 2 +- src/blas-gemm-cuda/main.cu | 2 +- src/blas-gemm-hip/main.cu | 2 +- src/blas-gemm-sycl/main.cpp | 2 +- src/blockAccess-cuda/main.cu | 2 +- src/blockAccess-hip/main.cu | 2 +- src/blockAccess-sycl/main.cpp | 2 +- src/blockScan-cuda/main.cu | 4 ++-- src/blockScan-hip/main.cu | 4 ++-- src/blockScan-sycl/main.cpp | 4 ++-- src/blockexchange-cuda/main.cu | 2 +- src/blockexchange-hip/main.cu | 2 +- src/blockexchange-sycl/main.cpp | 2 +- src/boxfilter-cuda/main.cu | 2 +- src/boxfilter-hip/main.cu | 2 +- src/boxfilter-omp/main.cpp | 2 +- src/boxfilter-sycl/main.cpp | 2 +- src/bscan-cuda/main.cu | 2 +- src/bscan-hip/main-wave64.cu | 2 +- src/bscan-hip/main.cu | 2 +- src/bscan-sycl/main-wave64.cpp | 2 +- src/bscan-sycl/main.cpp | 2 +- src/bspline-vgh-cuda/main.cu | 2 +- src/bspline-vgh-hip/main.cu | 2 +- src/bspline-vgh-omp/main.cpp | 2 +- src/bspline-vgh-sycl/main.cpp | 2 +- src/burger-cuda/main.cu | 2 +- src/burger-hip/main.cu | 2 +- src/burger-omp/main.cpp | 2 +- src/burger-sycl/main.cpp | 2 +- src/cbsfil-cuda/main.cu | 2 +- src/cbsfil-hip/main.cu | 2 +- src/cbsfil-omp/main.cpp | 2 +- src/cbsfil-sycl/main.cpp | 2 +- src/cc-cuda/main.cu | 2 +- src/cc-sycl/main.cpp | 2 +- src/ccsd-trpdrv-cuda/main.cu | 2 +- src/ccsd-trpdrv-omp/main.cpp | 2 +- src/ccsd-trpdrv-sycl/main.cpp | 2 +- src/chacha20-cuda/main.cu | 2 +- src/chacha20-hip/main.cu | 2 +- src/chacha20-omp/main.cpp | 2 +- src/chacha20-sycl/main.cpp | 2 +- src/chi2-cuda/chi2.cu | 2 +- src/chi2-hip/chi2.cu | 2 +- src/chi2-omp/chi2.cpp | 2 +- src/chi2-sycl/chi2.cpp | 2 +- src/cmembench-cuda/main.cu | 2 +- src/cmembench-hip/main.cu | 2 +- src/columnarSolver-cuda/main.cu | 2 +- src/columnarSolver-hip/main.cu | 2 +- src/columnarSolver-omp/main.cpp | 2 +- src/columnarSolver-sycl/main.cpp | 2 +- src/complex-cuda/main.cu | 2 +- src/complex-hip/main.cu | 2 +- src/complex-omp/main.cpp | 2 +- src/complex-sycl/main.cpp | 2 +- src/concurrentKernels-cuda/main.cu | 2 +- src/concurrentKernels-hip/main.cu | 2 +- src/concurrentKernels-sycl/main.cpp | 2 +- src/convolution1D-cuda/main.cu | 2 +- src/convolution1D-hip/main.cu | 2 +- src/convolution1D-omp/main.cpp | 2 +- src/convolution1D-sycl/main.cpp | 2 +- src/convolution3D-cuda/main.cu | 2 +- src/convolution3D-hip/main.cu | 2 +- src/convolution3D-omp/main.cpp | 2 +- src/convolution3D-sycl/main.cpp | 2 +- src/cooling-cuda/main.cu | 2 +- src/cooling-hip/main.cu | 2 +- src/cooling-omp/main.cpp | 2 +- src/cooling-sycl/main.cpp | 2 +- src/cross-cuda/main.cu | 2 +- src/cross-hip/main.cu | 2 +- src/cross-omp/main.cpp | 2 +- src/cross-sycl/main.cpp | 2 +- src/dct8x8-cuda/main.cu | 2 +- src/dct8x8-hip/main.cu | 2 +- src/dct8x8-omp/main.cpp | 2 +- src/dct8x8-sycl/main.cpp | 2 +- src/degrid-cuda/main.cu | 2 +- src/degrid-hip/main.cu | 2 +- src/degrid-omp/main.cpp | 2 +- src/degrid-sycl/main.cpp | 2 +- src/dense-embedding-cuda/main.cu | 2 +- src/dense-embedding-hip/main.cu | 2 +- src/dense-embedding-omp/main.cpp | 2 +- src/dense-embedding-sycl/main.cpp | 2 +- src/dp-cuda/main.cu | 6 +++--- src/dp-hip/main.cu | 6 +++--- src/dp-omp/main.cpp | 2 +- src/dp-sycl/main.cpp | 6 +++--- src/dp4a-cuda/main.cu | 4 ++-- src/dp4a-hip/main.cu | 4 ++-- src/dp4a-sycl/main.cpp | 4 ++-- src/ecdh-cuda/main.cu | 2 +- src/ecdh-hip/main.cu | 2 +- src/ecdh-omp/main.cpp | 2 +- src/ecdh-sycl/main.cpp | 2 +- src/entropy-cuda/main.cu | 2 +- src/entropy-hip/main.cu | 2 +- src/entropy-omp/main.cpp | 2 +- src/entropy-sycl/main.cpp | 2 +- src/epistasis-cuda/main.cu | 2 +- src/epistasis-hip/main.cu | 2 +- src/epistasis-sycl/main.cpp | 2 +- src/f16max-cuda/main.cu | 4 ++-- src/f16max-hip/main.cu | 4 ++-- src/f16max-sycl/main.cpp | 4 ++-- src/f8cast-cuda/main.cu | 2 +- src/f8cast-hip/main.cu | 2 +- src/f8cast-sycl/main.cpp | 2 +- src/fft-cuda/main.cu | 4 ++-- src/fft-hip/main.cu | 4 ++-- src/fft-omp/main.cpp | 4 ++-- src/fft-sycl/main.cpp | 4 ++-- src/filter-cuda/main.cu | 4 ++-- src/filter-hip/main.cu | 4 ++-- src/filter-sycl/main.cpp | 4 ++-- src/flip-cuda/main.cu | 2 +- src/flip-hip/main.cu | 2 +- src/flip-omp/main.cpp | 2 +- src/flip-sycl/main.cpp | 2 +- src/fma-cuda/main.cu | 2 +- src/fma-hip/main.cu | 2 +- src/fma-sycl/main.cpp | 2 +- src/fpc-cuda/main.cu | 2 +- src/fpc-hip/main.cu | 2 +- src/fpc-omp/main.cpp | 2 +- src/fpc-sycl/main.cpp | 2 +- src/fresnel-cuda/main.cu | 2 +- src/fresnel-hip/main.cu | 2 +- src/fresnel-omp/main.cpp | 2 +- src/fresnel-sycl/main.cpp | 2 +- src/fsm-cuda/main.cu | 2 +- src/fsm-hip/main.cu | 2 +- src/fsm-sycl/main.cpp | 2 +- src/ga-cuda/main.cu | 2 +- src/ga-hip/main.cu | 2 +- src/ga-sycl/main.cpp | 2 +- src/gaussian-cuda/gaussianElim.cu | 2 +- src/gaussian-hip/gaussianElim.cu | 2 +- src/gaussian-omp/gaussianElim.cpp | 2 +- src/gaussian-sycl/gaussianElim.cpp | 2 +- src/gc-cuda/main.cu | 2 +- src/gc-hip/main.cu | 2 +- src/gc-omp/main.cpp | 2 +- src/gc-sycl/main.cpp | 2 +- src/geam-cuda/main.cu | 4 ++-- src/geam-hip/main.cu | 4 ++-- src/geam-sycl/main.cpp | 2 +- src/geglu-cuda/main.cu | 2 +- src/geglu-hip/main.cu | 2 +- src/geglu-omp/main.cpp | 2 +- src/geglu-sycl/main.cpp | 2 +- src/gelu-cuda/main.cu | 4 ++-- src/gelu-hip/main.cu | 4 ++-- src/gelu-sycl/main.cpp | 4 ++-- src/glu-cuda/main.cu | 2 +- src/glu-hip/main.cu | 2 +- src/glu-omp/main.cpp | 2 +- src/glu-sycl/main.cpp | 2 +- src/goulash-cuda/main.cu | 2 +- src/goulash-hip/main.cu | 2 +- src/goulash-omp/main.cpp | 2 +- src/goulash-sycl/main.cpp | 2 +- src/hadamard-cuda/main.cu | 2 +- src/hadamard-hip/main.cu | 2 +- src/hadamard-sycl/main.cpp | 2 +- src/hausdorff-cuda/main.cu | 2 +- src/hausdorff-hip/main.cu | 2 +- src/hausdorff-omp/main.cpp | 2 +- src/hausdorff-sycl/main.cpp | 2 +- src/heat2d-cuda/main.cu | 2 +- src/heat2d-hip/main.cu | 2 +- src/heat2d-omp/main.cpp | 2 +- src/heat2d-sycl/main.cpp | 2 +- src/histogram-cuda/histogram_compare.cu | 2 +- src/histogram-hip/histogram_compare.cu | 2 +- src/histogram-omp/histogram_compare_base.cpp | 2 +- src/histogram-sycl/histogram_compare_base.cpp | 2 +- src/hybridsort-cuda/hybridsort.cu | 2 +- src/hybridsort-hip/hybridsort.cu | 2 +- src/hybridsort-omp/hybridsort.c | 2 +- src/hybridsort-sycl/hybridsort.c | 2 +- src/interval-cuda/main.cu | 2 +- src/interval-hip/main.cu | 2 +- src/interval-omp/main.cpp | 2 +- src/interval-sycl/main.cpp | 2 +- src/is-cuda/main.cu | 2 +- src/is-hip/main.cu | 2 +- src/is-sycl/main.cpp | 2 +- src/ising-cuda/main.cu | 2 +- src/ising-hip/main.cu | 2 +- src/ising-omp/main.cpp | 2 +- src/ising-sycl/main.cpp | 2 +- src/jenkins-hash-cuda/main.cu | 2 +- src/jenkins-hash-hip/main.cu | 2 +- src/jenkins-hash-omp/main.cpp | 2 +- src/jenkins-hash-sycl/main.cpp | 2 +- src/keogh-cuda/main.cu | 2 +- src/keogh-hip/main.cu | 2 +- src/keogh-omp/main.cpp | 2 +- src/keogh-sycl/main.cpp | 2 +- src/laplace-cuda/main.cu | 2 +- src/laplace-hip/main.cu | 2 +- src/laplace-omp/main.cpp | 2 +- src/laplace-sycl/main.cpp | 2 +- src/laplace3d-cuda/main.cu | 2 +- src/laplace3d-hip/main.cu | 2 +- src/laplace3d-omp/main.cpp | 2 +- src/laplace3d-sycl/main.cpp | 2 +- src/layout-cuda/main.cu | 4 ++-- src/layout-hip/main.cu | 4 ++-- src/layout-omp/main.cpp | 4 ++-- src/layout-sycl/main.cpp | 4 ++-- src/lebesgue-cuda/main.cpp | 18 +++++++++--------- src/lebesgue-sycl/main.cpp | 18 +++++++++--------- src/lfib4-cuda/main.cu | 2 +- src/lfib4-hip/main.cu | 2 +- src/lfib4-sycl/main.cpp | 2 +- src/lif-cuda/main.cu | 2 +- src/lif-hip/main.cu | 2 +- src/lif-omp/main.cpp | 2 +- src/lif-sycl/main.cpp | 2 +- src/linearprobing-omp/main.cpp | 2 +- src/logprob-cuda/main.cu | 2 +- src/logprob-hip/main.cu | 2 +- src/logprob-sycl/main.cpp | 2 +- src/lombscargle-cuda/main.cu | 2 +- src/lombscargle-hip/main.cu | 2 +- src/lombscargle-omp/main.cpp | 2 +- src/lombscargle-sycl/main.cpp | 2 +- src/marchingCubes-cuda/main.cu | 2 +- src/marchingCubes-hip/main.cu | 2 +- src/marchingCubes-sycl/main.cpp | 2 +- src/mask-cuda/main.cu | 2 +- src/mask-hip/main.cu | 2 +- src/mask-omp/main.cpp | 2 +- src/mask-sycl/main.cpp | 2 +- src/matern-cuda/main.cu | 2 +- src/matern-hip/main.cu | 2 +- src/matern-omp/main.cpp | 2 +- src/matern-sycl/main.cpp | 2 +- src/matrix-rotate-cuda/main.cu | 2 +- src/matrix-rotate-hip/main.cu | 2 +- src/matrix-rotate-omp/main.cpp | 2 +- src/matrix-rotate-sycl/main.cpp | 2 +- src/matrixT-cuda/main.cu | 2 +- src/matrixT-hip/main.cu | 2 +- src/matrixT-sycl/main.cpp | 2 +- src/mdh-cuda/main.cu | 2 +- src/mdh-hip/main.cu | 2 +- src/mdh-omp/main.cpp | 2 +- src/mdh-sycl/main.cpp | 2 +- src/meanshift-cuda/main.cu | 4 ++-- src/meanshift-hip/main.cu | 4 ++-- src/meanshift-omp/main.cpp | 4 ++-- src/meanshift-sycl/main.cpp | 4 ++-- src/miniWeather-cuda/main.cu | 2 +- src/miniWeather-hip/main.cu | 2 +- src/miniWeather-sycl/main.cpp | 2 +- src/minisweep-cuda/main.cu | 2 +- src/minisweep-hip/main.cu | 2 +- src/minisweep-omp/main.cpp | 2 +- src/minisweep-sycl/main.cpp | 2 +- src/mixbench-cuda/main.cu | 2 +- src/mixbench-hip/main.cu | 2 +- src/mixbench-omp/main.cpp | 2 +- src/moe-align-cuda/main.cu | 2 +- src/moe-align-hip/main.cu | 2 +- src/moe-align-sycl/main.cpp | 2 +- src/moe-cuda/main.cu | 2 +- src/moe-hip/main.cu | 2 +- src/moe-sum-cuda/main.cu | 2 +- src/moe-sum-hip/main.cu | 2 +- src/moe-sum-sycl/main.cpp | 2 +- src/moe-sycl/main.cpp | 2 +- src/morphology-cuda/main.cu | 2 +- src/morphology-hip/main.cu | 2 +- src/morphology-omp/main.cpp | 2 +- src/morphology-sycl/main.cpp | 2 +- src/mr-cuda/main.cu | 2 +- src/mr-hip/main.cu | 2 +- src/mr-omp/main.cpp | 2 +- src/mr-sycl/main.cpp | 2 +- src/mrc-cuda/main.cu | 2 +- src/mrc-hip/main.cu | 2 +- src/mrc-omp/main.cpp | 2 +- src/mrc-sycl/main.cpp | 2 +- src/multinomial-cuda/main.cu | 2 +- src/multinomial-hip/main.cu | 2 +- src/multinomial-sycl/main.cpp | 2 +- src/murmurhash3-cuda/murmurhash3.cu | 2 +- src/murmurhash3-hip/murmurhash3.cu | 2 +- src/murmurhash3-omp/murmurhash3.cpp | 2 +- src/murmurhash3-sycl/murmurhash3.cpp | 2 +- src/nlll-cuda/main.cu | 2 +- src/nlll-hip/main.cu | 2 +- src/nlll-omp/main.cpp | 2 +- src/nlll-sycl/main.cpp | 2 +- src/nqueen-cuda/main.cu | 2 +- src/nqueen-hip/main.cu | 2 +- src/nqueen-omp/main.cpp | 2 +- src/nqueen-sycl/main.cpp | 2 +- src/nw-cuda/nw.cu | 2 +- src/nw-hip/nw.cu | 2 +- src/nw-omp/nw.cpp | 2 +- src/nw-sycl/nw.cpp | 2 +- src/openmp-cuda/main.cu | 2 +- src/openmp-hip/main.cu | 2 +- src/openmp-omp/main.cpp | 2 +- src/openmp-sycl/main.cpp | 2 +- src/overlay-cuda/main.cu | 2 +- src/overlay-hip/main.cu | 2 +- src/overlay-omp/main.cpp | 2 +- src/overlay-sycl/main.cpp | 2 +- src/page-rank-cuda/main.cu | 2 +- src/page-rank-hip/main.cu | 2 +- src/page-rank-omp/main.cpp | 2 +- src/page-rank-sycl/main.cpp | 2 +- src/particle-diffusion-cuda/motionsim.cu | 2 +- src/particle-diffusion-hip/motionsim.cu | 2 +- src/particle-diffusion-omp/motionsim.cpp | 2 +- src/particle-diffusion-sycl/motionsim.cpp | 2 +- src/perplexity-cuda/main.cu | 2 +- src/perplexity-hip/main.cu | 2 +- src/perplexity-sycl/main.cpp | 2 +- src/pnpoly-cuda/main.cu | 2 +- src/pnpoly-hip/main.cu | 2 +- src/pnpoly-omp/main.cpp | 2 +- src/pnpoly-sycl/main.cpp | 2 +- src/pool-cuda/main.cu | 2 +- src/pool-hip/main.cu | 2 +- src/pool-omp/main.cpp | 2 +- src/pool-sycl/main.cpp | 2 +- src/prefetch-cuda/main.cu | 2 +- src/prefetch-hip/main.cu | 2 +- src/prefetch-sycl/main.cpp | 2 +- src/pso-cuda/main.cpp | 2 +- src/qem-cuda/main.cu | 4 ++-- src/qem-sycl/main.cpp | 4 ++-- src/qrg-cuda/main.cu | 2 +- src/qrg-hip/main.cu | 2 +- src/qrg-omp/main.cpp | 2 +- src/qrg-sycl/main.cpp | 2 +- src/quant3MatMul-cuda/main.cu | 4 ++-- src/quant3MatMul-hip/main.cu | 4 ++-- src/quant3MatMul-sycl/main.cpp | 4 ++-- src/quantBnB-cuda/main.cu | 2 +- src/quantBnB-hip/main.cu | 2 +- src/quantBnB-omp/main.cpp | 2 +- src/quantBnB-sycl/main.cpp | 2 +- src/rainflow-cuda/main.cu | 2 +- src/rainflow-hip/main.cu | 2 +- src/rainflow-omp/main.cpp | 2 +- src/rainflow-sycl/main.cpp | 2 +- src/relu-cuda/main.cu | 8 ++++---- src/relu-hip/main.cu | 8 ++++---- src/relu-sycl/main.cpp | 8 ++++---- src/reverse-cuda/main.cu | 2 +- src/reverse-hip/main.cu | 2 +- src/reverse-sycl/main.cpp | 2 +- src/rfs-cuda/main.cu | 4 ++-- src/rfs-hip/main.cu | 4 ++-- src/rfs-omp/main.cpp | 4 ++-- src/rfs-sycl/main.cpp | 4 ++-- src/ring-cuda/main.cu | 2 +- src/ring-hip/main.cu | 2 +- src/ring-sycl/main.cpp | 2 +- src/rle-cuda/main.cu | 6 +++--- src/rle-hip/main.cu | 6 +++--- src/rng-wallace-cuda/main.cu | 2 +- src/rng-wallace-hip/main.cu | 2 +- src/rng-wallace-omp/main.cpp | 2 +- src/rng-wallace-sycl/main.cpp | 2 +- src/romberg-cuda/main.cu | 2 +- src/romberg-hip/main.cu | 2 +- src/romberg-omp/main.cpp | 2 +- src/romberg-sycl/main.cpp | 2 +- src/rtm8-cuda/rtm8.cu | 2 +- src/rtm8-hip/rtm8.cu | 2 +- src/rtm8-omp/rtm8.cpp | 2 +- src/rtm8-sycl/rtm8.cpp | 2 +- src/s8n-cuda/main.cu | 2 +- src/s8n-hip/main.cu | 2 +- src/s8n-omp/main.cpp | 2 +- src/s8n-sycl/main.cpp | 2 +- src/scan-cuda/main.cu | 2 +- src/scan-hip/main.cu | 2 +- src/scan-sycl/main.cpp | 2 +- src/scan2-cuda/main.cu | 2 +- src/scan2-hip/main.cu | 2 +- src/scan2-omp/main.cpp | 2 +- src/scan2-sycl/main.cpp | 2 +- src/scan3-cuda/main.cu | 4 ++-- src/scan3-hip/main.cu | 4 ++-- src/scan3-sycl/main.cpp | 2 +- src/scatter-cuda/main.cu | 2 +- src/scatter-hip/main.cu | 2 +- src/scatter-sycl/main.cpp | 2 +- src/scatterAdd-cuda/main.cu | 2 +- src/scatterAdd-hip/main.cu | 2 +- src/scatterAdd-omp/main.cpp | 2 +- src/scatterAdd-sycl/main.cpp | 2 +- src/scatterThrust-cuda/main.cu | 2 +- src/scatterThrust-hip/main.cu | 2 +- src/scatterThrust-sycl/main.cpp | 2 +- src/scel-cuda/main.cu | 2 +- src/scel-hip/main.cu | 2 +- src/scel-omp/main.cpp | 2 +- src/scel-sycl/main.cpp | 2 +- src/score-cuda/main.cu | 2 +- src/score-hip/main.cu | 2 +- src/score-sycl/main.cpp | 2 +- src/shuffle-cuda/main.cu | 4 ++-- src/shuffle-hip/main.cu | 4 ++-- src/shuffle-sycl/main.cpp | 4 ++-- src/snake-cuda/main.cu | 2 +- src/snake-hip/main.cu | 2 +- src/snake-omp/main.cpp | 2 +- src/snake-sycl/main.cpp | 2 +- src/softmax-cuda/main.cu | 2 +- src/softmax-fused-cuda/main.cu | 2 +- src/softmax-fused-hip/main.cu | 2 +- src/softmax-fused-sycl/main.cpp | 2 +- src/softmax-hip/main.cu | 2 +- src/softmax-omp/main.cpp | 2 +- src/softmax-sycl/main.cpp | 2 +- src/sort-cuda/main.cu | 2 +- src/sort-hip/main.cu | 2 +- src/sort-omp/main.cpp | 2 +- src/sort-sycl/main.cpp | 2 +- src/sosfil-cuda/main.cu | 2 +- src/sosfil-hip/main.cu | 2 +- src/sosfil-omp/main.cpp | 2 +- src/sosfil-sycl/main.cpp | 2 +- src/split-cuda/main.cu | 2 +- src/split-hip/main.cu | 2 +- src/split-omp/main.cpp | 2 +- src/split-sycl/main.cpp | 2 +- src/sptrsv-cuda/sptrsv_syncfree.cu | 2 +- src/sptrsv-hip/sptrsv_syncfree.cu | 2 +- src/sptrsv-omp/sptrsv_syncfree.cpp | 2 +- src/sptrsv-sycl/sptrsv_syncfree.cpp | 2 +- src/stddev-cuda/main.cu | 2 +- src/stddev-hip/main.cu | 2 +- src/stddev-omp/main.cpp | 2 +- src/stddev-sycl/main.cpp | 2 +- src/stencil1d-cuda/stencil_1d.cu | 2 +- src/stencil1d-hip/stencil_1d.cu | 2 +- src/stencil1d-omp/stencil_1d.cpp | 2 +- src/stencil1d-sycl/stencil_1d.cpp | 2 +- src/surfel-cuda/main.cu | 2 +- src/surfel-hip/main.cu | 2 +- src/surfel-omp/main.cpp | 2 +- src/surfel-sycl/main.cpp | 2 +- src/svd3x3-cuda/main.cu | 2 +- src/svd3x3-hip/main.cu | 2 +- src/svd3x3-omp/main.cpp | 2 +- src/svd3x3-sycl/main.cpp | 2 +- src/tensorAccessor-cuda/main.cu | 2 +- src/tensorAccessor-hip/main.cu | 2 +- src/tensorAccessor-sycl/main.cpp | 2 +- src/tensorT-cuda/main.cu | 2 +- src/tensorT-hip/main.cu | 2 +- src/tensorT-omp/main.cpp | 2 +- src/tensorT-sycl/main.cpp | 2 +- src/threadcpy-cuda/main.cu | 2 +- src/threadcpy-hip/main.cu | 2 +- src/threadcpy-omp/main.cpp | 2 +- src/threadcpy-sycl/main.cpp | 2 +- src/tissue-cuda/main.cu | 2 +- src/tissue-hip/main.cu | 2 +- src/tissue-omp/main.cpp | 2 +- src/tissue-sycl/main.cpp | 2 +- src/topk-cuda/main.cu | 2 +- src/topk-hip/main.cu | 2 +- src/topk-sycl/main.cpp | 2 +- src/tsa-cuda/main.cu | 2 +- src/tsa-hip/main.cu | 2 +- src/tsa-omp/main.cpp | 2 +- src/tsa-sycl/main.cpp | 2 +- src/tsp-cuda/main.cu | 2 +- src/tsp-hip/main.cu | 2 +- src/tsp-omp/main.cpp | 2 +- src/tsp-sycl/main.cpp | 2 +- src/unfold-cuda/main.cu | 2 +- src/unfold-hip/main.cu | 2 +- src/unfold-sycl/main.cpp | 2 +- src/vanGenuchten-cuda/main.cu | 2 +- src/vanGenuchten-hip/main.cu | 2 +- src/vanGenuchten-omp/main.cpp | 2 +- src/vanGenuchten-sycl/main.cpp | 2 +- src/vol2col-cuda/main.cu | 4 ++-- src/vol2col-hip/main.cu | 4 ++-- src/vol2col-omp/main.cpp | 4 ++-- src/vol2col-sycl/main.cpp | 4 ++-- src/warpexchange-cuda/main.cu | 2 +- src/warpexchange-hip/main.cu | 2 +- src/warpexchange-sycl/main.cpp | 2 +- src/wedford-cuda/main.cu | 2 +- src/wedford-hip/main.cu | 2 +- src/wedford-omp/main.cpp | 2 +- src/wedford-sycl/main.cpp | 2 +- src/winograd-cuda/main.cu | 2 +- src/winograd-hip/main.cu | 2 +- src/winograd-omp/main.cpp | 2 +- src/winograd-sycl/main.cpp | 2 +- src/zerocopy-cuda/main.cu | 2 +- src/zerocopy-hip/main.cu | 2 +- src/zerocopy-sycl/main.cpp | 2 +- src/zeropoint-cuda/main.cu | 2 +- src/zeropoint-hip/main.cu | 2 +- src/zeropoint-omp/main.cpp | 2 +- src/zeropoint-sycl/main.cpp | 2 +- 592 files changed, 701 insertions(+), 699 deletions(-) diff --git a/src/accuracy-cuda/main.cu b/src/accuracy-cuda/main.cu index 3565d70cc8..db28968de8 100644 --- a/src/accuracy-cuda/main.cu +++ b/src/accuracy-cuda/main.cu @@ -199,5 +199,6 @@ int main(int argc, char* argv[]) free(label); free(data); + if (!ok) return 1; return 0; } diff --git a/src/accuracy-hip/main.cu b/src/accuracy-hip/main.cu index 15efa97dc6..c48371005b 100644 --- a/src/accuracy-hip/main.cu +++ b/src/accuracy-hip/main.cu @@ -198,5 +198,6 @@ int main(int argc, char* argv[]) free(label); free(data); + if (!ok) return 1; return 0; } diff --git a/src/accuracy-omp/main.cpp b/src/accuracy-omp/main.cpp index b42219822a..bc79c38253 100644 --- a/src/accuracy-omp/main.cpp +++ b/src/accuracy-omp/main.cpp @@ -80,7 +80,6 @@ int main(int argc, char* argv[]) #pragma omp target update from (count[0:1]) bool ok = (count[0] == count_ref); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // printf("Accuracy = %f\n", (float)count / nrows); } } @@ -88,5 +87,6 @@ int main(int argc, char* argv[]) free(label); free(data); + if (!ok) return 1; return 0; } diff --git a/src/accuracy-sycl/main.cpp b/src/accuracy-sycl/main.cpp index 9d66f12a48..ae31bbcff6 100644 --- a/src/accuracy-sycl/main.cpp +++ b/src/accuracy-sycl/main.cpp @@ -180,7 +180,6 @@ int main(int argc, char* argv[]) int count; q.memcpy(&count, d_count, sizeof(int)).wait(); bool ok = (count == count_ref); - if (!ok) exit(1); printf("%s\n", (count == count_ref) ? "PASS" : "FAIL"); // printf("Accuracy = %f\n", (float)count / nrows); @@ -215,5 +214,6 @@ int main(int argc, char* argv[]) free(label); free(data); + if (!ok) return 1; return 0; } diff --git a/src/ace-cuda/main.cu b/src/ace-cuda/main.cu index da07a44258..3b8c1d9112 100644 --- a/src/ace-cuda/main.cu +++ b/src/ace-cuda/main.cu @@ -438,12 +438,12 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(phi_ref); free(u_ref); #endif free(phi_host); free(u_host); + if (!ok) return 1; return 0; } diff --git a/src/ace-hip/main.cu b/src/ace-hip/main.cu index 7a6e7ac5d5..9c110c4835 100644 --- a/src/ace-hip/main.cu +++ b/src/ace-hip/main.cu @@ -438,12 +438,12 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(phi_ref); free(u_ref); #endif free(phi_host); free(u_host); + if (!ok) return 1; return 0; } diff --git a/src/ace-omp/main.cpp b/src/ace-omp/main.cpp index 9d6a631b52..bbfd5afcda 100644 --- a/src/ace-omp/main.cpp +++ b/src/ace-omp/main.cpp @@ -416,7 +416,6 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(phi_ref); free(u_ref); #endif @@ -428,5 +427,6 @@ int main(int argc, char *argv[]) free(d_Fx); free(d_Fy); free(d_Fz); + if (!ok) return 1; return 0; } diff --git a/src/ace-sycl/main.cpp b/src/ace-sycl/main.cpp index b41a845ff3..f2eb6be5a2 100644 --- a/src/ace-sycl/main.cpp +++ b/src/ace-sycl/main.cpp @@ -489,7 +489,6 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(phi_ref); free(u_ref); #endif @@ -497,5 +496,6 @@ int main(int argc, char *argv[]) free(phi_host); free(u_host); + if (!ok) return 1; return 0; } diff --git a/src/adam-cuda/main.cu b/src/adam-cuda/main.cu index dbd672fd42..3fe524d5fe 100644 --- a/src/adam-cuda/main.cu +++ b/src/adam-cuda/main.cu @@ -152,7 +152,6 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); printf("Checksum: %lf %lf\n", cr / vector_size, cp / vector_size); free(p); @@ -160,5 +159,6 @@ int main(int argc, char* argv[]) free(v); free(g); free(r); + if (!ok) return 1; return 0; } diff --git a/src/adam-hip/main.cu b/src/adam-hip/main.cu index 393bf2d0b6..2f50341ef6 100644 --- a/src/adam-hip/main.cu +++ b/src/adam-hip/main.cu @@ -152,7 +152,6 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); printf("Checksum: %lf %lf\n", cr / vector_size, cp / vector_size); free(p); @@ -160,5 +159,6 @@ int main(int argc, char* argv[]) free(v); free(g); free(r); + if (!ok) return 1; return 0; } diff --git a/src/adam-omp/main.cpp b/src/adam-omp/main.cpp index 8c48ef87c5..7d2daf5969 100644 --- a/src/adam-omp/main.cpp +++ b/src/adam-omp/main.cpp @@ -126,7 +126,6 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); printf("Checksum: %lf %lf\n", cr / vector_size, cp / vector_size); free(p); @@ -134,5 +133,6 @@ int main(int argc, char* argv[]) free(v); free(g); free(r); + if (!ok) return 1; return 0; } diff --git a/src/adam-sycl/main.cpp b/src/adam-sycl/main.cpp index eeaefa2e5e..da7f3fc493 100644 --- a/src/adam-sycl/main.cpp +++ b/src/adam-sycl/main.cpp @@ -165,7 +165,6 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); printf("Checksum: %lf %lf\n", cr / vector_size, cp / vector_size); free(p); @@ -173,5 +172,6 @@ int main(int argc, char* argv[]) free(v); free(g); free(r); + if (!ok) return 1; return 0; } diff --git a/src/adamw-cuda/main.cu b/src/adamw-cuda/main.cu index 6b6907d1ad..53b63070b6 100644 --- a/src/adamw-cuda/main.cu +++ b/src/adamw-cuda/main.cu @@ -136,7 +136,6 @@ int main(int argc, char* argv[]) } printf("Absolute maximum error: %f\n", absmax_error); printf("%s\n", absmax_error > 1e-3f ? "FAIL" : "PASS"); - if (absmax_error > 1e-3f) exit(1); auto start = std::chrono::steady_clock::now(); @@ -187,5 +186,6 @@ int main(int argc, char* argv[]) free(v); free(g); free(r); + if (absmax_error > 1e-3f) return 1; return 0; } diff --git a/src/adamw-hip/main.cu b/src/adamw-hip/main.cu index 0b67c463aa..0108e91621 100644 --- a/src/adamw-hip/main.cu +++ b/src/adamw-hip/main.cu @@ -136,7 +136,6 @@ int main(int argc, char* argv[]) } printf("Absolute maximum error: %f\n", absmax_error); printf("%s\n", absmax_error > 1e-3f ? "FAIL" : "PASS"); - if (absmax_error > 1e-3f) exit(1); auto start = std::chrono::steady_clock::now(); @@ -187,5 +186,6 @@ int main(int argc, char* argv[]) free(v); free(g); free(r); + if (absmax_error > 1e-3f) return 1; return 0; } diff --git a/src/adamw-omp/main.cpp b/src/adamw-omp/main.cpp index 2785cad004..0d9151c637 100644 --- a/src/adamw-omp/main.cpp +++ b/src/adamw-omp/main.cpp @@ -123,7 +123,6 @@ int main(int argc, char* argv[]) } printf("Absolute maximum error: %f\n", absmax_error); printf("%s\n", absmax_error > 1e-3f ? "FAIL" : "PASS"); - if (absmax_error > 1e-3f) exit(1); auto start = std::chrono::steady_clock::now(); @@ -169,5 +168,6 @@ int main(int argc, char* argv[]) free(v); free(g); free(r); + if (absmax_error > 1e-3f) return 1; return 0; } diff --git a/src/adamw-sycl/main.cpp b/src/adamw-sycl/main.cpp index a0469dbdd4..8b57f80d11 100644 --- a/src/adamw-sycl/main.cpp +++ b/src/adamw-sycl/main.cpp @@ -135,7 +135,6 @@ int main(int argc, char* argv[]) } printf("Absolute maximum error: %f\n", absmax_error); printf("%s\n", absmax_error > 1e-3f ? "FAIL" : "PASS"); - if (absmax_error > 1e-3f) exit(1); auto start = std::chrono::steady_clock::now(); @@ -178,5 +177,6 @@ int main(int argc, char* argv[]) free(v); free(g); free(r); + if (absmax_error > 1e-3f) return 1; return 0; } diff --git a/src/adjacent-cuda/main.cu b/src/adjacent-cuda/main.cu index 0244f5d445..4e7e8ca646 100644 --- a/src/adjacent-cuda/main.cu +++ b/src/adjacent-cuda/main.cu @@ -132,7 +132,6 @@ void Test(int num_items, int repeat) int compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); - if (compare) exit(1); // verify the SubtractRight cudaMemcpy(d_in, h_in, sizeof(int) * num_items, cudaMemcpyHostToDevice); @@ -150,7 +149,6 @@ void Test(int num_items, int repeat) } compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); - if (compare) exit(1); auto start = std::chrono::steady_clock::now(); @@ -187,5 +185,7 @@ int main(int argc, char** argv) Test< 512>(nelems, repeat); Test<1024>(nelems, repeat); + if (compare) return 1; + if (compare) return 1; return 0; } diff --git a/src/adjacent-hip/main.cu b/src/adjacent-hip/main.cu index 159afc51c9..3ce0b8680e 100644 --- a/src/adjacent-hip/main.cu +++ b/src/adjacent-hip/main.cu @@ -132,7 +132,6 @@ void Test(int num_items, int repeat) int compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); - if (compare) exit(1); // verify the SubtractRight hipMemcpy(d_in, h_in, sizeof(int) * num_items, hipMemcpyHostToDevice); @@ -150,7 +149,6 @@ void Test(int num_items, int repeat) } compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); - if (compare) exit(1); auto start = std::chrono::steady_clock::now(); @@ -187,5 +185,7 @@ int main(int argc, char** argv) Test< 512>(nelems, repeat); Test<1024>(nelems, repeat); + if (compare) return 1; + if (compare) return 1; return 0; } diff --git a/src/adjacent-omp/main.cpp b/src/adjacent-omp/main.cpp index 25b50eb0a3..8b96b62f00 100644 --- a/src/adjacent-omp/main.cpp +++ b/src/adjacent-omp/main.cpp @@ -101,7 +101,6 @@ void Test(int num_items, int repeat) int compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); - if (compare) exit(1); for (int i = 0; i < repeat; i++) { BlockAdjDiffKernel(h_in, h_out, false, num_items); @@ -118,7 +117,6 @@ void Test(int num_items, int repeat) compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); - if (compare) exit(1); auto start = std::chrono::steady_clock::now(); @@ -152,5 +150,7 @@ int main(int argc, char** argv) Test< 512>(nelems, repeat); Test<1024>(nelems, repeat); + if (compare) return 1; + if (compare) return 1; return 0; } diff --git a/src/adjacent-sycl/main.cpp b/src/adjacent-sycl/main.cpp index 9d6464549e..9011b26fa5 100644 --- a/src/adjacent-sycl/main.cpp +++ b/src/adjacent-sycl/main.cpp @@ -138,7 +138,6 @@ void Test(sycl::queue &q, int num_items, int repeat) int compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); - if (compare) exit(1); q.memcpy(d_in, h_in, sizeof(int) * num_items); for (int i = 0; i < repeat; i++) { @@ -159,7 +158,6 @@ void Test(sycl::queue &q, int num_items, int repeat) compare = memcmp(r_out, h_out, sizeof(int) * num_items); printf("%s\n", compare ? "FAIL" : "PASS"); - if (compare) exit(1); auto start = std::chrono::steady_clock::now(); @@ -208,5 +206,7 @@ int main(int argc, char** argv) Test< 512>(q, nelems, repeat); Test<1024>(q, nelems, repeat); + if (compare) return 1; + if (compare) return 1; return 0; } diff --git a/src/aidw-cuda/main.cu b/src/aidw-cuda/main.cu index 8e4564ed60..bbc321099a 100644 --- a/src/aidw-cuda/main.cu +++ b/src/aidw-cuda/main.cu @@ -237,7 +237,6 @@ int main(int argc, char *argv[]) if (check) { bool ok = verify (iz.data(), h_iz.data(), inum, EPS); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } AIDW_Kernel_Tiled<<>>( @@ -247,7 +246,6 @@ int main(int argc, char *argv[]) if (check) { bool ok = verify (iz.data(), h_iz.data(), inum, EPS); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } auto start = std::chrono::steady_clock::now(); @@ -279,5 +277,7 @@ int main(int argc, char *argv[]) cudaFree(d_iy); cudaFree(d_iz); cudaFree(d_avg_dist); + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/aidw-hip/main.cu b/src/aidw-hip/main.cu index acd442f354..02dc2c257c 100644 --- a/src/aidw-hip/main.cu +++ b/src/aidw-hip/main.cu @@ -237,7 +237,6 @@ int main(int argc, char *argv[]) if (check) { bool ok = verify (iz.data(), h_iz.data(), inum, EPS); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } AIDW_Kernel_Tiled<<>>( @@ -247,7 +246,6 @@ int main(int argc, char *argv[]) if (check) { bool ok = verify (iz.data(), h_iz.data(), inum, EPS); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } auto start = std::chrono::steady_clock::now(); @@ -279,5 +277,7 @@ int main(int argc, char *argv[]) hipFree(d_iy); hipFree(d_iz); hipFree(d_avg_dist); + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/aidw-sycl/main.cpp b/src/aidw-sycl/main.cpp index 6b525abc1d..b07c151677 100644 --- a/src/aidw-sycl/main.cpp +++ b/src/aidw-sycl/main.cpp @@ -258,7 +258,6 @@ int main(int argc, char *argv[]) if (check) { bool ok = verify (iz.data(), h_iz.data(), inum, EPS); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } q.submit([&] (sycl::handler &cgh) { @@ -288,7 +287,6 @@ int main(int argc, char *argv[]) if (check) { bool ok = verify (iz.data(), h_iz.data(), inum, EPS); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } auto start = std::chrono::steady_clock::now(); @@ -357,5 +355,7 @@ int main(int argc, char *argv[]) sycl::free(d_iz, q); sycl::free(d_avg_dist, q); + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/asta-cuda/main.cu b/src/asta-cuda/main.cu index fb4f4067c2..e819ae5a7f 100644 --- a/src/asta-cuda/main.cu +++ b/src/asta-cuda/main.cu @@ -284,7 +284,6 @@ int main(int argc, char **argv) { // Verify int status = verify(h_in_out, h_in_backup, tiled_n * p.s, p.m, p.s); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); - if (!(status == 0)) exit(1); // Free memory free(h_in_out); @@ -296,5 +295,6 @@ int main(int argc, char **argv) { cudaFree(d_finished); cudaFree(d_head); + if (!(status == 0)) return 1; return 0; } diff --git a/src/asta-hip/main.cu b/src/asta-hip/main.cu index a9d9e7c113..4f236f2308 100644 --- a/src/asta-hip/main.cu +++ b/src/asta-hip/main.cu @@ -284,7 +284,6 @@ int main(int argc, char **argv) { // Verify int status = verify(h_in_out, h_in_backup, tiled_n * p.s, p.m, p.s); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); - if (!(status == 0)) exit(1); // Free memory free(h_in_out); @@ -296,5 +295,6 @@ int main(int argc, char **argv) { hipFree(d_finished); hipFree(d_head); + if (!(status == 0)) return 1; return 0; } diff --git a/src/asta-omp/main.cpp b/src/asta-omp/main.cpp index d1e486943b..9fb463a8ee 100644 --- a/src/asta-omp/main.cpp +++ b/src/asta-omp/main.cpp @@ -287,7 +287,6 @@ int main(int argc, char **argv) { // Verify int status = verify(h_in_out, h_in_backup, tiled_n * p.s, p.m, p.s); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); - if (!(status == 0)) exit(1); // Free memory free(h_in_out); @@ -295,5 +294,6 @@ int main(int argc, char **argv) { free(h_head); free(h_in_backup); + if (!(status == 0)) return 1; return 0; } diff --git a/src/asta-sycl/main.cpp b/src/asta-sycl/main.cpp index 113b9f23d0..b9ffae822f 100644 --- a/src/asta-sycl/main.cpp +++ b/src/asta-sycl/main.cpp @@ -299,7 +299,6 @@ int main(int argc, char **argv) { // Verify int status = verify(h_in_out, h_in_backup, tiled_n * p.s, p.m, p.s); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); - if (!(status == 0)) exit(1); // Free memory free(h_in_out); @@ -310,5 +309,6 @@ int main(int argc, char **argv) { sycl::free(d_in_out, q); sycl::free(d_finished, q); sycl::free(d_head, q); + if (!(status == 0)) return 1; return 0; } diff --git a/src/atomicAggregate-cuda/main.cu b/src/atomicAggregate-cuda/main.cu index b7f254cf41..2b65782028 100644 --- a/src/atomicAggregate-cuda/main.cu +++ b/src/atomicAggregate-cuda/main.cu @@ -73,9 +73,9 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_d); delete [] h_d; } + if (!ok) return 1; return 0; } diff --git a/src/atomicAggregate-hip/main.cu b/src/atomicAggregate-hip/main.cu index bfa9523b78..d87170d526 100644 --- a/src/atomicAggregate-hip/main.cu +++ b/src/atomicAggregate-hip/main.cu @@ -107,9 +107,9 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_d); delete [] h_d; } + if (!ok) return 1; return 0; } diff --git a/src/atomicAggregate-sycl/main.cpp b/src/atomicAggregate-sycl/main.cpp index 704af48282..7353f18b2d 100644 --- a/src/atomicAggregate-sycl/main.cpp +++ b/src/atomicAggregate-sycl/main.cpp @@ -140,9 +140,9 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_d, q); delete [] h_d; } + if (!ok) return 1; return 0; } diff --git a/src/atomicCAS-cuda/main.cu b/src/atomicCAS-cuda/main.cu index 6b6474c5cf..a5f4bf105c 100644 --- a/src/atomicCAS-cuda/main.cu +++ b/src/atomicCAS-cuda/main.cu @@ -125,10 +125,10 @@ int main(int argc, char** argv) { printf("atomic add results: %llu %lld %lf\n", res_u64[2], res_s64[2], res_f64[2]); } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); cudaFree(d_res_u64); cudaFree(d_res_s64); cudaFree(d_res_f64); + if (error) return 1; return 0; } diff --git a/src/atomicCAS-hip/main.cu b/src/atomicCAS-hip/main.cu index ea7300494f..cf21d138ad 100644 --- a/src/atomicCAS-hip/main.cu +++ b/src/atomicCAS-hip/main.cu @@ -125,10 +125,10 @@ int main(int argc, char** argv) { printf("atomic add results: %llu %lld %lf\n", res_u64[2], res_s64[2], res_f64[2]); } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); hipFree(d_res_u64); hipFree(d_res_s64); hipFree(d_res_f64); + if (error) return 1; return 0; } diff --git a/src/atomicCAS-sycl/main.cpp b/src/atomicCAS-sycl/main.cpp index f91588f047..13f7acf80c 100644 --- a/src/atomicCAS-sycl/main.cpp +++ b/src/atomicCAS-sycl/main.cpp @@ -213,11 +213,11 @@ int main(int argc, char** argv) { printf("atomic add results: %llu %lld %lf\n", res_u64[2], res_s64[2], res_f64[2]); } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); sycl::free(d_res_u64, q); sycl::free(d_res_s64, q); sycl::free(d_res_f64, q); + if (error) return 1; return 0; } diff --git a/src/atomicCost-cuda/main.cu b/src/atomicCost-cuda/main.cu index f71bd75d44..9b4aef4a30 100644 --- a/src/atomicCost-cuda/main.cu +++ b/src/atomicCost-cuda/main.cu @@ -85,7 +85,6 @@ void atomicCost (int length, int size, int repeat) int diff = memcmp(result_wi, result_wo, result_size); printf("%s\n", diff ? "FAIL" : "PASS"); - if (diff) exit(1); free(result_wi); free(result_wo); @@ -115,5 +114,6 @@ int main(int argc, char* argv[]) printf("\nFP32 atomic add\n"); atomicCost(length, nelems, repeat); + if (diff) return 1; return 0; } diff --git a/src/atomicCost-hip/main.cu b/src/atomicCost-hip/main.cu index 4f3a0a59e2..004441fca8 100644 --- a/src/atomicCost-hip/main.cu +++ b/src/atomicCost-hip/main.cu @@ -85,7 +85,6 @@ void atomicCost (int length, int size, int repeat) int diff = memcmp(result_wi, result_wo, result_size); printf("%s\n", diff ? "FAIL" : "PASS"); - if (diff) exit(1); free(result_wi); free(result_wo); @@ -115,5 +114,6 @@ int main(int argc, char* argv[]) printf("\nFP32 atomic add\n"); atomicCost(length, nelems, repeat); + if (diff) return 1; return 0; } diff --git a/src/atomicCost-omp/main.cpp b/src/atomicCost-omp/main.cpp index 6c6f76ef96..969c1a9c76 100644 --- a/src/atomicCost-omp/main.cpp +++ b/src/atomicCost-omp/main.cpp @@ -75,7 +75,6 @@ void atomicCost (int length, int size, int repeat) int diff = memcmp(result_wi, result_wo, result_size); printf("%s\n", diff ? "FAIL" : "PASS"); - if (diff) exit(1); } free(result_wi); @@ -104,5 +103,6 @@ int main(int argc, char* argv[]) printf("\nFP32 atomic add\n"); atomicCost(length, nelems, repeat); + if (diff) return 1; return 0; } diff --git a/src/atomicCost-sycl/main.cpp b/src/atomicCost-sycl/main.cpp index 326b63547a..c871d55c65 100644 --- a/src/atomicCost-sycl/main.cpp +++ b/src/atomicCost-sycl/main.cpp @@ -104,7 +104,6 @@ void atomicCost (int length, int size, int repeat) int diff = memcmp(result_wi, result_wo, result_size); printf("%s\n", diff ? "FAIL" : "PASS"); - if (diff) exit(1); free(result_wi); free(result_wo); @@ -134,5 +133,6 @@ int main(int argc, char* argv[]) printf("\nFP32 atomic add\n"); atomicCost(length, nelems, repeat); + if (diff) return 1; return 0; } diff --git a/src/atomicPerf-cuda/main.cu b/src/atomicPerf-cuda/main.cu index 9020b8ae95..24ce032395 100644 --- a/src/atomicPerf-cuda/main.cu +++ b/src/atomicPerf-cuda/main.cu @@ -118,7 +118,6 @@ void atomicPerf (int n, int t, int repeat) BlockRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); CHECK_ERROR( cudaMemcpy(d_data, data, data_size, cudaMemcpyHostToDevice) ); CHECK_ERROR( cudaDeviceSynchronize() ); @@ -139,7 +138,6 @@ void atomicPerf (int n, int t, int repeat) WarpRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); CHECK_ERROR( cudaMemcpy(d_data, data, data_size, cudaMemcpyHostToDevice) ); CHECK_ERROR( cudaDeviceSynchronize() ); @@ -160,7 +158,6 @@ void atomicPerf (int n, int t, int repeat) SingleRangeAtomicOnGlobalMem_ref(r_data, i % BLOCK_SIZE, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); CHECK_ERROR( cudaMemcpy(d_data, data, data_size, cudaMemcpyHostToDevice) ); CHECK_ERROR( cudaDeviceSynchronize() ); @@ -178,7 +175,6 @@ void atomicPerf (int n, int t, int repeat) CHECK_ERROR( cudaMemcpy(h_data, d_data, data_size, cudaMemcpyDeviceToHost) ); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); CHECK_ERROR( cudaMemcpy(d_data, data, data_size, cudaMemcpyHostToDevice) ); CHECK_ERROR( cudaDeviceSynchronize() ); @@ -196,7 +192,6 @@ void atomicPerf (int n, int t, int repeat) CHECK_ERROR( cudaMemcpy(h_data, d_data, data_size, cudaMemcpyDeviceToHost) ); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); CHECK_ERROR( cudaMemcpy(d_data, data, data_size, cudaMemcpyHostToDevice) ); CHECK_ERROR( cudaDeviceSynchronize() ); @@ -214,7 +209,6 @@ void atomicPerf (int n, int t, int repeat) CHECK_ERROR( cudaMemcpy(h_data, d_data, data_size, cudaMemcpyDeviceToHost) ); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); free(data); free(h_data); @@ -242,5 +236,11 @@ int main(int argc, char* argv[]) printf("\nFP32 atomic add\n"); atomicPerf(n, len, repeat); + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; return 0; } diff --git a/src/atomicPerf-hip/main.cu b/src/atomicPerf-hip/main.cu index 6c8e1ca7d9..991df97048 100644 --- a/src/atomicPerf-hip/main.cu +++ b/src/atomicPerf-hip/main.cu @@ -118,7 +118,6 @@ void atomicPerf (int n, int t, int repeat) BlockRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); CHECK_ERROR( hipMemcpy(d_data, data, data_size, hipMemcpyHostToDevice) ); CHECK_ERROR( hipDeviceSynchronize() ); @@ -139,7 +138,6 @@ void atomicPerf (int n, int t, int repeat) WarpRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); CHECK_ERROR( hipMemcpy(d_data, data, data_size, hipMemcpyHostToDevice) ); CHECK_ERROR( hipDeviceSynchronize() ); @@ -160,7 +158,6 @@ void atomicPerf (int n, int t, int repeat) SingleRangeAtomicOnGlobalMem_ref(r_data, i % BLOCK_SIZE, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); CHECK_ERROR( hipMemcpy(d_data, data, data_size, hipMemcpyHostToDevice) ); CHECK_ERROR( hipDeviceSynchronize() ); @@ -178,7 +175,6 @@ void atomicPerf (int n, int t, int repeat) CHECK_ERROR( hipMemcpy(h_data, d_data, data_size, hipMemcpyDeviceToHost) ); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); CHECK_ERROR( hipMemcpy(d_data, data, data_size, hipMemcpyHostToDevice) ); CHECK_ERROR( hipDeviceSynchronize() ); @@ -196,7 +192,6 @@ void atomicPerf (int n, int t, int repeat) CHECK_ERROR( hipMemcpy(h_data, d_data, data_size, hipMemcpyDeviceToHost) ); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); CHECK_ERROR( hipMemcpy(d_data, data, data_size, hipMemcpyHostToDevice) ); CHECK_ERROR( hipDeviceSynchronize() ); @@ -214,7 +209,6 @@ void atomicPerf (int n, int t, int repeat) CHECK_ERROR( hipMemcpy(h_data, d_data, data_size, hipMemcpyDeviceToHost) ); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); free(data); free(h_data); @@ -242,5 +236,11 @@ int main(int argc, char* argv[]) printf("\nFP32 atomic add\n"); atomicPerf(n, len, repeat); + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; return 0; } diff --git a/src/atomicPerf-omp/main.cpp b/src/atomicPerf-omp/main.cpp index f0903a73b0..3bb776785a 100644 --- a/src/atomicPerf-omp/main.cpp +++ b/src/atomicPerf-omp/main.cpp @@ -139,7 +139,6 @@ void atomicPerf (int n, int t, int repeat) BlockRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); memcpy(data, h_data, data_size); #pragma omp target update to (data[0:t]) @@ -159,7 +158,6 @@ void atomicPerf (int n, int t, int repeat) WarpRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); memcpy(data, h_data, data_size); #pragma omp target update to (data[0:t]) @@ -179,7 +177,6 @@ void atomicPerf (int n, int t, int repeat) SingleRangeAtomicOnGlobalMem_ref(r_data, i % BLOCK_SIZE, n); fail = memcmp(data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); memcpy(data, h_data, data_size); #pragma omp target update to (data[0:t]) @@ -196,7 +193,6 @@ void atomicPerf (int n, int t, int repeat) #pragma omp target update from (data[0:t]) fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); memcpy(data, h_data, data_size); #pragma omp target update to (data[0:t]) @@ -213,7 +209,6 @@ void atomicPerf (int n, int t, int repeat) #pragma omp target update from (data[0:t]) fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); memcpy(data, h_data, data_size); #pragma omp target update to (data[0:t]) @@ -230,7 +225,6 @@ void atomicPerf (int n, int t, int repeat) #pragma omp target update from (data[0:t]) fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); } free(data); @@ -258,5 +252,11 @@ int main(int argc, char* argv[]) printf("\nFP32 atomic add\n"); atomicPerf(n, len, repeat); + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; return 0; } diff --git a/src/atomicPerf-sycl/main.cpp b/src/atomicPerf-sycl/main.cpp index 41cc4cf46f..9e84b3472a 100644 --- a/src/atomicPerf-sycl/main.cpp +++ b/src/atomicPerf-sycl/main.cpp @@ -149,7 +149,6 @@ void atomicPerf (int n, int t, int repeat) BlockRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); q.memcpy(d_data, data, data_size).wait(); start = std::chrono::steady_clock::now(); @@ -173,7 +172,6 @@ void atomicPerf (int n, int t, int repeat) WarpRangeAtomicOnGlobalMem_ref(r_data, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); q.memcpy(d_data, data, data_size).wait(); start = std::chrono::steady_clock::now(); @@ -197,7 +195,6 @@ void atomicPerf (int n, int t, int repeat) SingleRangeAtomicOnGlobalMem_ref(r_data, i % BLOCK_SIZE, n); fail = memcmp(h_data, r_data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); q.memcpy(d_data, data, data_size).wait(); start = std::chrono::steady_clock::now(); @@ -219,7 +216,6 @@ void atomicPerf (int n, int t, int repeat) q.memcpy(h_data, d_data, data_size).wait(); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); q.memcpy(d_data, data, data_size).wait(); start = std::chrono::steady_clock::now(); @@ -241,7 +237,6 @@ void atomicPerf (int n, int t, int repeat) q.memcpy(h_data, d_data, data_size).wait(); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); q.memcpy(d_data, data, data_size).wait(); start = std::chrono::steady_clock::now(); @@ -264,7 +259,6 @@ void atomicPerf (int n, int t, int repeat) q.memcpy(h_data, d_data, data_size).wait(); fail = memcmp(h_data, data, data_size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); free(data); free(h_data); @@ -292,5 +286,11 @@ int main(int argc, char* argv[]) printf("\nFP32 atomic add\n"); atomicPerf(n, len, repeat); + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; return 0; } diff --git a/src/attention-cuda/main.cu b/src/attention-cuda/main.cu index be9884d1f2..722230c259 100644 --- a/src/attention-cuda/main.cu +++ b/src/attention-cuda/main.cu @@ -165,12 +165,12 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(key); free(value); free(query); free(dout); free(hout); + if (!ok) return 1; return 0; } diff --git a/src/attention-hip/main.cu b/src/attention-hip/main.cu index f2dd74bbe8..ab1c209318 100644 --- a/src/attention-hip/main.cu +++ b/src/attention-hip/main.cu @@ -178,12 +178,12 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(key); free(value); free(query); free(dout); free(hout); + if (!ok) return 1; return 0; } diff --git a/src/attention-omp/main.cpp b/src/attention-omp/main.cpp index 7877f850e7..7c6fdcfd94 100644 --- a/src/attention-omp/main.cpp +++ b/src/attention-omp/main.cpp @@ -101,12 +101,12 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(key); free(value); free(query); free(dout); free(hout); + if (!ok) return 1; return 0; } diff --git a/src/attention-paged-cuda/main.cu b/src/attention-paged-cuda/main.cu index f2b6c9972d..62ebafa317 100644 --- a/src/attention-paged-cuda/main.cu +++ b/src/attention-paged-cuda/main.cu @@ -285,7 +285,6 @@ void attention_page (int num_seqs, } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(query_h); free(out_h); @@ -344,5 +343,6 @@ int main(int argc, char* argv[]) attention_page<__nv_bfloat16, 32>(num_seqs, num_query_heads, num_kv_heads, head_size, max_seq_len, num_blocks, repeat); + if (!ok) return 1; return 0; } diff --git a/src/attention-paged-hip/main.cu b/src/attention-paged-hip/main.cu index 56054c5954..8bee6b7637 100644 --- a/src/attention-paged-hip/main.cu +++ b/src/attention-paged-hip/main.cu @@ -285,7 +285,6 @@ void attention_page (int num_seqs, } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(query_h); free(out_h); @@ -344,5 +343,6 @@ int main(int argc, char* argv[]) attention_page<__nv_bfloat16, 32>(num_seqs, num_query_heads, num_kv_heads, head_size, max_seq_len, num_blocks, repeat); + if (!ok) return 1; return 0; } diff --git a/src/attention-paged-sycl/main.cpp b/src/attention-paged-sycl/main.cpp index ae089f559d..4b9c9d2a17 100644 --- a/src/attention-paged-sycl/main.cpp +++ b/src/attention-paged-sycl/main.cpp @@ -313,7 +313,6 @@ void attention_page(sycl::queue &Q, int num_seqs, int num_query_heads, int num_k } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(query_h); free(out_h); @@ -386,5 +385,6 @@ int main(int argc, char* argv[]) Q, num_seqs, num_query_heads, num_kv_heads, head_size, max_seq_len, num_blocks, repeat); + if (!ok) return 1; return 0; } diff --git a/src/attention-sycl/main.cpp b/src/attention-sycl/main.cpp index 5ec78079b6..e2b05574f9 100644 --- a/src/attention-sycl/main.cpp +++ b/src/attention-sycl/main.cpp @@ -239,12 +239,12 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(key); free(value); free(query); free(dout); free(hout); + if (!ok) return 1; return 0; } diff --git a/src/attentionMultiHead-cuda/main.cu b/src/attentionMultiHead-cuda/main.cu index cae03f270a..ba34aa392a 100644 --- a/src/attentionMultiHead-cuda/main.cu +++ b/src/attentionMultiHead-cuda/main.cu @@ -238,7 +238,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(hq); free(hk); @@ -246,5 +245,6 @@ int main(int argc, char* argv[]) free(h_dst); free(r_dst); + if (!ok) return 1; return 0; } diff --git a/src/attentionMultiHead-hip/main.cu b/src/attentionMultiHead-hip/main.cu index 594663c431..30f84d4b05 100644 --- a/src/attentionMultiHead-hip/main.cu +++ b/src/attentionMultiHead-hip/main.cu @@ -220,7 +220,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(hq); free(hk); @@ -228,5 +227,6 @@ int main(int argc, char* argv[]) free(h_dst); free(r_dst); + if (!ok) return 1; return 0; } diff --git a/src/attentionMultiHead-sycl/main.cpp b/src/attentionMultiHead-sycl/main.cpp index 3c631b962c..708f23364e 100644 --- a/src/attentionMultiHead-sycl/main.cpp +++ b/src/attentionMultiHead-sycl/main.cpp @@ -232,7 +232,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(hq); free(hk); @@ -241,5 +240,6 @@ int main(int argc, char* argv[]) free(r_dst); + if (!ok) return 1; return 0; } diff --git a/src/axpby-cuda/main.cu b/src/axpby-cuda/main.cu index 489f73e0ec..6beb2c92e4 100644 --- a/src/axpby-cuda/main.cu +++ b/src/axpby-cuda/main.cu @@ -179,7 +179,6 @@ int main(int argc, char* argv[]) if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } cudaFree(d_noop); @@ -190,5 +189,6 @@ int main(int argc, char* argv[]) } } + if (!ok) return 1; return 0; } diff --git a/src/axpby-hip/main.cu b/src/axpby-hip/main.cu index e9f53a6a46..170afd7124 100644 --- a/src/axpby-hip/main.cu +++ b/src/axpby-hip/main.cu @@ -179,7 +179,6 @@ int main(int argc, char* argv[]) if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } hipFree(d_noop); @@ -190,5 +189,6 @@ int main(int argc, char* argv[]) } } + if (!ok) return 1; return 0; } diff --git a/src/axpby-sycl/main.cpp b/src/axpby-sycl/main.cpp index c9d952b5d7..ab1604d61f 100644 --- a/src/axpby-sycl/main.cpp +++ b/src/axpby-sycl/main.cpp @@ -194,7 +194,6 @@ int main(int argc, char* argv[]) if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } sycl::free(d_noop, q); @@ -205,5 +204,6 @@ int main(int argc, char* argv[]) } } + if (!ok) return 1; return 0; } diff --git a/src/background-subtract-cuda/main.cu b/src/background-subtract-cuda/main.cu index 6ae7563ffb..4682670841 100644 --- a/src/background-subtract-cuda/main.cu +++ b/src/background-subtract-cuda/main.cu @@ -183,7 +183,6 @@ int main(int argc, char* argv[]) { printf("Max error is %d\n", max_error); printf("%s\n", max_error ? "FAIL" : "PASS"); - if (max_error) exit(1); free(Img); free(Img1); @@ -199,5 +198,6 @@ int main(int argc, char* argv[]) { cudaFree(d_Mp); cudaFree(d_Bn); + if (max_error) return 1; return 0; } diff --git a/src/background-subtract-hip/main.cu b/src/background-subtract-hip/main.cu index 548c582c40..c9347975a3 100644 --- a/src/background-subtract-hip/main.cu +++ b/src/background-subtract-hip/main.cu @@ -183,7 +183,6 @@ int main(int argc, char* argv[]) { printf("Max error is %d\n", max_error); printf("%s\n", max_error ? "FAIL" : "PASS"); - if (max_error) exit(1); free(Img); free(Img1); @@ -199,5 +198,6 @@ int main(int argc, char* argv[]) { hipFree(d_Mp); hipFree(d_Bn); + if (max_error) return 1; return 0; } diff --git a/src/background-subtract-omp/main.cpp b/src/background-subtract-omp/main.cpp index d4a3249963..d13a54a45a 100644 --- a/src/background-subtract-omp/main.cpp +++ b/src/background-subtract-omp/main.cpp @@ -170,7 +170,6 @@ int main(int argc, char* argv[]) { printf("Max error is %d\n", max_error); printf("%s\n", max_error ? "FAIL" : "PASS"); - if (max_error) exit(1); free(Img); free(Img1); @@ -181,5 +180,6 @@ int main(int argc, char* argv[]) { free(Bn_ref); free(Mp); + if (max_error) return 1; return 0; } diff --git a/src/background-subtract-sycl/main.cpp b/src/background-subtract-sycl/main.cpp index 2b98a25c1a..ef8bb25237 100644 --- a/src/background-subtract-sycl/main.cpp +++ b/src/background-subtract-sycl/main.cpp @@ -213,7 +213,6 @@ int main(int argc, char* argv[]) { printf("Max error is %d\n", max_error); printf("%s\n", max_error ? "FAIL" : "PASS"); - if (max_error) exit(1); free(Img); free(Img1); @@ -229,5 +228,6 @@ int main(int argc, char* argv[]) { sycl::free(d_Mp, q); sycl::free(d_Bn, q); + if (max_error) return 1; return 0; } diff --git a/src/backprop-cuda/main.cu b/src/backprop-cuda/main.cu index 1a7fabce0e..15160557bb 100644 --- a/src/backprop-cuda/main.cu +++ b/src/backprop-cuda/main.cu @@ -139,7 +139,6 @@ int bpnn_train_kernel(BPNN *net, float *eo, float *eh) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef OUTPUT for (int i = 0; i < (in+1); i++) @@ -152,5 +151,6 @@ int bpnn_train_kernel(BPNN *net, float *eo, float *eh) free(input_weights_one_dim); free(input_weights_one_dim_r); + if (!ok) return 1; return 0; } diff --git a/src/backprop-hip/main.cu b/src/backprop-hip/main.cu index eadbfb0194..d58625cfbb 100644 --- a/src/backprop-hip/main.cu +++ b/src/backprop-hip/main.cu @@ -139,7 +139,6 @@ int bpnn_train_kernel(BPNN *net, float *eo, float *eh) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef OUTPUT for (int i = 0; i < (in+1); i++) @@ -152,5 +151,6 @@ int bpnn_train_kernel(BPNN *net, float *eo, float *eh) free(input_weights_one_dim); free(input_weights_one_dim_r); + if (!ok) return 1; return 0; } diff --git a/src/backprop-omp/main.cpp b/src/backprop-omp/main.cpp index 2ef63bc2f1..2fc6c94e95 100644 --- a/src/backprop-omp/main.cpp +++ b/src/backprop-omp/main.cpp @@ -180,7 +180,6 @@ int bpnn_train_kernel(BPNN *net, float *eo, float *eh) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef OUTPUT for (int i = 0; i < (in+1); i++) @@ -193,5 +192,6 @@ int bpnn_train_kernel(BPNN *net, float *eo, float *eh) free(input_weights_one_dim); free(input_weights_one_dim_r); + if (!ok) return 1; return 0; } diff --git a/src/backprop-sycl/main.cpp b/src/backprop-sycl/main.cpp index 95f1593af4..02e47f187b 100644 --- a/src/backprop-sycl/main.cpp +++ b/src/backprop-sycl/main.cpp @@ -152,7 +152,6 @@ int bpnn_train_kernel(BPNN *net, float *eo, float *eh) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef OUTPUT for (int i = 0; i < (in+1); i++) @@ -165,5 +164,6 @@ int bpnn_train_kernel(BPNN *net, float *eo, float *eh) free(input_weights_one_dim); free(input_weights_one_dim_r); + if (!ok) return 1; return 0; } diff --git a/src/bezier-surface-cuda/main.cu b/src/bezier-surface-cuda/main.cu index 26cefec836..ccf7809b9e 100644 --- a/src/bezier-surface-cuda/main.cu +++ b/src/bezier-surface-cuda/main.cu @@ -287,7 +287,6 @@ void run(XYZ *in, int in_size_i, int in_size_j, int out_size_i, int out_size_j, // Verify int status = compare_output(gpu_out, cpu_out, in_size_i, in_size_j, out_size_i, out_size_j); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); - if (!(status == 0)) exit(1); free(cpu_out); free(gpu_out); @@ -309,5 +308,6 @@ int main(int argc, char **argv) { run(h_in, p.in_size_i, p.in_size_j, p.out_size_i, p.out_size_j, p); free(h_in); + if (!(status == 0)) return 1; return 0; } diff --git a/src/bezier-surface-hip/main.cu b/src/bezier-surface-hip/main.cu index b77d639c13..82a6d51e8a 100644 --- a/src/bezier-surface-hip/main.cu +++ b/src/bezier-surface-hip/main.cu @@ -287,7 +287,6 @@ void run(XYZ *in, int in_size_i, int in_size_j, int out_size_i, int out_size_j, // Verify int status = compare_output(gpu_out, cpu_out, in_size_i, in_size_j, out_size_i, out_size_j); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); - if (!(status == 0)) exit(1); free(cpu_out); free(gpu_out); @@ -309,5 +308,6 @@ int main(int argc, char **argv) { run(h_in, p.in_size_i, p.in_size_j, p.out_size_i, p.out_size_j, p); free(h_in); + if (!(status == 0)) return 1; return 0; } diff --git a/src/bezier-surface-omp/main.cpp b/src/bezier-surface-omp/main.cpp index 5f0cd5f670..dc5b95105c 100644 --- a/src/bezier-surface-omp/main.cpp +++ b/src/bezier-surface-omp/main.cpp @@ -271,7 +271,6 @@ void run(XYZ *in, int in_size_i, int in_size_j, int out_size_i, int out_size_j, // Verify int status = compare_output(gpu_out, cpu_out, in_size_i, in_size_j, out_size_i, out_size_j); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); - if (!(status == 0)) exit(1); free(cpu_out); free(gpu_out); @@ -291,5 +290,6 @@ int main(int argc, char **argv) { run(h_in, p.in_size_i, p.in_size_j, p.out_size_i, p.out_size_j, p); free(h_in); + if (!(status == 0)) return 1; return 0; } diff --git a/src/bezier-surface-sycl/main.cpp b/src/bezier-surface-sycl/main.cpp index cbee3622fa..ab6238bc01 100644 --- a/src/bezier-surface-sycl/main.cpp +++ b/src/bezier-surface-sycl/main.cpp @@ -289,7 +289,6 @@ void run(XYZ *in, int in_size_i, int in_size_j, int out_size_i, int out_size_j, // Verify int status = compare_output(gpu_out, cpu_out, in_size_i, in_size_j, out_size_i, out_size_j); printf("%s\n", (status == 0) ? "PASS" : "FAIL"); - if (!(status == 0)) exit(1); free(cpu_out); free(gpu_out); @@ -311,5 +310,6 @@ int main(int argc, char **argv) { run(h_in, p.in_size_i, p.in_size_j, p.out_size_i, p.out_size_j, p); free(h_in); + if (!(status == 0)) return 1; return 0; } diff --git a/src/bilateral-cuda/main.cu b/src/bilateral-cuda/main.cu index 233ecee0cb..4ac94117a1 100644 --- a/src/bilateral-cuda/main.cu +++ b/src/bilateral-cuda/main.cu @@ -181,12 +181,12 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(h_dst); free(r_dst); free(h_src); cudaFree(d_dst); cudaFree(d_src); + if (!ok) return 1; return 0; } diff --git a/src/bilateral-hip/main.cu b/src/bilateral-hip/main.cu index fc1779c4fc..e95a6d300a 100644 --- a/src/bilateral-hip/main.cu +++ b/src/bilateral-hip/main.cu @@ -181,12 +181,12 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(h_dst); free(r_dst); free(h_src); hipFree(d_dst); hipFree(d_src); + if (!ok) return 1; return 0; } diff --git a/src/bilateral-omp/main.cpp b/src/bilateral-omp/main.cpp index e0736b7203..cb6718226f 100644 --- a/src/bilateral-omp/main.cpp +++ b/src/bilateral-omp/main.cpp @@ -166,11 +166,11 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } free(h_dst); free(r_dst); free(h_src); + if (!ok) return 1; return 0; } diff --git a/src/bilateral-sycl/main.cpp b/src/bilateral-sycl/main.cpp index 7ff5397e2f..532aa177e4 100644 --- a/src/bilateral-sycl/main.cpp +++ b/src/bilateral-sycl/main.cpp @@ -207,12 +207,12 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(h_dst); free(r_dst); free(h_src); sycl::free(d_dst, q); sycl::free(d_src, q); + if (!ok) return 1; return 0; } diff --git a/src/bitonic-sort-cuda/main.cu b/src/bitonic-sort-cuda/main.cu index 03bd26d01c..8966e343a7 100644 --- a/src/bitonic-sort-cuda/main.cu +++ b/src/bitonic-sort-cuda/main.cu @@ -218,11 +218,11 @@ int main(int argc, char *argv[]) { // Verify int unequal = memcmp(data_gpu, data_cpu, size_bytes); std::cout << (unequal ? "FAIL" : "PASS") << std::endl; - if (unequal) exit(1); // Clean CPU memory. free(data_cpu); free(data_gpu); + if (unequal) return 1; return 0; } diff --git a/src/bitonic-sort-hip/main.cu b/src/bitonic-sort-hip/main.cu index 44fdfb9b26..f5d5cfcdb2 100644 --- a/src/bitonic-sort-hip/main.cu +++ b/src/bitonic-sort-hip/main.cu @@ -217,11 +217,11 @@ int main(int argc, char *argv[]) { // Verify int unequal = memcmp(data_gpu, data_cpu, size_bytes); std::cout << (unequal ? "FAIL" : "PASS") << std::endl; - if (unequal) exit(1); // Clean CPU memory. free(data_cpu); free(data_gpu); + if (unequal) return 1; return 0; } diff --git a/src/bitonic-sort-omp/main.cpp b/src/bitonic-sort-omp/main.cpp index 914ca9c4f2..293bc12db0 100644 --- a/src/bitonic-sort-omp/main.cpp +++ b/src/bitonic-sort-omp/main.cpp @@ -212,11 +212,11 @@ int main(int argc, char *argv[]) { // Verify int unequal = memcmp(data_gpu, data_cpu, size_bytes); std::cout << (unequal ? "FAIL" : "PASS") << std::endl; - if (unequal) exit(1); // Clean CPU memory. free(data_cpu); free(data_gpu); + if (unequal) return 1; return 0; } diff --git a/src/bitonic-sort-sycl/main.cpp b/src/bitonic-sort-sycl/main.cpp index 4a71156b70..49de53a48c 100644 --- a/src/bitonic-sort-sycl/main.cpp +++ b/src/bitonic-sort-sycl/main.cpp @@ -230,11 +230,11 @@ int main(int argc, char *argv[]) { // Verify int unequal = memcmp(data_gpu, data_cpu, size_bytes); std::cout << (unequal ? "FAIL" : "PASS") << std::endl; - if (unequal) exit(1); // Clean CPU memory. free(data_cpu); free(data_gpu); + if (unequal) return 1; return 0; } diff --git a/src/blas-dot-cuda/main.cu b/src/blas-dot-cuda/main.cu index e31c1604fe..b37871ad2f 100644 --- a/src/blas-dot-cuda/main.cu +++ b/src/blas-dot-cuda/main.cu @@ -79,7 +79,6 @@ void dot (const size_t iNumElements, const int iNumIterations) cudaMemcpy(&dst, d_dst, sizeof(T), cudaMemcpyDeviceToHost); printf("Host: %lf Device: %lf\n", sum, double(dst)); printf("%s\n\n", (fabs(double(dst) - sum) < 1e-1) ? "PASS" : "FAIL"); - if (!(fabs(double(dst) - sum) < 1e-1)) exit(1); cudaFree(d_dst); cudaFree(d_srcA); @@ -108,5 +107,6 @@ int main(int argc, char **argv) printf("\nBF16 Dot\n"); dot<__nv_bfloat16>(iNumElements, iNumIterations); + if (!(fabs(double(dst) - sum) < 1e-1)) return 1; return EXIT_SUCCESS; } diff --git a/src/blas-dot-hip/main.cu b/src/blas-dot-hip/main.cu index 29a6d29733..62af315a92 100644 --- a/src/blas-dot-hip/main.cu +++ b/src/blas-dot-hip/main.cu @@ -79,7 +79,6 @@ void dot (const size_t iNumElements, const int iNumIterations) hipMemcpy(&dst, d_dst, sizeof(T), hipMemcpyDeviceToHost); printf("Host: %lf Device: %lf\n", sum, double(dst)); printf("%s\n\n", (fabs(double(dst) - sum) < 1e-1) ? "PASS" : "FAIL"); - if (!(fabs(double(dst) - sum) < 1e-1)) exit(1); hipFree(d_dst); hipFree(d_srcA); @@ -108,5 +107,6 @@ int main(int argc, char **argv) printf("\nBF16 Dot\n"); dot<__hip_bfloat16>(iNumElements, iNumIterations); + if (!(fabs(double(dst) - sum) < 1e-1)) return 1; return EXIT_SUCCESS; } diff --git a/src/blas-dot-sycl/main.cpp b/src/blas-dot-sycl/main.cpp index 87bea9d954..4cabee9a44 100644 --- a/src/blas-dot-sycl/main.cpp +++ b/src/blas-dot-sycl/main.cpp @@ -60,7 +60,6 @@ void dot (const size_t iNumElements, const int iNumIterations) q.memcpy(&dst, d_dst, sizeof(T)).wait(); printf("Host: %lf Device: %lf\n", sum, double(dst)); printf("%s\n\n", (fabs(double(dst) - sum) < 1e-1) ? "PASS" : "FAIL"); - if (!(fabs(double(dst) - sum) < 1e-1)) exit(1); sycl::free(d_dst, q); sycl::free(d_srcA, q); @@ -88,5 +87,6 @@ int main(int argc, char **argv) printf("\nBF16 Dot\n"); dot(iNumElements, iNumIterations); + if (!(fabs(double(dst) - sum) < 1e-1)) return 1; return EXIT_SUCCESS; } diff --git a/src/blas-gemm-cuda/main.cu b/src/blas-gemm-cuda/main.cu index 4f97eb6dc8..a599d6c34f 100644 --- a/src/blas-gemm-cuda/main.cu +++ b/src/blas-gemm-cuda/main.cu @@ -99,7 +99,6 @@ void run_gemm_example(int m, int k, int n, int repeat) { cudaMemcpy(r, dr, C_size, cudaMemcpyDeviceToHost); int error = memcmp(c, r, C_size); std::cout << (error ? "FAIL" : "PASS") << std::endl; - if (error) exit(1); cudaDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); @@ -174,5 +173,6 @@ int main (int argc, char ** argv) { std::cout << "\tRunning with double precision data type:" << std::endl; run_gemm_example(m, k, n, repeat); + if (error) return 1; return 0; } diff --git a/src/blas-gemm-hip/main.cu b/src/blas-gemm-hip/main.cu index 7c2bcd0494..2c13aad302 100644 --- a/src/blas-gemm-hip/main.cu +++ b/src/blas-gemm-hip/main.cu @@ -100,7 +100,6 @@ void run_gemm_example(int m, int k, int n, int repeat) { hipMemcpy(r, dr, C_size, hipMemcpyDeviceToHost); int error = memcmp(c, r, C_size); std::cout << (error ? "FAIL" : "PASS") << std::endl; - if (error) exit(1); hipDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); @@ -175,5 +174,6 @@ int main (int argc, char ** argv) { std::cout << "\tRunning with double precision data type:" << std::endl; run_gemm_example(m, k, n, repeat); + if (error) return 1; return 0; } diff --git a/src/blas-gemm-sycl/main.cpp b/src/blas-gemm-sycl/main.cpp index 4cebdcbc60..14a9e2ee3c 100644 --- a/src/blas-gemm-sycl/main.cpp +++ b/src/blas-gemm-sycl/main.cpp @@ -141,7 +141,6 @@ void run_gemm_example(MKL_INT m, MKL_INT k, MKL_INT n, int repeat) { q.memcpy(r, dr, C_size).wait(); int error = memcmp(c, r, C_size); std::cout << (error ? "FAIL" : "PASS") << std::endl; - if (error) exit(1); q.wait(); auto start = std::chrono::steady_clock::now(); @@ -207,5 +206,6 @@ int main (int argc, char ** argv) { std::cout << "\tRunning with double precision data type:" << std::endl; run_gemm_example(m, k, n, repeat); + if (error) return 1; return 0; } diff --git a/src/blockAccess-cuda/main.cu b/src/blockAccess-cuda/main.cu index 04ba9cda93..f259659ce4 100644 --- a/src/blockAccess-cuda/main.cu +++ b/src/blockAccess-cuda/main.cu @@ -124,7 +124,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); auto start = std::chrono::steady_clock::now(); @@ -154,5 +153,6 @@ int main(int argc, char* argv[]) free(A); free(out); free(out_ref); + if (error) return 1; return 0; } diff --git a/src/blockAccess-hip/main.cu b/src/blockAccess-hip/main.cu index fc202287c1..e75e610dee 100644 --- a/src/blockAccess-hip/main.cu +++ b/src/blockAccess-hip/main.cu @@ -125,7 +125,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); auto start = std::chrono::steady_clock::now(); @@ -155,5 +154,6 @@ int main(int argc, char* argv[]) free(A); free(out); free(out_ref); + if (error) return 1; return 0; } diff --git a/src/blockAccess-sycl/main.cpp b/src/blockAccess-sycl/main.cpp index 502b120566..493b0a1154 100644 --- a/src/blockAccess-sycl/main.cpp +++ b/src/blockAccess-sycl/main.cpp @@ -189,7 +189,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); auto start = std::chrono::steady_clock::now(); @@ -249,5 +248,6 @@ int main(int argc, char* argv[]) free(out); free(out2); free(out_ref); + if (error) return 1; return 0; } diff --git a/src/blockScan-cuda/main.cu b/src/blockScan-cuda/main.cu index 9d768f8b73..f62eed621d 100644 --- a/src/blockScan-cuda/main.cu +++ b/src/blockScan-cuda/main.cu @@ -191,13 +191,11 @@ void Test() printf("\tOutput items: "); int compare = CompareDeviceResults(h_reference, d_out, TILE_SIZE); printf("%s\n", compare ? "FAIL" : "PASS"); - if (compare) exit(1); // Check total aggregate printf("\tAggregate: "); compare = CompareDeviceResults(&h_aggregate, d_out + TILE_SIZE, 1); printf("%s\n", compare ? "FAIL" : "PASS"); - if (compare) exit(1); } } GPU_CHECK(cudaDeviceSynchronize()); @@ -271,5 +269,7 @@ int main(int argc, char** argv) Test<64, 16, BLOCK_SCAN_WARP_SCANS>(); Test<32, 32, BLOCK_SCAN_WARP_SCANS>(); + if (compare) return 1; + if (compare) return 1; return 0; } diff --git a/src/blockScan-hip/main.cu b/src/blockScan-hip/main.cu index eb24fb57e5..fae16a1ee1 100644 --- a/src/blockScan-hip/main.cu +++ b/src/blockScan-hip/main.cu @@ -192,13 +192,11 @@ void Test() printf("\tOutput items: "); int compare = CompareDeviceResults(h_reference, d_out, TILE_SIZE); printf("%s\n", compare ? "FAIL" : "PASS"); - if (compare) exit(1); // Check total aggregate printf("\tAggregate: "); compare = CompareDeviceResults(&h_aggregate, d_out + TILE_SIZE, 1); printf("%s\n", compare ? "FAIL" : "PASS"); - if (compare) exit(1); } } GPU_CHECK(hipDeviceSynchronize()); @@ -272,5 +270,7 @@ int main(int argc, char** argv) Test<64, 16, BLOCK_SCAN_WARP_SCANS>(); //Test<32, 32, BLOCK_SCAN_WARP_SCANS>(); + if (compare) return 1; + if (compare) return 1; return 0; } diff --git a/src/blockScan-sycl/main.cpp b/src/blockScan-sycl/main.cpp index e8277ce818..ae7de363f2 100644 --- a/src/blockScan-sycl/main.cpp +++ b/src/blockScan-sycl/main.cpp @@ -182,13 +182,11 @@ void Test(sycl::queue &q) try { printf("\tOutput items: "); int compare = CompareDeviceResults(q, h_reference, d_out, TILE_SIZE); printf("%s\n", compare ? "FAIL" : "PASS"); - if (compare) exit(1); // Check total aggregate printf("\tAggregate: "); compare = CompareDeviceResults(q, &h_aggregate, d_out + TILE_SIZE, 1); printf("%s\n", compare ? "FAIL" : "PASS"); - if (compare) exit(1); } } q.wait(); @@ -269,5 +267,7 @@ int main(int argc, char** argv) Test<64, 16, BLOCK_SCAN_WARP_SCANS>(q); Test<32, 32, BLOCK_SCAN_WARP_SCANS>(q); + if (compare) return 1; + if (compare) return 1; return 0; } diff --git a/src/blockexchange-cuda/main.cu b/src/blockexchange-cuda/main.cu index bdc6f16ed9..8779a98ba0 100644 --- a/src/blockexchange-cuda/main.cu +++ b/src/blockexchange-cuda/main.cu @@ -121,12 +121,12 @@ int main(int argc, char* argv[]) } stop: printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } cudaFree(d_A); cudaFree(d_out); free(A); free(out); + if (!ok) return 1; return 0; } diff --git a/src/blockexchange-hip/main.cu b/src/blockexchange-hip/main.cu index 2606ebcf3e..f2a3bbf21d 100644 --- a/src/blockexchange-hip/main.cu +++ b/src/blockexchange-hip/main.cu @@ -121,12 +121,12 @@ int main(int argc, char* argv[]) } stop: printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } hipFree(d_A); hipFree(d_out); free(A); free(out); + if (!ok) return 1; return 0; } diff --git a/src/blockexchange-sycl/main.cpp b/src/blockexchange-sycl/main.cpp index 5590b222d5..eca8c127a8 100644 --- a/src/blockexchange-sycl/main.cpp +++ b/src/blockexchange-sycl/main.cpp @@ -142,12 +142,12 @@ int main(int argc, char* argv[]) } stop: printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } sycl::free(d_A, q); sycl::free(d_out, q); free(A); free(out); + if (!ok) return 1; return 0; } diff --git a/src/boxfilter-cuda/main.cu b/src/boxfilter-cuda/main.cu index 81068e1db0..e60db4b1d7 100644 --- a/src/boxfilter-cuda/main.cu +++ b/src/boxfilter-cuda/main.cu @@ -285,11 +285,11 @@ int main(int argc, char** argv) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(uiInput); free(uiTmp); free(uiDevOutput); free(uiHostOutput); + if (error) return 1; return 0; } diff --git a/src/boxfilter-hip/main.cu b/src/boxfilter-hip/main.cu index 47eed8516e..5d6b3973a1 100644 --- a/src/boxfilter-hip/main.cu +++ b/src/boxfilter-hip/main.cu @@ -284,11 +284,11 @@ int main(int argc, char** argv) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(uiInput); free(uiTmp); free(uiDevOutput); free(uiHostOutput); + if (error) return 1; return 0; } diff --git a/src/boxfilter-omp/main.cpp b/src/boxfilter-omp/main.cpp index a417b11373..3a5ecebf54 100644 --- a/src/boxfilter-omp/main.cpp +++ b/src/boxfilter-omp/main.cpp @@ -283,11 +283,11 @@ int main(int argc, char** argv) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(uiInput); free(uiTmp); free(uiDevOutput); free(uiHostOutput); + if (error) return 1; return 0; } diff --git a/src/boxfilter-sycl/main.cpp b/src/boxfilter-sycl/main.cpp index de21beb3d0..9718ddd261 100644 --- a/src/boxfilter-sycl/main.cpp +++ b/src/boxfilter-sycl/main.cpp @@ -263,11 +263,11 @@ int main(int argc, char** argv) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(uiInput); free(uiTmp); free(uiDevOutput); free(uiHostOutput); + if (error) return 1; return 0; } diff --git a/src/bscan-cuda/main.cu b/src/bscan-cuda/main.cu index 113266d727..02643faa05 100644 --- a/src/bscan-cuda/main.cu +++ b/src/bscan-cuda/main.cu @@ -157,7 +157,6 @@ void bscan (const int repeat) printf("Block size = %d, ratio of valid elements = %f, verify = %s\n", N, valid_count * 1.f / (N * repeat), ok ? "PASS" : "FAIL"); - if (!ok) exit(1); if (ok) { printf("Average execution time: %f (us)\n", (time * 1e-3f) / repeat); @@ -185,5 +184,6 @@ int main(int argc, char* argv[]) bscan<512>(repeat); bscan<1024>(repeat); + if (!ok) return 1; return 0; } diff --git a/src/bscan-hip/main-wave64.cu b/src/bscan-hip/main-wave64.cu index 77bc46745f..a5d4cc2e2b 100644 --- a/src/bscan-hip/main-wave64.cu +++ b/src/bscan-hip/main-wave64.cu @@ -146,7 +146,6 @@ void bscan (const int repeat) printf("Block size = %d, ratio of valid elements = %f, verify = %s\n", N, valid_count * 1.f / (N * repeat), ok ? "PASS" : "FAIL"); - if (!ok) exit(1); if (ok) { printf("Average execution time: %f (us)\n", (time * 1e-3f) / repeat); @@ -173,5 +172,6 @@ int main(int argc, char* argv[]) bscan<512>(repeat); bscan<1024>(repeat); + if (!ok) return 1; return 0; } diff --git a/src/bscan-hip/main.cu b/src/bscan-hip/main.cu index 9f234b3bfa..cae96e8ef1 100644 --- a/src/bscan-hip/main.cu +++ b/src/bscan-hip/main.cu @@ -146,7 +146,6 @@ void bscan (const int repeat) printf("Block size = %d, ratio of valid elements = %f, verify = %s\n", N, valid_count * 1.f / (N * repeat), ok ? "PASS" : "FAIL"); - if (!ok) exit(1); if (ok) { printf("Average execution time: %f (us)\n", (time * 1e-3f) / repeat); @@ -174,5 +173,6 @@ int main(int argc, char* argv[]) bscan<512>(repeat); bscan<1024>(repeat); + if (!ok) return 1; return 0; } diff --git a/src/bscan-sycl/main-wave64.cpp b/src/bscan-sycl/main-wave64.cpp index 8d15e57731..a8b44343b5 100644 --- a/src/bscan-sycl/main-wave64.cpp +++ b/src/bscan-sycl/main-wave64.cpp @@ -162,7 +162,6 @@ void bscan (const int repeat) printf("Block size = %d, ratio of valid elements = %f, verify = %s\n", N, valid_count * 1.f / (N * repeat), ok ? "PASS" : "FAIL"); - if (!ok) exit(1); if (ok) { printf("Average execution time: %f (us)\n", (time * 1e-3f) / repeat); @@ -189,5 +188,6 @@ int main(int argc, char* argv[]) bscan<512>(repeat); bscan<1024>(repeat); + if (!ok) return 1; return 0; } diff --git a/src/bscan-sycl/main.cpp b/src/bscan-sycl/main.cpp index b715a48f76..9c0480fc4c 100644 --- a/src/bscan-sycl/main.cpp +++ b/src/bscan-sycl/main.cpp @@ -163,7 +163,6 @@ void bscan (const int repeat) printf("Block size = %d, ratio of valid elements = %f, verify = %s\n", N, valid_count * 1.f / (N * repeat), ok ? "PASS" : "FAIL"); - if (!ok) exit(1); if (ok) { printf("Average execution time: %f (us)\n", (time * 1e-3f) / repeat); @@ -191,5 +190,6 @@ int main(int argc, char* argv[]) bscan<512>(repeat); bscan<1024>(repeat); + if (!ok) return 1; return 0; } diff --git a/src/bspline-vgh-cuda/main.cu b/src/bspline-vgh-cuda/main.cu index 8c96ec1716..40c1e2fb10 100644 --- a/src/bspline-vgh-cuda/main.cu +++ b/src/bspline-vgh-cuda/main.cu @@ -263,7 +263,6 @@ int main(int argc, char ** argv) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(Af); free(dAf); @@ -292,5 +291,6 @@ int main(int argc, char ** argv) { cudaFree(d_d2a); cudaFree(d_d2b); cudaFree(d_d2c); + if (!ok) return 1; return 0; } diff --git a/src/bspline-vgh-hip/main.cu b/src/bspline-vgh-hip/main.cu index 7eb600648e..7e97af2d7c 100644 --- a/src/bspline-vgh-hip/main.cu +++ b/src/bspline-vgh-hip/main.cu @@ -264,7 +264,6 @@ int main(int argc, char ** argv) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(Af); free(dAf); @@ -293,5 +292,6 @@ int main(int argc, char ** argv) { hipFree(d_d2a); hipFree(d_d2b); hipFree(d_d2c); + if (!ok) return 1; return 0; } diff --git a/src/bspline-vgh-omp/main.cpp b/src/bspline-vgh-omp/main.cpp index 037b870397..cfb5bd5ae7 100644 --- a/src/bspline-vgh-omp/main.cpp +++ b/src/bspline-vgh-omp/main.cpp @@ -284,7 +284,6 @@ int main(int argc, char ** argv) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(Af); free(dAf); @@ -300,5 +299,6 @@ int main(int argc, char ** argv) { free(walkers_z); free(spline_coefs); + if (!ok) return 1; return 0; } diff --git a/src/bspline-vgh-sycl/main.cpp b/src/bspline-vgh-sycl/main.cpp index 2018e2a085..8d27dfae4a 100644 --- a/src/bspline-vgh-sycl/main.cpp +++ b/src/bspline-vgh-sycl/main.cpp @@ -325,7 +325,6 @@ int main(int argc, char ** argv) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(Af); free(dAf); @@ -354,5 +353,6 @@ int main(int argc, char ** argv) { sycl::free(d_d2a, q); sycl::free(d_d2b, q); sycl::free(d_d2c, q); + if (!ok) return 1; return 0; } diff --git a/src/burger-cuda/main.cu b/src/burger-cuda/main.cu index ad4627ecd9..76b5f8aa21 100644 --- a/src/burger-cuda/main.cu +++ b/src/burger-cuda/main.cu @@ -185,7 +185,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(x); free(y); @@ -200,5 +199,6 @@ int main(int argc, char* argv[]) cudaFree(d_u_new); cudaFree(d_v_new); + if (!ok) return 1; return 0; } diff --git a/src/burger-hip/main.cu b/src/burger-hip/main.cu index 9a070740e7..252b37625f 100644 --- a/src/burger-hip/main.cu +++ b/src/burger-hip/main.cu @@ -185,7 +185,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(x); free(y); @@ -200,5 +199,6 @@ int main(int argc, char* argv[]) hipFree(d_u_new); hipFree(d_v_new); + if (!ok) return 1; return 0; } diff --git a/src/burger-omp/main.cpp b/src/burger-omp/main.cpp index 0fa376eccb..bb72b326ce 100644 --- a/src/burger-omp/main.cpp +++ b/src/burger-omp/main.cpp @@ -191,7 +191,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(x); free(y); @@ -202,5 +201,6 @@ int main(int argc, char* argv[]) free(u_new); free(v_new); + if (!ok) return 1; return 0; } diff --git a/src/burger-sycl/main.cpp b/src/burger-sycl/main.cpp index 9369214ea1..4c15b81135 100644 --- a/src/burger-sycl/main.cpp +++ b/src/burger-sycl/main.cpp @@ -238,7 +238,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(x); free(y); @@ -253,5 +252,6 @@ int main(int argc, char* argv[]) sycl::free(d_u_new, q); sycl::free(d_v_new, q); + if (!ok) return 1; return 0; } diff --git a/src/cbsfil-cuda/main.cu b/src/cbsfil-cuda/main.cu index 1d2f1ad205..164a325956 100644 --- a/src/cbsfil-cuda/main.cu +++ b/src/cbsfil-cuda/main.cu @@ -73,7 +73,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); for (int i = 0; i < repeat; i++) { @@ -88,5 +87,6 @@ int main(int argc, char* argv[]) { cudaFree(d_image); free(image); free(image_ref); + if (!ok) return 1; return 0; } diff --git a/src/cbsfil-hip/main.cu b/src/cbsfil-hip/main.cu index f5bb73ef67..6b222c3ec2 100644 --- a/src/cbsfil-hip/main.cu +++ b/src/cbsfil-hip/main.cu @@ -73,7 +73,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); for (int i = 0; i < repeat; i++) { @@ -88,5 +87,6 @@ int main(int argc, char* argv[]) { hipFree(d_image); free(image); free(image_ref); + if (!ok) return 1; return 0; } diff --git a/src/cbsfil-omp/main.cpp b/src/cbsfil-omp/main.cpp index 2621419fef..45ffbade4b 100644 --- a/src/cbsfil-omp/main.cpp +++ b/src/cbsfil-omp/main.cpp @@ -65,7 +65,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); for (int i = 0; i < repeat; i++) { @@ -79,5 +78,6 @@ int main(int argc, char* argv[]) { free(image); free(image_ref); + if (!ok) return 1; return 0; } diff --git a/src/cbsfil-sycl/main.cpp b/src/cbsfil-sycl/main.cpp index eee538cbd6..90127db2bc 100644 --- a/src/cbsfil-sycl/main.cpp +++ b/src/cbsfil-sycl/main.cpp @@ -88,7 +88,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); for (int i = 0; i < repeat; i++) { @@ -114,5 +113,6 @@ int main(int argc, char* argv[]) { sycl::free(d_image, q); free(image); free(image_ref); + if (!ok) return 1; return 0; } diff --git a/src/cc-cuda/main.cu b/src/cc-cuda/main.cu index 1fac145ae4..8b977ddc17 100644 --- a/src/cc-cuda/main.cu +++ b/src/cc-cuda/main.cu @@ -432,9 +432,9 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFreeHost(nodestatus); freeECLgraph(g); + if (!ok) return 1; return 0; } diff --git a/src/cc-sycl/main.cpp b/src/cc-sycl/main.cpp index 50a38c21e6..e9bf71c8cc 100644 --- a/src/cc-sycl/main.cpp +++ b/src/cc-sycl/main.cpp @@ -508,9 +508,9 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(nodestatus); freeECLgraph(g); + if (!ok) return 1; return 0; } diff --git a/src/ccsd-trpdrv-cuda/main.cu b/src/ccsd-trpdrv-cuda/main.cu index 82cd21463d..82fecd1861 100644 --- a/src/ccsd-trpdrv-cuda/main.cu +++ b/src/ccsd-trpdrv-cuda/main.cu @@ -193,7 +193,6 @@ maxed_out: bool ok = fabs(emp4_r - emp4) < 1e-6 && fabs(emp5_r - emp5) < 1e-6; printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(eorb); free(f1n ); @@ -228,5 +227,6 @@ maxed_out: free(t1v1 ); free(t1v2 ); + if (!ok) return 1; return 0; } diff --git a/src/ccsd-trpdrv-omp/main.cpp b/src/ccsd-trpdrv-omp/main.cpp index 5b3d75f43b..9f95e6b6f8 100644 --- a/src/ccsd-trpdrv-omp/main.cpp +++ b/src/ccsd-trpdrv-omp/main.cpp @@ -192,7 +192,6 @@ int main(int argc, char* argv[]) bool ok = fabs(emp4_r - emp4) < 1e-6 && fabs(emp5_r - emp5) < 1e-6; printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(eorb); free(f1n ); @@ -227,5 +226,6 @@ int main(int argc, char* argv[]) free(t1v1 ); free(t1v2 ); + if (!ok) return 1; return 0; } diff --git a/src/ccsd-trpdrv-sycl/main.cpp b/src/ccsd-trpdrv-sycl/main.cpp index e68d878b12..d3c1cb5ddf 100644 --- a/src/ccsd-trpdrv-sycl/main.cpp +++ b/src/ccsd-trpdrv-sycl/main.cpp @@ -208,7 +208,6 @@ int main(int argc, char* argv[]) bool ok = fabs(emp4_r - emp4) < 1e-6 && fabs(emp5_r - emp5) < 1e-6; printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(eorb); free(f1n ); @@ -243,5 +242,6 @@ int main(int argc, char* argv[]) free(t1v1 ); free(t1v2 ); + if (!ok) return 1; return 0; } diff --git a/src/chacha20-cuda/main.cu b/src/chacha20-cuda/main.cu index 2d3845d7f0..ca65c6e292 100644 --- a/src/chacha20-cuda/main.cu +++ b/src/chacha20-cuda/main.cu @@ -114,7 +114,6 @@ int main(int argc, char* argv[]) int error = memcmp(result, raw_keystream, result_len); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(result); free(raw_keystream); @@ -127,5 +126,6 @@ int main(int argc, char* argv[]) cudaFree(d_result); cudaFree(d_char_to_uint); + if (error) return 1; return 0; } diff --git a/src/chacha20-hip/main.cu b/src/chacha20-hip/main.cu index 7c7b0494e8..3331e34f21 100644 --- a/src/chacha20-hip/main.cu +++ b/src/chacha20-hip/main.cu @@ -114,7 +114,6 @@ int main(int argc, char* argv[]) int error = memcmp(result, raw_keystream, result_len); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(result); free(raw_keystream); @@ -127,5 +126,6 @@ int main(int argc, char* argv[]) hipFree(d_result); hipFree(d_char_to_uint); + if (error) return 1; return 0; } diff --git a/src/chacha20-omp/main.cpp b/src/chacha20-omp/main.cpp index 5f95609bd6..daec77a219 100644 --- a/src/chacha20-omp/main.cpp +++ b/src/chacha20-omp/main.cpp @@ -101,12 +101,12 @@ int main(int argc, char* argv[]) int error = memcmp(result, raw_keystream, result_len); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(result); free(raw_keystream); free(raw_key); free(raw_nonce); + if (error) return 1; return 0; } diff --git a/src/chacha20-sycl/main.cpp b/src/chacha20-sycl/main.cpp index 8b1db2010d..31bc161c1e 100644 --- a/src/chacha20-sycl/main.cpp +++ b/src/chacha20-sycl/main.cpp @@ -129,7 +129,6 @@ int main(int argc, char* argv[]) int error = memcmp(result, raw_keystream, result_len); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(result); free(raw_keystream); @@ -142,5 +141,6 @@ int main(int argc, char* argv[]) sycl::free(d_result, q); sycl::free(d_char_to_uint, q); + if (error) return 1; return 0; } diff --git a/src/chi2-cuda/chi2.cu b/src/chi2-cuda/chi2.cu index 8db772b686..5d614b19c6 100644 --- a/src/chi2-cuda/chi2.cu +++ b/src/chi2-cuda/chi2.cu @@ -153,11 +153,11 @@ int main(int argc, char* argv[]) { if (fabs(cpu_results[k] - h_results[k]) > 1e-4) error++; } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(dataT); free(h_results); free(cpu_results); + if (error) return 1; return 0; } diff --git a/src/chi2-hip/chi2.cu b/src/chi2-hip/chi2.cu index 806b973152..f5086ba5c3 100644 --- a/src/chi2-hip/chi2.cu +++ b/src/chi2-hip/chi2.cu @@ -153,11 +153,11 @@ int main(int argc, char* argv[]) { if (fabs(cpu_results[k] - h_results[k]) > 1e-4) error++; } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(dataT); free(h_results); free(cpu_results); + if (error) return 1; return 0; } diff --git a/src/chi2-omp/chi2.cpp b/src/chi2-omp/chi2.cpp index 46de7643dc..de0ec741a5 100644 --- a/src/chi2-omp/chi2.cpp +++ b/src/chi2-omp/chi2.cpp @@ -121,11 +121,11 @@ int main(int argc, char* argv[]) { if (fabs(cpu_results[k] - h_results[k]) > 1e-4) error++; } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(dataT); free(h_results); free(cpu_results); + if (error) return 1; return 0; } diff --git a/src/chi2-sycl/chi2.cpp b/src/chi2-sycl/chi2.cpp index 1d18dff592..e3180217f9 100644 --- a/src/chi2-sycl/chi2.cpp +++ b/src/chi2-sycl/chi2.cpp @@ -153,11 +153,11 @@ int main(int argc, char* argv[]) { if (std::fabs(cpu_results[k] - h_results[k]) > 1e-4) error++; } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(dataT); free(h_results); free(cpu_results); + if (error) return 1; return 0; } diff --git a/src/cmembench-cuda/main.cu b/src/cmembench-cuda/main.cu index 6d9c8f846b..12f298b481 100644 --- a/src/cmembench-cuda/main.cu +++ b/src/cmembench-cuda/main.cu @@ -128,7 +128,6 @@ int test_case (int *a, long gridsize, int repeat) { // verify cudaMemcpy(&c, cd, sizeof(int), cudaMemcpyDeviceToHost); printf("%s\t", (c == VECTOR_SIZE) ? "PASS" : "FAIL"); - if (!(c == VECTOR_SIZE)) exit(1); cudaFree(cd); @@ -160,5 +159,6 @@ int main(int argc, char* argv[]) { free(v); + if (!(c == VECTOR_SIZE)) return 1; return 0; } diff --git a/src/cmembench-hip/main.cu b/src/cmembench-hip/main.cu index ae0bb74050..18088a6ade 100644 --- a/src/cmembench-hip/main.cu +++ b/src/cmembench-hip/main.cu @@ -128,7 +128,6 @@ int test_case (int *a, long gridsize, int repeat) { // verify hipMemcpy(&c, cd, sizeof(int), hipMemcpyDeviceToHost); printf("%s\t", (c == VECTOR_SIZE) ? "PASS" : "FAIL"); - if (!(c == VECTOR_SIZE)) exit(1); hipFree(cd); @@ -160,5 +159,6 @@ int main(int argc, char* argv[]) { free(v); + if (!(c == VECTOR_SIZE)) return 1; return 0; } diff --git a/src/columnarSolver-cuda/main.cu b/src/columnarSolver-cuda/main.cu index 6376bb9ee1..63a7e72ecf 100644 --- a/src/columnarSolver-cuda/main.cu +++ b/src/columnarSolver-cuda/main.cu @@ -133,7 +133,6 @@ int main(int argc, char* argv[]) { //printf("Best candidate score: %f\n", bestScore); bool pass = verify(&decrypted[ENCRYPTEDLEN*bestCandidate]); printf("%s\n", pass ? "PASS" : "FAIL"); - if (!pass) exit(1); cudaFree(d_scores); cudaFree(d_encrypted); @@ -141,5 +140,6 @@ int main(int argc, char* argv[]) { cudaFree(devStates); delete[] decrypted; delete[] scoreHistory; + if (!pass) return 1; return 0; } diff --git a/src/columnarSolver-hip/main.cu b/src/columnarSolver-hip/main.cu index f39ccc5953..793b9fa8f5 100644 --- a/src/columnarSolver-hip/main.cu +++ b/src/columnarSolver-hip/main.cu @@ -133,7 +133,6 @@ int main(int argc, char* argv[]) { //printf("Best candidate score: %f\n", bestScore); bool pass = verify(&decrypted[ENCRYPTEDLEN*bestCandidate]); printf("%s\n", pass ? "PASS" : "FAIL"); - if (!pass) exit(1); hipFree(d_scores); hipFree(d_encrypted); @@ -141,5 +140,6 @@ int main(int argc, char* argv[]) { hipFree(devStates); delete[] decrypted; delete[] scoreHistory; + if (!pass) return 1; return 0; } diff --git a/src/columnarSolver-omp/main.cpp b/src/columnarSolver-omp/main.cpp index 51663d0944..a16b37858d 100644 --- a/src/columnarSolver-omp/main.cpp +++ b/src/columnarSolver-omp/main.cpp @@ -137,9 +137,9 @@ int main(int argc, char* argv[]) { //printf("Best candidate score: %f\n", bestScore); bool pass = verify(&decrypted[ENCRYPTEDLEN*bestCandidate]); printf("%s\n", pass ? "PASS" : "FAIL"); - if (!pass) exit(1); delete[] decrypted; delete[] scoreHistory; + if (!pass) return 1; return 0; } diff --git a/src/columnarSolver-sycl/main.cpp b/src/columnarSolver-sycl/main.cpp index efa52f7965..7eccebbff8 100644 --- a/src/columnarSolver-sycl/main.cpp +++ b/src/columnarSolver-sycl/main.cpp @@ -156,7 +156,6 @@ int main(int argc, char* argv[]) { //printf("Best candidate score: %f\n", bestScore); bool pass = verify(&decrypted[ENCRYPTEDLEN*bestCandidate]); printf("%s\n", pass ? "PASS" : "FAIL"); - if (!pass) exit(1); sycl::free(d_scores, q); sycl::free(d_encrypted, q); @@ -164,5 +163,6 @@ int main(int argc, char* argv[]) { sycl::free(d_states, q); delete[] decrypted; delete[] scoreHistory; + if (!pass) return 1; return 0; } diff --git a/src/complex-cuda/main.cu b/src/complex-cuda/main.cu index 1ee5a87448..6acf2cf3c1 100644 --- a/src/complex-cuda/main.cu +++ b/src/complex-cuda/main.cu @@ -103,10 +103,10 @@ int main(int argc, char* argv[]) { printf("%s\n", (complex_float_check && complex_double_check) ? "PASS" : "FAIL"); - if (!(complex_float_check && complex_double_check)) exit(1); cudaFree(d_cs); free(cs); + if (!(complex_float_check && complex_double_check)) return 1; return 0; } diff --git a/src/complex-hip/main.cu b/src/complex-hip/main.cu index 9786e46f51..5c0849844c 100644 --- a/src/complex-hip/main.cu +++ b/src/complex-hip/main.cu @@ -103,10 +103,10 @@ int main(int argc, char* argv[]) { printf("%s\n", (complex_float_check && complex_double_check) ? "PASS" : "FAIL"); - if (!(complex_float_check && complex_double_check)) exit(1); hipFree(d_cs); free(cs); + if (!(complex_float_check && complex_double_check)) return 1; return 0; } diff --git a/src/complex-omp/main.cpp b/src/complex-omp/main.cpp index 34f6c88b87..bc92ffec6b 100644 --- a/src/complex-omp/main.cpp +++ b/src/complex-omp/main.cpp @@ -64,10 +64,10 @@ int main(int argc, char* argv[]) { printf("%s\n", (complex_float_check && complex_double_check) ? "PASS" : "FAIL"); - if (!(complex_float_check && complex_double_check)) exit(1); } free(cs); + if (!(complex_float_check && complex_double_check)) return 1; return 0; } diff --git a/src/complex-sycl/main.cpp b/src/complex-sycl/main.cpp index add9181229..f9d7a47a77 100644 --- a/src/complex-sycl/main.cpp +++ b/src/complex-sycl/main.cpp @@ -131,10 +131,10 @@ int main(int argc, char* argv[]) { printf("%s\n", (complex_float_check && complex_double_check) ? "PASS" : "FAIL"); - if (!(complex_float_check && complex_double_check)) exit(1); sycl::free(d_cs, q); free(cs); + if (!(complex_float_check && complex_double_check)) return 1; return 0; } diff --git a/src/concurrentKernels-cuda/main.cu b/src/concurrentKernels-cuda/main.cu index a8ef904159..2c757b4e00 100644 --- a/src/concurrentKernels-cuda/main.cu +++ b/src/concurrentKernels-cuda/main.cu @@ -156,7 +156,6 @@ int main(int argc, char **argv) { long sum = 0; for (int i = 0; i < time_clocks; i++) sum += i % 3; printf("%s\n", a[0] == nkernels * sum ? "PASS" : "FAIL"); - if (a[0] != nkernels * sum) exit(1); // release resources for (int i = 0; i < nkernels; i++) { @@ -170,5 +169,6 @@ int main(int argc, char **argv) { cudaFreeHost(a); cudaFree(d_a); + if (a[0] != nkernels * sum) return 1; return 0; } diff --git a/src/concurrentKernels-hip/main.cu b/src/concurrentKernels-hip/main.cu index 866c923a28..700729e93c 100644 --- a/src/concurrentKernels-hip/main.cu +++ b/src/concurrentKernels-hip/main.cu @@ -153,7 +153,6 @@ int main(int argc, char **argv) { long sum = 0; for (int i = 0; i < time_clocks; i++) sum += i % 3; printf("%s\n", a[0] == nkernels * sum ? "PASS" : "FAIL"); - if (a[0] != nkernels * sum) exit(1); // release resources for (int i = 0; i < nkernels; i++) { @@ -167,5 +166,6 @@ int main(int argc, char **argv) { hipHostFree(a); hipFree(d_a); + if (a[0] != nkernels * sum) return 1; return 0; } diff --git a/src/concurrentKernels-sycl/main.cpp b/src/concurrentKernels-sycl/main.cpp index 5a65294cab..32c5c6c265 100644 --- a/src/concurrentKernels-sycl/main.cpp +++ b/src/concurrentKernels-sycl/main.cpp @@ -140,10 +140,10 @@ int main(int argc, char **argv) { long sum = 0; for (int i = 0; i < time_clocks; i++) sum += i % 3; printf("%s\n", a[0] == nkernels * sum ? "PASS" : "FAIL"); - if (a[0] != nkernels * sum) exit(1); sycl::free(a, q); sycl::free(d_a, q); + if (a[0] != nkernels * sum) return 1; return 0; } diff --git a/src/convolution1D-cuda/main.cu b/src/convolution1D-cuda/main.cu index fd080c0b08..043254fdac 100644 --- a/src/convolution1D-cuda/main.cu +++ b/src/convolution1D-cuda/main.cu @@ -133,7 +133,6 @@ void reference(const T *h_in, } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } template @@ -248,5 +247,6 @@ int main(int argc, char* argv[]) { conv1D(input_width, mask_width, repeat); } + if (!ok) return 1; return 0; } diff --git a/src/convolution1D-hip/main.cu b/src/convolution1D-hip/main.cu index 8760b8dcb6..bd175dfb20 100644 --- a/src/convolution1D-hip/main.cu +++ b/src/convolution1D-hip/main.cu @@ -133,7 +133,6 @@ void reference(const T *h_in, } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } template @@ -248,5 +247,6 @@ int main(int argc, char* argv[]) { conv1D(input_width, mask_width, repeat); } + if (!ok) return 1; return 0; } diff --git a/src/convolution1D-omp/main.cpp b/src/convolution1D-omp/main.cpp index 309c83a01c..d41b7a14b9 100644 --- a/src/convolution1D-omp/main.cpp +++ b/src/convolution1D-omp/main.cpp @@ -139,7 +139,6 @@ void reference(const T *h_in, } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } template @@ -255,5 +254,6 @@ int main(int argc, char* argv[]) { conv1D(input_width, mask_width, repeat); } + if (!ok) return 1; return 0; } diff --git a/src/convolution1D-sycl/main.cpp b/src/convolution1D-sycl/main.cpp index 733e5626c2..caf18c2a79 100644 --- a/src/convolution1D-sycl/main.cpp +++ b/src/convolution1D-sycl/main.cpp @@ -136,7 +136,6 @@ void reference(const T *h_in, } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } template @@ -276,5 +275,6 @@ int main(int argc, char* argv[]) { conv1D(q, input_width, mask_width, repeat); } + if (!ok) return 1; return 0; } diff --git a/src/convolution3D-cuda/main.cu b/src/convolution3D-cuda/main.cu index d9f5dd2d39..e021144a6e 100644 --- a/src/convolution3D-cuda/main.cu +++ b/src/convolution3D-cuda/main.cu @@ -42,7 +42,6 @@ void verify (const T* Y, T* Y_ref, size_t Y_size) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } template @@ -296,5 +295,6 @@ int main(int argc, char* argv[]) { printf("\n========== Warmup done ==========\n"); conv3D(N, C, M, W, H, K, repeat); + if (!ok) return 1; return 0; } diff --git a/src/convolution3D-hip/main.cu b/src/convolution3D-hip/main.cu index fade38d01e..e5c7a8d98b 100644 --- a/src/convolution3D-hip/main.cu +++ b/src/convolution3D-hip/main.cu @@ -42,7 +42,6 @@ void verify (const T* Y, T* Y_ref, size_t Y_size) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } template @@ -296,5 +295,6 @@ int main(int argc, char* argv[]) { printf("\n========== Warmup done ==========\n"); conv3D(N, C, M, W, H, K, repeat); + if (!ok) return 1; return 0; } diff --git a/src/convolution3D-omp/main.cpp b/src/convolution3D-omp/main.cpp index 7e28c07281..ec0eb24124 100644 --- a/src/convolution3D-omp/main.cpp +++ b/src/convolution3D-omp/main.cpp @@ -112,7 +112,6 @@ void conv3D(const int N, const int C, const int M, const int Win, const int Hin, } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(X); free(W); @@ -141,5 +140,6 @@ int main(int argc, char* argv[]) { printf("\n========== Warmup done ==========\n"); conv3D(N, C, M, W, H, K, repeat); + if (!ok) return 1; return 0; } diff --git a/src/convolution3D-sycl/main.cpp b/src/convolution3D-sycl/main.cpp index e9727c3ccd..e4e5626740 100644 --- a/src/convolution3D-sycl/main.cpp +++ b/src/convolution3D-sycl/main.cpp @@ -36,7 +36,6 @@ void verify (const T* Y, T* Y_ref, size_t Y_size) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } template @@ -313,5 +312,6 @@ int main(int argc, char* argv[]) { printf("\n========== Warmup done ==========\n"); conv3D(N, C, M, W, H, K, repeat); + if (!ok) return 1; return 0; } diff --git a/src/cooling-cuda/main.cu b/src/cooling-cuda/main.cu index 8a29502323..ba67b2c27d 100644 --- a/src/cooling-cuda/main.cu +++ b/src/cooling-cuda/main.cu @@ -183,12 +183,12 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); cudaFree(d_T); cudaFree(d_r); free(T); free(r); free(h_r); + if (error) return 1; return 0; } diff --git a/src/cooling-hip/main.cu b/src/cooling-hip/main.cu index 9b5b28103b..f6f2de8662 100644 --- a/src/cooling-hip/main.cu +++ b/src/cooling-hip/main.cu @@ -183,12 +183,12 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); hipFree(d_T); hipFree(d_r); free(T); free(r); free(h_r); + if (error) return 1; return 0; } diff --git a/src/cooling-omp/main.cpp b/src/cooling-omp/main.cpp index d70d5a51ec..8ac13188b0 100644 --- a/src/cooling-omp/main.cpp +++ b/src/cooling-omp/main.cpp @@ -175,10 +175,10 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(T); free(h_r); free(d_r); + if (error) return 1; return 0; } diff --git a/src/cooling-sycl/main.cpp b/src/cooling-sycl/main.cpp index b099b3b136..cd3e059253 100644 --- a/src/cooling-sycl/main.cpp +++ b/src/cooling-sycl/main.cpp @@ -218,12 +218,12 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); sycl::free(d_T, q); sycl::free(d_r, q); free(T); free(r); free(h_r); + if (error) return 1; return 0; } diff --git a/src/cross-cuda/main.cu b/src/cross-cuda/main.cu index 34509c93f3..08e413d012 100644 --- a/src/cross-cuda/main.cu +++ b/src/cross-cuda/main.cu @@ -185,7 +185,6 @@ void eval(const int nrows, const int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_a); cudaFree(d_b); @@ -213,5 +212,6 @@ int main(int argc, char* argv[]) printf("=========== Data type is FP64 ==========\n"); eval(nrows, repeat); + if (!ok) return 1; return 0; } diff --git a/src/cross-hip/main.cu b/src/cross-hip/main.cu index f03e2d1d81..40eded546d 100644 --- a/src/cross-hip/main.cu +++ b/src/cross-hip/main.cu @@ -185,7 +185,6 @@ void eval(const int nrows, const int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_a); hipFree(d_b); @@ -213,5 +212,6 @@ int main(int argc, char* argv[]) printf("=========== Data type is FP64 ==========\n"); eval(nrows, repeat); + if (!ok) return 1; return 0; } diff --git a/src/cross-omp/main.cpp b/src/cross-omp/main.cpp index 5cef455717..f8327d23d2 100644 --- a/src/cross-omp/main.cpp +++ b/src/cross-omp/main.cpp @@ -168,7 +168,6 @@ void eval(const int nrows, const int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(a); free(b); @@ -192,5 +191,6 @@ int main(int argc, char* argv[]) printf("=========== Data type is FP64 ==========\n"); eval(nrows, repeat); + if (!ok) return 1; return 0; } diff --git a/src/cross-sycl/main.cpp b/src/cross-sycl/main.cpp index 329a779138..c1ad2fce97 100644 --- a/src/cross-sycl/main.cpp +++ b/src/cross-sycl/main.cpp @@ -218,7 +218,6 @@ void eval(const int nrows, const int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_a, q); sycl::free(d_b, q); @@ -246,5 +245,6 @@ int main(int argc, char* argv[]) printf("=========== Data type is FP64 ==========\n"); eval(nrows, repeat); + if (!ok) return 1; return 0; } diff --git a/src/dct8x8-cuda/main.cu b/src/dct8x8-cuda/main.cu index 0648c46fdd..fb78ff01bb 100644 --- a/src/dct8x8-cuda/main.cu +++ b/src/dct8x8-cuda/main.cu @@ -49,7 +49,6 @@ void Verify(const float* h_OutputGPU, printf("PASS\n"); else printf("FAIL\n"); - if (L2norm >= 1E-6) exit(1); } //////////////////////////////////////////////////////////////////////////////// @@ -140,5 +139,6 @@ int main(int argc, char **argv) free(h_OutputCPU); free(h_Input); + if (L2norm >= 1E-6) return 1; return 0; } diff --git a/src/dct8x8-hip/main.cu b/src/dct8x8-hip/main.cu index 2a2f3a1cdf..ca87f4cf06 100644 --- a/src/dct8x8-hip/main.cu +++ b/src/dct8x8-hip/main.cu @@ -49,7 +49,6 @@ void Verify(const float* h_OutputGPU, printf("PASS\n"); else printf("FAIL\n"); - if (L2norm >= 1E-6) exit(1); } //////////////////////////////////////////////////////////////////////////////// @@ -140,5 +139,6 @@ int main(int argc, char **argv) free(h_OutputCPU); free(h_Input); + if (L2norm >= 1E-6) return 1; return 0; } diff --git a/src/dct8x8-omp/main.cpp b/src/dct8x8-omp/main.cpp index 781652ac4c..6daf94a0ba 100644 --- a/src/dct8x8-omp/main.cpp +++ b/src/dct8x8-omp/main.cpp @@ -49,7 +49,6 @@ void Verify(const float* h_OutputGPU, printf("PASS\n"); else printf("FAIL\n"); - if (L2norm >= 1E-6) exit(1); } //////////////////////////////////////////////////////////////////////////////// @@ -132,5 +131,6 @@ int main(int argc, char **argv) free(h_OutputCPU); free(h_Input); + if (L2norm >= 1E-6) return 1; return 0; } diff --git a/src/dct8x8-sycl/main.cpp b/src/dct8x8-sycl/main.cpp index 01cfee6ef7..f5db112df3 100644 --- a/src/dct8x8-sycl/main.cpp +++ b/src/dct8x8-sycl/main.cpp @@ -50,7 +50,6 @@ void Verify(const float* h_OutputGPU, printf("PASS\n"); else printf("FAIL\n"); - if (L2norm >= 1E-6) exit(1); } //////////////////////////////////////////////////////////////////////////////// @@ -145,5 +144,6 @@ int main(int argc, char **argv) sycl::free(d_Output, q); sycl::free(d_Input, q); + if (L2norm >= 1E-6) return 1; return 0; } diff --git a/src/degrid-cuda/main.cu b/src/degrid-cuda/main.cu index 1b7c95072c..7937edf995 100644 --- a/src/degrid-cuda/main.cu +++ b/src/degrid-cuda/main.cu @@ -131,7 +131,6 @@ int main(void) { } std::cout << (ok ? "PASS" : "FAIL") << std::endl; - if (!ok) exit(1); img -= GCF_DIM + IMG_SIZE*GCF_DIM; @@ -140,5 +139,6 @@ int main(void) { free(img); free(gcf); + if (!ok) return 1; return 0; } diff --git a/src/degrid-hip/main.cu b/src/degrid-hip/main.cu index b748ca9970..89bda581c0 100644 --- a/src/degrid-hip/main.cu +++ b/src/degrid-hip/main.cu @@ -131,7 +131,6 @@ int main(void) { } std::cout << (ok ? "PASS" : "FAIL") << std::endl; - if (!ok) exit(1); img -= GCF_DIM + IMG_SIZE*GCF_DIM; @@ -140,5 +139,6 @@ int main(void) { free(img); free(gcf); + if (!ok) return 1; return 0; } diff --git a/src/degrid-omp/main.cpp b/src/degrid-omp/main.cpp index 8f0211b1f4..79ef2be988 100644 --- a/src/degrid-omp/main.cpp +++ b/src/degrid-omp/main.cpp @@ -131,7 +131,6 @@ int main(void) { } std::cout << (ok ? "PASS" : "FAIL") << std::endl; - if (!ok) exit(1); img -= GCF_DIM + IMG_SIZE*GCF_DIM; @@ -140,5 +139,6 @@ int main(void) { free(img); free(gcf); + if (!ok) return 1; return 0; } diff --git a/src/degrid-sycl/main.cpp b/src/degrid-sycl/main.cpp index df936ab25b..e0bb9c620a 100644 --- a/src/degrid-sycl/main.cpp +++ b/src/degrid-sycl/main.cpp @@ -127,7 +127,6 @@ int main(void) { } std::cout << (ok ? "PASS" : "FAIL") << std::endl; - if (!ok) exit(1); img -= GCF_DIM + IMG_SIZE*GCF_DIM; @@ -136,5 +135,6 @@ int main(void) { free(img); free(gcf); + if (!ok) return 1; return 0; } diff --git a/src/dense-embedding-cuda/main.cu b/src/dense-embedding-cuda/main.cu index d6d835cf6f..d3512d2229 100644 --- a/src/dense-embedding-cuda/main.cu +++ b/src/dense-embedding-cuda/main.cu @@ -213,7 +213,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } cudaFree(d_input); @@ -230,5 +229,6 @@ int main(int argc, char* argv[]) free(input_offset); } + if (!ok) return 1; return 0; } diff --git a/src/dense-embedding-hip/main.cu b/src/dense-embedding-hip/main.cu index 3986c789cb..e3ddb855d7 100644 --- a/src/dense-embedding-hip/main.cu +++ b/src/dense-embedding-hip/main.cu @@ -213,7 +213,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } hipFree(d_input); @@ -230,5 +229,6 @@ int main(int argc, char* argv[]) free(input_offset); } + if (!ok) return 1; return 0; } diff --git a/src/dense-embedding-omp/main.cpp b/src/dense-embedding-omp/main.cpp index 3d4a0e9fa5..0f851a6752 100644 --- a/src/dense-embedding-omp/main.cpp +++ b/src/dense-embedding-omp/main.cpp @@ -179,7 +179,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } } @@ -192,5 +191,6 @@ int main(int argc, char* argv[]) free(offset); } + if (!ok) return 1; return 0; } diff --git a/src/dense-embedding-sycl/main.cpp b/src/dense-embedding-sycl/main.cpp index 9a1943d04c..d9799a2b80 100644 --- a/src/dense-embedding-sycl/main.cpp +++ b/src/dense-embedding-sycl/main.cpp @@ -245,7 +245,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } sycl::free(d_input, q); @@ -262,5 +261,6 @@ int main(int argc, char* argv[]) free(input_offset); } + if (!ok) return 1; return 0; } diff --git a/src/dp-cuda/main.cu b/src/dp-cuda/main.cu index 2807f1acfb..b66dedad26 100644 --- a/src/dp-cuda/main.cu +++ b/src/dp-cuda/main.cu @@ -135,7 +135,6 @@ void dot (const size_t iNumElements, const int iNumIterations) GPU_CHECK(cudaMemcpy(&dst, d_dst, sizeof(T), cudaMemcpyDeviceToHost)); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); - if (dst != dst_ref) exit(1); cublasHandle_t h; BLAS_CHECK(cublasCreate(&h)); @@ -176,7 +175,6 @@ void dot (const size_t iNumElements, const int iNumIterations) GPU_CHECK(cudaMemcpy(&dst, d_dst, sizeof(T), cudaMemcpyDeviceToHost)); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); - if (dst != dst_ref) exit(1); // warmup for (i = 0; i < 100; i++) { @@ -195,7 +193,6 @@ void dot (const size_t iNumElements, const int iNumIterations) time = std::chrono::duration_cast(end - start).count(); printf("Average std::transform_reduce execution time %f (ms)\n", (time * 1e-6f) / iNumIterations); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); - if (dst != dst_ref) exit(1); GPU_CHECK(cudaFree(d_dst)); GPU_CHECK(cudaFree(d_srcA)); @@ -220,5 +217,8 @@ int main(int argc, char **argv) printf("------------- Data type is Float64 ---------------\n"); dot(iNumElements, iNumIterations); + if (dst != dst_ref) return 1; + if (dst != dst_ref) return 1; + if (dst != dst_ref) return 1; return EXIT_SUCCESS; } diff --git a/src/dp-hip/main.cu b/src/dp-hip/main.cu index 9b0718a486..d37ede8e48 100644 --- a/src/dp-hip/main.cu +++ b/src/dp-hip/main.cu @@ -136,7 +136,6 @@ void dot (const size_t iNumElements, const int iNumIterations) GPU_CHECK(hipMemcpy(&dst, d_dst, sizeof(T), hipMemcpyDeviceToHost)); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); - if (dst != dst_ref) exit(1); hipblasHandle_t h; BLAS_CHECK(hipblasCreate(&h)); @@ -177,7 +176,6 @@ void dot (const size_t iNumElements, const int iNumIterations) GPU_CHECK(hipMemcpy(&dst, d_dst, sizeof(T), hipMemcpyDeviceToHost)); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); - if (dst != dst_ref) exit(1); // warmup for (i = 0; i < 100; i++) { @@ -196,7 +194,6 @@ void dot (const size_t iNumElements, const int iNumIterations) time = std::chrono::duration_cast(end - start).count(); printf("Average std::transform_reduce execution time %f (ms)\n", (time * 1e-6f) / iNumIterations); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); - if (dst != dst_ref) exit(1); GPU_CHECK(hipFree(d_dst)); GPU_CHECK(hipFree(d_srcA)); @@ -221,5 +218,8 @@ int main(int argc, char **argv) printf("------------- Data type is Float64 ---------------\n"); dot(iNumElements, iNumIterations); + if (dst != dst_ref) return 1; + if (dst != dst_ref) return 1; + if (dst != dst_ref) return 1; return EXIT_SUCCESS; } diff --git a/src/dp-omp/main.cpp b/src/dp-omp/main.cpp index 0bbb2d4818..df9f3a6fa8 100644 --- a/src/dp-omp/main.cpp +++ b/src/dp-omp/main.cpp @@ -90,7 +90,6 @@ void dot (const size_t iNumElements, const int iNumIterations) auto time = std::chrono::duration_cast(end - start).count(); printf("Average kernel execution time %f (ms)\n", (time * 1e-6f) / iNumIterations); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); - if (dst != dst_ref) exit(1); } // Compute and compare results for golden-host and report errors and pass/fail @@ -113,5 +112,6 @@ int main(int argc, char **argv) printf("------------- Data type is Float64 ---------------\n"); dot(iNumElements, iNumIterations); + if (dst != dst_ref) return 1; return EXIT_SUCCESS; } diff --git a/src/dp-sycl/main.cpp b/src/dp-sycl/main.cpp index 915c961718..1a86be4a57 100644 --- a/src/dp-sycl/main.cpp +++ b/src/dp-sycl/main.cpp @@ -116,7 +116,6 @@ void dot (const size_t iNumElements, const int iNumIterations) try { printf("Average kernel execution time %f (ms)\n", (time * 1e-6f) / iNumIterations); q.memcpy(&dst, d_dst, sizeof(T)).wait(); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); - if (dst != dst_ref) exit(1); // warmup for (i = 0; i < 100; i++) { @@ -136,7 +135,6 @@ void dot (const size_t iNumElements, const int iNumIterations) try { printf("Average oneMKL::dot execution time %f (ms)\n", (time * 1e-6f) / iNumIterations); q.memcpy(&dst, d_dst, sizeof(T)).wait(); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); - if (dst != dst_ref) exit(1); // warmup for (i = 0; i < 100; i++) @@ -154,7 +152,6 @@ void dot (const size_t iNumElements, const int iNumIterations) try { time = std::chrono::duration_cast(end - start).count(); printf("Average std::transform_reduce execution time %f (ms)\n", (time * 1e-6f) / iNumIterations); printf("%s\n\n", dst == dst_ref ? "PASS" : "FAIL"); - if (dst != dst_ref) exit(1); sycl::free(d_dst, q); sycl::free(d_srcA, q); @@ -182,5 +179,8 @@ int main(int argc, char **argv) dot(iNumElements, iNumIterations); printf("------------- Data type is Float64 ---------------\n"); dot(iNumElements, iNumIterations); + if (dst != dst_ref) return 1; + if (dst != dst_ref) return 1; + if (dst != dst_ref) return 1; return EXIT_SUCCESS; } diff --git a/src/dp4a-cuda/main.cu b/src/dp4a-cuda/main.cu index 5bda191abf..acd330ebcc 100644 --- a/src/dp4a-cuda/main.cu +++ b/src/dp4a-cuda/main.cu @@ -161,7 +161,6 @@ void dot (const size_t iNumElements, const int iNumIterations) T dst_dev = 0; for (i = 0; i < grid_size; i++) dst_dev += dst[i]; printf("%s\n\n", dst_dev == M * dst_ref ? "PASS" : "FAIL"); - if (dst_dev != M * dst_ref) exit(1); start = std::chrono::steady_clock::now(); @@ -178,7 +177,6 @@ void dot (const size_t iNumElements, const int iNumIterations) dst_dev = 0; for (i = 0; i < grid_size; i++) dst_dev += dst[i]; printf("%s\n\n", dst_dev == M * dst_ref ? "PASS" : "FAIL"); - if (dst_dev != M * dst_ref) exit(1); GPU_CHECK(cudaFree(d_dst)); GPU_CHECK(cudaFree(d_srcA)); @@ -203,5 +201,7 @@ int main(int argc, char **argv) printf("------------- Data type is uint32 ---------------\n"); dot(iNumElements, iNumIterations); + if (dst_dev != M * dst_ref) return 1; + if (dst_dev != M * dst_ref) return 1; return EXIT_SUCCESS; } diff --git a/src/dp4a-hip/main.cu b/src/dp4a-hip/main.cu index 1096f8f720..b76c403856 100644 --- a/src/dp4a-hip/main.cu +++ b/src/dp4a-hip/main.cu @@ -205,7 +205,6 @@ void dot (const size_t iNumElements, const int iNumIterations) T dst_dev = 0; for (i = 0; i < grid_size; i++) dst_dev += dst[i]; printf("%s\n\n", dst_dev == M * dst_ref ? "PASS" : "FAIL"); - if (dst_dev != M * dst_ref) exit(1); start = std::chrono::steady_clock::now(); @@ -222,7 +221,6 @@ void dot (const size_t iNumElements, const int iNumIterations) dst_dev = 0; for (i = 0; i < grid_size; i++) dst_dev += dst[i]; printf("%s\n\n", dst_dev == M * dst_ref ? "PASS" : "FAIL"); - if (dst_dev != M * dst_ref) exit(1); GPU_CHECK(hipFree(d_dst)); GPU_CHECK(hipFree(d_srcA)); @@ -247,5 +245,7 @@ int main(int argc, char **argv) printf("------------- Data type is uint32 ---------------\n"); dot(iNumElements, iNumIterations); + if (dst_dev != M * dst_ref) return 1; + if (dst_dev != M * dst_ref) return 1; return EXIT_SUCCESS; } diff --git a/src/dp4a-sycl/main.cpp b/src/dp4a-sycl/main.cpp index bc258e30f5..e07e071734 100644 --- a/src/dp4a-sycl/main.cpp +++ b/src/dp4a-sycl/main.cpp @@ -162,7 +162,6 @@ void dot (sycl::queue &q, const size_t iNumElements, const int iNumIterations) T dst_dev = 0; for (i = 0; i < grid_size; i++) dst_dev += dst[i]; printf("%s\n\n", dst_dev == M * dst_ref ? "PASS" : "FAIL"); - if (dst_dev != M * dst_ref) exit(1); start = std::chrono::steady_clock::now(); @@ -179,7 +178,6 @@ void dot (sycl::queue &q, const size_t iNumElements, const int iNumIterations) dst_dev = 0; for (i = 0; i < grid_size; i++) dst_dev += dst[i]; printf("%s\n\n", dst_dev == M * dst_ref ? "PASS" : "FAIL"); - if (dst_dev != M * dst_ref) exit(1); sycl::free(d_dst, q); sycl::free(d_srcA, q); @@ -210,5 +208,7 @@ int main(int argc, char **argv) printf("------------- Data type is uint32 ---------------\n"); dot(q, iNumElements, iNumIterations); + if (dst_dev != M * dst_ref) return 1; + if (dst_dev != M * dst_ref) return 1; return EXIT_SUCCESS; } diff --git a/src/ecdh-cuda/main.cu b/src/ecdh-cuda/main.cu index 3ec9866ac7..995ac4f5a6 100644 --- a/src/ecdh-cuda/main.cu +++ b/src/ecdh-cuda/main.cu @@ -71,7 +71,6 @@ int main(int argc, char **argv) bool fail_pk_x = memcmp(pk_slow_x, pk_fast_x, pk_x_size); bool fail_pk_y = memcmp(pk_slow_y, pk_fast_y, pk_x_size); printf("%s\n", (fail_pk_x || fail_pk_y) ? "FAIL" : "PASS"); - if ((fail_pk_x || fail_pk_y)) exit(1); cudaFree(d_pk_x); cudaFree(d_pk_y); @@ -79,5 +78,6 @@ int main(int argc, char **argv) free(pk_slow_y); free(pk_fast_x); free(pk_fast_y); + if ((fail_pk_x || fail_pk_y)) return 1; return 0; } diff --git a/src/ecdh-hip/main.cu b/src/ecdh-hip/main.cu index 9d3180dde4..acb2499a59 100644 --- a/src/ecdh-hip/main.cu +++ b/src/ecdh-hip/main.cu @@ -71,7 +71,6 @@ int main(int argc, char **argv) bool fail_pk_x = memcmp(pk_slow_x, pk_fast_x, pk_x_size); bool fail_pk_y = memcmp(pk_slow_y, pk_fast_y, pk_x_size); printf("%s\n", (fail_pk_x || fail_pk_y) ? "FAIL" : "PASS"); - if ((fail_pk_x || fail_pk_y)) exit(1); hipFree(d_pk_x); hipFree(d_pk_y); @@ -79,5 +78,6 @@ int main(int argc, char **argv) free(pk_slow_y); free(pk_fast_x); free(pk_fast_y); + if ((fail_pk_x || fail_pk_y)) return 1; return 0; } diff --git a/src/ecdh-omp/main.cpp b/src/ecdh-omp/main.cpp index 9a87280a44..49c9a9ba58 100644 --- a/src/ecdh-omp/main.cpp +++ b/src/ecdh-omp/main.cpp @@ -60,11 +60,11 @@ int main(int argc, char **argv) bool fail_pk_x = memcmp(pk_slow_x, pk_fast_x, pk_x_size); bool fail_pk_y = memcmp(pk_slow_y, pk_fast_y, pk_x_size); printf("%s\n", (fail_pk_x || fail_pk_y) ? "FAIL" : "PASS"); - if ((fail_pk_x || fail_pk_y)) exit(1); free(pk_slow_x); free(pk_slow_y); free(pk_fast_x); free(pk_fast_y); + if ((fail_pk_x || fail_pk_y)) return 1; return 0; } diff --git a/src/ecdh-sycl/main.cpp b/src/ecdh-sycl/main.cpp index 74394294d8..dd06f8eec3 100644 --- a/src/ecdh-sycl/main.cpp +++ b/src/ecdh-sycl/main.cpp @@ -96,7 +96,6 @@ int main(int argc, char **argv) bool fail_pk_x = memcmp(pk_slow_x, pk_fast_x, pk_x_size); bool fail_pk_y = memcmp(pk_slow_y, pk_fast_y, pk_x_size); printf("%s\n", (fail_pk_x || fail_pk_y) ? "FAIL" : "PASS"); - if ((fail_pk_x || fail_pk_y)) exit(1); sycl::free(d_pk_x, q); sycl::free(d_pk_y, q); @@ -104,5 +103,6 @@ int main(int argc, char **argv) free(pk_slow_y); free(pk_fast_x); free(pk_fast_y); + if ((fail_pk_x || fail_pk_y)) return 1; return 0; } diff --git a/src/entropy-cuda/main.cu b/src/entropy-cuda/main.cu index 62f860d6ff..fe5c058460 100644 --- a/src/entropy-cuda/main.cu +++ b/src/entropy-cuda/main.cu @@ -166,10 +166,10 @@ int main(int argc, char* argv[]) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(input); free(output); free(output_ref); + if (!ok) return 1; return 0; } diff --git a/src/entropy-hip/main.cu b/src/entropy-hip/main.cu index 47d5884660..9e87ba4013 100644 --- a/src/entropy-hip/main.cu +++ b/src/entropy-hip/main.cu @@ -163,10 +163,10 @@ int main(int argc, char* argv[]) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(input); free(output); free(output_ref); + if (!ok) return 1; return 0; } diff --git a/src/entropy-omp/main.cpp b/src/entropy-omp/main.cpp index df6dc03b5d..6cd80ea466 100644 --- a/src/entropy-omp/main.cpp +++ b/src/entropy-omp/main.cpp @@ -156,10 +156,10 @@ int main(int argc, char* argv[]) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(input); free(output); free(output_ref); + if (!ok) return 1; return 0; } diff --git a/src/entropy-sycl/main.cpp b/src/entropy-sycl/main.cpp index 14545365f3..e4c2f2af35 100644 --- a/src/entropy-sycl/main.cpp +++ b/src/entropy-sycl/main.cpp @@ -159,10 +159,10 @@ int main(int argc, char* argv[]) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(input); free(output); free(output_ref); + if (!ok) return 1; return 0; } diff --git a/src/epistasis-cuda/main.cu b/src/epistasis-cuda/main.cu index 4242e75204..c9afa4c8c4 100644 --- a/src/epistasis-cuda/main.cu +++ b/src/epistasis-cuda/main.cu @@ -352,7 +352,6 @@ int main(int argc, char **argv) bool ok = (p1 == p2) && (fabsf(scores[p1] - scores_ref[p2]) < 1e-3f); std::cout << (ok ? "PASS" : "FAIL") << std::endl; - if (!ok) exit(1); cudaFree(d_data_zeros); cudaFree(d_data_ones); @@ -367,5 +366,6 @@ int main(int argc, char **argv) mem_free(SNP_Data); mem_free(SNP_Data_trans); mem_free(Ph_Data); + if (!ok) return 1; return 0; } diff --git a/src/epistasis-hip/main.cu b/src/epistasis-hip/main.cu index 1b6f3925bc..cdb3efc277 100644 --- a/src/epistasis-hip/main.cu +++ b/src/epistasis-hip/main.cu @@ -352,7 +352,6 @@ int main(int argc, char **argv) bool ok = (p1 == p2) && (fabsf(scores[p1] - scores_ref[p2]) < 1e-3f); std::cout << (ok ? "PASS" : "FAIL") << std::endl; - if (!ok) exit(1); hipFree(d_data_zeros); hipFree(d_data_ones); @@ -367,5 +366,6 @@ int main(int argc, char **argv) mem_free(SNP_Data); mem_free(SNP_Data_trans); mem_free(Ph_Data); + if (!ok) return 1; return 0; } diff --git a/src/epistasis-sycl/main.cpp b/src/epistasis-sycl/main.cpp index 97c606cf8e..aa21bdf8dd 100644 --- a/src/epistasis-sycl/main.cpp +++ b/src/epistasis-sycl/main.cpp @@ -353,7 +353,6 @@ int main(int argc, char **argv) bool ok = (p1 == p2) && (fabsf(scores[p1] - scores_ref[p2]) < 1e-3f); std::cout << (ok ? "PASS" : "FAIL") << std::endl; - if (!ok) exit(1); sycl::free(d_data_zeros, q); sycl::free(d_data_ones, q); @@ -368,5 +367,6 @@ int main(int argc, char **argv) mem_free(SNP_Data); mem_free(SNP_Data_trans); mem_free(Ph_Data); + if (!ok) return 1; return 0; } diff --git a/src/f16max-cuda/main.cu b/src/f16max-cuda/main.cu index 680efed849..12562985c6 100644 --- a/src/f16max-cuda/main.cu +++ b/src/f16max-cuda/main.cu @@ -118,7 +118,6 @@ int main(int argc, char *argv[]) } } printf("fp16_hmax2 %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); for (int i = 0; i < repeat; i++) hmax<<>>( @@ -155,7 +154,6 @@ int main(int argc, char *argv[]) } printf("fp16_hmax %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_a); cudaFree(d_b); @@ -164,5 +162,7 @@ int main(int argc, char *argv[]) free(b); free(r); + if (!ok) return 1; + if (!ok) return 1; return EXIT_SUCCESS; } diff --git a/src/f16max-hip/main.cu b/src/f16max-hip/main.cu index a08346fa37..726dd7da4e 100644 --- a/src/f16max-hip/main.cu +++ b/src/f16max-hip/main.cu @@ -118,7 +118,6 @@ int main(int argc, char *argv[]) } } printf("fp16_hmax2 %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); for (int i = 0; i < repeat; i++) hmax<<>>( @@ -155,7 +154,6 @@ int main(int argc, char *argv[]) } printf("fp16_hmax %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_a); hipFree(d_b); @@ -164,5 +162,7 @@ int main(int argc, char *argv[]) free(b); free(r); + if (!ok) return 1; + if (!ok) return 1; return EXIT_SUCCESS; } diff --git a/src/f16max-sycl/main.cpp b/src/f16max-sycl/main.cpp index 3d346125de..d40d264ff1 100644 --- a/src/f16max-sycl/main.cpp +++ b/src/f16max-sycl/main.cpp @@ -150,7 +150,6 @@ int main(int argc, char *argv[]) } } printf("fp16_hmax2 %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // run hmax (the size is doubled) for (int i = 0; i < repeat; i++) { @@ -198,7 +197,6 @@ int main(int argc, char *argv[]) } printf("fp16_hmax %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_a, q); sycl::free(d_b, q); @@ -207,5 +205,7 @@ int main(int argc, char *argv[]) free(b); free(r); + if (!ok) return 1; + if (!ok) return 1; return EXIT_SUCCESS; } diff --git a/src/f8cast-cuda/main.cu b/src/f8cast-cuda/main.cu index 726585b56d..f631a80b89 100644 --- a/src/f8cast-cuda/main.cu +++ b/src/f8cast-cuda/main.cu @@ -112,7 +112,6 @@ void convert(bool isE4M3, int nelems, int niters) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); CUDA_CHECK(cudaFree(src)); CUDA_CHECK(cudaFree(dst)); @@ -135,5 +134,6 @@ int main(int argc, char* argv[]) { printf("float -> fp8 E5M2\n"); convert(false, nelems, niters); + if (!ok) return 1; return 0; } diff --git a/src/f8cast-hip/main.cu b/src/f8cast-hip/main.cu index 1504bfa2fb..4aeaa68f2a 100644 --- a/src/f8cast-hip/main.cu +++ b/src/f8cast-hip/main.cu @@ -112,7 +112,6 @@ void convert(bool isE4M3, int nelems, int niters) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); HIP_CHECK(hipFree(src)); HIP_CHECK(hipFree(dst)); @@ -135,5 +134,6 @@ int main(int argc, char* argv[]) { printf("float -> fp8 E5M2\n"); convert(false, nelems, niters); + if (!ok) return 1; return 0; } diff --git a/src/f8cast-sycl/main.cpp b/src/f8cast-sycl/main.cpp index 8e9bd07f69..2b5ecdcff5 100644 --- a/src/f8cast-sycl/main.cpp +++ b/src/f8cast-sycl/main.cpp @@ -111,7 +111,6 @@ void convert(sycl::queue &q, bool isE4M3, int nelems, int niters) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(src, q); sycl::free(dst, q); @@ -140,5 +139,6 @@ int main(int argc, char* argv[]) { printf("float -> fp8 E5M2\n"); convert(q, false, nelems, niters); + if (!ok) return 1; return 0; } diff --git a/src/fft-cuda/main.cu b/src/fft-cuda/main.cu index acd309c97e..788f0f15b7 100644 --- a/src/fft-cuda/main.cu +++ b/src/fft-cuda/main.cu @@ -170,7 +170,6 @@ int main(int argc, char** argv) } } std::cout << "FFT " << (error ? "FAIL" : "PASS") << std::endl; - if (error) exit(1); // execute iFFT ifft1D_512<<>>(d_source); @@ -190,7 +189,6 @@ int main(int argc, char** argv) } } std::cout << "iFFT " << (error ? "FAIL" : "PASS") << std::endl; - if (error) exit(1); auto start = std::chrono::steady_clock::now(); @@ -209,5 +207,7 @@ int main(int argc, char** argv) free(reference); free(source); + if (error) return 1; + if (error) return 1; return 0; } diff --git a/src/fft-hip/main.cu b/src/fft-hip/main.cu index 88c5c806a3..d79b775c49 100644 --- a/src/fft-hip/main.cu +++ b/src/fft-hip/main.cu @@ -170,7 +170,6 @@ int main(int argc, char** argv) } } std::cout << "FFT " << (error ? "FAIL" : "PASS") << std::endl; - if (error) exit(1); // execute iFFT ifft1D_512<<>>(d_source); @@ -190,7 +189,6 @@ int main(int argc, char** argv) } } std::cout << "iFFT " << (error ? "FAIL" : "PASS") << std::endl; - if (error) exit(1); auto start = std::chrono::steady_clock::now(); @@ -209,5 +207,7 @@ int main(int argc, char** argv) free(reference); free(source); + if (error) return 1; + if (error) return 1; return 0; } diff --git a/src/fft-omp/main.cpp b/src/fft-omp/main.cpp index 6f858fd5d9..bb6963e63a 100644 --- a/src/fft-omp/main.cpp +++ b/src/fft-omp/main.cpp @@ -345,7 +345,6 @@ int main(int argc, char** argv) } } std::cout << "FFT " << (error ? "FAIL" : "PASS") << std::endl; - if (error) exit(1); ifft1D_512(source, n_ffts); @@ -364,7 +363,6 @@ int main(int argc, char** argv) } } std::cout << "iFFT " << (error ? "FAIL" : "PASS") << std::endl; - if (error) exit(1); auto start = std::chrono::steady_clock::now(); @@ -381,5 +379,7 @@ int main(int argc, char** argv) free(reference); free(source); + if (error) return 1; + if (error) return 1; return 0; } diff --git a/src/fft-sycl/main.cpp b/src/fft-sycl/main.cpp index 79d41e052c..44bbf1c0a4 100644 --- a/src/fft-sycl/main.cpp +++ b/src/fft-sycl/main.cpp @@ -177,7 +177,6 @@ int main(int argc, char** argv) } } std::cout << "FFT " << (error ? "FAIL" : "PASS") << std::endl; - if (error) exit(1); auto ifft_kernel = [&](sycl::handler& cgh) { sycl::local_accessor smem (sycl::range<1>(8*8*9), cgh); @@ -204,7 +203,6 @@ int main(int argc, char** argv) } } std::cout << "iFFT " << (error ? "FAIL" : "PASS") << std::endl; - if (error) exit(1); auto start = std::chrono::steady_clock::now(); @@ -223,5 +221,7 @@ int main(int argc, char** argv) free(reference); free(source); + if (error) return 1; + if (error) return 1; return 0; } diff --git a/src/filter-cuda/main.cu b/src/filter-cuda/main.cu index 42c47007d5..21f09905f7 100644 --- a/src/filter-cuda/main.cu +++ b/src/filter-cuda/main.cu @@ -158,7 +158,6 @@ int main(int argc, char **argv) { bool match = check(d_nres, d_output, h_flt_count, h_output); printf("%s\n", match ? "PASS" : "FAIL"); - if (!match) exit(1); start = std::chrono::steady_clock::now(); @@ -175,11 +174,12 @@ int main(int argc, char **argv) { match = check(d_nres, d_output, h_flt_count, h_output); printf("%s\n", match ? "PASS" : "FAIL"); - if (!match) exit(1); cudaFree(d_input); cudaFree(d_output); cudaFree(d_nres); + if (!match) return 1; + if (!match) return 1; return 0; } diff --git a/src/filter-hip/main.cu b/src/filter-hip/main.cu index e254008f23..148011b0d7 100644 --- a/src/filter-hip/main.cu +++ b/src/filter-hip/main.cu @@ -157,7 +157,6 @@ int main(int argc, char **argv) { bool match = check(d_nres, d_output, h_flt_count, h_output); printf("%s\n", match ? "PASS" : "FAIL"); - if (!match) exit(1); start = std::chrono::steady_clock::now(); @@ -174,11 +173,12 @@ int main(int argc, char **argv) { match = check(d_nres, d_output, h_flt_count, h_output); printf("%s\n", match ? "PASS" : "FAIL"); - if (!match) exit(1); hipFree(d_input); hipFree(d_output); hipFree(d_nres); + if (!match) return 1; + if (!match) return 1; return 0; } diff --git a/src/filter-sycl/main.cpp b/src/filter-sycl/main.cpp index c9232e6a97..6e46c3ea23 100644 --- a/src/filter-sycl/main.cpp +++ b/src/filter-sycl/main.cpp @@ -181,7 +181,6 @@ int main(int argc, char **argv) { bool match = check(q, d_nres, d_output, h_flt_count, h_output); printf("%s\n", match ? "PASS" : "FAIL"); - if (!match) exit(1); start = std::chrono::steady_clock::now(); @@ -203,11 +202,12 @@ int main(int argc, char **argv) { match = check(q, d_nres, d_output, h_flt_count, h_output); printf("%s\n", match ? "PASS" : "FAIL"); - if (!match) exit(1); sycl::free(d_input, q); sycl::free(d_output, q); sycl::free(d_nres, q); + if (!match) return 1; + if (!match) return 1; return 0; } diff --git a/src/flip-cuda/main.cu b/src/flip-cuda/main.cu index 332c71c9f0..fb6e5f7a60 100644 --- a/src/flip-cuda/main.cu +++ b/src/flip-cuda/main.cu @@ -138,7 +138,6 @@ void flip (const int64_t num_dims, const int64_t num_flip_dims, cudaMemcpy(output, d_output, output_size_bytes, cudaMemcpyDeviceToHost); int error = memcmp(output, output_ref, output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); #ifdef EXAMPLE for (int i = 0; i < n; i++) { @@ -202,5 +201,6 @@ int main(int argc, char* argv[]) printf("=========== Data type is FP64 ==========\n"); flip(num_dims, num_flip_dims, dim_size, repeat); + if (error) return 1; return 0; } diff --git a/src/flip-hip/main.cu b/src/flip-hip/main.cu index a1beaea899..5c3b7f8ce3 100644 --- a/src/flip-hip/main.cu +++ b/src/flip-hip/main.cu @@ -138,7 +138,6 @@ void flip (const int64_t num_dims, const int64_t num_flip_dims, hipMemcpy(output, d_output, output_size_bytes, hipMemcpyDeviceToHost); int error = memcmp(output, output_ref, output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); #ifdef EXAMPLE for (int i = 0; i < n; i++) { @@ -202,5 +201,6 @@ int main(int argc, char* argv[]) printf("=========== Data type is FP64 ==========\n"); flip(num_dims, num_flip_dims, dim_size, repeat); + if (error) return 1; return 0; } diff --git a/src/flip-omp/main.cpp b/src/flip-omp/main.cpp index 75118949d5..3621500bbb 100644 --- a/src/flip-omp/main.cpp +++ b/src/flip-omp/main.cpp @@ -126,7 +126,6 @@ void flip (const int64_t num_dims, const int64_t num_flip_dims, #pragma omp target update from (d_output[0:n]) int error = memcmp(output, output_ref, output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); #ifdef EXAMPLE for (int i = 0; i < n; i++) { @@ -183,5 +182,6 @@ int main(int argc, char* argv[]) printf("=========== Data type is FP64 ==========\n"); flip(num_dims, num_flip_dims, dim_size, repeat); + if (error) return 1; return 0; } diff --git a/src/flip-sycl/main.cpp b/src/flip-sycl/main.cpp index a167ed86a1..960cd30c02 100644 --- a/src/flip-sycl/main.cpp +++ b/src/flip-sycl/main.cpp @@ -160,7 +160,6 @@ void flip (const int64_t num_dims, const int64_t num_flip_dims, q.memcpy(output, d_output, output_size_bytes).wait(); int error = memcmp(output, output_ref, output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); #ifdef EXAMPLE for (int i = 0; i < n; i++) { @@ -217,5 +216,6 @@ int main(int argc, char* argv[]) printf("=========== Data type is FP64 ==========\n"); flip(num_dims, num_flip_dims, dim_size, repeat); + if (error) return 1; return 0; } diff --git a/src/fma-cuda/main.cu b/src/fma-cuda/main.cu index 286c11c54a..956e90abfa 100644 --- a/src/fma-cuda/main.cu +++ b/src/fma-cuda/main.cu @@ -80,7 +80,6 @@ void fma(int NA, int NC, int C, int num_ops, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); double time = 0; for (int i = 0; i < repeat; i++) { @@ -155,5 +154,6 @@ int main(int argc, char* argv[]) fma(NA, NC, C, num_ops, repeat); } + if (!ok) return 1; return 0; } diff --git a/src/fma-hip/main.cu b/src/fma-hip/main.cu index 3eb73c1355..ba261bb8da 100644 --- a/src/fma-hip/main.cu +++ b/src/fma-hip/main.cu @@ -80,7 +80,6 @@ void fma(int NA, int NC, int C, int num_ops, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); double time = 0; for (int i = 0; i < repeat; i++) { @@ -155,5 +154,6 @@ int main(int argc, char* argv[]) fma(NA, NC, C, num_ops, repeat); } + if (!ok) return 1; return 0; } diff --git a/src/fma-sycl/main.cpp b/src/fma-sycl/main.cpp index bfc0461cc0..63268eb72b 100644 --- a/src/fma-sycl/main.cpp +++ b/src/fma-sycl/main.cpp @@ -80,7 +80,6 @@ void fma(sycl::queue &q, int NA, int NC, int C, int num_ops, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); double time = 0; for (int i = 0; i < repeat; i++) { @@ -159,5 +158,6 @@ int main(int argc, char* argv[]) fma(q, NA, NC, C, num_ops, repeat); } + if (!ok) return 1; return 0; } diff --git a/src/fpc-cuda/main.cu b/src/fpc-cuda/main.cu index 9db0e71072..d2d0c26d54 100644 --- a/src/fpc-cuda/main.cu +++ b/src/fpc-cuda/main.cu @@ -335,9 +335,9 @@ int main(int argc, char** argv) { printf("fpc2: average device offload time %f (s)\n", (time * 1e-9f) / repeat); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(values); free(cbuffer); + if (!ok) return 1; return 0; } diff --git a/src/fpc-hip/main.cu b/src/fpc-hip/main.cu index ae7cbee6a8..340bfc6585 100644 --- a/src/fpc-hip/main.cu +++ b/src/fpc-hip/main.cu @@ -335,9 +335,9 @@ int main(int argc, char** argv) { printf("fpc2: average device offload time %f (s)\n", (time * 1e-9f) / repeat); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(values); free(cbuffer); + if (!ok) return 1; return 0; } diff --git a/src/fpc-omp/main.cpp b/src/fpc-omp/main.cpp index c98e934dab..b5f73ee14e 100644 --- a/src/fpc-omp/main.cpp +++ b/src/fpc-omp/main.cpp @@ -313,9 +313,9 @@ int main(int argc, char** argv) { printf("fpc2: average device offload time %f (s)\n", (time * 1e-9f) / repeat); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(values); free(cbuffer); + if (!ok) return 1; return 0; } diff --git a/src/fpc-sycl/main.cpp b/src/fpc-sycl/main.cpp index 170836516d..17668501de 100644 --- a/src/fpc-sycl/main.cpp +++ b/src/fpc-sycl/main.cpp @@ -349,9 +349,9 @@ int main(int argc, char** argv) { printf("fpc2: average device offload time %f (s)\n", (time * 1e-9f) / repeat); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(values); free(cbuffer); + if (!ok) return 1; return 0; } diff --git a/src/fresnel-cuda/main.cu b/src/fresnel-cuda/main.cu index aa872fccca..ad835f15fb 100644 --- a/src/fresnel-cuda/main.cu +++ b/src/fresnel-cuda/main.cu @@ -74,12 +74,12 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_x); cudaFree(d_output); free(x); free(output); free(h_output); + if (!ok) return 1; return 0; } diff --git a/src/fresnel-hip/main.cu b/src/fresnel-hip/main.cu index 8c76a2e215..63442ef765 100644 --- a/src/fresnel-hip/main.cu +++ b/src/fresnel-hip/main.cu @@ -74,12 +74,12 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_x); hipFree(d_output); free(x); free(output); free(h_output); + if (!ok) return 1; return 0; } diff --git a/src/fresnel-omp/main.cpp b/src/fresnel-omp/main.cpp index 25d161b63a..740297c8f1 100644 --- a/src/fresnel-omp/main.cpp +++ b/src/fresnel-omp/main.cpp @@ -57,10 +57,10 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(x); free(output); free(h_output); + if (!ok) return 1; return 0; } diff --git a/src/fresnel-sycl/main.cpp b/src/fresnel-sycl/main.cpp index d87bbc0f45..cccd381f8a 100644 --- a/src/fresnel-sycl/main.cpp +++ b/src/fresnel-sycl/main.cpp @@ -76,12 +76,12 @@ int main(int argc, char *argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_x, q); sycl::free(d_output, q); free(x); free(output); free(h_output); + if (!ok) return 1; return 0; } diff --git a/src/fsm-cuda/main.cu b/src/fsm-cuda/main.cu index c85e238a3c..83f2186ec8 100644 --- a/src/fsm-cuda/main.cu +++ b/src/fsm-cuda/main.cu @@ -160,7 +160,6 @@ int main(int argc, char *argv[]) bool ok = ((length - misses) == besthits); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG // print FSM state assignment in R's ncol format @@ -181,5 +180,6 @@ int main(int argc, char *argv[]) cudaFree(d_smax); cudaFree(d_sbest); cudaFree(d_oldmax); + if (!ok) return 1; return 0; } diff --git a/src/fsm-hip/main.cu b/src/fsm-hip/main.cu index 28b4848a96..b58a9f4314 100644 --- a/src/fsm-hip/main.cu +++ b/src/fsm-hip/main.cu @@ -160,7 +160,6 @@ int main(int argc, char *argv[]) bool ok = ((length - misses) == besthits); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG // print FSM state assignment in R's ncol format @@ -181,5 +180,6 @@ int main(int argc, char *argv[]) hipFree(d_smax); hipFree(d_sbest); hipFree(d_oldmax); + if (!ok) return 1; return 0; } diff --git a/src/fsm-sycl/main.cpp b/src/fsm-sycl/main.cpp index 31d60aaa40..dca5c815f4 100644 --- a/src/fsm-sycl/main.cpp +++ b/src/fsm-sycl/main.cpp @@ -187,7 +187,6 @@ int main(int argc, char *argv[]) bool ok = ((length - misses) == besthits); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG // print FSM state assignment in R's ncol format @@ -208,5 +207,6 @@ int main(int argc, char *argv[]) sycl::free(d_smax, q); sycl::free(d_sbest, q); sycl::free(d_oldmax, q); + if (!ok) return 1; return 0; } diff --git a/src/ga-cuda/main.cu b/src/ga-cuda/main.cu index f03c11b059..ec31ddd017 100644 --- a/src/ga-cuda/main.cu +++ b/src/ga-cuda/main.cu @@ -116,10 +116,10 @@ int main(int argc, char* argv[]) } printf("Total kernel execution time %f (s)\n", total_time * 1e-9f); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); cudaFree(d_target); cudaFree(d_query); cudaFree(d_batch_result); + if (error) return 1; return 0; } diff --git a/src/ga-hip/main.cu b/src/ga-hip/main.cu index 533f0c357a..575ffc9554 100644 --- a/src/ga-hip/main.cu +++ b/src/ga-hip/main.cu @@ -116,10 +116,10 @@ int main(int argc, char* argv[]) } printf("Total kernel execution time %f (s)\n", total_time * 1e-9f); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); hipFree(d_target); hipFree(d_query); hipFree(d_batch_result); + if (error) return 1; return 0; } diff --git a/src/ga-sycl/main.cpp b/src/ga-sycl/main.cpp index 57d411d06f..b1ecaa7fb2 100644 --- a/src/ga-sycl/main.cpp +++ b/src/ga-sycl/main.cpp @@ -133,10 +133,10 @@ int main(int argc, char* argv[]) } printf("Total kernel execution time %f (s)\n", total_time * 1e-9f); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); sycl::free(d_target, q); sycl::free(d_query, q); sycl::free(d_batch_result, q); + if (error) return 1; return 0; } diff --git a/src/gaussian-cuda/gaussianElim.cu b/src/gaussian-cuda/gaussianElim.cu index 443a34d916..f4b4d4e5e2 100644 --- a/src/gaussian-cuda/gaussianElim.cu +++ b/src/gaussian-cuda/gaussianElim.cu @@ -163,7 +163,6 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(m); free(a); @@ -287,6 +286,7 @@ int parseCommandline(int argc, char *argv[], char* filename, } } } + if (!ok) return 1; return 0; } diff --git a/src/gaussian-hip/gaussianElim.cu b/src/gaussian-hip/gaussianElim.cu index 8015950e4f..714a8266e0 100644 --- a/src/gaussian-hip/gaussianElim.cu +++ b/src/gaussian-hip/gaussianElim.cu @@ -163,7 +163,6 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(m); free(a); @@ -287,6 +286,7 @@ int parseCommandline(int argc, char *argv[], char* filename, } } } + if (!ok) return 1; return 0; } diff --git a/src/gaussian-omp/gaussianElim.cpp b/src/gaussian-omp/gaussianElim.cpp index 0bce428c61..29aab73726 100644 --- a/src/gaussian-omp/gaussianElim.cpp +++ b/src/gaussian-omp/gaussianElim.cpp @@ -158,7 +158,6 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(m); free(a); @@ -242,6 +241,7 @@ int parseCommandline(int argc, char *argv[], char* filename, } } } + if (!ok) return 1; return 0; } diff --git a/src/gaussian-sycl/gaussianElim.cpp b/src/gaussian-sycl/gaussianElim.cpp index 87c8575a59..d0acccbf78 100644 --- a/src/gaussian-sycl/gaussianElim.cpp +++ b/src/gaussian-sycl/gaussianElim.cpp @@ -164,7 +164,6 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(m); free(a); @@ -294,6 +293,7 @@ int parseCommandline(int argc, char *argv[], char* filename, } } } + if (!ok) return 1; return 0; } diff --git a/src/gc-cuda/main.cu b/src/gc-cuda/main.cu index a7d83f1b83..4f5ce39893 100644 --- a/src/gc-cuda/main.cu +++ b/src/gc-cuda/main.cu @@ -423,7 +423,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); if (ok) { const int vals = 16; @@ -446,5 +445,6 @@ int main(int argc, char* argv[]) delete [] color; freeECLgraph(g); + if (!ok) return 1; return 0; } diff --git a/src/gc-hip/main.cu b/src/gc-hip/main.cu index fd93516b63..4b097c30e0 100644 --- a/src/gc-hip/main.cu +++ b/src/gc-hip/main.cu @@ -421,7 +421,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); if (ok) { const int vals = 16; @@ -444,5 +443,6 @@ int main(int argc, char* argv[]) delete [] color; freeECLgraph(g); + if (!ok) return 1; return 0; } diff --git a/src/gc-omp/main.cpp b/src/gc-omp/main.cpp index 689920d715..12749118eb 100644 --- a/src/gc-omp/main.cpp +++ b/src/gc-omp/main.cpp @@ -373,7 +373,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); const int vals = 16; int c[vals]; @@ -398,5 +397,6 @@ int main(int argc, char* argv[]) delete [] posscol2; delete [] wl; freeECLgraph(g); + if (!ok) return 1; return 0; } diff --git a/src/gc-sycl/main.cpp b/src/gc-sycl/main.cpp index dbed2fb424..be00991973 100644 --- a/src/gc-sycl/main.cpp +++ b/src/gc-sycl/main.cpp @@ -464,7 +464,6 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); if (ok) { const int vals = 16; @@ -487,5 +486,6 @@ int main(int argc, char *argv[]) { delete [] color; freeECLgraph(g); + if (!ok) return 1; return 0; } diff --git a/src/geam-cuda/main.cu b/src/geam-cuda/main.cu index 798f1e12ba..14b86e89c8 100644 --- a/src/geam-cuda/main.cu +++ b/src/geam-cuda/main.cu @@ -78,7 +78,6 @@ void transpose_f64(int nrow, int ncol, int repeat) { } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); cublasDestroy(handle); free(h_matrixT); @@ -159,7 +158,6 @@ void transpose_f32(int nrow, int ncol, int repeat) { } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); cublasDestroy(handle); free(matrixT); @@ -188,5 +186,7 @@ int main(int argc, char* argv[]) { nrow, ncol); transpose_f64(nrow, ncol, repeat); + if (error) return 1; + if (error) return 1; return 0; } diff --git a/src/geam-hip/main.cu b/src/geam-hip/main.cu index f22317e2b4..eea8940cdf 100644 --- a/src/geam-hip/main.cu +++ b/src/geam-hip/main.cu @@ -78,7 +78,6 @@ void transpose_f64(int nrow, int ncol, int repeat) { } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); hipblasDestroy(handle); free(h_matrixT); @@ -159,7 +158,6 @@ void transpose_f32(int nrow, int ncol, int repeat) { } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); hipblasDestroy(handle); free(matrixT); @@ -188,5 +186,7 @@ int main(int argc, char* argv[]) { nrow, ncol); transpose_f64(nrow, ncol, repeat); + if (error) return 1; + if (error) return 1; return 0; } diff --git a/src/geam-sycl/main.cpp b/src/geam-sycl/main.cpp index 531f854902..c5989f659f 100644 --- a/src/geam-sycl/main.cpp +++ b/src/geam-sycl/main.cpp @@ -77,7 +77,6 @@ void transpose(sycl::queue &q, int nrow, int ncol, int repeat) { } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); sycl::free(d_matrix, q); sycl::free(d_matrixT, q); @@ -115,5 +114,6 @@ int main(int argc, char* argv[]) { nrow, ncol); transpose(q, nrow, ncol, repeat); + if (error) return 1; return 0; } diff --git a/src/geglu-cuda/main.cu b/src/geglu-cuda/main.cu index d8b576df71..e29781fdec 100644 --- a/src/geglu-cuda/main.cu +++ b/src/geglu-cuda/main.cu @@ -138,7 +138,6 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(x_and_gate); free(output); free(output_ref); @@ -180,5 +179,6 @@ int main(int argc, char* argv[]) } } + if (!ok) return 1; return 0; } diff --git a/src/geglu-hip/main.cu b/src/geglu-hip/main.cu index fa0bf4e9c2..d6766a1df8 100644 --- a/src/geglu-hip/main.cu +++ b/src/geglu-hip/main.cu @@ -138,7 +138,6 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(x_and_gate); free(output); free(output_ref); @@ -180,5 +179,6 @@ int main(int argc, char* argv[]) } } + if (!ok) return 1; return 0; } diff --git a/src/geglu-omp/main.cpp b/src/geglu-omp/main.cpp index 14e205b37f..77a86a828c 100644 --- a/src/geglu-omp/main.cpp +++ b/src/geglu-omp/main.cpp @@ -74,7 +74,6 @@ int main(int argc, char *argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(x_and_gate); free(output); free(output_ref); @@ -110,5 +109,6 @@ int main(int argc, char *argv[]) { } } + if (!ok) return 1; return 0; } diff --git a/src/geglu-sycl/main.cpp b/src/geglu-sycl/main.cpp index 726b004349..14b94efecf 100644 --- a/src/geglu-sycl/main.cpp +++ b/src/geglu-sycl/main.cpp @@ -139,7 +139,6 @@ int main(int argc, char *argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(x_and_gate); free(output); free(output_ref); @@ -181,5 +180,6 @@ int main(int argc, char *argv[]) { } } + if (!ok) return 1; return 0; } diff --git a/src/gelu-cuda/main.cu b/src/gelu-cuda/main.cu index 49c8ffd401..a82c9495b1 100644 --- a/src/gelu-cuda/main.cu +++ b/src/gelu-cuda/main.cu @@ -122,7 +122,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaMemcpy(d_output, input, src_size_bytes, cudaMemcpyHostToDevice); gelu_bias_loop <<>> (d_output, d_bias, hidden_dim, seq_len); @@ -136,7 +135,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); @@ -168,5 +166,7 @@ int main(int argc, char* argv[]) free(output_ref); free(bias); + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/gelu-hip/main.cu b/src/gelu-hip/main.cu index 3c5b3a1b9d..bcb84de9d7 100644 --- a/src/gelu-hip/main.cu +++ b/src/gelu-hip/main.cu @@ -122,7 +122,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipMemcpy(d_output, input, src_size_bytes, hipMemcpyHostToDevice); gelu_bias_loop <<>> (d_output, d_bias, hidden_dim, seq_len); @@ -136,7 +135,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); @@ -168,5 +166,7 @@ int main(int argc, char* argv[]) free(output_ref); free(bias); + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/gelu-sycl/main.cpp b/src/gelu-sycl/main.cpp index 814e1f10bb..8bceeee3eb 100644 --- a/src/gelu-sycl/main.cpp +++ b/src/gelu-sycl/main.cpp @@ -150,7 +150,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); ok = true; q.memcpy(d_output, input, src_size_bytes).wait(); @@ -167,7 +166,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); q.wait(); auto start = std::chrono::steady_clock::now(); @@ -199,5 +197,7 @@ int main(int argc, char* argv[]) free(output_ref); free(bias); + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/glu-cuda/main.cu b/src/glu-cuda/main.cu index 6a2702f415..f3299a4f34 100644 --- a/src/glu-cuda/main.cu +++ b/src/glu-cuda/main.cu @@ -116,7 +116,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } free(X); @@ -125,5 +124,6 @@ int main(int argc, char* argv[]) cudaFree(d_X); cudaFree(d_Y); + if (!ok) return 1; return 0; } diff --git a/src/glu-hip/main.cu b/src/glu-hip/main.cu index 95c77e0c1f..a84e06283a 100644 --- a/src/glu-hip/main.cu +++ b/src/glu-hip/main.cu @@ -116,7 +116,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } free(X); @@ -125,5 +124,6 @@ int main(int argc, char* argv[]) hipFree(d_X); hipFree(d_Y); + if (!ok) return 1; return 0; } diff --git a/src/glu-omp/main.cpp b/src/glu-omp/main.cpp index 2a0bb7d40f..d2d1035d8b 100644 --- a/src/glu-omp/main.cpp +++ b/src/glu-omp/main.cpp @@ -106,7 +106,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } } @@ -114,5 +113,6 @@ int main(int argc, char* argv[]) free(Y); free(Y_ref); + if (!ok) return 1; return 0; } diff --git a/src/glu-sycl/main.cpp b/src/glu-sycl/main.cpp index 1bd5617340..46efa6ee8b 100644 --- a/src/glu-sycl/main.cpp +++ b/src/glu-sycl/main.cpp @@ -125,7 +125,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } free(X); @@ -134,5 +133,6 @@ int main(int argc, char* argv[]) sycl::free(d_X, q); sycl::free(d_Y, q); + if (!ok) return 1; return 0; } diff --git a/src/goulash-cuda/main.cu b/src/goulash-cuda/main.cu index 8ca68330ad..404760c85e 100644 --- a/src/goulash-cuda/main.cu +++ b/src/goulash-cuda/main.cu @@ -116,10 +116,10 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); if (m_gate != NULL) free(m_gate); if (m_gate_h != NULL) free(m_gate_h); if (Vm != NULL) free(Vm); + if (!ok) return 1; return 0; } diff --git a/src/goulash-hip/main.cu b/src/goulash-hip/main.cu index b620ddf487..37c2cb517d 100644 --- a/src/goulash-hip/main.cu +++ b/src/goulash-hip/main.cu @@ -116,10 +116,10 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); if (m_gate != NULL) free(m_gate); if (m_gate_h != NULL) free(m_gate_h); if (Vm != NULL) free(Vm); + if (!ok) return 1; return 0; } diff --git a/src/goulash-omp/main.cpp b/src/goulash-omp/main.cpp index 55e5456784..34c3640a4f 100644 --- a/src/goulash-omp/main.cpp +++ b/src/goulash-omp/main.cpp @@ -99,10 +99,10 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); if (m_gate != NULL) free(m_gate); if (m_gate_h != NULL) free(m_gate_h); if (Vm != NULL) free(Vm); + if (!ok) return 1; return 0; } diff --git a/src/goulash-sycl/main.cpp b/src/goulash-sycl/main.cpp index 817d26543c..0493aeb8a5 100644 --- a/src/goulash-sycl/main.cpp +++ b/src/goulash-sycl/main.cpp @@ -122,10 +122,10 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); if (m_gate != NULL) free(m_gate); if (m_gate_h != NULL) free(m_gate_h); if (Vm != NULL) free(Vm); + if (!ok) return 1; return 0; } diff --git a/src/hadamard-cuda/main.cu b/src/hadamard-cuda/main.cu index 8919b2fad5..090b4e93cd 100644 --- a/src/hadamard-cuda/main.cu +++ b/src/hadamard-cuda/main.cu @@ -299,7 +299,6 @@ void hadamard_transform(int batch_size, int dim, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); GPU_CHECK(cudaFree(d_x)); GPU_CHECK(cudaFree(d_out)); @@ -319,5 +318,6 @@ int main(int argc, char* argv[]) hadamard_transform<__half>(batch_size, dim, repeat); hadamard_transform<__nv_bfloat16>(batch_size, dim, repeat); } + if (!ok) return 1; return 0; } diff --git a/src/hadamard-hip/main.cu b/src/hadamard-hip/main.cu index 90f39b423c..b2abf7cdbc 100644 --- a/src/hadamard-hip/main.cu +++ b/src/hadamard-hip/main.cu @@ -303,7 +303,6 @@ void hadamard_transform(int batch_size, int dim, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); GPU_CHECK(hipFree(d_x)); GPU_CHECK(hipFree(d_out)); @@ -323,5 +322,6 @@ int main(int argc, char* argv[]) hadamard_transform<__half>(batch_size, dim, repeat); hadamard_transform<__hip_bfloat16>(batch_size, dim, repeat); } + if (!ok) return 1; return 0; } diff --git a/src/hadamard-sycl/main.cpp b/src/hadamard-sycl/main.cpp index 14cc99d334..21b95f0b5d 100644 --- a/src/hadamard-sycl/main.cpp +++ b/src/hadamard-sycl/main.cpp @@ -310,7 +310,6 @@ void hadamard_transform(sycl::queue &q, int batch_size, int dim, int repeat) try } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_x, q); sycl::free(d_out, q); @@ -341,5 +340,6 @@ int main(int argc, char* argv[]) hadamard_transform(q, batch_size, dim, repeat); hadamard_transform(q, batch_size, dim, repeat); } + if (!ok) return 1; return 0; } diff --git a/src/hausdorff-cuda/main.cu b/src/hausdorff-cuda/main.cu index dbb0a0deb3..78fc7aeda0 100644 --- a/src/hausdorff-cuda/main.cu +++ b/src/hausdorff-cuda/main.cu @@ -115,12 +115,12 @@ int main(int argc, char* argv[]) { bool error = (fabsf(t_distance - r_distance)) > 1e-3f; printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(h_Apoints); free(h_Bpoints); cudaFree(d_distance); cudaFree(d_Apoints); cudaFree(d_Bpoints); + if (error) return 1; return 0; } diff --git a/src/hausdorff-hip/main.cu b/src/hausdorff-hip/main.cu index fae6db3ea8..99d743a95c 100644 --- a/src/hausdorff-hip/main.cu +++ b/src/hausdorff-hip/main.cu @@ -103,12 +103,12 @@ int main(int argc, char* argv[]) { bool error = (fabsf(t_distance - r_distance)) > 1e-3f; printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(h_Apoints); free(h_Bpoints); hipFree(d_distance); hipFree(d_Apoints); hipFree(d_Bpoints); + if (error) return 1; return 0; } diff --git a/src/hausdorff-omp/main.cpp b/src/hausdorff-omp/main.cpp index 8e5abf27e4..e55b307ab9 100644 --- a/src/hausdorff-omp/main.cpp +++ b/src/hausdorff-omp/main.cpp @@ -92,9 +92,9 @@ int main(int argc, char* argv[]) { bool error = (fabsf(t_distance - r_distance)) > 1e-3f; printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(h_Apoints); free(h_Bpoints); + if (error) return 1; return 0; } diff --git a/src/hausdorff-sycl/main.cpp b/src/hausdorff-sycl/main.cpp index 49c1f2f059..a3a75f96d2 100644 --- a/src/hausdorff-sycl/main.cpp +++ b/src/hausdorff-sycl/main.cpp @@ -130,12 +130,12 @@ int main(int argc, char* argv[]) { bool error = (fabsf(t_distance - r_distance)) > 1e-3f; printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(h_Apoints); free(h_Bpoints); sycl::free(d_distance, q); sycl::free(d_Apoints, q); sycl::free(d_Bpoints, q); + if (error) return 1; return 0; } diff --git a/src/heat2d-cuda/main.cu b/src/heat2d-cuda/main.cu index 569fb9ae08..3ac22fa1b4 100644 --- a/src/heat2d-cuda/main.cu +++ b/src/heat2d-cuda/main.cu @@ -150,7 +150,6 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_in); cudaFree(d_out); @@ -158,5 +157,6 @@ int main(int argc, char *argv[]) { free(h_out); free(h_in); free(d_res); + if (!ok) return 1; return 0; } diff --git a/src/heat2d-hip/main.cu b/src/heat2d-hip/main.cu index a50cf25e3f..12fea9459e 100644 --- a/src/heat2d-hip/main.cu +++ b/src/heat2d-hip/main.cu @@ -150,7 +150,6 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_in); hipFree(d_out); @@ -158,5 +157,6 @@ int main(int argc, char *argv[]) { free(h_out); free(h_in); free(d_res); + if (!ok) return 1; return 0; } diff --git a/src/heat2d-omp/main.cpp b/src/heat2d-omp/main.cpp index a962dbe793..f24532d19f 100644 --- a/src/heat2d-omp/main.cpp +++ b/src/heat2d-omp/main.cpp @@ -138,12 +138,12 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(buffer); free(h_out); free(h_in); free(d_in); free(d_out); + if (!ok) return 1; return 0; } diff --git a/src/heat2d-sycl/main.cpp b/src/heat2d-sycl/main.cpp index 3996f74bf4..b7d7a88ad3 100644 --- a/src/heat2d-sycl/main.cpp +++ b/src/heat2d-sycl/main.cpp @@ -161,7 +161,6 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_in, q); sycl::free(d_out, q); @@ -169,5 +168,6 @@ int main(int argc, char *argv[]) { free(h_out); free(h_in); free(d_res); + if (!ok) return 1; return 0; } diff --git a/src/histogram-cuda/histogram_compare.cu b/src/histogram-cuda/histogram_compare.cu index b6c59d6c6a..8b4d542385 100644 --- a/src/histogram-cuda/histogram_compare.cu +++ b/src/histogram-cuda/histogram_compare.cu @@ -409,7 +409,6 @@ void RunTest( int compare = CompareDeviceResults(h_hist, d_hist, ACTIVE_CHANNELS * NUM_BINS, true, g_verbose); if (!g_report) printf("\t%s\n", compare ? "FAIL" : "PASS"); fflush(stdout); - if (compare) exit(1); double elapsed_ms = 0; for (int i = 0; i < timing_iterations; i++) @@ -662,5 +661,6 @@ int main(int argc, char **argv) cudaDeviceSynchronize(); printf("\n\n"); + if (compare) return 1; return 0; } diff --git a/src/histogram-hip/histogram_compare.cu b/src/histogram-hip/histogram_compare.cu index d6b6cbdf0e..2412817d1a 100644 --- a/src/histogram-hip/histogram_compare.cu +++ b/src/histogram-hip/histogram_compare.cu @@ -409,7 +409,6 @@ void RunTest( int compare = CompareDeviceResults(h_hist, d_hist, ACTIVE_CHANNELS * NUM_BINS, true, g_verbose); if (!g_report) printf("\t%s\n", compare ? "FAIL" : "PASS"); fflush(stdout); - if (compare) exit(1); double elapsed_ms = 0; for (int i = 0; i < timing_iterations; i++) @@ -662,5 +661,6 @@ int main(int argc, char **argv) hipDeviceSynchronize(); printf("\n\n"); + if (compare) return 1; return 0; } diff --git a/src/histogram-omp/histogram_compare_base.cpp b/src/histogram-omp/histogram_compare_base.cpp index 682b9671ca..c6061dba00 100644 --- a/src/histogram-omp/histogram_compare_base.cpp +++ b/src/histogram-omp/histogram_compare_base.cpp @@ -420,7 +420,6 @@ void RunTest( int compare = CompareDeviceResults(h_hist, d_hist, ACTIVE_CHANNELS * NUM_BINS, true, g_verbose); if (!g_report) printf("\t%s\n", compare ? "FAIL" : "PASS"); fflush(stdout); - if (compare) exit(1); double elapsed_ms = 0; for (int i = 0; i < timing_iterations; i++) @@ -665,5 +664,6 @@ int main(int argc, char **argv) printf("\n\n"); + if (compare) return 1; return 0; } diff --git a/src/histogram-sycl/histogram_compare_base.cpp b/src/histogram-sycl/histogram_compare_base.cpp index ff7cf28964..cba9c4cbbf 100644 --- a/src/histogram-sycl/histogram_compare_base.cpp +++ b/src/histogram-sycl/histogram_compare_base.cpp @@ -431,7 +431,6 @@ void RunTest( int compare = CompareDeviceResults(q, h_hist, d_hist, ACTIVE_CHANNELS * NUM_BINS, true, g_verbose); if (!g_report) printf("\t%s\n", compare ? "FAIL" : "PASS"); fflush(stdout); - if (compare) exit(1); double elapsed_ms = 0; for (int i = 0; i < timing_iterations; i++) @@ -688,5 +687,6 @@ int main(int argc, char **argv) printf("\n\n"); + if (compare) return 1; return 0; } diff --git a/src/hybridsort-cuda/hybridsort.cu b/src/hybridsort-cuda/hybridsort.cu index 17df23309b..c96ea6d778 100644 --- a/src/hybridsort-cuda/hybridsort.cu +++ b/src/hybridsort-cuda/hybridsort.cu @@ -161,7 +161,6 @@ int main(int argc, char** argv) } if(count == 0) printf("PASSED.\n"); else printf("FAILED.\n"); - if (count != 0) exit(1); #ifdef OUTPUT FILE *tp1; @@ -181,6 +180,7 @@ int main(int argc, char** argv) free(nullElements); free(origOffsets); + if (count != 0) return 1; return 0; } diff --git a/src/hybridsort-hip/hybridsort.cu b/src/hybridsort-hip/hybridsort.cu index 17df23309b..c96ea6d778 100644 --- a/src/hybridsort-hip/hybridsort.cu +++ b/src/hybridsort-hip/hybridsort.cu @@ -161,7 +161,6 @@ int main(int argc, char** argv) } if(count == 0) printf("PASSED.\n"); else printf("FAILED.\n"); - if (count != 0) exit(1); #ifdef OUTPUT FILE *tp1; @@ -181,6 +180,7 @@ int main(int argc, char** argv) free(nullElements); free(origOffsets); + if (count != 0) return 1; return 0; } diff --git a/src/hybridsort-omp/hybridsort.c b/src/hybridsort-omp/hybridsort.c index 16aecc8de0..9a2b1b32f1 100644 --- a/src/hybridsort-omp/hybridsort.c +++ b/src/hybridsort-omp/hybridsort.c @@ -159,7 +159,6 @@ int main(int argc, char** argv) } if(count == 0) printf("PASSED.\n"); else printf("FAILED.\n"); - if (count != 0) exit(1); #ifdef OUTPUT FILE *tp1; @@ -179,6 +178,7 @@ int main(int argc, char** argv) free(nullElements); free(origOffsets); + if (count != 0) return 1; return 0; } diff --git a/src/hybridsort-sycl/hybridsort.c b/src/hybridsort-sycl/hybridsort.c index 6294354afa..84d2abc62b 100644 --- a/src/hybridsort-sycl/hybridsort.c +++ b/src/hybridsort-sycl/hybridsort.c @@ -170,7 +170,6 @@ int main(int argc, char** argv) } if(count == 0) printf("PASSED.\n"); else printf("FAILED.\n"); - if (count != 0) exit(1); #ifdef OUTPUT FILE *tp1; @@ -190,5 +189,6 @@ int main(int argc, char** argv) free(nullElements); free(origOffsets); + if (count != 0) return 1; return 0; } diff --git a/src/interval-cuda/main.cu b/src/interval-cuda/main.cu index b5f0268603..6a48bb8134 100644 --- a/src/interval-cuda/main.cu +++ b/src/interval-cuda/main.cu @@ -120,12 +120,12 @@ int main(int argc, char *argv[]) { bool bTestResult = checkAgainstHost(h_nresults, h_nresults_cpu, h_result, h_result_cpu); std::cout << (bTestResult ? "PASS" : "FAIL") << "\n"; - if (!bTestResult) exit(1); delete[] h_result_cpu; delete[] h_nresults_cpu; delete[] h_result; delete[] h_nresults; + if (!bTestResult) return 1; return 0; } diff --git a/src/interval-hip/main.cu b/src/interval-hip/main.cu index 3413828844..5b52232638 100644 --- a/src/interval-hip/main.cu +++ b/src/interval-hip/main.cu @@ -121,12 +121,12 @@ int main(int argc, char *argv[]) { bool bTestResult = checkAgainstHost(h_nresults, h_nresults_cpu, h_result, h_result_cpu); std::cout << (bTestResult ? "PASS" : "FAIL") << "\n"; - if (!bTestResult) exit(1); delete[] h_result_cpu; delete[] h_nresults_cpu; delete[] h_result; delete[] h_nresults; + if (!bTestResult) return 1; return 0; } diff --git a/src/interval-omp/main.cpp b/src/interval-omp/main.cpp index db71bc966d..1070297d16 100644 --- a/src/interval-omp/main.cpp +++ b/src/interval-omp/main.cpp @@ -136,12 +136,12 @@ int main(int argc, char *argv[]) { bool bTestResult = checkAgainstHost(h_nresults, h_nresults_cpu, h_result, h_result_cpu); std::cout << (bTestResult ? "PASS" : "FAIL") << "\n"; - if (!bTestResult) exit(1); delete[] h_result_cpu; delete[] h_nresults_cpu; delete[] h_result; delete[] h_nresults; + if (!bTestResult) return 1; return 0; } diff --git a/src/interval-sycl/main.cpp b/src/interval-sycl/main.cpp index e34d3957a1..dc8eb2a845 100644 --- a/src/interval-sycl/main.cpp +++ b/src/interval-sycl/main.cpp @@ -130,12 +130,12 @@ int main(int argc, char *argv[]) { bool bTestResult = checkAgainstHost(h_nresults, h_nresults_cpu, h_result, h_result_cpu); std::cout << (bTestResult ? "PASS" : "FAIL") << "\n"; - if (!bTestResult) exit(1); delete[] h_result_cpu; delete[] h_nresults_cpu; delete[] h_result; delete[] h_nresults; + if (!bTestResult) return 1; return 0; } diff --git a/src/is-cuda/main.cu b/src/is-cuda/main.cu index ab4ca428b2..a53a0f6018 100644 --- a/src/is-cuda/main.cu +++ b/src/is-cuda/main.cu @@ -349,7 +349,6 @@ int main(int argc, char** argv){ /* the final printout */ if(passed_verification != 5*MAX_ITERATIONS+1) {passed_verification = 0;} printf("%s\n", passed_verification ? "PASS" : "FAIL"); - if (!passed_verification) exit(1); cudaFree(key_array_device); cudaFree(key_buff1_device); @@ -360,5 +359,6 @@ int main(int argc, char** argv){ cudaFree(passed_verification_device); cudaFree(sum_device); + if (!passed_verification) return 1; return 0; } diff --git a/src/is-hip/main.cu b/src/is-hip/main.cu index 1b4269f1cc..4091017abc 100644 --- a/src/is-hip/main.cu +++ b/src/is-hip/main.cu @@ -335,7 +335,6 @@ int main(int argc, char** argv){ /* the final printout */ if(passed_verification != 5*MAX_ITERATIONS+1) {passed_verification = 0;} printf("%s\n", passed_verification ? "PASS" : "FAIL"); - if (!passed_verification) exit(1); hipFree(key_array_device); hipFree(key_buff1_device); @@ -346,5 +345,6 @@ int main(int argc, char** argv){ hipFree(passed_verification_device); hipFree(sum_device); + if (!passed_verification) return 1; return 0; } diff --git a/src/is-sycl/main.cpp b/src/is-sycl/main.cpp index ed0ea0a04e..90dd3c3412 100644 --- a/src/is-sycl/main.cpp +++ b/src/is-sycl/main.cpp @@ -427,7 +427,6 @@ int main(int argc, char** argv){ /* the final printout */ if(passed_verification != 5*MAX_ITERATIONS+1) {passed_verification = 0;} printf("%s\n", passed_verification ? "PASS" : "FAIL"); - if (!passed_verification) exit(1); sycl::free(key_array_device, q); sycl::free(key_buff1_device, q); @@ -438,5 +437,6 @@ int main(int argc, char** argv){ sycl::free(passed_verification_device, q); sycl::free(sum_device, q); + if (!passed_verification) return 1; return 0; } diff --git a/src/ising-cuda/main.cu b/src/ising-cuda/main.cu index 8c486ebcde..8584649559 100644 --- a/src/ising-cuda/main.cu +++ b/src/ising-cuda/main.cu @@ -302,7 +302,6 @@ int main(int argc, char **argv) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifndef CURAND free(randvals_host); @@ -316,5 +315,6 @@ int main(int argc, char **argv) { cudaFree(lattice_w); cudaFree(randvals); + if (!ok) return 1; return 0; } diff --git a/src/ising-hip/main.cu b/src/ising-hip/main.cu index d716d85aa3..3843582e35 100644 --- a/src/ising-hip/main.cu +++ b/src/ising-hip/main.cu @@ -302,7 +302,6 @@ int main(int argc, char **argv) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifndef HIPRAND free(randvals_host); @@ -316,5 +315,6 @@ int main(int argc, char **argv) { hipFree(lattice_w); hipFree(randvals); + if (!ok) return 1; return 0; } diff --git a/src/ising-omp/main.cpp b/src/ising-omp/main.cpp index 1d23a7e870..88399b2e29 100644 --- a/src/ising-omp/main.cpp +++ b/src/ising-omp/main.cpp @@ -250,11 +250,11 @@ int main(int argc, char **argv) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(randvals); free(lattice_b); free(lattice_w); free(lattice_b_r); free(lattice_w_r); + if (!ok) return 1; return 0; } diff --git a/src/ising-sycl/main.cpp b/src/ising-sycl/main.cpp index 2406c8f816..b576c14f90 100644 --- a/src/ising-sycl/main.cpp +++ b/src/ising-sycl/main.cpp @@ -342,7 +342,6 @@ int main(int argc, char **argv) { if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifndef MKLRAND free(randvals_host); @@ -356,5 +355,6 @@ int main(int argc, char **argv) { sycl::free(d_lattice_w, q); sycl::free(d_randvals, q); + if (!ok) return 1; return 0; } diff --git a/src/jenkins-hash-cuda/main.cu b/src/jenkins-hash-cuda/main.cu index 89b2ec2278..c94550ed82 100644 --- a/src/jenkins-hash-cuda/main.cu +++ b/src/jenkins-hash-cuda/main.cu @@ -306,12 +306,12 @@ int main(int argc, char** argv) { } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(keys); free(lens); free(initvals); free(out); + if (error) return 1; return 0; } diff --git a/src/jenkins-hash-hip/main.cu b/src/jenkins-hash-hip/main.cu index fa13c1f57d..df916a0bc9 100644 --- a/src/jenkins-hash-hip/main.cu +++ b/src/jenkins-hash-hip/main.cu @@ -307,12 +307,12 @@ int main(int argc, char** argv) { } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(keys); free(lens); free(initvals); free(out); + if (error) return 1; return 0; } diff --git a/src/jenkins-hash-omp/main.cpp b/src/jenkins-hash-omp/main.cpp index e2be7ed23b..69a04a0246 100644 --- a/src/jenkins-hash-omp/main.cpp +++ b/src/jenkins-hash-omp/main.cpp @@ -278,12 +278,12 @@ int main(int argc, char** argv) { } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(keys); free(lens); free(initvals); free(out); + if (error) return 1; return 0; } diff --git a/src/jenkins-hash-sycl/main.cpp b/src/jenkins-hash-sycl/main.cpp index 6c1ac1f131..2374426310 100644 --- a/src/jenkins-hash-sycl/main.cpp +++ b/src/jenkins-hash-sycl/main.cpp @@ -306,12 +306,12 @@ int main(int argc, char** argv) { } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(keys); free(lens); free(initvals); free(out); + if (error) return 1; return 0; } diff --git a/src/keogh-cuda/main.cu b/src/keogh-cuda/main.cu index fde08bb398..89844bd788 100644 --- a/src/keogh-cuda/main.cu +++ b/src/keogh-cuda/main.cu @@ -125,7 +125,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_lb); cudaFree(d_avgs); @@ -140,5 +139,6 @@ int main(int argc, char* argv[]) { free(subject); free(lower); free(upper); + if (!ok) return 1; return 0; } diff --git a/src/keogh-hip/main.cu b/src/keogh-hip/main.cu index 0a7e1a05f0..af4364d9b7 100644 --- a/src/keogh-hip/main.cu +++ b/src/keogh-hip/main.cu @@ -124,7 +124,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_lb); hipFree(d_avgs); @@ -139,5 +138,6 @@ int main(int argc, char* argv[]) { free(subject); free(lower); free(upper); + if (!ok) return 1; return 0; } diff --git a/src/keogh-omp/main.cpp b/src/keogh-omp/main.cpp index 9324804be7..bb9341075c 100644 --- a/src/keogh-omp/main.cpp +++ b/src/keogh-omp/main.cpp @@ -86,7 +86,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(lb); free(lb_h); @@ -95,5 +94,6 @@ int main(int argc, char* argv[]) { free(subject); free(lower_bound); free(upper_bound); + if (!ok) return 1; return 0; } diff --git a/src/keogh-sycl/main.cpp b/src/keogh-sycl/main.cpp index fcd96c4b16..7d182110e8 100644 --- a/src/keogh-sycl/main.cpp +++ b/src/keogh-sycl/main.cpp @@ -125,7 +125,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_lb, q); sycl::free(d_avgs, q); @@ -140,6 +139,7 @@ int main(int argc, char* argv[]) { free(subject); free(lower); free(upper); + if (!ok) return 1; return 0; } diff --git a/src/laplace-cuda/main.cu b/src/laplace-cuda/main.cu index f5cf38eb1e..601b5af7d9 100644 --- a/src/laplace-cuda/main.cu +++ b/src/laplace-cuda/main.cu @@ -286,7 +286,6 @@ int main (void) { fclose(pfile); printf("%s\n", count == 0 ? "PASS" : "FAIL"); - if (count != 0) exit(1); cudaFree(aP_d); cudaFree(aW_d); @@ -310,5 +309,6 @@ int main (void) { free(temp_red_ref); free(temp_black_ref); + if (count != 0) return 1; return 0; } diff --git a/src/laplace-hip/main.cu b/src/laplace-hip/main.cu index abc7aef3d8..e6e34c0119 100644 --- a/src/laplace-hip/main.cu +++ b/src/laplace-hip/main.cu @@ -286,7 +286,6 @@ int main (void) { fclose(pfile); printf("%s\n", count == 0 ? "PASS" : "FAIL"); - if (count != 0) exit(1); hipFree(aP_d); hipFree(aW_d); @@ -310,5 +309,6 @@ int main (void) { free(temp_red_ref); free(temp_black_ref); + if (count != 0) return 1; return 0; } diff --git a/src/laplace-omp/main.cpp b/src/laplace-omp/main.cpp index c17d47c437..77cb30ee60 100644 --- a/src/laplace-omp/main.cpp +++ b/src/laplace-omp/main.cpp @@ -295,7 +295,6 @@ int main (void) { fclose(pfile); printf("%s\n", count == 0 ? "PASS" : "FAIL"); - if (count != 0) exit(1); free(aP); free(aW); @@ -309,5 +308,6 @@ int main (void) { free(temp_black_ref); free(bl_norm_L2); + if (count != 0) return 1; return 0; } diff --git a/src/laplace-sycl/main.cpp b/src/laplace-sycl/main.cpp index 75dcf72e6a..1302ccb92d 100644 --- a/src/laplace-sycl/main.cpp +++ b/src/laplace-sycl/main.cpp @@ -287,7 +287,6 @@ int main(void) { fclose(pfile); printf("%s\n", count == 0 ? "PASS" : "FAIL"); - if (count != 0) exit(1); sycl::free(aP_d, q); sycl::free(aW_d, q); @@ -310,5 +309,6 @@ int main(void) { free(temp_red_ref); free(temp_black_ref); + if (count != 0) return 1; return 0; } diff --git a/src/laplace3d-cuda/main.cu b/src/laplace3d-cuda/main.cu index 2df95e834a..f20389e793 100644 --- a/src/laplace3d-cuda/main.cu +++ b/src/laplace3d-cuda/main.cu @@ -124,7 +124,6 @@ int main(int argc, char **argv){ } printf("\n RMS error = %f \n", sqrtf(err/ NX*NY*NZ)); printf(" %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } // Release GPU and CPU memory @@ -134,6 +133,7 @@ int main(int argc, char **argv){ free(h_u2); free(h_u3); + if (!ok) return 1; return 0; } diff --git a/src/laplace3d-hip/main.cu b/src/laplace3d-hip/main.cu index c8d32cbde7..f5cc8c4709 100644 --- a/src/laplace3d-hip/main.cu +++ b/src/laplace3d-hip/main.cu @@ -124,7 +124,6 @@ int main(int argc, char **argv){ } printf("\n RMS error = %f \n", sqrtf(err/ NX*NY*NZ)); printf(" %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } // Release GPU and CPU memory @@ -134,6 +133,7 @@ int main(int argc, char **argv){ free(h_u2); free(h_u3); + if (!ok) return 1; return 0; } diff --git a/src/laplace3d-omp/main.cpp b/src/laplace3d-omp/main.cpp index 31723372eb..68309cdaaf 100644 --- a/src/laplace3d-omp/main.cpp +++ b/src/laplace3d-omp/main.cpp @@ -108,7 +108,6 @@ int main(int argc, char **argv){ } printf("\n RMS error = %f \n", sqrtf(err/ NX*NY*NZ)); printf(" %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } // Release CPU memory @@ -116,6 +115,7 @@ int main(int argc, char **argv){ free(h_u2); free(h_u3); + if (!ok) return 1; return 0; } diff --git a/src/laplace3d-sycl/main.cpp b/src/laplace3d-sycl/main.cpp index c98cee84dc..c04bec32ca 100644 --- a/src/laplace3d-sycl/main.cpp +++ b/src/laplace3d-sycl/main.cpp @@ -142,7 +142,6 @@ int main(int argc, char **argv){ } printf("\n RMS error = %f \n", sqrtf(err/ NX*NY*NZ)); printf(" %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } // Release GPU and CPU memory @@ -152,6 +151,7 @@ int main(int argc, char **argv){ free(h_u2); free(h_u3); + if (!ok) return 1; return 0; } diff --git a/src/layout-cuda/main.cu b/src/layout-cuda/main.cu index 9ce2079e9c..f669560ab6 100644 --- a/src/layout-cuda/main.cu +++ b/src/layout-cuda/main.cu @@ -152,7 +152,6 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; - if (fail) exit(1); //initialize soa data for (int i = 0; i < treeNumber; i++) @@ -188,12 +187,13 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; - if (fail) exit(1); cudaFree(inputBuffer); cudaFree(outputBuffer); free(deviceResult); free(reference); free(data); + if (fail) return 1; + if (fail) return 1; return 0; } diff --git a/src/layout-hip/main.cu b/src/layout-hip/main.cu index 4462a0a985..f4ce9f62cb 100644 --- a/src/layout-hip/main.cu +++ b/src/layout-hip/main.cu @@ -152,7 +152,6 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; - if (fail) exit(1); //initialize soa data for (int i = 0; i < treeNumber; i++) @@ -188,12 +187,13 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; - if (fail) exit(1); hipFree(inputBuffer); hipFree(outputBuffer); free(deviceResult); free(reference); free(data); + if (fail) return 1; + if (fail) return 1; return 0; } diff --git a/src/layout-omp/main.cpp b/src/layout-omp/main.cpp index 90da362729..ff806396e5 100644 --- a/src/layout-omp/main.cpp +++ b/src/layout-omp/main.cpp @@ -127,7 +127,6 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; - if (fail) exit(1); //initialize soa data for (int i = 0; i < treeNumber; i++) @@ -173,13 +172,14 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; - if (fail) exit(1); } free(output); free(reference); free(data); + if (fail) return 1; + if (fail) return 1; return 0; } diff --git a/src/layout-sycl/main.cpp b/src/layout-sycl/main.cpp index a30308703b..0ca0cf7dee 100644 --- a/src/layout-sycl/main.cpp +++ b/src/layout-sycl/main.cpp @@ -159,7 +159,6 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; - if (fail) exit(1); //initialize soa data for (int i = 0; i < treeNumber; i++) @@ -200,12 +199,13 @@ int main(int argc, char * argv[]) std::cout << "FAIL\n"; else std::cout << "PASS\n"; - if (fail) exit(1); sycl::free(inputBuffer, q); sycl::free(outputBuffer, q); free(deviceResult); free(reference); free(data); + if (fail) return 1; + if (fail) return 1; return 0; } diff --git a/src/lebesgue-cuda/main.cpp b/src/lebesgue-cuda/main.cpp index a453483e98..e4ad76a053 100644 --- a/src/lebesgue-cuda/main.cpp +++ b/src/lebesgue-cuda/main.cpp @@ -48,7 +48,6 @@ void test01 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -103,7 +102,6 @@ void test02 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -158,7 +156,6 @@ void test03 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -213,7 +210,6 @@ void test04 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -268,7 +264,6 @@ void test05 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -323,7 +318,6 @@ void test06 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -378,7 +372,6 @@ void test07 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -433,7 +426,6 @@ void test08 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -488,7 +480,6 @@ void test09 ( int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -534,5 +525,14 @@ int main (int argc, char* argv[] ) timestamp ( ); } + if (!ok) return 1; + if (!ok) return 1; + if (!ok) return 1; + if (!ok) return 1; + if (!ok) return 1; + if (!ok) return 1; + if (!ok) return 1; + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/lebesgue-sycl/main.cpp b/src/lebesgue-sycl/main.cpp index e4c8d4edee..c636e73b33 100644 --- a/src/lebesgue-sycl/main.cpp +++ b/src/lebesgue-sycl/main.cpp @@ -48,7 +48,6 @@ void test01 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -103,7 +102,6 @@ void test02 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -158,7 +156,6 @@ void test03 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -213,7 +210,6 @@ void test04 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -268,7 +264,6 @@ void test05 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -323,7 +318,6 @@ void test06 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -378,7 +372,6 @@ void test07 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -433,7 +426,6 @@ void test08 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -488,7 +480,6 @@ void test09 ( sycl::queue &q, int nfun ) } printf ( " Total kernel execution time %f (s)\n", total_time * 1e-9f); printf ( " %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); #ifdef DEBUG r8vec_print ( n_max, l, @@ -540,5 +531,14 @@ int main (int argc, char* argv[] ) timestamp ( ); } + if (!ok) return 1; + if (!ok) return 1; + if (!ok) return 1; + if (!ok) return 1; + if (!ok) return 1; + if (!ok) return 1; + if (!ok) return 1; + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/lfib4-cuda/main.cu b/src/lfib4-cuda/main.cu index fb522bdee1..4bf1bbc431 100644 --- a/src/lfib4-cuda/main.cu +++ b/src/lfib4-cuda/main.cu @@ -259,12 +259,12 @@ int main(int argc, char**argv) { } } printf("check = %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(z); cudaFree(x_d); } free(x); + if (!ok) return 1; return 0; } diff --git a/src/lfib4-hip/main.cu b/src/lfib4-hip/main.cu index 2b0d31ed38..bb81e77517 100644 --- a/src/lfib4-hip/main.cu +++ b/src/lfib4-hip/main.cu @@ -259,12 +259,12 @@ int main(int argc, char**argv) { } } printf("check = %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(z); hipFree(x_d); } free(x); + if (!ok) return 1; return 0; } diff --git a/src/lfib4-sycl/main.cpp b/src/lfib4-sycl/main.cpp index 5f6282d1c3..fb33988960 100644 --- a/src/lfib4-sycl/main.cpp +++ b/src/lfib4-sycl/main.cpp @@ -294,12 +294,12 @@ int main(int argc, char **argv) { } } printf("check = %s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(z); sycl::free(x_d, q); } free(x); + if (!ok) return 1; return 0; } diff --git a/src/lif-cuda/main.cu b/src/lif-cuda/main.cu index f737c75587..a046048b35 100644 --- a/src/lif-cuda/main.cu +++ b/src/lif-cuda/main.cu @@ -185,7 +185,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(encode_result); free(voltage); @@ -204,5 +203,6 @@ int main(int argc, char* argv[]) { cudaFree(d_gain); cudaFree(d_spikes); + if (!ok) return 1; return 0; } diff --git a/src/lif-hip/main.cu b/src/lif-hip/main.cu index d2f455532c..95017948ff 100644 --- a/src/lif-hip/main.cu +++ b/src/lif-hip/main.cu @@ -185,7 +185,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(encode_result); free(voltage); @@ -204,5 +203,6 @@ int main(int argc, char* argv[]) { hipFree(d_gain); hipFree(d_spikes); + if (!ok) return 1; return 0; } diff --git a/src/lif-omp/main.cpp b/src/lif-omp/main.cpp index 7187f0346d..1a4d37b5c5 100644 --- a/src/lif-omp/main.cpp +++ b/src/lif-omp/main.cpp @@ -168,7 +168,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(encode_result); free(voltage); @@ -180,5 +179,6 @@ int main(int argc, char* argv[]) { free(spikes); free(spikes_host); + if (!ok) return 1; return 0; } diff --git a/src/lif-sycl/main.cpp b/src/lif-sycl/main.cpp index 9dd7c2a681..90b3ec1379 100644 --- a/src/lif-sycl/main.cpp +++ b/src/lif-sycl/main.cpp @@ -196,7 +196,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_encode_result, q); sycl::free(d_voltage, q); @@ -215,5 +214,6 @@ int main(int argc, char* argv[]) { free(spikes); free(spikes_host); + if (!ok) return 1; return 0; } diff --git a/src/linearprobing-omp/main.cpp b/src/linearprobing-omp/main.cpp index ed38bcfee7..1b5808f893 100644 --- a/src/linearprobing-omp/main.cpp +++ b/src/linearprobing-omp/main.cpp @@ -174,7 +174,6 @@ int main(int argc, char* argv[]) bool ok = test_correctness(insert_kvs, delete_kvs, kvs); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } free(pHashTable); @@ -183,5 +182,6 @@ int main(int argc, char* argv[]) free(iter_kvs); + if (!ok) return 1; return 0; } diff --git a/src/logprob-cuda/main.cu b/src/logprob-cuda/main.cu index 0d74e048f0..e8481fe959 100644 --- a/src/logprob-cuda/main.cu +++ b/src/logprob-cuda/main.cu @@ -252,7 +252,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); cudaDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); @@ -296,5 +295,6 @@ int main(int argc, char* argv[]) free(h_ids); free(h_lengths); + if (error) return 1; return 0; } diff --git a/src/logprob-hip/main.cu b/src/logprob-hip/main.cu index 5e24254fcd..008788729b 100644 --- a/src/logprob-hip/main.cu +++ b/src/logprob-hip/main.cu @@ -252,7 +252,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); hipDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); @@ -296,5 +295,6 @@ int main(int argc, char* argv[]) free(h_ids); free(h_lengths); + if (error) return 1; return 0; } diff --git a/src/logprob-sycl/main.cpp b/src/logprob-sycl/main.cpp index f34f482c5a..b45d7e68f7 100644 --- a/src/logprob-sycl/main.cpp +++ b/src/logprob-sycl/main.cpp @@ -309,7 +309,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); q.wait(); auto start = std::chrono::steady_clock::now(); @@ -338,5 +337,6 @@ int main(int argc, char* argv[]) free(h_ids); free(h_lengths); + if (error) return 1; return 0; } diff --git a/src/lombscargle-cuda/main.cu b/src/lombscargle-cuda/main.cu index bc841aaccc..69cbe3961b 100644 --- a/src/lombscargle-cuda/main.cu +++ b/src/lombscargle-cuda/main.cu @@ -201,7 +201,6 @@ int main(int argc, char* argv[]) { } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); cudaFree(d_x); cudaFree(d_y); @@ -212,5 +211,6 @@ int main(int argc, char* argv[]) { free(f); free(p); free(p2); + if (error) return 1; return 0; } diff --git a/src/lombscargle-hip/main.cu b/src/lombscargle-hip/main.cu index 9714cafc80..07484ef23a 100644 --- a/src/lombscargle-hip/main.cu +++ b/src/lombscargle-hip/main.cu @@ -201,7 +201,6 @@ int main(int argc, char* argv[]) { } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); hipFree(d_x); hipFree(d_y); @@ -212,5 +211,6 @@ int main(int argc, char* argv[]) { free(f); free(p); free(p2); + if (error) return 1; return 0; } diff --git a/src/lombscargle-omp/main.cpp b/src/lombscargle-omp/main.cpp index 2d245d01f2..04c9dd89ac 100644 --- a/src/lombscargle-omp/main.cpp +++ b/src/lombscargle-omp/main.cpp @@ -173,12 +173,12 @@ int main(int argc, char* argv[]) { } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(x); free(y); free(f); free(p); free(p2); + if (error) return 1; return 0; } diff --git a/src/lombscargle-sycl/main.cpp b/src/lombscargle-sycl/main.cpp index bc82ceba15..e30d63f81a 100644 --- a/src/lombscargle-sycl/main.cpp +++ b/src/lombscargle-sycl/main.cpp @@ -196,7 +196,6 @@ int main(int argc, char* argv[]) { } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); sycl::free(d_x, q); sycl::free(d_y, q); @@ -207,5 +206,6 @@ int main(int argc, char* argv[]) { free(f); free(p); free(p2); + if (error) return 1; return 0; } diff --git a/src/marchingCubes-cuda/main.cu b/src/marchingCubes-cuda/main.cu index c152f8dbc2..7aeff14651 100644 --- a/src/marchingCubes-cuda/main.cu +++ b/src/marchingCubes-cuda/main.cu @@ -556,7 +556,6 @@ int main(int argc, char* argv[]) bool ok = (countedBlockNumLv1 == 8296 && countedBlockNumLv2 == 240380 && countedVerticesNum == 4856560 && countedTrianglesNum == 6101640); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(minMaxLv1Device); cudaFree(blockIndicesLv1Device); @@ -572,5 +571,6 @@ int main(int argc, char* argv[]) cudaFree(coordYDevice); cudaFree(coordZDevice); cudaFree(coordZPDevice); + if (!ok) return 1; return 0; } diff --git a/src/marchingCubes-hip/main.cu b/src/marchingCubes-hip/main.cu index 3be08102e2..dcf083e4c7 100644 --- a/src/marchingCubes-hip/main.cu +++ b/src/marchingCubes-hip/main.cu @@ -556,7 +556,6 @@ int main(int argc, char* argv[]) bool ok = (countedBlockNumLv1 == 8296 && countedBlockNumLv2 == 240380 && countedVerticesNum == 4856560 && countedTrianglesNum == 6101640); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(minMaxLv1Device); hipFree(blockIndicesLv1Device); @@ -572,5 +571,6 @@ int main(int argc, char* argv[]) hipFree(coordYDevice); hipFree(coordZDevice); hipFree(coordZPDevice); + if (!ok) return 1; return 0; } diff --git a/src/marchingCubes-sycl/main.cpp b/src/marchingCubes-sycl/main.cpp index 4bfba51480..b40dd78b46 100644 --- a/src/marchingCubes-sycl/main.cpp +++ b/src/marchingCubes-sycl/main.cpp @@ -606,7 +606,6 @@ int main(int argc, char* argv[]) bool ok = (countedBlockNumLv1 == 8296 && countedBlockNumLv2 == 240380 && countedVerticesNum == 4856560 && countedTrianglesNum == 6101640); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(minMaxLv1Device, q); sycl::free(blockIndicesLv1Device, q); @@ -622,5 +621,6 @@ int main(int argc, char* argv[]) sycl::free(coordYDevice, q); sycl::free(coordZDevice, q); sycl::free(coordZPDevice, q); + if (!ok) return 1; return 0; } diff --git a/src/mask-cuda/main.cu b/src/mask-cuda/main.cu index ab72b4e14e..a9469ebbd5 100644 --- a/src/mask-cuda/main.cu +++ b/src/mask-cuda/main.cu @@ -171,7 +171,6 @@ void print_mask_ratio (T *h_out, T *d_out, T fill_val, int data_size) { if (h_out[i] == fill_val) cnt_fill++; } printf("%s, Mask ratio: %f\n", (error ? "FAIL" : "PASS"), - if ((error) exit(1); (float) cnt_fill / data_size); free(out); } @@ -348,5 +347,6 @@ int main(int argc, char* argv[]) eval_mask(M, N, B, repeat); + if ((error) return 1; return 0; } diff --git a/src/mask-hip/main.cu b/src/mask-hip/main.cu index cd2b40486f..07aad4ce9b 100644 --- a/src/mask-hip/main.cu +++ b/src/mask-hip/main.cu @@ -171,7 +171,6 @@ void print_mask_ratio (T *h_out, T *d_out, T fill_val, int data_size) { if (h_out[i] == fill_val) cnt_fill++; } printf("%s, Mask ratio: %f\n", (error ? "FAIL" : "PASS"), - if ((error) exit(1); (float) cnt_fill / data_size); free(out); } @@ -348,5 +347,6 @@ int main(int argc, char* argv[]) eval_mask(M, N, B, repeat); + if ((error) return 1; return 0; } diff --git a/src/mask-omp/main.cpp b/src/mask-omp/main.cpp index b420e97b64..5f302b5c12 100644 --- a/src/mask-omp/main.cpp +++ b/src/mask-omp/main.cpp @@ -193,7 +193,6 @@ void print_mask_ratio (T *h_out, T *out_ref, T fill_val, int data_size) { if (h_out[i] == fill_val) cnt_fill++; } printf("%s, Mask ratio: %f\n", (error ? "FAIL" : "PASS"), - if ((error) exit(1); (float) cnt_fill / data_size); } @@ -349,5 +348,6 @@ int main(int argc, char* argv[]) eval_mask(M, N, B, repeat); + if ((error) return 1; return 0; } diff --git a/src/mask-sycl/main.cpp b/src/mask-sycl/main.cpp index 6833de9b39..ef9a75562d 100644 --- a/src/mask-sycl/main.cpp +++ b/src/mask-sycl/main.cpp @@ -177,7 +177,6 @@ void print_mask_ratio (sycl::queue &q, T *h_out, T *d_out, T fill_val, int data_ if (h_out[i] == fill_val) cnt_fill++; } printf("%s, Mask ratio: %f\n", (error ? "FAIL" : "PASS"), - if ((error) exit(1); (float) cnt_fill / data_size); } @@ -384,5 +383,6 @@ int main(int argc, char* argv[]) eval_mask(M, N, B, repeat); + if ((error) return 1; return 0; } diff --git a/src/matern-cuda/main.cu b/src/matern-cuda/main.cu index 5c71bb5703..5ff1569e44 100644 --- a/src/matern-cuda/main.cu +++ b/src/matern-cuda/main.cu @@ -144,7 +144,6 @@ int main(int argc, char* argv[]) } } printf("Length scale = %.1e check = %s\n", l, ok ? "PASS" : "FAIL"); - if (!ok) exit(1); l = l * 10.f; } @@ -185,5 +184,6 @@ int main(int argc, char* argv[]) free(targets); free(result); free(result_ref); + if (!ok) return 1; return 0; } diff --git a/src/matern-hip/main.cu b/src/matern-hip/main.cu index 5133702cd6..e3a22fc2e2 100644 --- a/src/matern-hip/main.cu +++ b/src/matern-hip/main.cu @@ -145,7 +145,6 @@ int main(int argc, char* argv[]) } } printf("Length scale = %.1e check = %s\n", l, ok ? "PASS" : "FAIL"); - if (!ok) exit(1); l = l * 10.f; } @@ -186,5 +185,6 @@ int main(int argc, char* argv[]) free(targets); free(result); free(result_ref); + if (!ok) return 1; return 0; } diff --git a/src/matern-omp/main.cpp b/src/matern-omp/main.cpp index bfcfdac463..c1ea417c4e 100644 --- a/src/matern-omp/main.cpp +++ b/src/matern-omp/main.cpp @@ -172,7 +172,6 @@ int main(int argc, char* argv[]) } } printf("Length scale = %.1e check = %s\n", l, ok ? "PASS" : "FAIL"); - if (!ok) exit(1); l = l * 10.f; } @@ -207,5 +206,6 @@ int main(int argc, char* argv[]) free(targets); free(result); free(result_ref); + if (!ok) return 1; return 0; } diff --git a/src/matern-sycl/main.cpp b/src/matern-sycl/main.cpp index a1abce3057..cce3f8308b 100644 --- a/src/matern-sycl/main.cpp +++ b/src/matern-sycl/main.cpp @@ -162,7 +162,6 @@ int main(int argc, char* argv[]) } } printf("Length scale = %.1e check = %s\n", l, ok ? "PASS" : "FAIL"); - if (!ok) exit(1); l = l * 10.f; } @@ -229,5 +228,6 @@ int main(int argc, char* argv[]) free(targets); free(result); free(result_ref); + if (!ok) return 1; return 0; } diff --git a/src/matrix-rotate-cuda/main.cu b/src/matrix-rotate-cuda/main.cu index 212f8eebf1..52cc3492d8 100644 --- a/src/matrix-rotate-cuda/main.cu +++ b/src/matrix-rotate-cuda/main.cu @@ -99,10 +99,10 @@ int main(int argc, char** argv) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(serial_res); free(parallel_res); cudaFree(d_parallel_res); + if (!ok) return 1; return 0; } diff --git a/src/matrix-rotate-hip/main.cu b/src/matrix-rotate-hip/main.cu index 90406c9308..fdeddf8d04 100644 --- a/src/matrix-rotate-hip/main.cu +++ b/src/matrix-rotate-hip/main.cu @@ -99,10 +99,10 @@ int main(int argc, char** argv) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(serial_res); free(parallel_res); hipFree(d_parallel_res); + if (!ok) return 1; return 0; } diff --git a/src/matrix-rotate-omp/main.cpp b/src/matrix-rotate-omp/main.cpp index 3d89fa0e3a..5749f92a4e 100644 --- a/src/matrix-rotate-omp/main.cpp +++ b/src/matrix-rotate-omp/main.cpp @@ -93,9 +93,9 @@ int main(int argc, char** argv) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(serial_res); free(parallel_res); + if (!ok) return 1; return 0; } diff --git a/src/matrix-rotate-sycl/main.cpp b/src/matrix-rotate-sycl/main.cpp index a912df4d68..613570e983 100644 --- a/src/matrix-rotate-sycl/main.cpp +++ b/src/matrix-rotate-sycl/main.cpp @@ -105,10 +105,10 @@ int main(int argc, char** argv) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(serial_res); free(matrix); sycl::free(d_matrix, q); + if (!ok) return 1; return 0; } diff --git a/src/matrixT-cuda/main.cu b/src/matrixT-cuda/main.cu index 648c5fe9d8..986931cec9 100644 --- a/src/matrixT-cuda/main.cu +++ b/src/matrixT-cuda/main.cu @@ -503,7 +503,6 @@ int main(int argc, char **argv) } printf("%s\n", success ? "PASS" : "FAIL"); - if (!success) exit(1); // cleanup free(h_idata); @@ -512,5 +511,6 @@ int main(int argc, char **argv) cudaFree(d_idata); cudaFree(d_odata); + if (!success) return 1; return 0; } diff --git a/src/matrixT-hip/main.cu b/src/matrixT-hip/main.cu index e9f6d93df0..c647bdda57 100644 --- a/src/matrixT-hip/main.cu +++ b/src/matrixT-hip/main.cu @@ -503,7 +503,6 @@ int main(int argc, char **argv) } printf("%s\n", success ? "PASS" : "FAIL"); - if (!success) exit(1); // cleanup free(h_idata); @@ -512,5 +511,6 @@ int main(int argc, char **argv) hipFree(d_idata); hipFree(d_odata); + if (!success) return 1; return 0; } diff --git a/src/matrixT-sycl/main.cpp b/src/matrixT-sycl/main.cpp index 98b544af50..09c1ab3e9a 100644 --- a/src/matrixT-sycl/main.cpp +++ b/src/matrixT-sycl/main.cpp @@ -657,7 +657,6 @@ int main(int argc, char **argv) } printf("%s\n", success ? "PASS" : "FAIL"); - if (!success) exit(1); // cleanup free(h_idata); @@ -666,5 +665,6 @@ int main(int argc, char **argv) sycl::free(d_idata, q); sycl::free(d_odata, q); + if (!success) return 1; return 0; } diff --git a/src/mdh-cuda/main.cu b/src/mdh-cuda/main.cu index 96b65bee35..6258843881 100644 --- a/src/mdh-cuda/main.cu +++ b/src/mdh-cuda/main.cu @@ -55,7 +55,6 @@ void compare(const float *arr, const float *arr2, int ngrid) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } __global__ void mdh ( @@ -476,5 +475,6 @@ int main(int argc, const char **argv) { wkf_timer_destroy(timer); + if (!ok) return 1; return 0; } diff --git a/src/mdh-hip/main.cu b/src/mdh-hip/main.cu index f485fa05d2..c47ff5d8ab 100644 --- a/src/mdh-hip/main.cu +++ b/src/mdh-hip/main.cu @@ -74,7 +74,6 @@ void compare(const float *arr, const float *arr2, int ngrid) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } __global__ void mdh ( @@ -495,5 +494,6 @@ int main(int argc, const char **argv) { wkf_timer_destroy(timer); + if (!ok) return 1; return 0; } diff --git a/src/mdh-omp/main.cpp b/src/mdh-omp/main.cpp index 02ac5434e1..46fc1c6df2 100644 --- a/src/mdh-omp/main.cpp +++ b/src/mdh-omp/main.cpp @@ -54,7 +54,6 @@ void compare(const float *arr, const float *arr2, int ngrid) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } void run_gpu_kernel( @@ -256,5 +255,6 @@ int main(int argc, const char **argv) { wkf_timer_destroy(timer); + if (!ok) return 1; return 0; } diff --git a/src/mdh-sycl/main.cpp b/src/mdh-sycl/main.cpp index 78595f9345..f530f5d648 100644 --- a/src/mdh-sycl/main.cpp +++ b/src/mdh-sycl/main.cpp @@ -54,7 +54,6 @@ void compare(const float *arr, const float *arr2, int ngrid) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } void run_gpu_kernel( @@ -398,5 +397,6 @@ int main(int argc, const char **argv) { wkf_timer_destroy(timer); + if (!ok) return 1; return 0; } diff --git a/src/meanshift-cuda/main.cu b/src/meanshift-cuda/main.cu index c6601e17b0..2288456651 100644 --- a/src/meanshift-cuda/main.cu +++ b/src/meanshift-cuda/main.cu @@ -143,7 +143,6 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (centroids.size() != M && are_close) exit(1); // Reset device data cudaMemcpy(d_data, data.data(), data_bytes, cudaMemcpyHostToDevice); @@ -168,9 +167,10 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (centroids.size() != M && are_close) exit(1); cudaFree(d_data); cudaFree(d_data_next); + if (centroids.size() != M && are_close) return 1; + if (centroids.size() != M && are_close) return 1; return 0; } diff --git a/src/meanshift-hip/main.cu b/src/meanshift-hip/main.cu index 8baff2e88a..30ed44dcd7 100644 --- a/src/meanshift-hip/main.cu +++ b/src/meanshift-hip/main.cu @@ -142,7 +142,6 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (centroids.size() != M && are_close) exit(1); // Reset device data hipMemcpy(d_data, data.data(), data_bytes, hipMemcpyHostToDevice); @@ -166,10 +165,11 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (centroids.size() != M && are_close) exit(1); hipFree(d_data); hipFree(d_data_next); + if (centroids.size() != M && are_close) return 1; + if (centroids.size() != M && are_close) return 1; return 0; } diff --git a/src/meanshift-omp/main.cpp b/src/meanshift-omp/main.cpp index debf02ee21..528bb5259c 100644 --- a/src/meanshift-omp/main.cpp +++ b/src/meanshift-omp/main.cpp @@ -147,7 +147,6 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (centroids.size() != M && are_close) exit(1); // Reset device data result = data; @@ -171,9 +170,10 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (centroids.size() != M && are_close) exit(1); } free(d_data_next); + if (centroids.size() != M && are_close) return 1; + if (centroids.size() != M && are_close) return 1; return 0; } diff --git a/src/meanshift-sycl/main.cpp b/src/meanshift-sycl/main.cpp index db8ab91b55..ddc0c7e6f1 100644 --- a/src/meanshift-sycl/main.cpp +++ b/src/meanshift-sycl/main.cpp @@ -156,7 +156,6 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (centroids.size() != M && are_close) exit(1); // Reset device data q.memcpy(d_data, data.data(), data_bytes).wait(); @@ -187,9 +186,10 @@ int main(int argc, char* argv[]) { std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (centroids.size() != M && are_close) exit(1); sycl::free(d_data, q); sycl::free(d_data_next, q); + if (centroids.size() != M && are_close) return 1; + if (centroids.size() != M && are_close) return 1; return 0; } diff --git a/src/miniWeather-cuda/main.cu b/src/miniWeather-cuda/main.cu index 9e508d1922..2f77aa6e30 100644 --- a/src/miniWeather-cuda/main.cu +++ b/src/miniWeather-cuda/main.cu @@ -774,7 +774,6 @@ int main(int argc, char **argv) { printf("d_te: %le\n" , d_te); bool ok = check_output(d_mass, d_te); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); finalize(); @@ -792,5 +791,6 @@ int main(int argc, char **argv) { cudaFree(d_recvbuf_l); cudaFree(d_recvbuf_r); + if (!ok) return 1; return 0; } diff --git a/src/miniWeather-hip/main.cu b/src/miniWeather-hip/main.cu index f113506b4e..1f8421d34d 100644 --- a/src/miniWeather-hip/main.cu +++ b/src/miniWeather-hip/main.cu @@ -774,7 +774,6 @@ int main(int argc, char **argv) { printf("d_te: %le\n" , d_te); bool ok = check_output(d_mass, d_te); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); finalize(); @@ -792,5 +791,6 @@ int main(int argc, char **argv) { hipFree(d_recvbuf_l); hipFree(d_recvbuf_r); + if (!ok) return 1; return 0; } diff --git a/src/miniWeather-sycl/main.cpp b/src/miniWeather-sycl/main.cpp index 40da66c8fd..60e8b065c9 100644 --- a/src/miniWeather-sycl/main.cpp +++ b/src/miniWeather-sycl/main.cpp @@ -1007,7 +1007,6 @@ int main(int argc, char **argv) { printf("d_te: %le\n" , d_te); bool ok = check_output(d_mass, d_te); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); finalize(); @@ -1025,5 +1024,6 @@ int main(int argc, char **argv) { sycl::free(d_recvbuf_l, q); sycl::free(d_recvbuf_r, q); + if (!ok) return 1; return 0; } diff --git a/src/minisweep-cuda/main.cu b/src/minisweep-cuda/main.cu index 48905df6d9..b881b560d1 100644 --- a/src/minisweep-cuda/main.cu +++ b/src/minisweep-cuda/main.cu @@ -397,7 +397,6 @@ int main( int argc, char** argv ) normsq, normsqdiff, normsqdiff== (P)0 ? "PASS" : "FAIL", - if (normsqdiff != (P)0) exit(1); time * 1e-6, ktime * 1e-6); printf( "GF/s (host): %.3f\nGF/s (device): %.3f\n", floprate_h, floprate_d ); @@ -424,5 +423,6 @@ int main( int argc, char** argv ) free(faceyz); free(vslocal); + if (normsqdiff != (P)0) return 1; return 0; } /*---main---*/ diff --git a/src/minisweep-hip/main.cu b/src/minisweep-hip/main.cu index 9e28eec5d8..677bac6f13 100644 --- a/src/minisweep-hip/main.cu +++ b/src/minisweep-hip/main.cu @@ -397,7 +397,6 @@ int main( int argc, char** argv ) normsq, normsqdiff, normsqdiff== (P)0 ? "PASS" : "FAIL", - if (normsqdiff != (P)0) exit(1); time * 1e-6, ktime * 1e-6); printf( "GF/s (host): %.3f\nGF/s (device): %.3f\n", floprate_h, floprate_d ); @@ -424,5 +423,6 @@ int main( int argc, char** argv ) free(faceyz); free(vslocal); + if (normsqdiff != (P)0) return 1; return 0; } /*---main---*/ diff --git a/src/minisweep-omp/main.cpp b/src/minisweep-omp/main.cpp index d6409947b0..e877a2d6c1 100644 --- a/src/minisweep-omp/main.cpp +++ b/src/minisweep-omp/main.cpp @@ -464,7 +464,6 @@ int main( int argc, char** argv ) normsq, normsqdiff, normsqdiff== (P)0 ? "PASS" : "FAIL", - if (normsqdiff != (P)0) exit(1); time * 1e-6, ktime * 1e-6); printf( "GF/s (host): %.3f\nGF/s (device): %.3f\n", floprate_h, floprate_d ); @@ -482,5 +481,6 @@ int main( int argc, char** argv ) free(faceyz); free(vslocal); + if (normsqdiff != (P)0) return 1; return 0; } /*---main---*/ diff --git a/src/minisweep-sycl/main.cpp b/src/minisweep-sycl/main.cpp index a3ba4ac44c..a728ff2cea 100644 --- a/src/minisweep-sycl/main.cpp +++ b/src/minisweep-sycl/main.cpp @@ -407,7 +407,6 @@ int main( int argc, char** argv ) normsq, normsqdiff, normsqdiff== (P)0 ? "PASS" : "FAIL", - if (normsqdiff != (P)0) exit(1); time * 1e-6, ktime * 1e-6); printf( "GF/s (host): %.3f\nGF/s (device): %.3f\n", floprate_h, floprate_d ); @@ -434,6 +433,7 @@ int main( int argc, char** argv ) free(faceyz); free(vslocal); + if (normsqdiff != (P)0) return 1; return 0; } /*---main---*/ diff --git a/src/mixbench-cuda/main.cu b/src/mixbench-cuda/main.cu index 9601a21d1b..211eaf08b4 100644 --- a/src/mixbench-cuda/main.cu +++ b/src/mixbench-cuda/main.cu @@ -92,7 +92,6 @@ void mixbenchGPU(long size, int compute_iterations, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(cd); cudaFree(d_cd); @@ -112,5 +111,6 @@ int main(int argc, char* argv[]) { mixbenchGPU(VECTOR_SIZE, compute_iterations, repeat); + if (!ok) return 1; return 0; } diff --git a/src/mixbench-hip/main.cu b/src/mixbench-hip/main.cu index 5480ae8233..24334202e6 100644 --- a/src/mixbench-hip/main.cu +++ b/src/mixbench-hip/main.cu @@ -92,7 +92,6 @@ void mixbenchGPU(long size, int compute_iterations, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(cd); hipFree(d_cd); @@ -112,5 +111,6 @@ int main(int argc, char* argv[]) { mixbenchGPU(VECTOR_SIZE, compute_iterations, repeat); + if (!ok) return 1; return 0; } diff --git a/src/mixbench-omp/main.cpp b/src/mixbench-omp/main.cpp index 36360b6bc0..05829e40ea 100644 --- a/src/mixbench-omp/main.cpp +++ b/src/mixbench-omp/main.cpp @@ -91,7 +91,6 @@ void mixbenchGPU(long size, int compute_iterations, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(cd); } @@ -110,5 +109,6 @@ int main(int argc, char* argv[]) { mixbenchGPU(VECTOR_SIZE, compute_iterations, repeat); + if (!ok) return 1; return 0; } diff --git a/src/moe-align-cuda/main.cu b/src/moe-align-cuda/main.cu index d02dc36892..7e4938287d 100644 --- a/src/moe-align-cuda/main.cu +++ b/src/moe-align-cuda/main.cu @@ -650,7 +650,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); GPU_CHECK(cudaFree(topk_ids)); GPU_CHECK(cudaFree(sorted_ids)); @@ -663,5 +662,6 @@ int main(int argc, char* argv[]) } } } + if (!ok) return 1; return 0; } diff --git a/src/moe-align-hip/main.cu b/src/moe-align-hip/main.cu index 9fdd0b9525..c1a974f96a 100644 --- a/src/moe-align-hip/main.cu +++ b/src/moe-align-hip/main.cu @@ -654,7 +654,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); GPU_CHECK(hipFree(topk_ids)); GPU_CHECK(hipFree(sorted_ids)); @@ -667,5 +666,6 @@ int main(int argc, char* argv[]) } } } + if (!ok) return 1; return 0; } diff --git a/src/moe-align-sycl/main.cpp b/src/moe-align-sycl/main.cpp index 9b39511ec4..0a5de3b6ae 100644 --- a/src/moe-align-sycl/main.cpp +++ b/src/moe-align-sycl/main.cpp @@ -663,7 +663,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(topk_ids, q); sycl::free(sorted_ids, q); @@ -676,5 +675,6 @@ int main(int argc, char* argv[]) } } } + if (!ok) return 1; return 0; } diff --git a/src/moe-cuda/main.cu b/src/moe-cuda/main.cu index 1f617e190e..c8c5cd4b75 100644 --- a/src/moe-cuda/main.cu +++ b/src/moe-cuda/main.cu @@ -109,7 +109,6 @@ void topk_softmax(int num_tokens, int num_experts, int topk, int repeat) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); auto start = std::chrono::steady_clock::now(); @@ -165,5 +164,6 @@ int main(int argc, char* argv[]) const int topk = atoi(argv[3]); const int repeat = atoi(argv[4]); topk_softmax(num_tokens, num_experts, topk, repeat); + if (error) return 1; return 0; } diff --git a/src/moe-hip/main.cu b/src/moe-hip/main.cu index 126c5bb55f..0997e61c4f 100644 --- a/src/moe-hip/main.cu +++ b/src/moe-hip/main.cu @@ -110,7 +110,6 @@ void topk_softmax(int num_tokens, int num_experts, int topk, int repeat) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); auto start = std::chrono::steady_clock::now(); @@ -166,5 +165,6 @@ int main(int argc, char* argv[]) const int topk = atoi(argv[3]); const int repeat = atoi(argv[4]); topk_softmax(num_tokens, num_experts, topk, repeat); + if (error) return 1; return 0; } diff --git a/src/moe-sum-cuda/main.cu b/src/moe-sum-cuda/main.cu index e1f5aa83e0..24538500f3 100644 --- a/src/moe-sum-cuda/main.cu +++ b/src/moe-sum-cuda/main.cu @@ -176,7 +176,6 @@ int main(int argc, char* argv[]) int32_t rc = memcmp(output, output_vec4, output_size_bytes); printf("%s\n", rc ? "FAIL" : "PASS"); - if (rc) exit(1); GPU_CHECK(cudaFree(d_input)); free(input); @@ -184,5 +183,6 @@ int main(int argc, char* argv[]) GPU_CHECK(cudaFree(d_output)); free(output); free(output_vec4); + if (rc) return 1; return 0; } diff --git a/src/moe-sum-hip/main.cu b/src/moe-sum-hip/main.cu index dbf93d2089..43ea166e9d 100644 --- a/src/moe-sum-hip/main.cu +++ b/src/moe-sum-hip/main.cu @@ -176,7 +176,6 @@ int main(int argc, char* argv[]) int32_t rc = memcmp(output, output_vec4, output_size_bytes); printf("%s\n", rc ? "FAIL" : "PASS"); - if (rc) exit(1); GPU_CHECK(hipFree(d_input)); free(input); @@ -184,5 +183,6 @@ int main(int argc, char* argv[]) GPU_CHECK(hipFree(d_output)); free(output); free(output_vec4); + if (rc) return 1; return 0; } diff --git a/src/moe-sum-sycl/main.cpp b/src/moe-sum-sycl/main.cpp index 81e5783c18..ab393da83f 100644 --- a/src/moe-sum-sycl/main.cpp +++ b/src/moe-sum-sycl/main.cpp @@ -184,7 +184,6 @@ int main(int argc, char* argv[]) int32_t rc = memcmp(output, output_vec4, output_size_bytes); printf("%s\n", rc ? "FAIL" : "PASS"); - if (rc) exit(1); sycl::free(d_input, q); free(input); @@ -192,5 +191,6 @@ int main(int argc, char* argv[]) sycl::free(d_output, q); free(output); free(output_vec4); + if (rc) return 1; return 0; } diff --git a/src/moe-sycl/main.cpp b/src/moe-sycl/main.cpp index 042d9d8fe0..4310e6148d 100644 --- a/src/moe-sycl/main.cpp +++ b/src/moe-sycl/main.cpp @@ -110,7 +110,6 @@ void topk_softmax(int num_tokens, int num_experts, int topk, int repeat) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); auto start = std::chrono::steady_clock::now(); @@ -157,5 +156,6 @@ int main(int argc, char* argv[]) const int topk = atoi(argv[3]); const int repeat = atoi(argv[4]); topk_softmax(num_tokens, num_experts, topk, repeat); + if (error) return 1; return 0; } diff --git a/src/morphology-cuda/main.cu b/src/morphology-cuda/main.cu index fb8a69ecc7..9c6ee8fa53 100644 --- a/src/morphology-cuda/main.cu +++ b/src/morphology-cuda/main.cu @@ -56,10 +56,10 @@ int main(int argc, char* argv[]) int s = 0; for (unsigned int i = 0; i < memSize; i++) s += srcImg[i]; printf("%s\n", s == WHITE ? "PASS" : "FAIL"); - if (s != WHITE) exit(1); cudaFree(img_d); cudaFree(tmp_d); free(srcImg); + if (s != WHITE) return 1; return 0; } diff --git a/src/morphology-hip/main.cu b/src/morphology-hip/main.cu index b648b4a85b..07e6548291 100644 --- a/src/morphology-hip/main.cu +++ b/src/morphology-hip/main.cu @@ -56,10 +56,10 @@ int main(int argc, char* argv[]) int s = 0; for (unsigned int i = 0; i < memSize; i++) s += srcImg[i]; printf("%s\n", s == WHITE ? "PASS" : "FAIL"); - if (s != WHITE) exit(1); hipFree(img_d); hipFree(tmp_d); free(srcImg); + if (s != WHITE) return 1; return 0; } diff --git a/src/morphology-omp/main.cpp b/src/morphology-omp/main.cpp index 3c3ef1cb0f..1e5aded9ae 100644 --- a/src/morphology-omp/main.cpp +++ b/src/morphology-omp/main.cpp @@ -52,9 +52,9 @@ int main(int argc, char* argv[]) int s = 0; for (unsigned int i = 0; i < memSize; i++) s += srcImg[i]; printf("%s\n", s == WHITE ? "PASS" : "FAIL"); - if (s != WHITE) exit(1); free(srcImg); free(tmpImg); + if (s != WHITE) return 1; return 0; } diff --git a/src/morphology-sycl/main.cpp b/src/morphology-sycl/main.cpp index c38ba108b8..0510c37ff3 100644 --- a/src/morphology-sycl/main.cpp +++ b/src/morphology-sycl/main.cpp @@ -59,10 +59,10 @@ int main(int argc, char* argv[]) int s = 0; for (unsigned int i = 0; i < memSize; i++) s += srcImg[i]; printf("%s\n", s == WHITE ? "PASS" : "FAIL"); - if (s != WHITE) exit(1); sycl::free(img_d, q); sycl::free(tmp_d, q); free(srcImg); + if (s != WHITE) return 1; return 0; } diff --git a/src/mr-cuda/main.cu b/src/mr-cuda/main.cu index d078b9b13f..4afd84daeb 100644 --- a/src/mr-cuda/main.cu +++ b/src/mr-cuda/main.cu @@ -99,7 +99,6 @@ void run_benchmark(const int repeat) printf("Total kernel execution time (mr32_simple ): %f (ms)\n", mr32_sf_time * 1e-6); printf("Total kernel execution time (mr32_efficent): %f (ms)\n", mr32_eff_time * 1e-6); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // device results are not included print_results(bits32, SIZES_CNT32, BASES_CNT32, time_vals); @@ -131,5 +130,6 @@ int main(int argc, char *argv[]) set_nintegers(); run_benchmark(repeat); + if (!ok) return 1; return 0; } diff --git a/src/mr-hip/main.cu b/src/mr-hip/main.cu index 452debf23f..07b60515cd 100644 --- a/src/mr-hip/main.cu +++ b/src/mr-hip/main.cu @@ -99,7 +99,6 @@ void run_benchmark(const int repeat) printf("Total kernel execution time (mr32_simple ): %f (ms)\n", mr32_sf_time * 1e-6); printf("Total kernel execution time (mr32_efficent): %f (ms)\n", mr32_eff_time * 1e-6); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // device results are not included print_results(bits32, SIZES_CNT32, BASES_CNT32, time_vals); @@ -131,5 +130,6 @@ int main(int argc, char *argv[]) set_nintegers(); run_benchmark(repeat); + if (!ok) return 1; return 0; } diff --git a/src/mr-omp/main.cpp b/src/mr-omp/main.cpp index 2d713d0258..ef459f20b5 100644 --- a/src/mr-omp/main.cpp +++ b/src/mr-omp/main.cpp @@ -105,7 +105,6 @@ void run_benchmark(const int repeat) printf("Total kernel execution time (mr32_simple ): %f (ms)\n", mr32_sf_time * 1e-6); printf("Total kernel execution time (mr32_efficent): %f (ms)\n", mr32_eff_time * 1e-6); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // device results are not included print_results(bits32, SIZES_CNT32, BASES_CNT32, time_vals); @@ -134,5 +133,6 @@ int main(int argc, char *argv[]) set_nintegers(); run_benchmark(repeat); + if (!ok) return 1; return 0; } diff --git a/src/mr-sycl/main.cpp b/src/mr-sycl/main.cpp index 9321730ae8..a03d899837 100644 --- a/src/mr-sycl/main.cpp +++ b/src/mr-sycl/main.cpp @@ -107,7 +107,6 @@ void run_benchmark(sycl::queue &q, const int repeat) printf("Total kernel execution time (mr32_simple ): %f (ms)\n", mr32_sf_time * 1e-6); printf("Total kernel execution time (mr32_efficent): %f (ms)\n", mr32_eff_time * 1e-6); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // device results are not included print_results(bits32, SIZES_CNT32, BASES_CNT32, time_vals); @@ -145,5 +144,6 @@ int main(int argc, char *argv[]) set_nintegers(); run_benchmark(q, repeat); + if (!ok) return 1; return 0; } diff --git a/src/mrc-cuda/main.cu b/src/mrc-cuda/main.cu index b2dfa81d32..d726e4a1bc 100644 --- a/src/mrc-cuda/main.cu +++ b/src/mrc-cuda/main.cu @@ -190,7 +190,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_X1); cudaFree(d_X2); @@ -206,5 +205,6 @@ int main(int argc, char* argv[]) free(h_dX1); free(h_dX2); + if (!ok) return 1; return 0; } diff --git a/src/mrc-hip/main.cu b/src/mrc-hip/main.cu index 3766eca6cf..c0fb081f0b 100644 --- a/src/mrc-hip/main.cu +++ b/src/mrc-hip/main.cu @@ -190,7 +190,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_X1); hipFree(d_X2); @@ -206,5 +205,6 @@ int main(int argc, char* argv[]) free(h_dX1); free(h_dX2); + if (!ok) return 1; return 0; } diff --git a/src/mrc-omp/main.cpp b/src/mrc-omp/main.cpp index f652433157..6d034b10ba 100644 --- a/src/mrc-omp/main.cpp +++ b/src/mrc-omp/main.cpp @@ -107,7 +107,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(h_X1); free(h_X2); @@ -116,5 +115,6 @@ int main(int argc, char* argv[]) free(h_dX1); free(h_dX2); + if (!ok) return 1; return 0; } diff --git a/src/mrc-sycl/main.cpp b/src/mrc-sycl/main.cpp index a88d958cd9..427310bcd1 100644 --- a/src/mrc-sycl/main.cpp +++ b/src/mrc-sycl/main.cpp @@ -213,7 +213,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_X1, q); sycl::free(d_X2, q); @@ -229,5 +228,6 @@ int main(int argc, char* argv[]) free(h_dX1); free(h_dX2); + if (!ok) return 1; return 0; } diff --git a/src/multinomial-cuda/main.cu b/src/multinomial-cuda/main.cu index cba5d2c75b..fbf88f1714 100644 --- a/src/multinomial-cuda/main.cu +++ b/src/multinomial-cuda/main.cu @@ -206,7 +206,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); cudaDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); @@ -230,5 +229,6 @@ int main(int argc, char* argv[]) free(sample); free(distr); + if (error) return 1; return 0; } diff --git a/src/multinomial-hip/main.cu b/src/multinomial-hip/main.cu index 5803c34920..9016a7088f 100644 --- a/src/multinomial-hip/main.cu +++ b/src/multinomial-hip/main.cu @@ -206,7 +206,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); hipDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); @@ -230,5 +229,6 @@ int main(int argc, char* argv[]) free(sample); free(distr); + if (error) return 1; return 0; } diff --git a/src/multinomial-sycl/main.cpp b/src/multinomial-sycl/main.cpp index 7135f74aad..91ec772101 100644 --- a/src/multinomial-sycl/main.cpp +++ b/src/multinomial-sycl/main.cpp @@ -226,7 +226,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); q.wait(); auto start = std::chrono::steady_clock::now(); @@ -249,5 +248,6 @@ int main(int argc, char* argv[]) free(sample); free(distr); + if (error) return 1; return 0; } diff --git a/src/murmurhash3-cuda/murmurhash3.cu b/src/murmurhash3-cuda/murmurhash3.cu index a77d7930ac..7f2ec979ca 100644 --- a/src/murmurhash3-cuda/murmurhash3.cu +++ b/src/murmurhash3-cuda/murmurhash3.cu @@ -226,7 +226,6 @@ int main(int argc, char** argv) } if (error) printf("FAIL\n"); else printf("SUCCESS\n"); - if (error) exit(1); for (uint32_t i = 0; i < numKeys; i++) { free(out[i]); @@ -242,5 +241,6 @@ int main(int argc, char** argv) cudaFree(dev_out); cudaFree(dev_length); cudaFree(key_length); + if (error) return 1; return 0; } diff --git a/src/murmurhash3-hip/murmurhash3.cu b/src/murmurhash3-hip/murmurhash3.cu index 0dd21bdf4e..cb8655a62d 100644 --- a/src/murmurhash3-hip/murmurhash3.cu +++ b/src/murmurhash3-hip/murmurhash3.cu @@ -226,7 +226,6 @@ int main(int argc, char** argv) } if (error) printf("FAIL\n"); else printf("SUCCESS\n"); - if (error) exit(1); for (uint32_t i = 0; i < numKeys; i++) { free(out[i]); @@ -242,5 +241,6 @@ int main(int argc, char** argv) hipFree(dev_out); hipFree(dev_length); hipFree(key_length); + if (error) return 1; return 0; } diff --git a/src/murmurhash3-omp/murmurhash3.cpp b/src/murmurhash3-omp/murmurhash3.cpp index f089aa4793..951f57c5a1 100644 --- a/src/murmurhash3-omp/murmurhash3.cpp +++ b/src/murmurhash3-omp/murmurhash3.cpp @@ -203,7 +203,6 @@ int main(int argc, char** argv) } if (error) printf("FAIL\n"); else printf("SUCCESS\n"); - if (error) exit(1); for (uint32_t i = 0; i < numKeys; i++) { free(out[i]); @@ -215,5 +214,6 @@ int main(int argc, char** argv) free(d_keys); free(d_out); free(d_length); + if (error) return 1; return 0; } diff --git a/src/murmurhash3-sycl/murmurhash3.cpp b/src/murmurhash3-sycl/murmurhash3.cpp index 756889f86d..20d9658d2d 100644 --- a/src/murmurhash3-sycl/murmurhash3.cpp +++ b/src/murmurhash3-sycl/murmurhash3.cpp @@ -219,7 +219,6 @@ int main(int argc, char** argv) } if (error) printf("FAIL\n"); else printf("SUCCESS\n"); - if (error) exit(1); for (uint32_t i = 0; i < numKeys; i++) { free(out[i]); @@ -235,5 +234,6 @@ int main(int argc, char** argv) sycl::free(dev_out, q); sycl::free(dev_length, q); sycl::free(key_length, q); + if (error) return 1; return 0; } diff --git a/src/nlll-cuda/main.cu b/src/nlll-cuda/main.cu index b037eaa138..cc3ddb5644 100644 --- a/src/nlll-cuda/main.cu +++ b/src/nlll-cuda/main.cu @@ -143,7 +143,6 @@ void eval(const int64_t nframe, ok = false; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_output); cudaFree(d_total_weight); @@ -227,5 +226,6 @@ int main(int argc, char* argv[]) printf("=========== Data type is FP16 ==========\n"); driver(argv); + if (!ok) return 1; return 0; } diff --git a/src/nlll-hip/main.cu b/src/nlll-hip/main.cu index 4e8aea7626..7986e46cd5 100644 --- a/src/nlll-hip/main.cu +++ b/src/nlll-hip/main.cu @@ -143,7 +143,6 @@ void eval(const int64_t nframe, ok = false; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_output); hipFree(d_total_weight); @@ -227,5 +226,6 @@ int main(int argc, char* argv[]) printf("=========== Data type is FP16 ==========\n"); driver(argv); + if (!ok) return 1; return 0; } diff --git a/src/nlll-omp/main.cpp b/src/nlll-omp/main.cpp index b6bfaadeac..8697820f38 100644 --- a/src/nlll-omp/main.cpp +++ b/src/nlll-omp/main.cpp @@ -119,7 +119,6 @@ void eval(const int64_t nframe, ok = false; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } template @@ -195,5 +194,6 @@ int main(int argc, char* argv[]) printf("=========== Data type is FP32 ==========\n"); driver(argv); + if (!ok) return 1; return 0; } diff --git a/src/nlll-sycl/main.cpp b/src/nlll-sycl/main.cpp index 76761da194..f81ca98936 100644 --- a/src/nlll-sycl/main.cpp +++ b/src/nlll-sycl/main.cpp @@ -154,7 +154,6 @@ void eval(const int64_t nframe, ok = false; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_output, q); sycl::free(d_total_weight, q); @@ -240,5 +239,6 @@ int main(int argc, char* argv[]) printf("=========== Data type is FP16 ==========\n"); driver(argv); + if (!ok) return 1; return 0; } diff --git a/src/nqueen-cuda/main.cu b/src/nqueen-cuda/main.cu index 0905f68116..c06bee5ed1 100644 --- a/src/nqueen-cuda/main.cu +++ b/src/nqueen-cuda/main.cu @@ -258,11 +258,11 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); - if (qtd_sols_global != 2279184 && tree_size == 171129071) exit(1); } free(root_prefixes_h); free(vector_of_tree_size_h); free(solutions_h); + if (qtd_sols_global != 2279184 && tree_size == 171129071) return 1; return 0; } diff --git a/src/nqueen-hip/main.cu b/src/nqueen-hip/main.cu index f6fc659bf2..c3137d3f79 100644 --- a/src/nqueen-hip/main.cu +++ b/src/nqueen-hip/main.cu @@ -259,11 +259,11 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); - if (qtd_sols_global != 2279184 && tree_size == 171129071) exit(1); } free(root_prefixes_h); free(vector_of_tree_size_h); free(solutions_h); + if (qtd_sols_global != 2279184 && tree_size == 171129071) return 1; return 0; } diff --git a/src/nqueen-omp/main.cpp b/src/nqueen-omp/main.cpp index 47dc393c54..0f5e0b22f4 100644 --- a/src/nqueen-omp/main.cpp +++ b/src/nqueen-omp/main.cpp @@ -233,11 +233,11 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); - if (qtd_sols_global != 2279184 && tree_size == 171129071) exit(1); } free(root_prefixes_h); free(vector_of_tree_size_h); free(solutions_h); + if (qtd_sols_global != 2279184 && tree_size == 171129071) return 1; return 0; } diff --git a/src/nqueen-sycl/main.cpp b/src/nqueen-sycl/main.cpp index 4364038c3e..77a97860f1 100644 --- a/src/nqueen-sycl/main.cpp +++ b/src/nqueen-sycl/main.cpp @@ -260,11 +260,11 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); - if (qtd_sols_global != 2279184 && tree_size == 171129071) exit(1); } free(root_prefixes_h); free(vector_of_tree_size_h); free(solutions_h); + if (qtd_sols_global != 2279184 && tree_size == 171129071) return 1; return 0; } diff --git a/src/nw-cuda/nw.cu b/src/nw-cuda/nw.cu index 8f1a078d2f..4a50c27097 100644 --- a/src/nw-cuda/nw.cu +++ b/src/nw-cuda/nw.cu @@ -345,7 +345,6 @@ int main(int argc, char **argv){ nw_host(input_itemsets, reference, max_cols, penalty); int err = memcmp(input_itemsets, output_itemsets, max_cols * max_rows * sizeof(int)); printf("%s\n", err ? "FAIL" : "PASS"); - if (err) exit(1); #ifdef TRACEBACK @@ -413,6 +412,7 @@ int main(int argc, char **argv){ free(output_itemsets); cudaFree(d_input_itemsets); cudaFree(d_reference); + if (err) return 1; return 0; } diff --git a/src/nw-hip/nw.cu b/src/nw-hip/nw.cu index 1c781bff92..2f116de37b 100644 --- a/src/nw-hip/nw.cu +++ b/src/nw-hip/nw.cu @@ -345,7 +345,6 @@ int main(int argc, char **argv){ nw_host(input_itemsets, reference, max_cols, penalty); int err = memcmp(input_itemsets, output_itemsets, max_cols * max_rows * sizeof(int)); printf("%s\n", err ? "FAIL" : "PASS"); - if (err) exit(1); #ifdef TRACEBACK @@ -413,6 +412,7 @@ int main(int argc, char **argv){ free(output_itemsets); hipFree(d_input_itemsets); hipFree(d_reference); + if (err) return 1; return 0; } diff --git a/src/nw-omp/nw.cpp b/src/nw-omp/nw.cpp index 2f8f909c8a..b79bc10a0e 100644 --- a/src/nw-omp/nw.cpp +++ b/src/nw-omp/nw.cpp @@ -320,7 +320,6 @@ int main(int argc, char **argv){ nw_host(h_input_itemsets, reference, max_cols, penalty); int err = memcmp(input_itemsets, h_input_itemsets, max_cols * max_rows * sizeof(int)); printf("%s\n", err ? "FAIL" : "PASS"); - if (err) exit(1); #ifdef TRACEBACK int *output_itemsets = input_itemsets; @@ -388,6 +387,7 @@ int main(int argc, char **argv){ free(reference); free(input_itemsets); free(h_input_itemsets); + if (err) return 1; return 0; } diff --git a/src/nw-sycl/nw.cpp b/src/nw-sycl/nw.cpp index 5f18b118f8..04eedc2018 100644 --- a/src/nw-sycl/nw.cpp +++ b/src/nw-sycl/nw.cpp @@ -234,7 +234,6 @@ int main(int argc, char **argv){ nw_host(input_itemsets, reference, max_cols, penalty); int err = memcmp(input_itemsets, output_itemsets, max_cols * max_rows * sizeof(int)); printf("%s\n", err ? "FAIL" : "PASS"); - if (err) exit(1); #ifdef TRACEBACK @@ -307,5 +306,6 @@ int main(int argc, char **argv){ free(output_itemsets); sycl::free(d_input_itemsets_acc, q); sycl::free(d_reference_acc, q); + if (err) return 1; return 0; } diff --git a/src/openmp-cuda/main.cu b/src/openmp-cuda/main.cu index 1ee5e32d13..841e067a58 100644 --- a/src/openmp-cuda/main.cu +++ b/src/openmp-cuda/main.cu @@ -103,11 +103,11 @@ int main(int argc, char *argv[]) { // check the result bool bResult = correctResult(a, nwords, b, repeat); printf("%s\n", bResult ? "PASS" : "FAIL"); - if (!bResult) exit(1); } } printf("Runtime overhead of first run is %f seconds\n", overhead); free(a); + if (!bResult) return 1; return 0; } diff --git a/src/openmp-hip/main.cu b/src/openmp-hip/main.cu index 09f37568d0..71c8632024 100644 --- a/src/openmp-hip/main.cu +++ b/src/openmp-hip/main.cu @@ -103,11 +103,11 @@ int main(int argc, char *argv[]) { // check the result bool bResult = correctResult(a, nwords, b, repeat); printf("%s\n", bResult ? "PASS" : "FAIL"); - if (!bResult) exit(1); } } printf("Runtime overhead of first run is %f seconds\n", overhead); free(a); + if (!bResult) return 1; return 0; } diff --git a/src/openmp-omp/main.cpp b/src/openmp-omp/main.cpp index 3f5464e12f..21902fff32 100644 --- a/src/openmp-omp/main.cpp +++ b/src/openmp-omp/main.cpp @@ -91,11 +91,11 @@ int main(int argc, char *argv[]) { // check the result bool bResult = correctResult(a, nwords, b, repeat); printf("%s\n", bResult ? "PASS" : "FAIL"); - if (!bResult) exit(1); } } printf("Runtime overhead of first run is %f seconds\n", overhead); free(a); + if (!bResult) return 1; return 0; } diff --git a/src/openmp-sycl/main.cpp b/src/openmp-sycl/main.cpp index 1ba86ddc62..e24ab7e225 100644 --- a/src/openmp-sycl/main.cpp +++ b/src/openmp-sycl/main.cpp @@ -108,11 +108,11 @@ int main(int argc, char *argv[]) { // check the result bool bResult = correctResult(a, nwords, b, repeat); printf("%s\n", bResult ? "PASS" : "FAIL"); - if (!bResult) exit(1); } } printf("Runtime overhead of first run is %f seconds\n", overhead); free(a); + if (!bResult) return 1; return 0; } diff --git a/src/overlay-cuda/main.cu b/src/overlay-cuda/main.cu index e7ecbbaf17..218f982a3a 100644 --- a/src/overlay-cuda/main.cu +++ b/src/overlay-cuda/main.cu @@ -146,7 +146,6 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_input); cudaFree(d_output); @@ -154,5 +153,6 @@ int main(int argc, char* argv[]) { free(output); free(ref_output); free(detections); + if (!ok) return 1; return 0; } diff --git a/src/overlay-hip/main.cu b/src/overlay-hip/main.cu index 3eca836d82..f6d943e77d 100644 --- a/src/overlay-hip/main.cu +++ b/src/overlay-hip/main.cu @@ -146,7 +146,6 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_input); hipFree(d_output); @@ -154,5 +153,6 @@ int main(int argc, char* argv[]) { free(output); free(ref_output); free(detections); + if (!ok) return 1; return 0; } diff --git a/src/overlay-omp/main.cpp b/src/overlay-omp/main.cpp index 5c347e9d86..8e40a4e167 100644 --- a/src/overlay-omp/main.cpp +++ b/src/overlay-omp/main.cpp @@ -140,11 +140,11 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(input); free(output); free(ref_output); free(detections); + if (!ok) return 1; return 0; } diff --git a/src/overlay-sycl/main.cpp b/src/overlay-sycl/main.cpp index 0f21808f12..decde59309 100644 --- a/src/overlay-sycl/main.cpp +++ b/src/overlay-sycl/main.cpp @@ -162,7 +162,6 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_input, q); sycl::free(d_output, q); @@ -170,5 +169,6 @@ int main(int argc, char* argv[]) { free(output); free(ref_output); free(detections); + if (!ok) return 1; return 0; } diff --git a/src/page-rank-cuda/main.cu b/src/page-rank-cuda/main.cu index b8747dc633..1feef6d5b2 100644 --- a/src/page-rank-cuda/main.cu +++ b/src/page-rank-cuda/main.cu @@ -261,7 +261,6 @@ int main(int argc, char *argv[]) { } bool ok = fabsf(max_diff - max_diff_ref) < 1e-3f; printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(pages); free(maps); @@ -269,5 +268,6 @@ int main(int argc, char *argv[]) { free(noutlinks); free(diffs); + if (!ok) return 1; return 0; } diff --git a/src/page-rank-hip/main.cu b/src/page-rank-hip/main.cu index c2675bac54..0a29f08204 100644 --- a/src/page-rank-hip/main.cu +++ b/src/page-rank-hip/main.cu @@ -261,7 +261,6 @@ int main(int argc, char *argv[]) { } bool ok = fabsf(max_diff - max_diff_ref) < 1e-3f; printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(pages); free(maps); @@ -269,5 +268,6 @@ int main(int argc, char *argv[]) { free(noutlinks); free(diffs); + if (!ok) return 1; return 0; } diff --git a/src/page-rank-omp/main.cpp b/src/page-rank-omp/main.cpp index 535b53c500..fdecf69930 100644 --- a/src/page-rank-omp/main.cpp +++ b/src/page-rank-omp/main.cpp @@ -210,12 +210,12 @@ int main(int argc, char *argv[]) { } bool ok = fabsf(max_diff - max_diff_ref) < 1e-3f; printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(pages); free(maps); free(page_ranks); free(noutlinks); free(diffs); + if (!ok) return 1; return 0; } diff --git a/src/page-rank-sycl/main.cpp b/src/page-rank-sycl/main.cpp index cca05d6c4d..7414f6fb07 100644 --- a/src/page-rank-sycl/main.cpp +++ b/src/page-rank-sycl/main.cpp @@ -257,12 +257,12 @@ int main(int argc, char *argv[]) { } bool ok = fabsf(max_diff - max_diff_ref) < 1e-3f; printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(pages); free(maps); free(page_ranks); free(noutlinks); free(diffs); + if (!ok) return 1; return 0; } diff --git a/src/particle-diffusion-cuda/motionsim.cu b/src/particle-diffusion-cuda/motionsim.cu index cd983e268a..3a17baeabf 100644 --- a/src/particle-diffusion-cuda/motionsim.cu +++ b/src/particle-diffusion-cuda/motionsim.cu @@ -302,7 +302,6 @@ int main(int argc, char* argv[]) { count++; } std::cout << (count <= 2 ? "PASS" : "FAIL") << std::endl; - if (count > 2) exit(1); #ifdef DEBUG // Displays final grid only if grid small. @@ -323,5 +322,6 @@ int main(int argc, char* argv[]) { delete[] map; delete[] map_ref; + if (count > 2) return 1; return 0; } diff --git a/src/particle-diffusion-hip/motionsim.cu b/src/particle-diffusion-hip/motionsim.cu index f77a4bf67f..c4c4596496 100644 --- a/src/particle-diffusion-hip/motionsim.cu +++ b/src/particle-diffusion-hip/motionsim.cu @@ -301,7 +301,6 @@ int main(int argc, char* argv[]) { if (map[i] != map_ref[i]) count++; } std::cout << (count <= 2 ? "PASS" : "FAIL") << std::endl; - if (count > 2) exit(1); #ifdef DEBUG // Displays final grid only if grid small. @@ -322,5 +321,6 @@ int main(int argc, char* argv[]) { delete[] map; delete[] map_ref; + if (count > 2) return 1; return 0; } diff --git a/src/particle-diffusion-omp/motionsim.cpp b/src/particle-diffusion-omp/motionsim.cpp index 0a96805685..1c7a7a61b5 100644 --- a/src/particle-diffusion-omp/motionsim.cpp +++ b/src/particle-diffusion-omp/motionsim.cpp @@ -253,7 +253,6 @@ int main(int argc, char* argv[]) { if (map[i] != map_ref[i]) count++; } std::cout << (count <= 2 ? "PASS" : "FAIL") << std::endl; - if (count > 2) exit(1); #ifdef DEBUG // Displays final grid only if grid small. @@ -274,5 +273,6 @@ int main(int argc, char* argv[]) { delete[] map; delete[] map_ref; + if (count > 2) return 1; return 0; } diff --git a/src/particle-diffusion-sycl/motionsim.cpp b/src/particle-diffusion-sycl/motionsim.cpp index 1d9aa3d82b..c02593fa51 100644 --- a/src/particle-diffusion-sycl/motionsim.cpp +++ b/src/particle-diffusion-sycl/motionsim.cpp @@ -290,7 +290,6 @@ int main(int argc, char* argv[]) { if (map[i] != map_ref[i]) count++; } std::cout << (count <= 2 ? "PASS" : "FAIL") << std::endl; - if (count > 2) exit(1); #ifdef DEBUG // Displays final grid only if grid small. @@ -311,5 +310,6 @@ int main(int argc, char* argv[]) { delete[] map; delete[] map_ref; + if (count > 2) return 1; return 0; } diff --git a/src/perplexity-cuda/main.cu b/src/perplexity-cuda/main.cu index 2dbd356750..562c2b3adc 100644 --- a/src/perplexity-cuda/main.cu +++ b/src/perplexity-cuda/main.cu @@ -160,9 +160,9 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_distance); cudaFree(d_data); + if (!ok) return 1; return 0; } diff --git a/src/perplexity-hip/main.cu b/src/perplexity-hip/main.cu index 6bea845956..c2b44e1859 100644 --- a/src/perplexity-hip/main.cu +++ b/src/perplexity-hip/main.cu @@ -160,9 +160,9 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_distance); hipFree(d_data); + if (!ok) return 1; return 0; } diff --git a/src/perplexity-sycl/main.cpp b/src/perplexity-sycl/main.cpp index 4440b8c8f5..c0836add8d 100644 --- a/src/perplexity-sycl/main.cpp +++ b/src/perplexity-sycl/main.cpp @@ -172,10 +172,10 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_distance, q); sycl::free(d_data, q); + if (!ok) return 1; return 0; } diff --git a/src/pnpoly-cuda/main.cu b/src/pnpoly-cuda/main.cu index 839a0e381e..1f1bd0d14f 100644 --- a/src/pnpoly-cuda/main.cu +++ b/src/pnpoly-cuda/main.cu @@ -153,7 +153,6 @@ int main(int argc, char* argv[]) { printf("Checksum: %d\n", checksum); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); cudaFree(d_vertex); cudaFree(d_point); @@ -164,5 +163,6 @@ int main(int argc, char* argv[]) { free(point); free(bitmap_ref); free(bitmap_opt); + if (error) return 1; return 0; } diff --git a/src/pnpoly-hip/main.cu b/src/pnpoly-hip/main.cu index 718c732a71..909d3e3b2b 100644 --- a/src/pnpoly-hip/main.cu +++ b/src/pnpoly-hip/main.cu @@ -153,7 +153,6 @@ int main(int argc, char* argv[]) { printf("Checksum: %d\n", checksum); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); hipFree(d_vertex); hipFree(d_point); @@ -164,5 +163,6 @@ int main(int argc, char* argv[]) { free(point); free(bitmap_ref); free(bitmap_opt); + if (error) return 1; return 0; } diff --git a/src/pnpoly-omp/main.cpp b/src/pnpoly-omp/main.cpp index 784f72e71b..5d7c188c4c 100644 --- a/src/pnpoly-omp/main.cpp +++ b/src/pnpoly-omp/main.cpp @@ -134,11 +134,11 @@ int main(int argc, char* argv[]) { printf("Checksum: %d\n", checksum); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(vertex); free(point); free(bitmap_ref); free(bitmap_opt); + if (error) return 1; return 0; } diff --git a/src/pnpoly-sycl/main.cpp b/src/pnpoly-sycl/main.cpp index 842fa1f937..d23ae6e811 100644 --- a/src/pnpoly-sycl/main.cpp +++ b/src/pnpoly-sycl/main.cpp @@ -194,7 +194,6 @@ int main(int argc, char* argv[]) { printf("Checksum: %d\n", checksum); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); sycl::free(d_vertex, q); sycl::free(d_point, q); @@ -205,5 +204,6 @@ int main(int argc, char* argv[]) { free(point); free(bitmap_ref); free(bitmap_opt); + if (error) return 1; return 0; } diff --git a/src/pool-cuda/main.cu b/src/pool-cuda/main.cu index 7fb1f5a3aa..7552ce1453 100644 --- a/src/pool-cuda/main.cu +++ b/src/pool-cuda/main.cu @@ -217,7 +217,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); delete[] input; delete[] output; @@ -228,5 +227,6 @@ int main(int argc, char* argv[]) cudaFree(input_grad_data); cudaFree(output_data); cudaFree(output_grad_data); + if (!ok) return 1; return 0; } diff --git a/src/pool-hip/main.cu b/src/pool-hip/main.cu index 33b9af758c..463d036b76 100644 --- a/src/pool-hip/main.cu +++ b/src/pool-hip/main.cu @@ -217,7 +217,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); delete[] input; delete[] output; @@ -228,5 +227,6 @@ int main(int argc, char* argv[]) hipFree(input_grad_data); hipFree(output_data); hipFree(output_grad_data); + if (!ok) return 1; return 0; } diff --git a/src/pool-omp/main.cpp b/src/pool-omp/main.cpp index 2a80e3a8f3..0cbc9b9851 100644 --- a/src/pool-omp/main.cpp +++ b/src/pool-omp/main.cpp @@ -203,12 +203,12 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); delete[] input; delete[] output; delete[] input_grad; delete[] input_grad_ref; delete[] output_grad; + if (!ok) return 1; return 0; } diff --git a/src/pool-sycl/main.cpp b/src/pool-sycl/main.cpp index 31d7d499b5..60d6de5f0b 100644 --- a/src/pool-sycl/main.cpp +++ b/src/pool-sycl/main.cpp @@ -233,7 +233,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); delete[] input; delete[] output; @@ -244,5 +243,6 @@ int main(int argc, char* argv[]) sycl::free(d_input_grad, q); sycl::free(d_output, q); sycl::free(d_output_grad, q); + if (!ok) return 1; return 0; } diff --git a/src/prefetch-cuda/main.cu b/src/prefetch-cuda/main.cu index adc714b2fa..7f0dc67e09 100644 --- a/src/prefetch-cuda/main.cu +++ b/src/prefetch-cuda/main.cu @@ -93,7 +93,6 @@ void prefetch (const int gpuDeviceId, const int numElements, const int repeat) bool testResult = (maxError == 0.0f); printf("%s\n", testResult ? "PASS" : "FAIL"); - if (!testResult) exit(1); } void naive (const int numElements, const int repeat) @@ -172,5 +171,6 @@ int main(int argc, char *argv[]) for (int i = 0; i < 10; i++) { naive(numElements, repeat); } + if (!testResult) return 1; return 0; } diff --git a/src/prefetch-hip/main.cu b/src/prefetch-hip/main.cu index 1115a1a3f1..ce468feb25 100644 --- a/src/prefetch-hip/main.cu +++ b/src/prefetch-hip/main.cu @@ -89,7 +89,6 @@ void prefetch (const int gpuDeviceId, const int numElements, const int repeat) bool testResult = (maxError == 0.0f); printf("%s\n", testResult ? "PASS" : "FAIL"); - if (!testResult) exit(1); } void naive (const int numElements, const int repeat) @@ -168,5 +167,6 @@ int main(int argc, char *argv[]) for (int i = 0; i < 10; i++) { naive(numElements, repeat); } + if (!testResult) return 1; return 0; } diff --git a/src/prefetch-sycl/main.cpp b/src/prefetch-sycl/main.cpp index e2479d2335..406afd75a0 100644 --- a/src/prefetch-sycl/main.cpp +++ b/src/prefetch-sycl/main.cpp @@ -85,7 +85,6 @@ void prefetch(sycl::queue &q, const int numElements, const int repeat) bool testResult = (maxError == 0.0f); printf("%s\n", testResult ? "PASS" : "FAIL"); - if (!testResult) exit(1); } void naive(sycl::queue &q, const int numElements, const int repeat) @@ -165,5 +164,6 @@ int main(int argc, char *argv[]) for (int i = 0; i < 10; i++) { naive(q, numElements, repeat); } + if (!testResult) return 1; return 0; } diff --git a/src/pso-cuda/main.cpp b/src/pso-cuda/main.cpp index ddcfc97e09..9bdfd90880 100644 --- a/src/pso-cuda/main.cpp +++ b/src/pso-cuda/main.cpp @@ -58,12 +58,12 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(positions); free(velocities); free(pBests); free(pBests_ref); free(gBest); + if (!ok) return 1; return 0; } diff --git a/src/qem-cuda/main.cu b/src/qem-cuda/main.cu index 7f0f7b6801..d11c20e990 100644 --- a/src/qem-cuda/main.cu +++ b/src/qem-cuda/main.cu @@ -99,7 +99,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); avg = 0; @@ -128,7 +127,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); checkCuda(cudaFreeHost(A)); checkCuda(cudaFreeHost(B)); @@ -138,5 +136,7 @@ int main(int argc, char* argv[]) { checkCuda(cudaFreeHost(minimum_ref)); checkCuda(cudaFreeHost(minimum)); + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/qem-sycl/main.cpp b/src/qem-sycl/main.cpp index cbcf858b03..76a84e5ad5 100644 --- a/src/qem-sycl/main.cpp +++ b/src/qem-sycl/main.cpp @@ -104,7 +104,6 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); avg = 0; @@ -133,7 +132,6 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(A, q); sycl::free(B, q); @@ -143,5 +141,7 @@ int main(int argc, char *argv[]) { sycl::free(minimum_ref, q); sycl::free(minimum, q); + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/qrg-cuda/main.cu b/src/qrg-cuda/main.cu index 4bbcbf69f9..0379adb7e8 100644 --- a/src/qrg-cuda/main.cu +++ b/src/qrg-cuda/main.cu @@ -258,10 +258,10 @@ int main(int argc, const char **argv) printf("PASS\n"); else printf("FAIL\n"); - if (!bPassFlag) exit(1); free(h_OutputGPU); cudaFree(d_Output); cudaFree(d_Table); + if (!bPassFlag) return 1; return 0; } diff --git a/src/qrg-hip/main.cu b/src/qrg-hip/main.cu index 24a20688de..8030aec069 100644 --- a/src/qrg-hip/main.cu +++ b/src/qrg-hip/main.cu @@ -258,10 +258,10 @@ int main(int argc, const char **argv) printf("PASS\n"); else printf("FAIL\n"); - if (!bPassFlag) exit(1); free(h_OutputGPU); hipFree(d_Output); hipFree(d_Table); + if (!bPassFlag) return 1; return 0; } diff --git a/src/qrg-omp/main.cpp b/src/qrg-omp/main.cpp index e7343225ec..a99c42dab1 100644 --- a/src/qrg-omp/main.cpp +++ b/src/qrg-omp/main.cpp @@ -233,9 +233,9 @@ int main(int argc, const char **argv) printf("PASS\n"); else printf("FAIL\n"); - if (!bPassFlag) exit(1); free(output); } + if (!bPassFlag) return 1; return 0; } diff --git a/src/qrg-sycl/main.cpp b/src/qrg-sycl/main.cpp index fcfc810200..86e2fbaaba 100644 --- a/src/qrg-sycl/main.cpp +++ b/src/qrg-sycl/main.cpp @@ -258,10 +258,10 @@ int main(int argc, const char **argv) printf("PASS\n"); else printf("FAIL\n"); - if (!bPassFlag) exit(1); free(h_OutputGPU); sycl::free(d_Output, q); sycl::free(d_Table, q); + if (!bPassFlag) return 1; return 0; } diff --git a/src/quant3MatMul-cuda/main.cu b/src/quant3MatMul-cuda/main.cu index 6c8a23d1be..cbfe117c9c 100644 --- a/src/quant3MatMul-cuda/main.cu +++ b/src/quant3MatMul-cuda/main.cu @@ -89,7 +89,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // verify vecquant3matmul_faster cudaMemset(d_output, 0, sizeof(scalar_t) * mul_size); @@ -104,7 +103,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); @@ -143,5 +141,7 @@ int main(int argc, char* argv[]) free(h_scale); free(h_bias); free(h_output); + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/quant3MatMul-hip/main.cu b/src/quant3MatMul-hip/main.cu index a473030735..15b2d967f9 100644 --- a/src/quant3MatMul-hip/main.cu +++ b/src/quant3MatMul-hip/main.cu @@ -89,7 +89,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // verify vecquant3matmul_faster hipMemset(d_output, 0, sizeof(scalar_t) * mul_size); @@ -104,7 +103,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); @@ -143,5 +141,7 @@ int main(int argc, char* argv[]) free(h_scale); free(h_bias); free(h_output); + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/quant3MatMul-sycl/main.cpp b/src/quant3MatMul-sycl/main.cpp index ba4af95bb3..b4a7f680b1 100644 --- a/src/quant3MatMul-sycl/main.cpp +++ b/src/quant3MatMul-sycl/main.cpp @@ -96,7 +96,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // verify vecquant3matmul_faster q.memset(d_output, 0, sizeof(scalar_t) * mul_size); @@ -111,7 +110,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); @@ -150,5 +148,7 @@ int main(int argc, char* argv[]) free(h_scale); free(h_bias); free(h_output); + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/quantBnB-cuda/main.cu b/src/quantBnB-cuda/main.cu index 14d150affe..095d703fb0 100644 --- a/src/quantBnB-cuda/main.cu +++ b/src/quantBnB-cuda/main.cu @@ -185,10 +185,10 @@ int main(int argc, char* argv[]) cudaMemcpy(out.data(), d_out, out_size, cudaMemcpyDeviceToHost); printf("%s\n", out == ref ? "PASS" : "FAIL"); - if (out != ref) exit(1); cudaFree(d_A); cudaFree(d_code); cudaFree(d_out); + if (out != ref) return 1; return 0; } diff --git a/src/quantBnB-hip/main.cu b/src/quantBnB-hip/main.cu index e8f1ccde87..c34fe68e27 100644 --- a/src/quantBnB-hip/main.cu +++ b/src/quantBnB-hip/main.cu @@ -185,10 +185,10 @@ int main(int argc, char* argv[]) hipMemcpy(out.data(), d_out, out_size, hipMemcpyDeviceToHost); printf("%s\n", out == ref ? "PASS" : "FAIL"); - if (out != ref) exit(1); hipFree(d_A); hipFree(d_code); hipFree(d_out); + if (out != ref) return 1; return 0; } diff --git a/src/quantBnB-omp/main.cpp b/src/quantBnB-omp/main.cpp index 546c6b9fef..bb4596d224 100644 --- a/src/quantBnB-omp/main.cpp +++ b/src/quantBnB-omp/main.cpp @@ -129,10 +129,10 @@ int main(int argc, char* argv[]) } printf("%s\n", memcmp(out, ref, out_size) ? "FAIL" : "PASS"); - if (out_size)) exit(1); free(A); free(out); free(ref); + if (out_size)) return 1; return 0; } diff --git a/src/quantBnB-sycl/main.cpp b/src/quantBnB-sycl/main.cpp index c0fa352921..f80bd6f3e2 100644 --- a/src/quantBnB-sycl/main.cpp +++ b/src/quantBnB-sycl/main.cpp @@ -205,10 +205,10 @@ int main(int argc, char* argv[]) q.memcpy(out.data(), d_out, out_size).wait(); printf("%s\n", out == ref ? "PASS" : "FAIL"); - if (out != ref) exit(1); sycl::free(d_A, q); sycl::free(d_code, q); sycl::free(d_out, q); + if (out != ref) return 1; return 0; } diff --git a/src/rainflow-cuda/main.cu b/src/rainflow-cuda/main.cu index 77fedb2dbd..a3fa7704d3 100644 --- a/src/rainflow-cuda/main.cu +++ b/src/rainflow-cuda/main.cu @@ -248,7 +248,6 @@ int main(int argc, char* argv[]) { int error = memcmp(ref_result_lengths, result_lengths, num_history * sizeof(int)); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); cudaFree(d_history); cudaFree(d_history_lengths); @@ -264,5 +263,6 @@ int main(int argc, char* argv[]) { free(result_lengths); free(ref_result_lengths); + if (error) return 1; return 0; } diff --git a/src/rainflow-hip/main.cu b/src/rainflow-hip/main.cu index cd19ffee0b..2415b2f164 100644 --- a/src/rainflow-hip/main.cu +++ b/src/rainflow-hip/main.cu @@ -248,7 +248,6 @@ int main(int argc, char* argv[]) { int error = memcmp(ref_result_lengths, result_lengths, num_history * sizeof(int)); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); hipFree(d_history); hipFree(d_history_lengths); @@ -264,5 +263,6 @@ int main(int argc, char* argv[]) { free(result_lengths); free(ref_result_lengths); + if (error) return 1; return 0; } diff --git a/src/rainflow-omp/main.cpp b/src/rainflow-omp/main.cpp index e23d94e2e7..fd3a1d8ab0 100644 --- a/src/rainflow-omp/main.cpp +++ b/src/rainflow-omp/main.cpp @@ -207,7 +207,6 @@ int main(int argc, char* argv[]) { int error = memcmp(ref_result_lengths, result_lengths, num_history * sizeof(int)); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(history); free(history_lengths); @@ -217,5 +216,6 @@ int main(int argc, char* argv[]) { free(result_lengths); free(ref_result_lengths); + if (error) return 1; return 0; } diff --git a/src/rainflow-sycl/main.cpp b/src/rainflow-sycl/main.cpp index f51e205516..d0c72f4e5a 100644 --- a/src/rainflow-sycl/main.cpp +++ b/src/rainflow-sycl/main.cpp @@ -255,7 +255,6 @@ int main(int argc, char* argv[]) { int error = memcmp(ref_result_lengths, result_lengths, num_history * sizeof(int)); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); sycl::free(d_history, q); sycl::free(d_history_lengths, q); @@ -271,5 +270,6 @@ int main(int argc, char* argv[]) { free(result_lengths); free(ref_result_lengths); + if (error) return 1; return 0; } diff --git a/src/relu-cuda/main.cu b/src/relu-cuda/main.cu index 223ec1ecd1..fc3e034068 100644 --- a/src/relu-cuda/main.cu +++ b/src/relu-cuda/main.cu @@ -236,7 +236,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); half_count = divup(count, VectorSize); kBlock = divup(half_count, kThreadInBlock); @@ -265,7 +264,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); //------------------------------------------------------------------------------- // RELU @@ -310,7 +308,6 @@ int main(int argc, char* argv[]) fail = memcmp(h_out, r_out, size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); start = std::chrono::steady_clock::now(); @@ -327,7 +324,6 @@ int main(int argc, char* argv[]) fail = memcmp(h_out, r_out, size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); cudaFree(d_out); cudaFree(d_in); @@ -343,5 +339,9 @@ int main(int argc, char* argv[]) free(h_backprop); free(r_backprop); + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; return 0; } diff --git a/src/relu-hip/main.cu b/src/relu-hip/main.cu index 33c0fd9058..37ca6640a4 100644 --- a/src/relu-hip/main.cu +++ b/src/relu-hip/main.cu @@ -238,7 +238,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); half_count = divup(count, VectorSize); kBlock = divup(half_count, kThreadInBlock); @@ -267,7 +266,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); //------------------------------------------------------------------------------- // RELU @@ -312,7 +310,6 @@ int main(int argc, char* argv[]) fail = memcmp(h_out, r_out, size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); /* start = std::chrono::steady_clock::now(); @@ -330,7 +327,6 @@ int main(int argc, char* argv[]) fail = memcmp(h_out, r_out, size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); */ hipFree(d_out); @@ -347,5 +343,9 @@ int main(int argc, char* argv[]) free(h_backprop); free(r_backprop); + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; return 0; } diff --git a/src/relu-sycl/main.cpp b/src/relu-sycl/main.cpp index dcade708d9..720e6abfc7 100644 --- a/src/relu-sycl/main.cpp +++ b/src/relu-sycl/main.cpp @@ -267,7 +267,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); half_count = divup(count, VectorSize); kBlock = divup(half_count, kThreadInBlock); @@ -304,7 +303,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); int *h_in, *h_out, *r_out; size = count * sizeof(int); @@ -353,7 +351,6 @@ int main(int argc, char* argv[]) fail = memcmp(h_out, r_out, size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); start = std::chrono::steady_clock::now(); @@ -376,7 +373,6 @@ int main(int argc, char* argv[]) fail = memcmp(h_out, r_out, size); printf("%s\n", fail ? "FAIL" : "PASS"); - if (fail) exit(1); sycl::free(d_out, q); sycl::free(d_in, q); @@ -392,5 +388,9 @@ int main(int argc, char* argv[]) free(h_backprop); free(r_backprop); + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; + if (fail) return 1; return 0; } diff --git a/src/reverse-cuda/main.cu b/src/reverse-cuda/main.cu index 4b58be7eae..b16e197b59 100644 --- a/src/reverse-cuda/main.cu +++ b/src/reverse-cuda/main.cu @@ -77,8 +77,8 @@ int main(int argc, char* argv[]) { printf("Total kernel execution time: %f (s)\n", time * 1e-9f); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); cudaFree(d_test); + if (error) return 1; return 0; } diff --git a/src/reverse-hip/main.cu b/src/reverse-hip/main.cu index b3a082a89f..2a660b5ace 100644 --- a/src/reverse-hip/main.cu +++ b/src/reverse-hip/main.cu @@ -77,8 +77,8 @@ int main(int argc, char* argv[]) { printf("Total kernel execution time: %f (s)\n", time * 1e-9f); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); hipFree(d_test); + if (error) return 1; return 0; } diff --git a/src/reverse-sycl/main.cpp b/src/reverse-sycl/main.cpp index aeacd655d7..92a74e03fe 100644 --- a/src/reverse-sycl/main.cpp +++ b/src/reverse-sycl/main.cpp @@ -84,9 +84,9 @@ int main(int argc, char* argv[]) { printf("Total kernel execution time: %f (s)\n", time * 1e-9f); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(d_test, q); + if (error) return 1; return 0; } diff --git a/src/rfs-cuda/main.cu b/src/rfs-cuda/main.cu index 0cbb855154..461b3ee29f 100644 --- a/src/rfs-cuda/main.cu +++ b/src/rfs-cuda/main.cu @@ -158,7 +158,6 @@ int main(int argc, char* argv[]) { cudaMemcpy(result, d_result, narray_size, cudaMemcpyDeviceToHost); bool ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); start = std::chrono::steady_clock::now(); @@ -174,7 +173,6 @@ int main(int argc, char* argv[]) { cudaMemcpy(result, d_result, narray_size, cudaMemcpyDeviceToHost); ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_arrays); cudaFree(d_maxVal); @@ -185,5 +183,7 @@ int main(int argc, char* argv[]) { free(factor); free(result_ref); + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/rfs-hip/main.cu b/src/rfs-hip/main.cu index 5eed445d6f..b7799302ac 100644 --- a/src/rfs-hip/main.cu +++ b/src/rfs-hip/main.cu @@ -158,7 +158,6 @@ int main(int argc, char* argv[]) { hipMemcpy(result, d_result, narray_size, hipMemcpyDeviceToHost); bool ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); start = std::chrono::steady_clock::now(); @@ -174,7 +173,6 @@ int main(int argc, char* argv[]) { hipMemcpy(result, d_result, narray_size, hipMemcpyDeviceToHost); ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_arrays); hipFree(d_maxVal); @@ -185,5 +183,7 @@ int main(int argc, char* argv[]) { free(factor); free(result_ref); + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/rfs-omp/main.cpp b/src/rfs-omp/main.cpp index e4ec399c5e..9fb5cf26c3 100644 --- a/src/rfs-omp/main.cpp +++ b/src/rfs-omp/main.cpp @@ -152,7 +152,6 @@ int main(int argc, char* argv[]) { #pragma omp target update from (result[0:nArrays]) ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); start = std::chrono::steady_clock::now(); @@ -167,7 +166,6 @@ int main(int argc, char* argv[]) { #pragma omp target update from (result[0:nArrays]) ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } free(arrays); @@ -176,5 +174,7 @@ int main(int argc, char* argv[]) { free(factor); free(result_ref); + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/rfs-sycl/main.cpp b/src/rfs-sycl/main.cpp index 7b8d84de02..d850a36a16 100644 --- a/src/rfs-sycl/main.cpp +++ b/src/rfs-sycl/main.cpp @@ -175,7 +175,6 @@ int main(int argc, char* argv[]) { bool ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); start = std::chrono::steady_clock::now(); @@ -196,7 +195,6 @@ int main(int argc, char* argv[]) { ok = !memcmp(result_ref, result, narray_size); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_arrays, q); sycl::free(d_maxVal, q); @@ -207,5 +205,7 @@ int main(int argc, char* argv[]) { free(factor); free(result_ref); + if (!ok) return 1; + if (!ok) return 1; return 0; } diff --git a/src/ring-cuda/main.cu b/src/ring-cuda/main.cu index cba072c956..ccfe5b6d03 100644 --- a/src/ring-cuda/main.cu +++ b/src/ring-cuda/main.cu @@ -83,11 +83,11 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); for (int i = 0; i < num_devices; i++) { cudaFree(device_ptr[i]); } } + if (!ok) return 1; return 0; } diff --git a/src/ring-hip/main.cu b/src/ring-hip/main.cu index 8b2a97fc48..85710597d6 100644 --- a/src/ring-hip/main.cu +++ b/src/ring-hip/main.cu @@ -83,11 +83,11 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); for (int i = 0; i < num_devices; i++) { hipFree(device_ptr[i]); } } + if (!ok) return 1; return 0; } diff --git a/src/ring-sycl/main.cpp b/src/ring-sycl/main.cpp index cdf05da8dc..03f4bd8de8 100644 --- a/src/ring-sycl/main.cpp +++ b/src/ring-sycl/main.cpp @@ -85,11 +85,11 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); for (int i = 0; i < num_devices; i++) { free(device_ptr[i], queues[i]); } } + if (!ok) return 1; return 0; } diff --git a/src/rle-cuda/main.cu b/src/rle-cuda/main.cu index 914b4ede33..f596329bd9 100644 --- a/src/rle-cuda/main.cu +++ b/src/rle-cuda/main.cu @@ -250,15 +250,12 @@ void Test(DeviceInputIteratorT d_in, compare0 = CompareDeviceResults(h_unique_reference, d_unique_out, num_runs, true, g_verbose); printf("\t Keys %s\n", compare0 ? "FAIL" : "PASS"); - if (compare0) exit(1); compare1 = CompareDeviceResults(h_lengths_reference, d_lengths_out, num_runs, true, g_verbose); printf("\t Lengths %s\n", compare1 ? "FAIL" : "PASS"); - if (compare1) exit(1); compare2 = CompareDeviceResults(&num_runs, d_num_runs, 1, true, g_verbose); printf("\t Count %s\n", compare2 ? "FAIL" : "PASS"); - if (compare2) exit(1); // Flush any stdout/stderr fflush(stdout); @@ -513,5 +510,8 @@ int main(int argc, char **argv) // TestSize(num_items); // TestSize(num_items); + if (compare0) return 1; + if (compare1) return 1; + if (compare2) return 1; return 0; } diff --git a/src/rle-hip/main.cu b/src/rle-hip/main.cu index 58c4ed9abf..1a91b9c66a 100644 --- a/src/rle-hip/main.cu +++ b/src/rle-hip/main.cu @@ -252,15 +252,12 @@ void Test(DeviceInputIteratorT d_in, compare0 = CompareDeviceResults(h_unique_reference, d_unique_out, num_runs, true, g_verbose); printf("\t Keys %s\n", compare0 ? "FAIL" : "PASS"); - if (compare0) exit(1); compare1 = CompareDeviceResults(h_lengths_reference, d_lengths_out, num_runs, true, g_verbose); printf("\t Lengths %s\n", compare1 ? "FAIL" : "PASS"); - if (compare1) exit(1); compare2 = CompareDeviceResults(&num_runs, d_num_runs, 1, true, g_verbose); printf("\t Count %s\n", compare2 ? "FAIL" : "PASS"); - if (compare2) exit(1); // Flush any stdout/stderr fflush(stdout); @@ -511,5 +508,8 @@ int main(int argc, char **argv) // TestSize(num_items); // TestSize(num_items); + if (compare0) return 1; + if (compare1) return 1; + if (compare2) return 1; return 0; } diff --git a/src/rng-wallace-cuda/main.cu b/src/rng-wallace-cuda/main.cu index c9909add96..b1ab9d3f62 100644 --- a/src/rng-wallace-cuda/main.cu +++ b/src/rng-wallace-cuda/main.cu @@ -81,7 +81,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); @@ -104,5 +103,6 @@ int main(int argc, char* argv[]) { cudaFree(devicerngChi2Corrections); cudaFree(device_randomNumbers); cudaFree(devPool); + if (!ok) return 1; return 0; } diff --git a/src/rng-wallace-hip/main.cu b/src/rng-wallace-hip/main.cu index bc3eb39eab..4feac7d089 100644 --- a/src/rng-wallace-hip/main.cu +++ b/src/rng-wallace-hip/main.cu @@ -81,7 +81,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); @@ -104,5 +103,6 @@ int main(int argc, char* argv[]) { hipFree(devicerngChi2Corrections); hipFree(device_randomNumbers); hipFree(devPool); + if (!ok) return 1; return 0; } diff --git a/src/rng-wallace-omp/main.cpp b/src/rng-wallace-omp/main.cpp index 327d533633..6e631969cc 100644 --- a/src/rng-wallace-omp/main.cpp +++ b/src/rng-wallace-omp/main.cpp @@ -70,7 +70,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); @@ -88,5 +87,6 @@ int main(int argc, char* argv[]) { free(randomNumbers_ref); free(globalPool); free(Pool_ref); + if (!ok) return 1; return 0; } diff --git a/src/rng-wallace-sycl/main.cpp b/src/rng-wallace-sycl/main.cpp index f79a0c5295..83498fdc0c 100644 --- a/src/rng-wallace-sycl/main.cpp +++ b/src/rng-wallace-sycl/main.cpp @@ -87,7 +87,6 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); q.wait(); auto start = std::chrono::steady_clock::now(); @@ -109,5 +108,6 @@ int main(int argc, char* argv[]) { sycl::free(d_rngChi2Corrections, q); sycl::free(d_randomNumbers, q); sycl::free(d_Pool, q); + if (!ok) return 1; return 0; } diff --git a/src/romberg-cuda/main.cu b/src/romberg-cuda/main.cu index f34eba7caf..5872c54bf9 100644 --- a/src/romberg-cuda/main.cu +++ b/src/romberg-cuda/main.cu @@ -118,9 +118,9 @@ int main( int argc, char** argv) double ref_sum = reference(f, A, B, ROW_SIZE, EPS); printf("%s\n", (fabs(sum - ref_sum) > EPS) ? "FAIL" : "PASS"); - if ((fabs(sum - ref_sum) > EPS)) exit(1); cudaFree(d_result); free(h_result); + if ((fabs(sum - ref_sum) > EPS)) return 1; return 0; } diff --git a/src/romberg-hip/main.cu b/src/romberg-hip/main.cu index bb64492df9..073548fc17 100644 --- a/src/romberg-hip/main.cu +++ b/src/romberg-hip/main.cu @@ -118,9 +118,9 @@ int main( int argc, char** argv) double ref_sum = reference(f, A, B, ROW_SIZE, EPS); printf("%s\n", (fabs(sum - ref_sum) > EPS) ? "FAIL" : "PASS"); - if ((fabs(sum - ref_sum) > EPS)) exit(1); hipFree(d_result); free(h_result); + if ((fabs(sum - ref_sum) > EPS)) return 1; return 0; } diff --git a/src/romberg-omp/main.cpp b/src/romberg-omp/main.cpp index c868ecfbf8..f5d4f3fe7d 100644 --- a/src/romberg-omp/main.cpp +++ b/src/romberg-omp/main.cpp @@ -118,8 +118,8 @@ int main( int argc, char** argv) // verify double ref_sum = reference(f, A, B, ROW_SIZE, EPS); printf("%s\n", (fabs(d_sum - ref_sum) > EPS) ? "FAIL" : "PASS"); - if ((fabs(d_sum - ref_sum) > EPS)) exit(1); free(result); + if ((fabs(d_sum - ref_sum) > EPS)) return 1; return 0; } diff --git a/src/romberg-sycl/main.cpp b/src/romberg-sycl/main.cpp index 83128fd8e0..8bde8b4f70 100644 --- a/src/romberg-sycl/main.cpp +++ b/src/romberg-sycl/main.cpp @@ -133,9 +133,9 @@ int main( int argc, char** argv) double ref_sum = reference(f, A, B, ROW_SIZE, EPS); printf("%s\n", (fabs(sum - ref_sum) > EPS) ? "FAIL" : "PASS"); - if ((fabs(sum - ref_sum) > EPS)) exit(1); free(h_result); sycl::free(d_result, q); + if ((fabs(sum - ref_sum) > EPS)) return 1; return 0; } diff --git a/src/rtm8-cuda/rtm8.cu b/src/rtm8-cuda/rtm8.cu index ff0c09b0aa..c7efb6ea77 100644 --- a/src/rtm8-cuda/rtm8.cu +++ b/src/rtm8-cuda/rtm8.cu @@ -233,7 +233,6 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); pt_rate = pts/dt; flop_rate = flops/dt; @@ -260,5 +259,6 @@ int main(int argc, char *argv[]) { cudaFree(image_d); cudaFree(a_d); + if (!ok) return 1; return 0; } diff --git a/src/rtm8-hip/rtm8.cu b/src/rtm8-hip/rtm8.cu index f06ff4cf18..b27c88a063 100644 --- a/src/rtm8-hip/rtm8.cu +++ b/src/rtm8-hip/rtm8.cu @@ -233,7 +233,6 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); pt_rate = pts/dt; flop_rate = flops/dt; @@ -260,5 +259,6 @@ int main(int argc, char *argv[]) { hipFree(image_d); hipFree(a_d); + if (!ok) return 1; return 0; } diff --git a/src/rtm8-omp/rtm8.cpp b/src/rtm8-omp/rtm8.cpp index 7e1640d9d4..3ec849efc7 100644 --- a/src/rtm8-omp/rtm8.cpp +++ b/src/rtm8-omp/rtm8.cpp @@ -186,7 +186,6 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); pt_rate = pts/dt; flop_rate = flops/dt; @@ -206,5 +205,6 @@ int main(int argc, char *argv[]) { free(image_cpu); free(image_gpu); + if (!ok) return 1; return 0; } diff --git a/src/rtm8-sycl/rtm8.cpp b/src/rtm8-sycl/rtm8.cpp index d79e12ba07..b296edb0d6 100644 --- a/src/rtm8-sycl/rtm8.cpp +++ b/src/rtm8-sycl/rtm8.cpp @@ -215,7 +215,6 @@ int main(int argc, char *argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); pt_rate = pts/dt; flop_rate = flops/dt; @@ -242,5 +241,6 @@ int main(int argc, char *argv[]) { sycl::free(image_d, q); sycl::free(a_d, q); + if (!ok) return 1; return 0; } diff --git a/src/s8n-cuda/main.cu b/src/s8n-cuda/main.cu index b99688e6cf..0ac32d1871 100644 --- a/src/s8n-cuda/main.cu +++ b/src/s8n-cuda/main.cu @@ -216,7 +216,6 @@ int main(int argc, char* argv[]) error += memcmp(h_out4, r_out4, 4 * output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(h_xyz); free(h_out); @@ -229,5 +228,6 @@ int main(int argc, char* argv[]) cudaFree(d_out); cudaFree(d_out2); cudaFree(d_out4); + if (error) return 1; return 0; } diff --git a/src/s8n-hip/main.cu b/src/s8n-hip/main.cu index 8de05c1334..42123e03eb 100644 --- a/src/s8n-hip/main.cu +++ b/src/s8n-hip/main.cu @@ -216,7 +216,6 @@ int main(int argc, char* argv[]) error += memcmp(h_out4, r_out4, 4 * output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(h_xyz); free(h_out); @@ -229,5 +228,6 @@ int main(int argc, char* argv[]) hipFree(d_out); hipFree(d_out2); hipFree(d_out4); + if (error) return 1; return 0; } diff --git a/src/s8n-omp/main.cpp b/src/s8n-omp/main.cpp index e12949f554..4c0efb425a 100644 --- a/src/s8n-omp/main.cpp +++ b/src/s8n-omp/main.cpp @@ -213,7 +213,6 @@ int main(int argc, char* argv[]) error += memcmp(h_out4, r_out4, 4 * output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); } free(h_xyz); @@ -223,5 +222,6 @@ int main(int argc, char* argv[]) free(r_out); free(r_out2); free(r_out4); + if (error) return 1; return 0; } diff --git a/src/s8n-sycl/main.cpp b/src/s8n-sycl/main.cpp index dc73a85eee..556ae90d41 100644 --- a/src/s8n-sycl/main.cpp +++ b/src/s8n-sycl/main.cpp @@ -235,7 +235,6 @@ int main(int argc, char* argv[]) error += memcmp(h_out4, r_out4, 4 * output_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(h_xyz); free(h_out); @@ -248,5 +247,6 @@ int main(int argc, char* argv[]) sycl::free(d_out, q); sycl::free(d_out2, q); sycl::free(d_out4, q); + if (error) return 1; return 0; } diff --git a/src/scan-cuda/main.cu b/src/scan-cuda/main.cu index 0d3c736217..b0a773567e 100644 --- a/src/scan-cuda/main.cu +++ b/src/scan-cuda/main.cu @@ -17,7 +17,6 @@ void verify(const T* cpu_out, const T* gpu_out, int64_t n) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); } // bank conflict aware optimization @@ -249,5 +248,6 @@ int main(int argc, char* argv[]) run<1024>(n, repeat); run<2048>(n, repeat); + if (error) return 1; return 0; } diff --git a/src/scan-hip/main.cu b/src/scan-hip/main.cu index a1b4cd07b9..6238e8e91a 100644 --- a/src/scan-hip/main.cu +++ b/src/scan-hip/main.cu @@ -17,7 +17,6 @@ void verify(const T* cpu_out, const T* gpu_out, int64_t n) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); } // bank conflict aware optimization @@ -241,5 +240,6 @@ int main(int argc, char* argv[]) run<1024>(n, repeat); run<2048>(n, repeat); + if (error) return 1; return 0; } diff --git a/src/scan-sycl/main.cpp b/src/scan-sycl/main.cpp index fc81ae372b..3c2ebfe62b 100644 --- a/src/scan-sycl/main.cpp +++ b/src/scan-sycl/main.cpp @@ -17,7 +17,6 @@ void verify(const T* cpu_out, const T* gpu_out, int64_t n) } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); } #define LOG_MEM_BANKS 5 @@ -265,5 +264,6 @@ int main(int argc, char* argv[]) run<1024>(q, n, repeat); run<2048>(q, n, repeat); + if (error) return 1; return 0; } diff --git a/src/scan2-cuda/main.cu b/src/scan2-cuda/main.cu index e58ed527ae..4f7373e0e0 100644 --- a/src/scan2-cuda/main.cu +++ b/src/scan2-cuda/main.cu @@ -349,10 +349,10 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; - if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); free(input); free(output); free(verificationOutput); + if (!(compare(output, verificationOutput, length, (float)0.001))) return 1; return 0; } diff --git a/src/scan2-hip/main.cu b/src/scan2-hip/main.cu index fac83285fc..2ed1fe1afe 100644 --- a/src/scan2-hip/main.cu +++ b/src/scan2-hip/main.cu @@ -349,10 +349,10 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; - if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); free(input); free(output); free(verificationOutput); + if (!(compare(output, verificationOutput, length, (float)0.001))) return 1; return 0; } diff --git a/src/scan2-omp/main.cpp b/src/scan2-omp/main.cpp index 094c0cc873..605fe1178b 100644 --- a/src/scan2-omp/main.cpp +++ b/src/scan2-omp/main.cpp @@ -295,7 +295,6 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; - if (!(compare(outputBuffer, verificationOutput, length, (float)0.001))) exit(1); free(verificationOutput); free(inputBuffer); @@ -304,5 +303,6 @@ int main(int argc, char * argv[]) free(blockSumBufferSizeOffset); free(outputBuffer); free(outputBufferSizeOffset); + if (!(compare(outputBuffer, verificationOutput, length, (float)0.001))) return 1; return 0; } diff --git a/src/scan2-sycl/main.cpp b/src/scan2-sycl/main.cpp index 42dd2c9b19..05ab6aa48e 100644 --- a/src/scan2-sycl/main.cpp +++ b/src/scan2-sycl/main.cpp @@ -316,10 +316,10 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; - if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); free(input); free(output); free(verificationOutput); + if (!(compare(output, verificationOutput, length, (float)0.001))) return 1; return 0; } diff --git a/src/scan3-cuda/main.cu b/src/scan3-cuda/main.cu index 8c67cb1505..26b97852a8 100644 --- a/src/scan3-cuda/main.cu +++ b/src/scan3-cuda/main.cu @@ -107,7 +107,6 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; - if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); // include the overhead of allocating temporary device storage start = std::chrono::steady_clock::now(); @@ -143,7 +142,6 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; - if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); cudaFree(inputBuffer); cudaFree(outputBuffer); @@ -151,5 +149,7 @@ int main(int argc, char * argv[]) free(input); free(output); free(verificationOutput); + if (!(compare(output, verificationOutput, length, (float)0.001))) return 1; + if (!(compare(output, verificationOutput, length, (float)0.001))) return 1; return 0; } diff --git a/src/scan3-hip/main.cu b/src/scan3-hip/main.cu index 23eb38b777..bd84b7d94e 100644 --- a/src/scan3-hip/main.cu +++ b/src/scan3-hip/main.cu @@ -97,7 +97,6 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; - if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); // include the overhead of allocating temporary device storage start = std::chrono::steady_clock::now(); @@ -133,7 +132,6 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; - if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); hipFree(inputBuffer); hipFree(outputBuffer); @@ -141,5 +139,7 @@ int main(int argc, char * argv[]) free(input); free(output); free(verificationOutput); + if (!(compare(output, verificationOutput, length, (float)0.001))) return 1; + if (!(compare(output, verificationOutput, length, (float)0.001))) return 1; return 0; } diff --git a/src/scan3-sycl/main.cpp b/src/scan3-sycl/main.cpp index 3690d0d0a2..d767339e6e 100644 --- a/src/scan3-sycl/main.cpp +++ b/src/scan3-sycl/main.cpp @@ -104,10 +104,10 @@ int main(int argc, char * argv[]) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; - if (!(compare(output, verificationOutput, length, (float)0.001))) exit(1); free(input); free(output); free(verificationOutput); + if (!(compare(output, verificationOutput, length, (float)0.001))) return 1; return 0; } diff --git a/src/scatter-cuda/main.cu b/src/scatter-cuda/main.cu index 73ba74e174..1f49626f26 100644 --- a/src/scatter-cuda/main.cu +++ b/src/scatter-cuda/main.cu @@ -107,7 +107,6 @@ void scatter(int64_t num_elems, int repeat) { } } printf("%s\n\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); CHECK_CUDA( cudaFree(d_src) ) CHECK_CUDA( cudaFree(d_idx) ) @@ -150,5 +149,6 @@ int main(int argc, char* argv[]) scatter(num_elements, repeat); scatter(num_elements, repeat); scatter(num_elements, repeat); + if (!ok) return 1; return 0; } diff --git a/src/scatter-hip/main.cu b/src/scatter-hip/main.cu index a7b20c54f8..6d4fbbb8a5 100644 --- a/src/scatter-hip/main.cu +++ b/src/scatter-hip/main.cu @@ -107,7 +107,6 @@ void scatter(int64_t num_elems, int repeat) { } } printf("%s\n\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); CHECK_HIP( hipFree(d_src) ) CHECK_HIP( hipFree(d_idx) ) @@ -150,5 +149,6 @@ int main(int argc, char* argv[]) scatter(num_elements, repeat); scatter(num_elements, repeat); scatter(num_elements, repeat); + if (!ok) return 1; return 0; } diff --git a/src/scatter-sycl/main.cpp b/src/scatter-sycl/main.cpp index 8d4f1e5f31..5e73453ec6 100644 --- a/src/scatter-sycl/main.cpp +++ b/src/scatter-sycl/main.cpp @@ -100,7 +100,6 @@ void scatter(sycl::queue &q, int64_t num_elems, int repeat) { } } printf("%s\n\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_src, q); sycl::free(d_idx, q); @@ -150,5 +149,6 @@ int main(int argc, char* argv[]) scatter(q, num_elements, repeat); scatter(q, num_elements, repeat); scatter(q, num_elements, repeat); + if (!ok) return 1; return 0; } diff --git a/src/scatterAdd-cuda/main.cu b/src/scatterAdd-cuda/main.cu index bc40f1b5f4..660710166c 100644 --- a/src/scatterAdd-cuda/main.cu +++ b/src/scatterAdd-cuda/main.cu @@ -107,7 +107,6 @@ void index_accumulate (int batch_size, int output_size, int vector_dim, int repe } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); int64_t time = 0; auto start = std::chrono::steady_clock::now(); @@ -175,5 +174,6 @@ int main(int argc, char* argv[]) printf("vector_dimension: %d\n", vector_dim); index_accumulate (batch_size, output_size, vector_dim, repeat) ; + if (!ok) return 1; return 0; } diff --git a/src/scatterAdd-hip/main.cu b/src/scatterAdd-hip/main.cu index e687ba4e93..eb13335976 100644 --- a/src/scatterAdd-hip/main.cu +++ b/src/scatterAdd-hip/main.cu @@ -110,7 +110,6 @@ void index_accumulate (int batch_size, int output_size, int vector_dim, int repe } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); int64_t time = 0; auto start = std::chrono::steady_clock::now(); @@ -178,5 +177,6 @@ int main(int argc, char* argv[]) printf("vector_dimension: %d\n", vector_dim); index_accumulate (batch_size, output_size, vector_dim, repeat) ; + if (!ok) return 1; return 0; } diff --git a/src/scatterAdd-omp/main.cpp b/src/scatterAdd-omp/main.cpp index 66332669f2..5514207c7e 100644 --- a/src/scatterAdd-omp/main.cpp +++ b/src/scatterAdd-omp/main.cpp @@ -84,7 +84,6 @@ void index_accumulate (int batch_size, int output_size, int vector_dim, int repe } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); int64_t time = 0; auto start = std::chrono::steady_clock::now(); @@ -146,5 +145,6 @@ int main(int argc, char* argv[]) printf("vector_dimension: %d\n", vector_dim); index_accumulate (batch_size, output_size, vector_dim, repeat) ; + if (!ok) return 1; return 0; } diff --git a/src/scatterAdd-sycl/main.cpp b/src/scatterAdd-sycl/main.cpp index 50cb40b88f..174046643f 100644 --- a/src/scatterAdd-sycl/main.cpp +++ b/src/scatterAdd-sycl/main.cpp @@ -120,7 +120,6 @@ void index_accumulate(int batch_size, int output_size, int vector_dim, int repea } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); int64_t time = 0; auto start = std::chrono::steady_clock::now(); @@ -173,5 +172,6 @@ int main(int argc, char* argv[]) printf("vector_dimension: %d\n", vector_dim); index_accumulate (batch_size, output_size, vector_dim, repeat) ; + if (!ok) return 1; return 0; } diff --git a/src/scatterThrust-cuda/main.cu b/src/scatterThrust-cuda/main.cu index 2c920dd4c1..1792867658 100644 --- a/src/scatterThrust-cuda/main.cu +++ b/src/scatterThrust-cuda/main.cu @@ -65,7 +65,6 @@ void scatter(int64_t num_elems, int repeat) { } } printf("%s\n\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); CHECK_CUDA( cudaFree(d_src) ) CHECK_CUDA( cudaFree(d_idx) ) @@ -95,5 +94,6 @@ int main(int argc, char* argv[]) scatter(num_elements, repeat); printf("FP64 scatter\n"); scatter(num_elements, repeat); + if (!ok) return 1; return 0; } diff --git a/src/scatterThrust-hip/main.cu b/src/scatterThrust-hip/main.cu index 13f84af095..d5543c3fb2 100644 --- a/src/scatterThrust-hip/main.cu +++ b/src/scatterThrust-hip/main.cu @@ -65,7 +65,6 @@ void scatter(int64_t num_elems, int repeat) { } } printf("%s\n\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); CHECK_HIP( hipFree(d_src) ) CHECK_HIP( hipFree(d_idx) ) @@ -95,5 +94,6 @@ int main(int argc, char* argv[]) scatter(num_elements, repeat); printf("FP64 scatter\n"); scatter(num_elements, repeat); + if (!ok) return 1; return 0; } diff --git a/src/scatterThrust-sycl/main.cpp b/src/scatterThrust-sycl/main.cpp index f6a1a7f131..b11a7305ff 100644 --- a/src/scatterThrust-sycl/main.cpp +++ b/src/scatterThrust-sycl/main.cpp @@ -69,7 +69,6 @@ template void scatter(sycl::queue &q, int64_t num_elems, int } } printf("%s\n\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_src, q); sycl::free(d_idx, q); @@ -106,5 +105,6 @@ int main(int argc, char* argv[]) scatter(q, num_elements, repeat); printf("FP64 scatter\n"); scatter(q, num_elements, repeat); + if (!ok) return 1; return 0; } diff --git a/src/scel-cuda/main.cu b/src/scel-cuda/main.cu index 39d394e24c..4bcc6b5b12 100644 --- a/src/scel-cuda/main.cu +++ b/src/scel-cuda/main.cu @@ -121,7 +121,6 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_targets); cudaFree(d_logits); @@ -132,5 +131,6 @@ int main(int argc, char* argv[]) free(h_out); free(r_out); + if (!ok) return 1; return 0; } diff --git a/src/scel-hip/main.cu b/src/scel-hip/main.cu index e59ddb34a9..2fd8a3e7b6 100644 --- a/src/scel-hip/main.cu +++ b/src/scel-hip/main.cu @@ -121,7 +121,6 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_targets); hipFree(d_logits); @@ -132,5 +131,6 @@ int main(int argc, char* argv[]) free(h_out); free(r_out); + if (!ok) return 1; return 0; } diff --git a/src/scel-omp/main.cpp b/src/scel-omp/main.cpp index 8b16a54684..dbfad41809 100644 --- a/src/scel-omp/main.cpp +++ b/src/scel-omp/main.cpp @@ -111,12 +111,12 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(h_targets); free(h_logits); free(h_out); free(r_out); + if (!ok) return 1; return 0; } diff --git a/src/scel-sycl/main.cpp b/src/scel-sycl/main.cpp index 68311eef8d..f6011272d2 100644 --- a/src/scel-sycl/main.cpp +++ b/src/scel-sycl/main.cpp @@ -150,7 +150,6 @@ int main(int argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_targets, q); sycl::free(d_logits, q); @@ -161,5 +160,6 @@ int main(int argc, char* argv[]) free(h_out); free(r_out); + if (!ok) return 1; return 0; } diff --git a/src/score-cuda/main.cu b/src/score-cuda/main.cu index d84fa95b79..15f8c6b903 100644 --- a/src/score-cuda/main.cu +++ b/src/score-cuda/main.cu @@ -278,7 +278,6 @@ int main(int argc, char* argv[]) } checksum += memcmp(count, count_ref, count_size_bytes); printf("%s\n", checksum == 0 ? "PASS" : "FAIL"); - if (checksum != 0) exit(1); cudaFree(d_indices); cudaFree(d_count); @@ -289,5 +288,6 @@ int main(int argc, char* argv[]) free(count_ref); free(scores); + if (checksum != 0) return 1; return 0; } diff --git a/src/score-hip/main.cu b/src/score-hip/main.cu index 8012301d24..82f9f021a6 100644 --- a/src/score-hip/main.cu +++ b/src/score-hip/main.cu @@ -283,7 +283,6 @@ int main(int argc, char* argv[]) } checksum += memcmp(count, count_ref, count_size_bytes); printf("%s\n", checksum == 0 ? "PASS" : "FAIL"); - if (checksum != 0) exit(1); hipFree(d_indices); hipFree(d_count); @@ -294,5 +293,6 @@ int main(int argc, char* argv[]) free(count_ref); free(scores); + if (checksum != 0) return 1; return 0; } diff --git a/src/score-sycl/main.cpp b/src/score-sycl/main.cpp index 1a5c4c305f..80f81cce2a 100644 --- a/src/score-sycl/main.cpp +++ b/src/score-sycl/main.cpp @@ -304,7 +304,6 @@ int main(int argc, char* argv[]) } checksum += memcmp(count, count_ref, count_size_bytes); printf("%s\n", checksum == 0 ? "PASS" : "FAIL"); - if (checksum != 0) exit(1); sycl::free(d_indices, q); @@ -316,5 +315,6 @@ int main(int argc, char* argv[]) free(count_ref); free(scores); + if (checksum != 0) return 1; return 0; } diff --git a/src/shuffle-cuda/main.cu b/src/shuffle-cuda/main.cu index 31f000ac18..6a92a25ffd 100644 --- a/src/shuffle-cuda/main.cu +++ b/src/shuffle-cuda/main.cu @@ -57,7 +57,6 @@ void verifyBroadcast(const int *out, const int subGroupSize, int pattern = 0) std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (errors != 0) exit(1); } void verifyTransposeMatrix(const float *TransposeMatrix, @@ -80,7 +79,6 @@ void verifyTransposeMatrix(const float *TransposeMatrix, std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (errors != 0) exit(1); } #define __shfl(v, d) __shfl_sync(0xffffffff, v, d) @@ -361,5 +359,7 @@ int main(int argc, char* argv[]) { free(TransposeMatrix); free(cpuTransposeMatrix); + if (errors != 0) return 1; + if (errors != 0) return 1; return 0; } diff --git a/src/shuffle-hip/main.cu b/src/shuffle-hip/main.cu index 583a9dfdac..bfe38321de 100644 --- a/src/shuffle-hip/main.cu +++ b/src/shuffle-hip/main.cu @@ -57,7 +57,6 @@ void verifyBroadcast(const int *out, const int subGroupSize, int pattern = 0) std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (errors != 0) exit(1); } void verifyTransposeMatrix(const float *TransposeMatrix, @@ -80,7 +79,6 @@ void verifyTransposeMatrix(const float *TransposeMatrix, std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (errors != 0) exit(1); } //================================================================================== @@ -358,5 +356,7 @@ int main(int argc, char* argv[]) { free(TransposeMatrix); free(cpuTransposeMatrix); + if (errors != 0) return 1; + if (errors != 0) return 1; return 0; } diff --git a/src/shuffle-sycl/main.cpp b/src/shuffle-sycl/main.cpp index ad199d8470..6f291e967c 100644 --- a/src/shuffle-sycl/main.cpp +++ b/src/shuffle-sycl/main.cpp @@ -57,7 +57,6 @@ void verifyBroadcast(const int *out, const int subGroupSize, int pattern = 0) std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (errors != 0) exit(1); } void verifyTransposeMatrix(const float *TransposeMatrix, const float* cpuTransposeMatrix, @@ -79,7 +78,6 @@ void verifyTransposeMatrix(const float *TransposeMatrix, const float* cpuTranspo std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (errors != 0) exit(1); } int main(int argc, char* argv[]) { @@ -382,5 +380,7 @@ int main(int argc, char* argv[]) { free(TransposeMatrix); free(cpuTransposeMatrix); + if (errors != 0) return 1; + if (errors != 0) return 1; return 0; } diff --git a/src/snake-cuda/main.cu b/src/snake-cuda/main.cu index a655dd7d36..eb6fdb288c 100644 --- a/src/snake-cuda/main.cu +++ b/src/snake-cuda/main.cu @@ -200,7 +200,6 @@ int main(int argc, const char * const argv[]) F_ErrorThreshold, elapsed_time / repeat, D_accepted, NumReads - D_accepted); } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(ReadSeq); free(RefSeq); @@ -209,5 +208,6 @@ int main(int argc, const char * const argv[]) cudaFree(Dev_ReadSeq); cudaFree(Dev_RefSeq); cudaFree(Dev_Results); + if (error) return 1; return 0; } diff --git a/src/snake-hip/main.cu b/src/snake-hip/main.cu index d5170e6d27..d8e9df3c7c 100644 --- a/src/snake-hip/main.cu +++ b/src/snake-hip/main.cu @@ -200,7 +200,6 @@ int main(int argc, const char * const argv[]) F_ErrorThreshold, elapsed_time / repeat, D_accepted, NumReads - D_accepted); } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(ReadSeq); free(RefSeq); @@ -209,5 +208,6 @@ int main(int argc, const char * const argv[]) hipFree(Dev_ReadSeq); hipFree(Dev_RefSeq); hipFree(Dev_Results); + if (error) return 1; return 0; } diff --git a/src/snake-omp/main.cpp b/src/snake-omp/main.cpp index 3454071904..9a8b888d22 100644 --- a/src/snake-omp/main.cpp +++ b/src/snake-omp/main.cpp @@ -210,7 +210,6 @@ int main(int argc, const char * const argv[]) F_ErrorThreshold, elapsed_time / repeat, D_accepted, NumReads - D_accepted); } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); } @@ -218,5 +217,6 @@ int main(int argc, const char * const argv[]) free(RefSeq); free(DFinal_Results); free(HFinal_Results); + if (error) return 1; return 0; } diff --git a/src/snake-sycl/main.cpp b/src/snake-sycl/main.cpp index 80d18ad9b0..5683a7e511 100644 --- a/src/snake-sycl/main.cpp +++ b/src/snake-sycl/main.cpp @@ -209,7 +209,6 @@ int main(int argc, const char * const argv[]) F_ErrorThreshold, elapsed_time / repeat, D_accepted, NumReads - D_accepted); } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); free(ReadSeq); free(RefSeq); @@ -218,5 +217,6 @@ int main(int argc, const char * const argv[]) sycl::free(d_ReadSeq, q); sycl::free(d_RefSeq, q); sycl::free(d_Results, q); + if (error) return 1; return 0; } diff --git a/src/softmax-cuda/main.cu b/src/softmax-cuda/main.cu index 1abea59fce..3d23df9425 100644 --- a/src/softmax-cuda/main.cu +++ b/src/softmax-cuda/main.cu @@ -144,12 +144,12 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(input); free(output_cpu); free(output_gpu); cudaFree(d_input); cudaFree(d_output); + if (!ok) return 1; return 0; } diff --git a/src/softmax-fused-cuda/main.cu b/src/softmax-fused-cuda/main.cu index 48e865b0ab..4f31419477 100644 --- a/src/softmax-fused-cuda/main.cu +++ b/src/softmax-fused-cuda/main.cu @@ -322,7 +322,6 @@ void fused_softmax(int batches, int attn_heads, int query_seq_len, } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); @@ -367,5 +366,6 @@ int main(int argc, char *argv[]) { fused_softmax(batches, attn_heads, query_seq_len, key_seq_len, 0, repeat); fused_softmax(batches, attn_heads, query_seq_len, key_seq_len, 1, repeat); + if (!ok) return 1; return 0; } diff --git a/src/softmax-fused-hip/main.cu b/src/softmax-fused-hip/main.cu index c5e94b4432..e48164da5d 100644 --- a/src/softmax-fused-hip/main.cu +++ b/src/softmax-fused-hip/main.cu @@ -322,7 +322,6 @@ void fused_softmax(int batches, int attn_heads, int query_seq_len, } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipDeviceSynchronize(); auto start = std::chrono::steady_clock::now(); @@ -367,5 +366,6 @@ int main(int argc, char *argv[]) { fused_softmax(batches, attn_heads, query_seq_len, key_seq_len, 0, repeat); fused_softmax(batches, attn_heads, query_seq_len, key_seq_len, 1, repeat); + if (!ok) return 1; return 0; } diff --git a/src/softmax-fused-sycl/main.cpp b/src/softmax-fused-sycl/main.cpp index a4214a597a..b376fe2238 100644 --- a/src/softmax-fused-sycl/main.cpp +++ b/src/softmax-fused-sycl/main.cpp @@ -336,7 +336,6 @@ void fused_softmax(int batches, int attn_heads, int query_seq_len, } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); q.wait(); auto start = std::chrono::steady_clock::now(); @@ -382,5 +381,6 @@ int main(int argc, char *argv[]) { fused_softmax(batches, attn_heads, query_seq_len, key_seq_len, 0, repeat); fused_softmax(batches, attn_heads, query_seq_len, key_seq_len, 1, repeat); + if (!ok) return 1; return 0; } diff --git a/src/softmax-hip/main.cu b/src/softmax-hip/main.cu index 6c3389581f..89f6bfdeb0 100644 --- a/src/softmax-hip/main.cu +++ b/src/softmax-hip/main.cu @@ -155,12 +155,12 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(input); free(output_cpu); free(output_gpu); hipFree(d_input); hipFree(d_output); + if (!ok) return 1; return 0; } diff --git a/src/softmax-omp/main.cpp b/src/softmax-omp/main.cpp index f4f6e0e861..889b665f24 100644 --- a/src/softmax-omp/main.cpp +++ b/src/softmax-omp/main.cpp @@ -81,10 +81,10 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(input); free(output_cpu); free(output_gpu); + if (!ok) return 1; return 0; } diff --git a/src/softmax-sycl/main.cpp b/src/softmax-sycl/main.cpp index d6e9dc8e6c..92bd01cd39 100644 --- a/src/softmax-sycl/main.cpp +++ b/src/softmax-sycl/main.cpp @@ -147,12 +147,12 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(input); free(output_cpu); free(output_gpu); sycl::free(d_input, q); sycl::free(d_output, q); + if (!ok) return 1; return 0; } diff --git a/src/sort-cuda/main.cu b/src/sort-cuda/main.cu index 5bec11f573..dd304a1946 100644 --- a/src/sort-cuda/main.cu +++ b/src/sort-cuda/main.cu @@ -37,7 +37,6 @@ void verifySort(const T *keys, const size_t size) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; - if (!passed) exit(1); } int main(int argc, char** argv) @@ -155,5 +154,6 @@ int main(int argc, char** argv) free(h_idata); free(h_odata); + if (!passed) return 1; return 0; } diff --git a/src/sort-hip/main.cu b/src/sort-hip/main.cu index 918a99bd53..f85ad3e3b2 100644 --- a/src/sort-hip/main.cu +++ b/src/sort-hip/main.cu @@ -37,7 +37,6 @@ void verifySort(const T *keys, const size_t size) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; - if (!passed) exit(1); } int main(int argc, char** argv) @@ -155,5 +154,6 @@ int main(int argc, char** argv) free(h_idata); free(h_odata); + if (!passed) return 1; return 0; } diff --git a/src/sort-omp/main.cpp b/src/sort-omp/main.cpp index 5d744a2988..1ef45f5db7 100644 --- a/src/sort-omp/main.cpp +++ b/src/sort-omp/main.cpp @@ -36,7 +36,6 @@ void verifySort(const T *keys, const size_t size) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; - if (!passed) exit(1); } int main(int argc, char** argv) @@ -168,5 +167,6 @@ int main(int argc, char** argv) free(idata); free(isums); free(odata); + if (!passed) return 1; return 0; } diff --git a/src/sort-sycl/main.cpp b/src/sort-sycl/main.cpp index 8f25260db7..60d42aea1c 100644 --- a/src/sort-sycl/main.cpp +++ b/src/sort-sycl/main.cpp @@ -31,7 +31,6 @@ void verifySort(const T *keys, const size_t size) std::cout << "PASS" << std::endl; else std::cout << "FAIL" << std::endl; - if (!passed) exit(1); } int main(int argc, char** argv) @@ -182,5 +181,6 @@ int main(int argc, char** argv) free(h_idata); free(h_odata); + if (!passed) return 1; return 0; } diff --git a/src/sosfil-cuda/main.cu b/src/sosfil-cuda/main.cu index c02096af1a..761e16c4c3 100644 --- a/src/sosfil-cuda/main.cu +++ b/src/sosfil-cuda/main.cu @@ -225,7 +225,6 @@ void filtering (const int repeat, bool ok = compare_results(x_ref, x, n_signals * n_samples, 1e-4, 1e-4); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaCheck(cudaDeviceSynchronize()); auto start = std::chrono::steady_clock::now(); @@ -281,5 +280,6 @@ int main(int argc, char** argv) printf("Double-precision second-order-section filtering of digital signals\n"); filtering (repeat, numSignals, numSamples, numSections, zi_width); + if (!ok) return 1; return 0; } diff --git a/src/sosfil-hip/main.cu b/src/sosfil-hip/main.cu index 99bf8f94dc..3d3749e91c 100644 --- a/src/sosfil-hip/main.cu +++ b/src/sosfil-hip/main.cu @@ -225,7 +225,6 @@ void filtering (const int repeat, bool ok = compare_results(x_ref, x, n_signals * n_samples, 1e-4, 1e-4); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipCheck(hipDeviceSynchronize()); auto start = std::chrono::steady_clock::now(); @@ -281,5 +280,6 @@ int main(int argc, char** argv) printf("Double-precision second-order-section filtering of digital signals\n"); filtering (repeat, numSignals, numSamples, numSections, zi_width); + if (!ok) return 1; return 0; } diff --git a/src/sosfil-omp/main.cpp b/src/sosfil-omp/main.cpp index ae9f184972..366953a0d3 100644 --- a/src/sosfil-omp/main.cpp +++ b/src/sosfil-omp/main.cpp @@ -215,7 +215,6 @@ void filtering (const int repeat, const int n_signals, const int n_samples, bool ok = compare_results(x_ref, x_in, n_signals * n_samples, 1e-4, 1e-4); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); auto start = std::chrono::steady_clock::now(); @@ -267,5 +266,6 @@ int main(int argc, char** argv) printf("Double-precision second-order-section filtering of digital signals\n"); filtering(repeat, numSignals, numSamples, numSections, zi_width); + if (!ok) return 1; return 0; } diff --git a/src/sosfil-sycl/main.cpp b/src/sosfil-sycl/main.cpp index 660ebe1a7e..6e822153ea 100644 --- a/src/sosfil-sycl/main.cpp +++ b/src/sosfil-sycl/main.cpp @@ -213,7 +213,6 @@ void filtering (sycl::queue &q, const int repeat, bool ok = compare_results(x_ref, x, n_signals * n_samples, 1e-4, 1e-4); printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); q.wait(); auto start = std::chrono::steady_clock::now(); @@ -268,5 +267,6 @@ int main(int argc, char** argv) printf("Double-precision second-order-section filtering of digital signals\n"); filtering (q, repeat, numSignals, numSamples, numSections, zi_width); + if (!ok) return 1; return 0; } diff --git a/src/split-cuda/main.cu b/src/split-cuda/main.cu index 74fa5a529d..42984d81c2 100644 --- a/src/split-cuda/main.cu +++ b/src/split-cuda/main.cu @@ -204,10 +204,10 @@ int main(int argc, char* argv[]) printf("PASS\n"); else printf("FAIL\n"); - if (!check) exit(1); free(keys); free(out); + if (!check) return 1; return 0; } diff --git a/src/split-hip/main.cu b/src/split-hip/main.cu index ed2a8f6e7c..10caa75c84 100644 --- a/src/split-hip/main.cu +++ b/src/split-hip/main.cu @@ -204,10 +204,10 @@ int main(int argc, char* argv[]) printf("PASS\n"); else printf("FAIL\n"); - if (!check) exit(1); free(keys); free(out); + if (!check) return 1; return 0; } diff --git a/src/split-omp/main.cpp b/src/split-omp/main.cpp index 22f83dccc0..7878c5511d 100644 --- a/src/split-omp/main.cpp +++ b/src/split-omp/main.cpp @@ -190,10 +190,10 @@ int main(int argc, char** argv) { printf("PASS\n"); else printf("FAIL\n"); - if (!check) exit(1); free(keys); free(out); + if (!check) return 1; return 0; } diff --git a/src/split-sycl/main.cpp b/src/split-sycl/main.cpp index 7a3c5d8cf6..18fafd36ef 100644 --- a/src/split-sycl/main.cpp +++ b/src/split-sycl/main.cpp @@ -216,9 +216,9 @@ int main(int argc, char** argv) { printf("PASS\n"); else printf("FAIL\n"); - if (!check) exit(1); free(keys); free(out); + if (!check) return 1; return 0; } diff --git a/src/sptrsv-cuda/sptrsv_syncfree.cu b/src/sptrsv-cuda/sptrsv_syncfree.cu index 31741d874f..6345bb5ec0 100644 --- a/src/sptrsv-cuda/sptrsv_syncfree.cu +++ b/src/sptrsv-cuda/sptrsv_syncfree.cu @@ -228,7 +228,6 @@ int sptrsv_syncfree ( printf("|x-xref|/|xref| = %8.2e\n", res); printf("%s\n", (res < accuracy) ? "PASS" : "FAIL"); - if (!(res < accuracy)) exit(1); free(warp_num); cudaFree(d_csrRowPtr); @@ -238,6 +237,7 @@ int sptrsv_syncfree ( cudaFree(d_b); cudaFree(d_x); cudaFree(d_warp_num); + if (!(res < accuracy)) return 1; return 0; } diff --git a/src/sptrsv-hip/sptrsv_syncfree.cu b/src/sptrsv-hip/sptrsv_syncfree.cu index 04d9a27c20..4be2b9f85d 100644 --- a/src/sptrsv-hip/sptrsv_syncfree.cu +++ b/src/sptrsv-hip/sptrsv_syncfree.cu @@ -228,7 +228,6 @@ int sptrsv_syncfree ( printf("|x-xref|/|xref| = %8.2e\n", res); printf("%s\n", (res < accuracy) ? "PASS" : "FAIL"); - if (!(res < accuracy)) exit(1); free(warp_num); hipFree(d_csrRowPtr); @@ -238,6 +237,7 @@ int sptrsv_syncfree ( hipFree(d_b); hipFree(d_x); hipFree(d_warp_num); + if (!(res < accuracy)) return 1; return 0; } diff --git a/src/sptrsv-omp/sptrsv_syncfree.cpp b/src/sptrsv-omp/sptrsv_syncfree.cpp index 317928e21d..ec7377533f 100644 --- a/src/sptrsv-omp/sptrsv_syncfree.cpp +++ b/src/sptrsv-omp/sptrsv_syncfree.cpp @@ -205,11 +205,11 @@ int sptrsv_syncfree ( printf("|x-xref|/|xref| = %8.2e\n", res); printf("%s\n", (res < accuracy) ? "PASS" : "FAIL"); - if (!(res < accuracy)) exit(1); free(get_value); free(warp_num); + if (!(res < accuracy)) return 1; return 0; } diff --git a/src/sptrsv-sycl/sptrsv_syncfree.cpp b/src/sptrsv-sycl/sptrsv_syncfree.cpp index 19acc842e7..159ff416c5 100644 --- a/src/sptrsv-sycl/sptrsv_syncfree.cpp +++ b/src/sptrsv-sycl/sptrsv_syncfree.cpp @@ -213,7 +213,6 @@ int sptrsv_syncfree ( printf("|x-xref|/|xref| = %8.2e\n", res); printf("%s\n", (res < accuracy) ? "PASS" : "FAIL"); - if (!(res < accuracy)) exit(1); free(warp_num); sycl::free(d_csrRowPtr, q); @@ -224,6 +223,7 @@ int sptrsv_syncfree ( sycl::free(d_x, q); sycl::free(d_warp_num, q); + if (!(res < accuracy)) return 1; return 0; } diff --git a/src/stddev-cuda/main.cu b/src/stddev-cuda/main.cu index 247351cbf0..e9529248d2 100644 --- a/src/stddev-cuda/main.cu +++ b/src/stddev-cuda/main.cu @@ -153,11 +153,11 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(std_ref); free(std); free(data); cudaFree(d_std); cudaFree(d_data); + if (!ok) return 1; return 0; } diff --git a/src/stddev-hip/main.cu b/src/stddev-hip/main.cu index 285a0e2918..98aab0dfe2 100644 --- a/src/stddev-hip/main.cu +++ b/src/stddev-hip/main.cu @@ -153,11 +153,11 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(std_ref); free(std); free(data); hipFree(d_std); hipFree(d_data); + if (!ok) return 1; return 0; } diff --git a/src/stddev-omp/main.cpp b/src/stddev-omp/main.cpp index c5f8e382da..6c6bb6d870 100644 --- a/src/stddev-omp/main.cpp +++ b/src/stddev-omp/main.cpp @@ -149,9 +149,9 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(std_ref); free(std); free(data); + if (!ok) return 1; return 0; } diff --git a/src/stddev-sycl/main.cpp b/src/stddev-sycl/main.cpp index 0fd6d3cd55..eb276bdffd 100644 --- a/src/stddev-sycl/main.cpp +++ b/src/stddev-sycl/main.cpp @@ -185,12 +185,12 @@ int main(int argc, char* argv[]) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(std_ref); free(std); free(data); sycl::free(d_std, q); sycl::free(d_data, q); + if (!ok) return 1; return 0; } diff --git a/src/stencil1d-cuda/stencil_1d.cu b/src/stencil1d-cuda/stencil_1d.cu index 1514225b08..69932f7156 100644 --- a/src/stencil1d-cuda/stencil_1d.cu +++ b/src/stencil1d-cuda/stencil_1d.cu @@ -111,12 +111,12 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // Cleanup free(a); free(b); cudaFree(d_a); cudaFree(d_b); + if (!ok) return 1; return 0; } diff --git a/src/stencil1d-hip/stencil_1d.cu b/src/stencil1d-hip/stencil_1d.cu index dd99dc726c..1e3f783a0f 100644 --- a/src/stencil1d-hip/stencil_1d.cu +++ b/src/stencil1d-hip/stencil_1d.cu @@ -111,12 +111,12 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // Cleanup free(a); free(b); hipFree(d_a); hipFree(d_b); + if (!ok) return 1; return 0; } diff --git a/src/stencil1d-omp/stencil_1d.cpp b/src/stencil1d-omp/stencil_1d.cpp index bb0485f5b3..1be598a07b 100644 --- a/src/stencil1d-omp/stencil_1d.cpp +++ b/src/stencil1d-omp/stencil_1d.cpp @@ -85,10 +85,10 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // Cleanup free(a); free(b); + if (!ok) return 1; return 0; } diff --git a/src/stencil1d-sycl/stencil_1d.cpp b/src/stencil1d-sycl/stencil_1d.cpp index 2473c2f0b7..3619c35666 100644 --- a/src/stencil1d-sycl/stencil_1d.cpp +++ b/src/stencil1d-sycl/stencil_1d.cpp @@ -114,12 +114,12 @@ int main(int argc, char* argv[]) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // Cleanup free(a); free(b); sycl::free(d_in, q); sycl::free(d_out, q); + if (!ok) return 1; return 0; } diff --git a/src/surfel-cuda/main.cu b/src/surfel-cuda/main.cu index 74124c033b..8394419908 100644 --- a/src/surfel-cuda/main.cu +++ b/src/surfel-cuda/main.cu @@ -212,7 +212,6 @@ void surfelRenderTest(int n, int w, int h, int repeat) if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(r_dst); free(h_dst); @@ -236,5 +235,6 @@ int main(int argc, char *argv[]) { printf("-------------------------------------\n"); surfelRenderTest(n, w, h, repeat); + if (!ok) return 1; return 0; } diff --git a/src/surfel-hip/main.cu b/src/surfel-hip/main.cu index c82b5687c3..7924ff4c9d 100644 --- a/src/surfel-hip/main.cu +++ b/src/surfel-hip/main.cu @@ -212,7 +212,6 @@ void surfelRenderTest(int n, int w, int h, int repeat) if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(r_dst); free(h_dst); @@ -236,5 +235,6 @@ int main(int argc, char *argv[]) { printf("-------------------------------------\n"); surfelRenderTest(n, w, h, repeat); + if (!ok) return 1; return 0; } diff --git a/src/surfel-omp/main.cpp b/src/surfel-omp/main.cpp index e2a393d298..46d5d25cc9 100644 --- a/src/surfel-omp/main.cpp +++ b/src/surfel-omp/main.cpp @@ -115,7 +115,6 @@ void surfelRenderTest(int n, int w, int h, int repeat) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(r_dst); free(h_dst); @@ -137,5 +136,6 @@ int main(int argc, char *argv[]) { printf("-------------------------------------\n"); surfelRenderTest(n, w, h, repeat); + if (!ok) return 1; return 0; } diff --git a/src/surfel-sycl/main.cpp b/src/surfel-sycl/main.cpp index c6fec18884..715523a4d9 100644 --- a/src/surfel-sycl/main.cpp +++ b/src/surfel-sycl/main.cpp @@ -229,7 +229,6 @@ void surfelRenderTest(sycl::queue &q, int n, int w, int h, int repeat) if (!ok) break; } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(r_dst); free(h_dst); @@ -259,5 +258,6 @@ int main(int argc, char *argv[]) { printf("-------------------------------------\n"); surfelRenderTest(q, n, w, h, repeat); + if (!ok) return 1; return 0; } diff --git a/src/svd3x3-cuda/main.cu b/src/svd3x3-cuda/main.cu index 257ad7f37a..ccee5e7d81 100644 --- a/src/svd3x3-cuda/main.cu +++ b/src/svd3x3-cuda/main.cu @@ -113,10 +113,10 @@ int main(int argc, char* argv[]) std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (!ok) exit(1); free(input); free(result); free(result_h); + if (!ok) return 1; return 0; } diff --git a/src/svd3x3-hip/main.cu b/src/svd3x3-hip/main.cu index 25e7b30df1..96a3a3f098 100644 --- a/src/svd3x3-hip/main.cu +++ b/src/svd3x3-hip/main.cu @@ -113,10 +113,10 @@ int main(int argc, char* argv[]) std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (!ok) exit(1); free(input); free(result); free(result_h); + if (!ok) return 1; return 0; } diff --git a/src/svd3x3-omp/main.cpp b/src/svd3x3-omp/main.cpp index e66b0b914f..57c750c70d 100644 --- a/src/svd3x3-omp/main.cpp +++ b/src/svd3x3-omp/main.cpp @@ -112,10 +112,10 @@ int main(int argc, char* argv[]) std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (!ok) exit(1); free(input); free(result); free(result_h); + if (!ok) return 1; return 0; } diff --git a/src/svd3x3-sycl/main.cpp b/src/svd3x3-sycl/main.cpp index d2712554fc..7aeaa27fd4 100644 --- a/src/svd3x3-sycl/main.cpp +++ b/src/svd3x3-sycl/main.cpp @@ -121,10 +121,10 @@ int main(int argc, char* argv[]) std::cout << "PASS\n"; else std::cout << "FAIL\n"; - if (!ok) exit(1); free(input); free(result); free(result_h); + if (!ok) return 1; return 0; } diff --git a/src/tensorAccessor-cuda/main.cu b/src/tensorAccessor-cuda/main.cu index 04d3d2b6fa..a2bdbcce82 100644 --- a/src/tensorAccessor-cuda/main.cu +++ b/src/tensorAccessor-cuda/main.cu @@ -149,12 +149,12 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(m); free(v); free(r); free(r_ref); + if (!ok) return 1; return 0; } diff --git a/src/tensorAccessor-hip/main.cu b/src/tensorAccessor-hip/main.cu index 406f28f101..966359f0d6 100644 --- a/src/tensorAccessor-hip/main.cu +++ b/src/tensorAccessor-hip/main.cu @@ -149,12 +149,12 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(m); free(v); free(r); free(r_ref); + if (!ok) return 1; return 0; } diff --git a/src/tensorAccessor-sycl/main.cpp b/src/tensorAccessor-sycl/main.cpp index b929bdff2a..75da5dced0 100644 --- a/src/tensorAccessor-sycl/main.cpp +++ b/src/tensorAccessor-sycl/main.cpp @@ -171,12 +171,12 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(m); free(v); free(r); free(r_ref); + if (!ok) return 1; return 0; } diff --git a/src/tensorT-cuda/main.cu b/src/tensorT-cuda/main.cu index 6b2b4ca7dc..5db545e8e7 100644 --- a/src/tensorT-cuda/main.cu +++ b/src/tensorT-cuda/main.cu @@ -32,7 +32,6 @@ void verify(double *input, double *output) { } } if (!error) printf("PASS\n"); - if (error) exit(1); } __global__ void tensor_transpose( @@ -172,5 +171,6 @@ int main(int argc, char **argv) { delete [] input; delete [] output; + if (error) return 1; return 0; } diff --git a/src/tensorT-hip/main.cu b/src/tensorT-hip/main.cu index 0c131f3598..933fffdfc5 100644 --- a/src/tensorT-hip/main.cu +++ b/src/tensorT-hip/main.cu @@ -32,7 +32,6 @@ void verify(double *input, double *output) { } } if (!error) printf("PASS\n"); - if (error) exit(1); } __global__ void tensor_transpose( @@ -172,5 +171,6 @@ int main(int argc, char **argv) { delete [] input; delete [] output; + if (error) return 1; return 0; } diff --git a/src/tensorT-omp/main.cpp b/src/tensorT-omp/main.cpp index c78f3c7878..0bd38f05b6 100644 --- a/src/tensorT-omp/main.cpp +++ b/src/tensorT-omp/main.cpp @@ -32,7 +32,6 @@ void verify(double *input, double *output) { } } if (!error) printf("PASS\n"); - if (error) exit(1); } int main(int argc, char **argv) { @@ -113,5 +112,6 @@ int main(int argc, char **argv) { verify(input, output); delete [] input; delete [] output; + if (error) return 1; return 0; } diff --git a/src/tensorT-sycl/main.cpp b/src/tensorT-sycl/main.cpp index 83a52c138c..7f83523e4a 100644 --- a/src/tensorT-sycl/main.cpp +++ b/src/tensorT-sycl/main.cpp @@ -32,7 +32,6 @@ void verify(double *input, double *output) { } } if (!error) printf("PASS\n"); - if (error) exit(1); } int main(int argc, char **argv) { @@ -148,5 +147,6 @@ int main(int argc, char **argv) { verify(input, output); delete [] input; delete [] output; + if (error) return 1; return 0; } diff --git a/src/threadcpy-cuda/main.cu b/src/threadcpy-cuda/main.cu index 6f7a801005..8a5b95f59f 100644 --- a/src/threadcpy-cuda/main.cu +++ b/src/threadcpy-cuda/main.cu @@ -60,7 +60,6 @@ void test_threads_copy(size_t n, int repeat) { int s = memcmp(out_h, in_h, sizeof(scalar_t) * n); std::cout << (s ? "FAIL" : "PASS") << std::endl; - if (s) exit(1); auto start = std::chrono::steady_clock::now(); @@ -127,5 +126,6 @@ int main(int argc, char* argv[]) test_threads_copy<8, char>(numel * 4, repeat); std::cout << "char16: "; test_threads_copy<16, char>(numel * 4, repeat); + if (s) return 1; return 0; } diff --git a/src/threadcpy-hip/main.cu b/src/threadcpy-hip/main.cu index c4bae3727c..d30af5d445 100644 --- a/src/threadcpy-hip/main.cu +++ b/src/threadcpy-hip/main.cu @@ -60,7 +60,6 @@ void test_threads_copy(size_t n, int repeat) { int s = memcmp(out_h, in_h, sizeof(scalar_t) * n); std::cout << (s ? "FAIL" : "PASS") << std::endl; - if (s) exit(1); auto start = std::chrono::steady_clock::now(); @@ -127,5 +126,6 @@ int main(int argc, char* argv[]) test_threads_copy<8, char>(numel * 4, repeat); std::cout << "char16: "; test_threads_copy<16, char>(numel * 4, repeat); + if (s) return 1; return 0; } diff --git a/src/threadcpy-omp/main.cpp b/src/threadcpy-omp/main.cpp index 349aa7cdb6..2655056c7f 100644 --- a/src/threadcpy-omp/main.cpp +++ b/src/threadcpy-omp/main.cpp @@ -61,7 +61,6 @@ void test_threads_copy(size_t n, int repeat) { int s = memcmp(out, in, sizeof(scalar_t) * n); std::cout << (s ? "FAIL" : "PASS") << std::endl; - if (s) exit(1); auto start = std::chrono::steady_clock::now(); @@ -137,5 +136,6 @@ int main(int argc, char* argv[]) test_threads_copy<8, char>(numel * 4, repeat); std::cout << "char16: "; test_threads_copy<16, char>(numel * 4, repeat); + if (s) return 1; return 0; } diff --git a/src/threadcpy-sycl/main.cpp b/src/threadcpy-sycl/main.cpp index e7f9eb39ab..6b2794c50d 100644 --- a/src/threadcpy-sycl/main.cpp +++ b/src/threadcpy-sycl/main.cpp @@ -59,7 +59,6 @@ void test_threads_copy(sycl::queue &q, size_t n, int repeat) try { int s = memcmp(out_h, in_h, sizeof(scalar_t) * n); std::cout << (s ? "FAIL" : "PASS") << std::endl; - if (s) exit(1); auto start = std::chrono::steady_clock::now(); @@ -139,5 +138,6 @@ int main(int argc, char* argv[]) test_threads_copy<8, char>(q, numel * 4, repeat); std::cout << "char16: "; test_threads_copy<16, char>(q, numel * 4, repeat); + if (s) return 1; return 0; } diff --git a/src/tissue-cuda/main.cu b/src/tissue-cuda/main.cu index 0a260f7c10..fa7982fe7f 100644 --- a/src/tissue-cuda/main.cu +++ b/src/tissue-cuda/main.cu @@ -167,7 +167,6 @@ int main(int argc, char** argv) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // timing kernel execution auto start = std::chrono::steady_clock::now(); @@ -196,5 +195,6 @@ int main(int argc, char** argv) { cudaFree(d_ctprev); cudaFree(d_qt); + if (!ok) return 1; return 0; } diff --git a/src/tissue-hip/main.cu b/src/tissue-hip/main.cu index 307937a17c..a648d60f58 100644 --- a/src/tissue-hip/main.cu +++ b/src/tissue-hip/main.cu @@ -167,7 +167,6 @@ int main(int argc, char** argv) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // timing kernel execution auto start = std::chrono::steady_clock::now(); @@ -196,5 +195,6 @@ int main(int argc, char** argv) { hipFree(d_ctprev); hipFree(d_qt); + if (!ok) return 1; return 0; } diff --git a/src/tissue-omp/main.cpp b/src/tissue-omp/main.cpp index f64dc2ab65..7df97b3c1a 100644 --- a/src/tissue-omp/main.cpp +++ b/src/tissue-omp/main.cpp @@ -126,7 +126,6 @@ int main(int argc, char** argv) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // timing kernel execution auto start = std::chrono::steady_clock::now(); @@ -148,5 +147,6 @@ int main(int argc, char** argv) { free(h_ctprev); free(h_qt); + if (!ok) return 1; return 0; } diff --git a/src/tissue-sycl/main.cpp b/src/tissue-sycl/main.cpp index af430dac93..f8238411d0 100644 --- a/src/tissue-sycl/main.cpp +++ b/src/tissue-sycl/main.cpp @@ -176,7 +176,6 @@ int main(int argc, char** argv) { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); // timing kernel execution auto start = std::chrono::steady_clock::now(); @@ -204,5 +203,6 @@ int main(int argc, char** argv) { sycl::free(d_ctprev, q); sycl::free(d_qt, q); + if (!ok) return 1; return 0; } diff --git a/src/topk-cuda/main.cu b/src/topk-cuda/main.cu index 26d273cf84..4600a8fbfb 100644 --- a/src/topk-cuda/main.cu +++ b/src/topk-cuda/main.cu @@ -140,7 +140,6 @@ int32_t main(int32_t argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); GPU_CHECK(cudaFree(d_x)); GPU_CHECK(cudaFree(d_topk_ids)); @@ -148,5 +147,6 @@ int32_t main(int32_t argc, char* argv[]) } } + if (!ok) return 1; return 0; } diff --git a/src/topk-hip/main.cu b/src/topk-hip/main.cu index 230bf7bf33..7db1ab1d33 100644 --- a/src/topk-hip/main.cu +++ b/src/topk-hip/main.cu @@ -139,7 +139,6 @@ int32_t main(int32_t argc, char* argv[]) } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); GPU_CHECK(hipFree(d_x)); GPU_CHECK(hipFree(d_topk_ids)); @@ -147,5 +146,6 @@ int32_t main(int32_t argc, char* argv[]) } } + if (!ok) return 1; return 0; } diff --git a/src/topk-sycl/main.cpp b/src/topk-sycl/main.cpp index aff44cf707..b68c7baf95 100644 --- a/src/topk-sycl/main.cpp +++ b/src/topk-sycl/main.cpp @@ -150,7 +150,6 @@ int32_t main(int32_t argc, char *argv[]) try { } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_x, q); sycl::free(d_topk_ids, q); @@ -158,6 +157,7 @@ int32_t main(int32_t argc, char *argv[]) try { } } + if (!ok) return 1; return 0; } catch (sycl::exception const &exc) { diff --git a/src/tsa-cuda/main.cu b/src/tsa-cuda/main.cu index fc8b4e9d88..1edd5abb49 100644 --- a/src/tsa-cuda/main.cu +++ b/src/tsa-cuda/main.cu @@ -108,7 +108,6 @@ void tsa(int width, int height, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); delete[] p_real; delete[] p_imag; @@ -136,5 +135,6 @@ int main(int argc, char** argv) { printf("TSA in float64\n"); tsa(width, height, repeat); + if (!ok) return 1; return 0; } diff --git a/src/tsa-hip/main.cu b/src/tsa-hip/main.cu index 7c1d15d294..397f6d4c5a 100644 --- a/src/tsa-hip/main.cu +++ b/src/tsa-hip/main.cu @@ -109,7 +109,6 @@ void tsa(int width, int height, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); delete[] p_real; delete[] p_imag; @@ -137,5 +136,6 @@ int main(int argc, char** argv) { printf("TSA in float64\n"); tsa(width, height, repeat); + if (!ok) return 1; return 0; } diff --git a/src/tsa-omp/main.cpp b/src/tsa-omp/main.cpp index de59dac1f7..0c5c64369e 100644 --- a/src/tsa-omp/main.cpp +++ b/src/tsa-omp/main.cpp @@ -109,7 +109,6 @@ void tsa(int width, int height, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); delete[] d_real[0]; delete[] d_imag[0]; @@ -135,5 +134,6 @@ int main(int argc, char** argv) { printf("TSA in float64\n"); tsa(width, height, repeat); + if (!ok) return 1; return 0; } diff --git a/src/tsa-sycl/main.cpp b/src/tsa-sycl/main.cpp index 81afc38352..c0eb70ef3f 100644 --- a/src/tsa-sycl/main.cpp +++ b/src/tsa-sycl/main.cpp @@ -126,7 +126,6 @@ void tsa(sycl::queue &q, int width, int height, int repeat) { } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); delete[] p_real; delete[] p_imag; @@ -160,5 +159,6 @@ int main(int argc, char** argv) { printf("TSA in float64\n"); tsa(q, width, height, repeat); + if (!ok) return 1; return 0; } diff --git a/src/tsp-cuda/main.cu b/src/tsp-cuda/main.cu index 29518f0b92..f62275c8c2 100644 --- a/src/tsp-cuda/main.cu +++ b/src/tsp-cuda/main.cu @@ -372,7 +372,6 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); - if (best < 38000 && best < 35002) exit(1); cudaFree(glob_d); cudaFree(best_d); @@ -381,5 +380,6 @@ int main(int argc, char *argv[]) cudaFree(posy_d); free(posx); free(posy); + if (best < 38000 && best < 35002) return 1; return 0; } diff --git a/src/tsp-hip/main.cu b/src/tsp-hip/main.cu index 807f984daf..1e96cbe994 100644 --- a/src/tsp-hip/main.cu +++ b/src/tsp-hip/main.cu @@ -372,7 +372,6 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); - if (best < 38000 && best < 35002) exit(1); hipFree(glob_d); hipFree(best_d); @@ -381,5 +380,6 @@ int main(int argc, char *argv[]) hipFree(posy_d); free(posx); free(posy); + if (best < 38000 && best < 35002) return 1; return 0; } diff --git a/src/tsp-omp/main.cpp b/src/tsp-omp/main.cpp index 44a7acba67..d4deafcf5a 100644 --- a/src/tsp-omp/main.cpp +++ b/src/tsp-omp/main.cpp @@ -374,12 +374,12 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); - if (best[0] < 38000 && best[0] < 35002) exit(1); } free(posx); free(posy); free(glob); + if (best[0] < 38000 && best[0] < 35002) return 1; return 0; } diff --git a/src/tsp-sycl/main.cpp b/src/tsp-sycl/main.cpp index 9e1dc4cde0..e9c2ec7df9 100644 --- a/src/tsp-sycl/main.cpp +++ b/src/tsp-sycl/main.cpp @@ -393,7 +393,6 @@ int main(int argc, char *argv[]) printf("PASS\n"); else printf("FAIL\n"); - if (best < 38000 && best < 35002) exit(1); sycl::free(glob_d, q); sycl::free(best_d, q); @@ -401,5 +400,6 @@ int main(int argc, char *argv[]) sycl::free(posx_d, q); free(posx); free(posy); + if (best < 38000 && best < 35002) return 1; return 0; } diff --git a/src/unfold-cuda/main.cu b/src/unfold-cuda/main.cu index 08ade9dac1..346316688b 100644 --- a/src/unfold-cuda/main.cu +++ b/src/unfold-cuda/main.cu @@ -140,7 +140,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_grad_in); cudaFree(d_grad_out); @@ -149,5 +148,6 @@ int main(int argc, char* argv[]) free(h_grad_in); free(h_grad_out); + if (!ok) return 1; return 0; } diff --git a/src/unfold-hip/main.cu b/src/unfold-hip/main.cu index edfde77b07..77de58c0c1 100644 --- a/src/unfold-hip/main.cu +++ b/src/unfold-hip/main.cu @@ -140,7 +140,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_grad_in); hipFree(d_grad_out); @@ -149,5 +148,6 @@ int main(int argc, char* argv[]) free(h_grad_in); free(h_grad_out); + if (!ok) return 1; return 0; } diff --git a/src/unfold-sycl/main.cpp b/src/unfold-sycl/main.cpp index 76e74920f7..018491594a 100644 --- a/src/unfold-sycl/main.cpp +++ b/src/unfold-sycl/main.cpp @@ -154,7 +154,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_grad_in, q); sycl::free(d_grad_out, q); @@ -163,5 +162,6 @@ int main(int argc, char* argv[]) free(h_grad_in); free(h_grad_out); + if (!ok) return 1; return 0; } diff --git a/src/vanGenuchten-cuda/main.cu b/src/vanGenuchten-cuda/main.cu index 3b4e958612..d832667587 100644 --- a/src/vanGenuchten-cuda/main.cu +++ b/src/vanGenuchten-cuda/main.cu @@ -124,7 +124,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_Ksat); cudaFree(d_psi); @@ -141,5 +140,6 @@ int main(int argc, char* argv[]) delete[] theta_ref; delete[] K_ref; + if (!ok) return 1; return 0; } diff --git a/src/vanGenuchten-hip/main.cu b/src/vanGenuchten-hip/main.cu index 64c56daab4..fa297430ca 100644 --- a/src/vanGenuchten-hip/main.cu +++ b/src/vanGenuchten-hip/main.cu @@ -124,7 +124,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_Ksat); hipFree(d_psi); @@ -141,5 +140,6 @@ int main(int argc, char* argv[]) delete[] theta_ref; delete[] K_ref; + if (!ok) return 1; return 0; } diff --git a/src/vanGenuchten-omp/main.cpp b/src/vanGenuchten-omp/main.cpp index ca78579a5d..b00df531fb 100644 --- a/src/vanGenuchten-omp/main.cpp +++ b/src/vanGenuchten-omp/main.cpp @@ -106,7 +106,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); delete[] Ksat; delete[] psi; @@ -117,5 +116,6 @@ int main(int argc, char* argv[]) delete[] theta_ref; delete[] K_ref; + if (!ok) return 1; return 0; } diff --git a/src/vanGenuchten-sycl/main.cpp b/src/vanGenuchten-sycl/main.cpp index 8095c784c9..6862b87134 100644 --- a/src/vanGenuchten-sycl/main.cpp +++ b/src/vanGenuchten-sycl/main.cpp @@ -140,7 +140,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_Ksat, q); sycl::free(d_psi, q); @@ -157,5 +156,6 @@ int main(int argc, char* argv[]) delete[] theta_ref; delete[] K_ref; + if (!ok) return 1; return 0; } diff --git a/src/vol2col-cuda/main.cu b/src/vol2col-cuda/main.cu index 0da312d4d6..8609831b36 100644 --- a/src/vol2col-cuda/main.cu +++ b/src/vol2col-cuda/main.cu @@ -236,7 +236,6 @@ void eval ( int error = memcmp(h_data_col_ref, h_data_col, col_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); cudaDeviceSynchronize(); start = std::chrono::steady_clock::now(); @@ -279,7 +278,6 @@ void eval ( } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); cudaFree(d_data_vol); cudaFree(d_data_col); @@ -329,5 +327,7 @@ int main(int argc, char* argv[]) dilation_t, dilation_h, dilation_w); } + if (error) return 1; + if (error) return 1; return 0; } diff --git a/src/vol2col-hip/main.cu b/src/vol2col-hip/main.cu index a450c61b8d..1df39053a6 100644 --- a/src/vol2col-hip/main.cu +++ b/src/vol2col-hip/main.cu @@ -236,7 +236,6 @@ void eval ( int error = memcmp(h_data_col_ref, h_data_col, col_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); hipDeviceSynchronize(); start = std::chrono::steady_clock::now(); @@ -279,7 +278,6 @@ void eval ( } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); hipFree(d_data_vol); hipFree(d_data_col); @@ -329,5 +327,7 @@ int main(int argc, char* argv[]) dilation_t, dilation_h, dilation_w); } + if (error) return 1; + if (error) return 1; return 0; } diff --git a/src/vol2col-omp/main.cpp b/src/vol2col-omp/main.cpp index ac1060a195..546ecbafd5 100644 --- a/src/vol2col-omp/main.cpp +++ b/src/vol2col-omp/main.cpp @@ -219,7 +219,6 @@ void eval ( int error = memcmp(data_col_ref, data_col, col_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); start = std::chrono::steady_clock::now(); @@ -259,7 +258,6 @@ void eval ( } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); } free(data_vol); @@ -308,5 +306,7 @@ int main(int argc, char* argv[]) dilation_t, dilation_h, dilation_w); } + if (error) return 1; + if (error) return 1; return 0; } diff --git a/src/vol2col-sycl/main.cpp b/src/vol2col-sycl/main.cpp index 176f4523fe..4a286a0dd4 100644 --- a/src/vol2col-sycl/main.cpp +++ b/src/vol2col-sycl/main.cpp @@ -256,7 +256,6 @@ void eval ( int error = memcmp(h_data_col_ref, h_data_col, col_size_bytes); printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); start = std::chrono::steady_clock::now(); @@ -304,7 +303,6 @@ void eval ( } } printf("%s\n", error ? "FAIL" : "PASS"); - if (error) exit(1); sycl::free(d_data_vol, q); sycl::free(d_data_col, q); @@ -354,5 +352,7 @@ int main(int argc, char* argv[]) dilation_t, dilation_h, dilation_w); } + if (error) return 1; + if (error) return 1; return 0; } diff --git a/src/warpexchange-cuda/main.cu b/src/warpexchange-cuda/main.cu index 7287526ced..97756cea37 100644 --- a/src/warpexchange-cuda/main.cu +++ b/src/warpexchange-cuda/main.cu @@ -125,12 +125,12 @@ int main(int argc, char* argv[]) } stop: printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } cudaFree(d_A); cudaFree(d_out); free(A); free(out); + if (!ok) return 1; return 0; } diff --git a/src/warpexchange-hip/main.cu b/src/warpexchange-hip/main.cu index dba7907155..e1b3825e28 100644 --- a/src/warpexchange-hip/main.cu +++ b/src/warpexchange-hip/main.cu @@ -125,12 +125,12 @@ int main(int argc, char* argv[]) } stop: printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } hipFree(d_A); hipFree(d_out); free(A); free(out); + if (!ok) return 1; return 0; } diff --git a/src/warpexchange-sycl/main.cpp b/src/warpexchange-sycl/main.cpp index f126d72ffa..42978bdd0a 100644 --- a/src/warpexchange-sycl/main.cpp +++ b/src/warpexchange-sycl/main.cpp @@ -146,12 +146,12 @@ int main(int argc, char* argv[]) } stop: printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); } sycl::free(d_A, q); sycl::free(d_out, q); free(A); free(out); + if (!ok) return 1; return 0; } diff --git a/src/wedford-cuda/main.cu b/src/wedford-cuda/main.cu index 74e5b3b6b6..8c704b5e70 100644 --- a/src/wedford-cuda/main.cu +++ b/src/wedford-cuda/main.cu @@ -173,7 +173,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_input); cudaFree(d_mean); @@ -183,5 +182,6 @@ int main(int argc, char* argv[]) free(var); free(r_mean); free(r_var); + if (!ok) return 1; return 0; } diff --git a/src/wedford-hip/main.cu b/src/wedford-hip/main.cu index 5a4277ad5d..181ff8da15 100644 --- a/src/wedford-hip/main.cu +++ b/src/wedford-hip/main.cu @@ -173,7 +173,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_input); hipFree(d_mean); @@ -183,5 +182,6 @@ int main(int argc, char* argv[]) free(var); free(r_mean); free(r_var); + if (!ok) return 1; return 0; } diff --git a/src/wedford-omp/main.cpp b/src/wedford-omp/main.cpp index 0ab00b9cd5..e207fbae7a 100644 --- a/src/wedford-omp/main.cpp +++ b/src/wedford-omp/main.cpp @@ -134,12 +134,12 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(input); free(mean); free(var); free(r_mean); free(r_var); + if (!ok) return 1; return 0; } diff --git a/src/wedford-sycl/main.cpp b/src/wedford-sycl/main.cpp index 5331391802..663b0e3f89 100644 --- a/src/wedford-sycl/main.cpp +++ b/src/wedford-sycl/main.cpp @@ -203,7 +203,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_input, q); sycl::free(d_mean, q); @@ -213,5 +212,6 @@ int main(int argc, char* argv[]) free(var); free(r_mean); free(r_var); + if (!ok) return 1; return 0; } diff --git a/src/winograd-cuda/main.cu b/src/winograd-cuda/main.cu index c6b1863423..8ca457e581 100644 --- a/src/winograd-cuda/main.cu +++ b/src/winograd-cuda/main.cu @@ -179,7 +179,6 @@ int main(int argc, char* argv[]) { } // sweep printf("%s\n", pass ? "PASS" : "FAIL"); - if (!pass) exit(1); cudaFree(d_A); cudaFree(d_B); @@ -195,5 +194,6 @@ int main(int argc, char* argv[]) { printf("Ratio of co-execution time to total time: %.2lf%%\n", 100.0 * co_time / (end - start)); + if (!pass) return 1; return 0; } diff --git a/src/winograd-hip/main.cu b/src/winograd-hip/main.cu index 42d6bc4222..73ca09790e 100644 --- a/src/winograd-hip/main.cu +++ b/src/winograd-hip/main.cu @@ -179,7 +179,6 @@ int main(int argc, char* argv[]) { } // sweep printf("%s\n", pass ? "PASS" : "FAIL"); - if (!pass) exit(1); hipFree(d_A); hipFree(d_B); @@ -195,5 +194,6 @@ int main(int argc, char* argv[]) { printf("Ratio of co-execution time to total time: %.2lf%%\n", 100.0 * co_time / (end - start)); + if (!pass) return 1; return 0; } diff --git a/src/winograd-omp/main.cpp b/src/winograd-omp/main.cpp index b6ffd5f10c..80a62de41a 100644 --- a/src/winograd-omp/main.cpp +++ b/src/winograd-omp/main.cpp @@ -171,7 +171,6 @@ int main(int argc, char* argv[]) { } // #pragma printf("%s\n", pass ? "PASS" : "FAIL"); - if (!pass) exit(1); free(A); free(B); @@ -184,5 +183,6 @@ int main(int argc, char* argv[]) { printf("Ratio of co-execution time to total time: %.2lf%%\n", 100.0 * co_time / (end - start)); + if (!pass) return 1; return 0; } diff --git a/src/winograd-sycl/main.cpp b/src/winograd-sycl/main.cpp index c325960193..74e5835e87 100644 --- a/src/winograd-sycl/main.cpp +++ b/src/winograd-sycl/main.cpp @@ -179,7 +179,6 @@ int main(int argc, char* argv[]) { } // sweep printf("%s\n", pass ? "PASS" : "FAIL"); - if (!pass) exit(1); sycl::free(d_A, q); sycl::free(d_B, q); @@ -195,5 +194,6 @@ int main(int argc, char* argv[]) { printf("Ratio of co-execution time to total time: %.2lf%%\n", 100.0 * co_time / (end - start)); + if (!pass) return 1; return 0; } diff --git a/src/zerocopy-cuda/main.cu b/src/zerocopy-cuda/main.cu index 84e8821977..2bac63c626 100644 --- a/src/zerocopy-cuda/main.cu +++ b/src/zerocopy-cuda/main.cu @@ -163,7 +163,6 @@ void eval (bool warmup, bool bPinGenericMemory, const int repeat) { refNorm = (float)sqrt((double)refNorm); printf("%s\n", (errorNorm / refNorm < 1.e-6f) ? "SUCCESS" : "FAILURE"); - if (!(errorNorm / refNorm < 1.e-6f)) exit(1); } // Memory clean up @@ -210,5 +209,6 @@ int main(int argc, char **argv) { bPinGenericMemory = true; eval(true, bPinGenericMemory, repeat); eval(false, bPinGenericMemory, repeat); + if (!(errorNorm / refNorm < 1.e-6f)) return 1; return 0; } diff --git a/src/zerocopy-hip/main.cu b/src/zerocopy-hip/main.cu index ebb2ef0138..c8358c6eee 100644 --- a/src/zerocopy-hip/main.cu +++ b/src/zerocopy-hip/main.cu @@ -163,7 +163,6 @@ void eval (bool warmup, bool bPinGenericMemory, const int repeat) { refNorm = (float)sqrt((double)refNorm); printf("%s\n", (errorNorm / refNorm < 1.e-6f) ? "SUCCESS" : "FAILURE"); - if (!(errorNorm / refNorm < 1.e-6f)) exit(1); } // Memory clean up @@ -210,5 +209,6 @@ int main(int argc, char **argv) { bPinGenericMemory = true; eval(true, bPinGenericMemory, repeat); eval(false, bPinGenericMemory, repeat); + if (!(errorNorm / refNorm < 1.e-6f)) return 1; return 0; } diff --git a/src/zerocopy-sycl/main.cpp b/src/zerocopy-sycl/main.cpp index 7bccf2097b..f07ba14ea8 100644 --- a/src/zerocopy-sycl/main.cpp +++ b/src/zerocopy-sycl/main.cpp @@ -140,7 +140,6 @@ void eval(sycl::queue &q, bool warmup, bool bGenericSharedMemory, const int repe refNorm = (float)sqrt((double)refNorm); printf("%s\n", (errorNorm / refNorm < 1.e-6f) ? "SUCCESS" : "FAILURE"); - if (!(errorNorm / refNorm < 1.e-6f)) exit(1); } // Memory clean up @@ -190,5 +189,6 @@ int main(int argc, char **argv) { bGenericSharedMemory = false; eval(q, true, bGenericSharedMemory, repeat); eval(q, false, bGenericSharedMemory, repeat); + if (!(errorNorm / refNorm < 1.e-6f)) return 1; return 0; } diff --git a/src/zeropoint-cuda/main.cu b/src/zeropoint-cuda/main.cu index 6499d26907..9a6930762a 100644 --- a/src/zeropoint-cuda/main.cu +++ b/src/zeropoint-cuda/main.cu @@ -164,7 +164,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); cudaFree(d_zp); cudaFree(d_scale); @@ -178,5 +177,6 @@ int main(int argc, char* argv[]) free(min); free(max); + if (!ok) return 1; return 0; } diff --git a/src/zeropoint-hip/main.cu b/src/zeropoint-hip/main.cu index 422343fe94..3079c5bf8e 100644 --- a/src/zeropoint-hip/main.cu +++ b/src/zeropoint-hip/main.cu @@ -164,7 +164,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); hipFree(d_zp); hipFree(d_scale); @@ -178,5 +177,6 @@ int main(int argc, char* argv[]) free(min); free(max); + if (!ok) return 1; return 0; } diff --git a/src/zeropoint-omp/main.cpp b/src/zeropoint-omp/main.cpp index 916224c6f3..1fa469d262 100644 --- a/src/zeropoint-omp/main.cpp +++ b/src/zeropoint-omp/main.cpp @@ -145,7 +145,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); free(zp); free(scale); @@ -154,5 +153,6 @@ int main(int argc, char* argv[]) free(min); free(max); + if (!ok) return 1; return 0; } diff --git a/src/zeropoint-sycl/main.cpp b/src/zeropoint-sycl/main.cpp index 9048a27a15..eb97cc416c 100644 --- a/src/zeropoint-sycl/main.cpp +++ b/src/zeropoint-sycl/main.cpp @@ -173,7 +173,6 @@ int main(int argc, char* argv[]) } } printf("%s\n", ok ? "PASS" : "FAIL"); - if (!ok) exit(1); sycl::free(d_zp, q); sycl::free(d_scale, q); @@ -187,5 +186,6 @@ int main(int argc, char* argv[]) free(min); free(max); + if (!ok) return 1; return 0; } From d5bcf24662328d7f3a4204072a25afe8a823315b Mon Sep 17 00:00:00 2001 From: Paulius Velesko Date: Tue, 10 Mar 2026 16:48:35 +0200 Subject: [PATCH 3/6] Fix prefetch-hip: add missing exit(1) and remove out-of-scope testResult check The prefetch() function was missing exit(1) on failure, and main() referenced testResult which is local to prefetch/naive functions. Both functions now exit(1) on failure directly. --- src/prefetch-hip/main.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/prefetch-hip/main.cu b/src/prefetch-hip/main.cu index ce468feb25..1115a1a3f1 100644 --- a/src/prefetch-hip/main.cu +++ b/src/prefetch-hip/main.cu @@ -89,6 +89,7 @@ void prefetch (const int gpuDeviceId, const int numElements, const int repeat) bool testResult = (maxError == 0.0f); printf("%s\n", testResult ? "PASS" : "FAIL"); + if (!testResult) exit(1); } void naive (const int numElements, const int repeat) @@ -167,6 +168,5 @@ int main(int argc, char *argv[]) for (int i = 0; i < 10; i++) { naive(numElements, repeat); } - if (!testResult) return 1; return 0; } From 1f5bd2a3593b8be359723190a7cfaa663d7dc955 Mon Sep 17 00:00:00 2001 From: Paulius Velesko Date: Sat, 7 Mar 2026 09:17:32 +0200 Subject: [PATCH 4/6] Rename all executables to main across all Makefiles Standardize binary names across all benchmarks to produce an executable named 'main' instead of various custom names (AMGMk, MD5Hash, SobolQRNG, rtm8, lulesh, kernel, b+tree.out, xsbench, XSBench, streamcluster, srad, myocyte, leukocyte, kmeans, hybridsort, heartwall, MaxwellsGPU3d, etc.). Changes include: - Updated program/EXE/BIN_NAME variables in Makefiles - Changed binary target names and -o flags - Updated run targets to reference 'main' - Updated clean targets to remove 'main' - Fixed all Makefile variants (.hipcl, .hipsycl, .aomp, .nvc) --- src/amgmk-cuda/Makefile | 2 +- src/amgmk-hip/Makefile | 2 +- src/amgmk-hip/Makefile.hipcl | 2 +- src/amgmk-omp/Makefile | 2 +- src/amgmk-omp/Makefile.aomp | 2 +- src/amgmk-omp/Makefile.nvc | 2 +- src/amgmk-sycl/Makefile | 2 +- src/amgmk-sycl/Makefile.hipsycl | 2 +- src/aobench-hip/Makefile.hipcl | 2 +- src/aobench-sycl/Makefile.hipsycl | 2 +- src/atomicReduction-hip/Makefile.hipcl | 2 +- src/atomicReduction-sycl/Makefile.hipsycl | 2 +- src/axhelm-hip/Makefile.hipcl | 2 +- src/axhelm-sycl/Makefile.hipsycl | 2 +- src/b+tree-cuda/Makefile | 10 +++++----- src/b+tree-hip/Makefile | 9 ++++----- src/b+tree-hip/Makefile.hipcl | 10 +++++----- src/b+tree-omp/Makefile | 10 +++++----- src/b+tree-omp/Makefile.aomp | 10 +++++----- src/b+tree-omp/Makefile.nvc | 10 +++++----- src/b+tree-sycl/Makefile | 12 ++++++------ src/bezier-surface-hip/Makefile.hipcl | 2 +- src/bezier-surface-omp/Makefile.aomp | 2 +- src/black-scholes-hip/Makefile.hipcl | 2 +- src/ccsd-trpdrv-hip/Makefile.hipcl | 2 +- src/ced-cuda/Makefile | 2 +- src/ced-hip/Makefile.hipcl | 2 +- src/chi2-hip/Makefile | 2 +- src/clenergy-hip/Makefile.hipcl | 2 +- src/diamond-hip/Makefile.hipcl | 2 +- src/diamond-omp/Makefile.aomp | 2 +- src/diamond-omp/Makefile.nvc | 2 +- src/divergence-hip/Makefile.hipcl | 2 +- src/divergence-omp/Makefile.aomp | 2 +- src/divergence-omp/Makefile.nvc | 2 +- src/face-cuda/Makefile | 6 +++--- src/face-hip/Makefile | 6 +++--- src/face-omp/Makefile | 6 +++--- src/face-omp/Makefile.aomp | 2 +- src/face-omp/Makefile.nvc | 2 +- src/face-sycl/Makefile | 7 +++++-- src/gamma-correction-hip/Makefile.hipcl | 2 +- src/grep-hip/Makefile.hipcl | 2 +- src/grep-omp/Makefile.aomp | 2 +- src/grep-omp/Makefile.nvc | 2 +- src/haccmk-hip/Makefile.hipcl | 2 +- src/heartwall-cuda/Makefile | 10 +++++----- src/heartwall-hip/Makefile | 12 ++++++------ src/heartwall-hip/Makefile.hipcl | 10 +++++----- src/heartwall-omp/Makefile | 10 +++++----- src/heartwall-omp/Makefile.aomp | 10 +++++----- src/heartwall-omp/Makefile.nvc | 10 +++++----- src/heartwall-sycl/Makefile | 11 +++++------ src/hmm-hip/Makefile.hipcl | 2 +- src/hybridsort-cuda/Makefile | 10 +++++----- src/hybridsort-hip/Makefile.hipcl | 10 +++++----- src/hybridsort-omp/Makefile | 10 +++++----- src/hybridsort-omp/Makefile.aomp | 10 +++++----- src/hybridsort-omp/Makefile.nvc | 10 +++++----- src/hybridsort-sycl/Makefile | 10 +++++----- src/inversek2j-hip/Makefile.hipcl | 2 +- src/iso2dfd-hip/Makefile.hipcl | 2 +- src/keccaktreehash-hip/Makefile.hipcl | 2 +- src/kmeans-cuda/Makefile | 12 ++++++------ src/kmeans-hip/Makefile | 14 ++++++-------- src/kmeans-hip/Makefile.hipcl | 12 ++++++------ src/kmeans-omp/Makefile | 12 ++++++------ src/kmeans-omp/Makefile.aomp | 12 ++++++------ src/kmeans-omp/Makefile.nvc | 12 ++++++------ src/leukocyte-cuda/Makefile | 10 +++++----- src/leukocyte-hip/Makefile | 10 +++++----- src/leukocyte-hip/Makefile.hipcl | 10 +++++----- src/leukocyte-omp/Makefile | 10 +++++----- src/leukocyte-omp/Makefile.aomp | 10 +++++----- src/leukocyte-omp/Makefile.nvc | 10 +++++----- src/leukocyte-sycl/Makefile | 10 +++++----- src/logan-cuda/Makefile | 2 +- src/logan-hip/Makefile | 2 +- src/lsqt-cuda/Makefile | 13 +++++-------- src/lsqt-hip/Makefile | 13 +++++-------- src/lsqt-omp/Makefile | 10 +++++----- src/lud-hip/Makefile.hipcl | 2 +- src/lulesh-cuda/Makefile | 2 +- src/lulesh-hip/Makefile | 2 +- src/lulesh-hip/Makefile.hipcl | 2 +- src/lulesh-omp/Makefile | 2 +- src/lulesh-omp/Makefile.aomp | 2 +- src/lulesh-omp/Makefile.nvc | 2 +- src/lulesh-sycl/Makefile | 2 +- src/mandelbrot-hip/Makefile.hipcl | 2 +- src/md5hash-cuda/Makefile | 2 +- src/md5hash-hip/Makefile | 2 +- src/md5hash-hip/Makefile.hipcl | 2 +- src/md5hash-omp/Makefile | 2 +- src/md5hash-omp/Makefile.aomp | 2 +- src/md5hash-omp/Makefile.nvc | 2 +- src/md5hash-sycl/Makefile | 2 +- src/miniDGS-cuda/Makefile | 8 ++++---- src/miniDGS-cuda/README | 2 +- src/miniFE-cuda/src/make_targets | 12 ++++++------ src/miniFE-hip/src/make_targets | 12 ++++++------ src/miniFE-omp/src/make_targets | 12 ++++++------ src/miniFE-sycl/src/make_targets | 12 ++++++------ src/minimap2-cuda/Makefile | 2 +- src/minimap2-hip/Makefile | 4 ++-- src/minimap2-hip/Makefile.hipcl | 2 +- src/multimaterial-cuda/Makefile | 8 ++++---- src/multimaterial-hip/Makefile | 16 ++++------------ src/multimaterial-hip/Makefile.hipcl | 2 +- src/multimaterial-omp/Makefile | 8 ++++---- src/multimaterial-omp/Makefile.aomp | 2 +- src/multimaterial-omp/Makefile.nvc | 2 +- src/multimaterial-sycl/Makefile | 18 ++++-------------- src/myocyte-omp/Makefile | 10 +++++----- src/myocyte-omp/Makefile.aomp | 10 +++++----- src/myocyte-omp/Makefile.nvc | 14 +++++++------- src/nn-hip/Makefile.hipcl | 2 +- src/nw-hip/Makefile.hipcl | 2 +- src/nw-omp/Makefile | 2 +- src/page-rank-hip/Makefile.hipcl | 2 +- src/particle-diffusion-hip/Makefile.hipcl | 2 +- src/projectile-cuda/Makefile | 2 +- src/projectile-hip/Makefile | 2 +- src/projectile-hip/Makefile.hipcl | 2 +- src/projectile-hip/Projectile | Bin 0 -> 39328 bytes src/projectile-omp/Makefile | 2 +- src/projectile-omp/Makefile.aomp | 2 +- src/projectile-omp/Makefile.nvc | 2 +- src/qtclustering-cuda/Makefile | 2 +- src/qtclustering-hip/Makefile | 2 +- src/qtclustering-hip/Makefile.hipcl | 2 +- src/qtclustering-omp/Makefile | 2 +- src/qtclustering-omp/Makefile.aomp | 2 +- src/qtclustering-omp/Makefile.nvc | 2 +- src/rsbench-cuda/Makefile | 2 +- src/rsbench-hip/Makefile | 2 +- src/rsbench-hip/Makefile.hipcl | 2 +- src/rsbench-omp/Makefile | 2 +- src/rsbench-omp/Makefile.aomp | 2 +- src/rsbench-omp/Makefile.nvc | 2 +- src/rtm8-cuda/Makefile | 2 +- src/rtm8-hip/Makefile | 2 +- src/rtm8-hip/Makefile.hipcl | 2 +- src/rtm8-omp/Makefile | 2 +- src/rtm8-omp/Makefile.aomp | 2 +- src/rtm8-omp/Makefile.nvc | 2 +- src/s3d-hip/Makefile.hipcl | 2 +- src/sheath-hip/Makefile | 2 +- src/snicit-cuda/bin/Makefile | 2 +- src/snicit-hip/bin/Makefile | 2 +- src/snicit-sycl/bin/Makefile | 2 +- src/sobol-cuda/Makefile | 2 +- src/sobol-hip/Makefile | 2 +- src/sobol-hip/Makefile.hipcl | 2 +- src/sobol-omp/Makefile | 2 +- src/sobol-omp/Makefile.aomp | 2 +- src/sobol-omp/Makefile.nvc | 2 +- src/sph-cuda/Makefile | 2 +- src/sph-hip/Makefile | 2 +- src/sph-hip/Makefile.hipcl | 2 +- src/sph-omp/Makefile | 2 +- src/sph-omp/Makefile.aomp | 2 +- src/sph-omp/Makefile.nvc | 2 +- src/srad-cuda/Makefile | 2 +- src/srad-hip/Makefile | 4 ++-- src/srad-hip/Makefile.hipcl | 2 +- src/srad-omp/Makefile | 10 +++++----- src/srad-omp/Makefile.aomp | 10 +++++----- src/srad-omp/Makefile.nvc | 10 +++++----- src/srad-sycl/Makefile | 10 +++++----- src/stencil1d-cuda/Makefile | 2 +- src/stencil1d-hip/Makefile | 2 +- src/stencil1d-hip/Makefile.hipcl | 2 +- src/stencil1d-omp/Makefile | 2 +- src/stencil1d-omp/Makefile.aomp | 2 +- src/stencil1d-omp/Makefile.nvc | 2 +- src/streamcluster-cuda/Makefile | 2 +- src/streamcluster-hip/Makefile | 4 ++-- src/streamcluster-omp/Makefile | 2 +- src/triad-hip/Makefile.hipcl | 2 +- src/triad-omp/Makefile.aomp | 2 +- src/triad-omp/Makefile.nvc | 2 +- src/xsbench-cuda/Makefile | 2 +- src/xsbench-cuda/io.cu | 2 +- src/xsbench-hip/Makefile | 2 +- src/xsbench-hip/Makefile.hipcl | 2 +- src/xsbench-omp/Makefile | 2 +- src/xsbench-omp/Makefile.aomp | 2 +- src/xsbench-omp/Makefile.nvc | 2 +- 189 files changed, 417 insertions(+), 442 deletions(-) create mode 100755 src/projectile-hip/Projectile diff --git a/src/amgmk-cuda/Makefile b/src/amgmk-cuda/Makefile index 7de109d987..3d626218f0 100644 --- a/src/amgmk-cuda/Makefile +++ b/src/amgmk-cuda/Makefile @@ -13,7 +13,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = AMGMk +program = main source = csr_matrix.cu csr_matvec.cu hypre_error.cu hypre_memory.cu laplace.cu main.cu vector.cu diff --git a/src/amgmk-hip/Makefile b/src/amgmk-hip/Makefile index 0f0931282f..8d95b82694 100644 --- a/src/amgmk-hip/Makefile +++ b/src/amgmk-hip/Makefile @@ -12,7 +12,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = AMGMk +program = main source = csr_matrix.cu csr_matvec.cu hypre_error.cu hypre_memory.cu laplace.cu main.cu vector.cu diff --git a/src/amgmk-hip/Makefile.hipcl b/src/amgmk-hip/Makefile.hipcl index c35a0a720c..a80f7b4d47 100644 --- a/src/amgmk-hip/Makefile.hipcl +++ b/src/amgmk-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = AMGMk +program = main source = csr_matrix.cu csr_matvec.cu hypre_error.cu hypre_memory.cu laplace.cu main.cu vector.cu diff --git a/src/amgmk-omp/Makefile b/src/amgmk-omp/Makefile index 77dcb866c9..4491d99d60 100644 --- a/src/amgmk-omp/Makefile +++ b/src/amgmk-omp/Makefile @@ -13,7 +13,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = AMGMk +program = main source = csr_matrix.cpp csr_matvec.cpp hypre_error.cpp hypre_memory.cpp laplace.cpp main.cpp vector.cpp diff --git a/src/amgmk-omp/Makefile.aomp b/src/amgmk-omp/Makefile.aomp index d8eba4cf82..ca21bc3146 100644 --- a/src/amgmk-omp/Makefile.aomp +++ b/src/amgmk-omp/Makefile.aomp @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = AMGMk +program = main source = csr_matrix.cpp csr_matvec.cpp hypre_error.cpp hypre_memory.cpp laplace.cpp main.cpp vector.cpp diff --git a/src/amgmk-omp/Makefile.nvc b/src/amgmk-omp/Makefile.nvc index 7ba7b38d82..6157b2274e 100644 --- a/src/amgmk-omp/Makefile.nvc +++ b/src/amgmk-omp/Makefile.nvc @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = AMGMk +program = main source = csr_matrix.cpp csr_matvec.cpp hypre_error.cpp hypre_memory.cpp laplace.cpp main.cpp vector.cpp diff --git a/src/amgmk-sycl/Makefile b/src/amgmk-sycl/Makefile index e322a1435a..53e2aa9984 100644 --- a/src/amgmk-sycl/Makefile +++ b/src/amgmk-sycl/Makefile @@ -19,7 +19,7 @@ HIP_ARCH = gfx908 # Program name & source code list #=============================================================================== -program = AMGMk +program = main source = csr_matrix.cpp csr_matvec.cpp hypre_error.cpp \ hypre_memory.cpp laplace.cpp main.cpp vector.cpp diff --git a/src/amgmk-sycl/Makefile.hipsycl b/src/amgmk-sycl/Makefile.hipsycl index 47122134f1..e3d5f0171f 100644 --- a/src/amgmk-sycl/Makefile.hipsycl +++ b/src/amgmk-sycl/Makefile.hipsycl @@ -15,7 +15,7 @@ DEVICE = gpu # Program name & source code list #=============================================================================== -program = AMGMk +program = main source = csr_matrix.cpp csr_matvec.cpp hypre_error.cpp hypre_memory.cpp laplace.cpp main.cpp vector.cpp diff --git a/src/aobench-hip/Makefile.hipcl b/src/aobench-hip/Makefile.hipcl index 68031e5ab4..91498d8dd5 100644 --- a/src/aobench-hip/Makefile.hipcl +++ b/src/aobench-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = ao +program = main source = ao.cu diff --git a/src/aobench-sycl/Makefile.hipsycl b/src/aobench-sycl/Makefile.hipsycl index ad13cbc8cc..16b6e39b81 100644 --- a/src/aobench-sycl/Makefile.hipsycl +++ b/src/aobench-sycl/Makefile.hipsycl @@ -14,7 +14,7 @@ DEVICE = gpu # Program name & source code list #=============================================================================== -program = ao +program = main source = ao.cpp diff --git a/src/atomicReduction-hip/Makefile.hipcl b/src/atomicReduction-hip/Makefile.hipcl index cd8b0fcbb5..0e7f38b973 100644 --- a/src/atomicReduction-hip/Makefile.hipcl +++ b/src/atomicReduction-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = reduction +program = main source = reduction.cu diff --git a/src/atomicReduction-sycl/Makefile.hipsycl b/src/atomicReduction-sycl/Makefile.hipsycl index 7e73b0f167..067ca8908d 100644 --- a/src/atomicReduction-sycl/Makefile.hipsycl +++ b/src/atomicReduction-sycl/Makefile.hipsycl @@ -16,7 +16,7 @@ ROCM_DEVICE_LIB = -nogpulib \ # Program name & source code list #=============================================================================== -program = reduction +program = main source = reduction.cpp diff --git a/src/axhelm-hip/Makefile.hipcl b/src/axhelm-hip/Makefile.hipcl index 86ad5d4505..4085c1201b 100644 --- a/src/axhelm-hip/Makefile.hipcl +++ b/src/axhelm-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = axhelm +program = main #=============================================================================== # Sets Flags diff --git a/src/axhelm-sycl/Makefile.hipsycl b/src/axhelm-sycl/Makefile.hipsycl index b936e65af7..68792a5460 100644 --- a/src/axhelm-sycl/Makefile.hipsycl +++ b/src/axhelm-sycl/Makefile.hipsycl @@ -14,7 +14,7 @@ DEVICE = gpu # Program name & source code list #=============================================================================== -program = axhelm +program = main #=============================================================================== # Sets Flags diff --git a/src/b+tree-cuda/Makefile b/src/b+tree-cuda/Makefile index 6cb4eaff59..1a126ee8d0 100644 --- a/src/b+tree-cuda/Makefile +++ b/src/b+tree-cuda/Makefile @@ -32,7 +32,7 @@ ifeq ($(OPTIMIZE),yes) endif -b+tree.out: ./main.o \ +main: ./main.o \ ./kernel/kernel_wrapper.o \ ./kernel/kernel2_wrapper.o \ ./util/timer/timer.o \ @@ -42,7 +42,7 @@ b+tree.out: ./main.o \ ./kernel/kernel2_wrapper.o \ ./util/timer/timer.o \ ./util/num/num.o \ - -lm -o b+tree.out + -lm -o main @@ -69,11 +69,11 @@ main.o: ./common.h ./main.h ./main.cu ./util/num/num.o: ./common.h ./util/num/num.h ./util/num/num.c $(CC) ./util/num/num.c -c -o ./util/num/num.o -run: b+tree.out - $(LAUNCHER) ./b+tree.out file ../data/b+tree/mil.txt command ../data/b+tree/command.txt +run: main + $(LAUNCHER) ./main file ../data/b+tree/mil.txt command ../data/b+tree/command.txt clean: - rm -rf *.o *.out \ + rm -rf *.o main \ ./kernel/*.o \ ./util/timer/*.o \ ./util/num/*.o \ diff --git a/src/b+tree-hip/Makefile b/src/b+tree-hip/Makefile index 3d93dae20e..900eb9389d 100644 --- a/src/b+tree-hip/Makefile +++ b/src/b+tree-hip/Makefile @@ -31,7 +31,7 @@ ifeq ($(OPTIMIZE),yes) endif -b+tree.out: ./main.o \ +main: ./main.o \ ./kernel/kernel_wrapper.o \ ./kernel/kernel2_wrapper.o \ ./util/timer/timer.o \ @@ -41,7 +41,7 @@ b+tree.out: ./main.o \ ./kernel/kernel2_wrapper.o \ ./util/timer/timer.o \ ./util/num/num.o \ - -lm -o b+tree.out + -lm -o main @@ -90,8 +90,8 @@ main.o: ./common.h \ -c \ -o ./util/num/num.o -run: b+tree.out - $(LAUNCHER) ./b+tree.out file ../data/b+tree/mil.txt command ../data/b+tree/command.txt +run: main + $(LAUNCHER) ./main file ../data/b+tree/mil.txt command ../data/b+tree/command.txt clean: rm -rf *.o *.out \ @@ -99,4 +99,3 @@ clean: ./util/timer/*.o \ ./util/num/*.o \ output.txt - diff --git a/src/b+tree-hip/Makefile.hipcl b/src/b+tree-hip/Makefile.hipcl index 49963f2d83..0078978307 100644 --- a/src/b+tree-hip/Makefile.hipcl +++ b/src/b+tree-hip/Makefile.hipcl @@ -30,7 +30,7 @@ ifeq ($(OPTIMIZE),yes) endif -b+tree.out: ./main.o \ +main: ./main.o \ ./kernel/kernel_wrapper.o \ ./kernel/kernel2_wrapper.o \ ./util/timer/timer.o \ @@ -40,7 +40,7 @@ b+tree.out: ./main.o \ ./kernel/kernel2_wrapper.o \ ./util/timer/timer.o \ ./util/num/num.o \ - -o b+tree.out $(LDFLAGS) + -o main $(LDFLAGS) @@ -88,11 +88,11 @@ main.o: ./common.h \ -c \ -o ./util/num/num.o -run: b+tree.out - ./b+tree.out file ../data/b+tree/mil.txt command ../data/b+tree/command.txt +run: main + ./main file ../data/b+tree/mil.txt command ../data/b+tree/command.txt clean: - rm -rf *.o *.out \ + rm -rf *.o main \ ./kernel/*.o \ ./util/timer/*.o \ ./util/num/*.o \ diff --git a/src/b+tree-omp/Makefile b/src/b+tree-omp/Makefile index 11ae704df5..13b520fda1 100644 --- a/src/b+tree-omp/Makefile +++ b/src/b+tree-omp/Makefile @@ -29,7 +29,7 @@ else endif -b+tree.out: ./main.o \ +main: ./main.o \ ./kernel/kernel_wrapper.o \ ./kernel/kernel2_wrapper.o \ ./util/timer/timer.o \ @@ -40,7 +40,7 @@ b+tree.out: ./main.o \ ./util/timer/timer.o \ ./util/num/num.o \ $(LDFLAGS) \ - -o b+tree.out + -o main # ========================================================================================================================================================================================================200 # OBJECTS (COMPILE SOURCE FILES INTO OBJECTS) # ========================================================================================================================================================================================================200 @@ -97,15 +97,15 @@ main.o: ./common.h \ # END # ======================================================================================================================================================150 # -run: b+tree.out - $(LAUNCHER) ./b+tree.out file ../data/b+tree/mil.txt command ../data/b+tree/command.txt +run: main + $(LAUNCHER) ./main file ../data/b+tree/mil.txt command ../data/b+tree/command.txt # ========================================================================================================================================================================================================200 # DELETE # ========================================================================================================================================================================================================200 clean: - rm -f *.o *.out \ + rm -f *.o main \ ./kernel/*.o \ ./util/timer/*.o \ ./util/num/*.o \ diff --git a/src/b+tree-omp/Makefile.aomp b/src/b+tree-omp/Makefile.aomp index 0844350731..2643118067 100644 --- a/src/b+tree-omp/Makefile.aomp +++ b/src/b+tree-omp/Makefile.aomp @@ -33,7 +33,7 @@ else endif -b+tree.out: ./main.o \ +main: ./main.o \ ./kernel/kernel_wrapper.o \ ./kernel/kernel2_wrapper.o \ ./util/timer/timer.o \ @@ -44,7 +44,7 @@ b+tree.out: ./main.o \ ./util/timer/timer.o \ ./util/num/num.o \ $(LDFLAGS) \ - -o b+tree.out + -o main # ========================================================================================================================================================================================================200 # OBJECTS (COMPILE SOURCE FILES INTO OBJECTS) # ========================================================================================================================================================================================================200 @@ -101,15 +101,15 @@ main.o: ./common.h \ # END # ======================================================================================================================================================150 # -run: b+tree.out - $(LAUNCHER) ./b+tree.out file ../data/b+tree/mil.txt command ../data/b+tree/command.txt +run: main + $(LAUNCHER) ./main file ../data/b+tree/mil.txt command ../data/b+tree/command.txt # ========================================================================================================================================================================================================200 # DELETE # ========================================================================================================================================================================================================200 clean: - rm -f *.o *.out \ + rm -f *.o main \ ./kernel/*.o \ ./util/timer/*.o \ ./util/num/*.o \ diff --git a/src/b+tree-omp/Makefile.nvc b/src/b+tree-omp/Makefile.nvc index 32712ac647..22a25b5371 100644 --- a/src/b+tree-omp/Makefile.nvc +++ b/src/b+tree-omp/Makefile.nvc @@ -30,7 +30,7 @@ else endif -b+tree.out: ./main.o \ +main: ./main.o \ ./kernel/kernel_wrapper.o \ ./kernel/kernel2_wrapper.o \ ./util/timer/timer.o \ @@ -41,7 +41,7 @@ b+tree.out: ./main.o \ ./util/timer/timer.o \ ./util/num/num.o \ $(LDFLAGS) \ - -o b+tree.out + -o main # ========================================================================================================================================================================================================200 # OBJECTS (COMPILE SOURCE FILES INTO OBJECTS) # ========================================================================================================================================================================================================200 @@ -98,15 +98,15 @@ main.o: ./common.h \ # END # ======================================================================================================================================================150 # -run: b+tree.out - $(LAUNCHER) ./b+tree.out file ../data/b+tree/mil.txt command ../data/b+tree/command.txt +run: main + $(LAUNCHER) ./main file ../data/b+tree/mil.txt command ../data/b+tree/command.txt # ========================================================================================================================================================================================================200 # DELETE # ========================================================================================================================================================================================================200 clean: - rm -f *.o *.out \ + rm -f *.o main \ ./kernel/*.o \ ./util/timer/*.o \ ./util/num/*.o \ diff --git a/src/b+tree-sycl/Makefile b/src/b+tree-sycl/Makefile index e685959cbd..e9c43d7173 100644 --- a/src/b+tree-sycl/Makefile +++ b/src/b+tree-sycl/Makefile @@ -66,18 +66,18 @@ endif # Targets to Build #=============================================================================== -b+tree.out:./main.o \ +main: ./main.o \ ./kernel/kernel_wrapper.o \ ./kernel/kernel2_wrapper.o \ ./util/timer/timer.o \ - ./util/num/num.o + ./util/num/num.o $(CC) $(CFLAGS) ./main.o \ ./kernel/kernel_wrapper.o \ ./kernel/kernel2_wrapper.o \ ./util/timer/timer.o \ ./util/num/num.o \ $(LDFLAGS) \ - -o b+tree.out + -o main main.o: ./b+tree.h ./main.c @@ -117,11 +117,11 @@ main.o: ./b+tree.h ./main.c -o ./util/num/num.o \ -O3 -run: b+tree.out - $(LAUNCHER) ./b+tree.out file ../data/b+tree/mil.txt command ../data/b+tree/command.txt +run: main + $(LAUNCHER) ./main file ../data/b+tree/mil.txt command ../data/b+tree/command.txt clean: - rm -f *.o *.out \ + rm -f *.o main \ ./kernel/*.o \ ./util/timer/*.o \ ./util/num/*.o \ diff --git a/src/bezier-surface-hip/Makefile.hipcl b/src/bezier-surface-hip/Makefile.hipcl index 31003ad9aa..0c19382bcc 100644 --- a/src/bezier-surface-hip/Makefile.hipcl +++ b/src/bezier-surface-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = bs +program = main source = main.cu diff --git a/src/bezier-surface-omp/Makefile.aomp b/src/bezier-surface-omp/Makefile.aomp index e83ef1c7a6..2fa75f0934 100644 --- a/src/bezier-surface-omp/Makefile.aomp +++ b/src/bezier-surface-omp/Makefile.aomp @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = bs +program = main source = main.cpp diff --git a/src/black-scholes-hip/Makefile.hipcl b/src/black-scholes-hip/Makefile.hipcl index c34ce2f8c5..d9cf7604a3 100644 --- a/src/black-scholes-hip/Makefile.hipcl +++ b/src/black-scholes-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = BlackScholesEngine +program = main source = blackScholesAnalyticEngine.cu diff --git a/src/ccsd-trpdrv-hip/Makefile.hipcl b/src/ccsd-trpdrv-hip/Makefile.hipcl index 5f7a7235dd..df34da2112 100644 --- a/src/ccsd-trpdrv-hip/Makefile.hipcl +++ b/src/ccsd-trpdrv-hip/Makefile.hipcl @@ -12,7 +12,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = test +program = main source = ccsd_tengy.cu ccsd_trpdrv.cu main.cu diff --git a/src/ced-cuda/Makefile b/src/ced-cuda/Makefile index 95be7a695b..d0d662bd87 100644 --- a/src/ced-cuda/Makefile +++ b/src/ced-cuda/Makefile @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = ced +program = main source = main.cu kernel_reference.cu diff --git a/src/ced-hip/Makefile.hipcl b/src/ced-hip/Makefile.hipcl index 27f7929192..776b489434 100644 --- a/src/ced-hip/Makefile.hipcl +++ b/src/ced-hip/Makefile.hipcl @@ -12,7 +12,7 @@ OPENCV = no # Program name & source code list #=============================================================================== -program = ced +program = main source = main.cu kernel_reference.cu diff --git a/src/chi2-hip/Makefile b/src/chi2-hip/Makefile index ba1e9e0405..987a468cc9 100644 --- a/src/chi2-hip/Makefile +++ b/src/chi2-hip/Makefile @@ -12,7 +12,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = chi2 +program = main source = chi2.cu diff --git a/src/clenergy-hip/Makefile.hipcl b/src/clenergy-hip/Makefile.hipcl index cca1fe5b49..dd3ead97b2 100644 --- a/src/clenergy-hip/Makefile.hipcl +++ b/src/clenergy-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = clenergy +program = main source = clenergy.cu WKFUtils.cu diff --git a/src/diamond-hip/Makefile.hipcl b/src/diamond-hip/Makefile.hipcl index b7a35cb2cf..338dbfac0f 100644 --- a/src/diamond-hip/Makefile.hipcl +++ b/src/diamond-hip/Makefile.hipcl @@ -12,7 +12,7 @@ DMND_PATH = ../diamond-sycl # Program name & source code list #=============================================================================== -program = diamond +program = main c_src = \ $(DMND_PATH)/src/blast/sm_blosum45.c \ diff --git a/src/diamond-omp/Makefile.aomp b/src/diamond-omp/Makefile.aomp index 045be9e4a3..c6064249d4 100644 --- a/src/diamond-omp/Makefile.aomp +++ b/src/diamond-omp/Makefile.aomp @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = diamond +program = main c_src= \ $(DMND_PATH)/src/blast/sm_blosum45.c \ diff --git a/src/diamond-omp/Makefile.nvc b/src/diamond-omp/Makefile.nvc index e3aa4b50b0..69c41d5240 100644 --- a/src/diamond-omp/Makefile.nvc +++ b/src/diamond-omp/Makefile.nvc @@ -15,7 +15,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = diamond +program = main c_src= \ $(DMND_PATH)/src/blast/sm_blosum45.c \ diff --git a/src/divergence-hip/Makefile.hipcl b/src/divergence-hip/Makefile.hipcl index 98c9f478e4..09e5bf19de 100644 --- a/src/divergence-hip/Makefile.hipcl +++ b/src/divergence-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = divergence +program = main #=============================================================================== diff --git a/src/divergence-omp/Makefile.aomp b/src/divergence-omp/Makefile.aomp index 3c2a345139..87c0991567 100644 --- a/src/divergence-omp/Makefile.aomp +++ b/src/divergence-omp/Makefile.aomp @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = divergence +program = main #=============================================================================== diff --git a/src/divergence-omp/Makefile.nvc b/src/divergence-omp/Makefile.nvc index c190c09898..333f42280f 100644 --- a/src/divergence-omp/Makefile.nvc +++ b/src/divergence-omp/Makefile.nvc @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = divergence +program = main #=============================================================================== diff --git a/src/face-cuda/Makefile b/src/face-cuda/Makefile index 84051da283..8bba86dec4 100644 --- a/src/face-cuda/Makefile +++ b/src/face-cuda/Makefile @@ -13,7 +13,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = vj-cpu vj-gpu +program = main vj-cpu #=============================================================================== # Sets Flags @@ -64,7 +64,7 @@ rectangles.o: rectangles.cu $(HEADERS) vj-cpu: main.o haar-cpu.o image.o stdio-wrapper.o rectangles.o $(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS) -vj-gpu: main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o +main: main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o $(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS) clean: @@ -72,4 +72,4 @@ clean: run: build $(LAUNCHER) ./vj-cpu Face.pgm info.txt class.txt Output-cpu.pgm - $(LAUNCHER) ./vj-gpu Face.pgm info.txt class.txt Output-gpu.pgm + $(LAUNCHER) ./main Face.pgm info.txt class.txt Output-gpu.pgm diff --git a/src/face-hip/Makefile b/src/face-hip/Makefile index 53562629d7..a6c8a1df91 100644 --- a/src/face-hip/Makefile +++ b/src/face-hip/Makefile @@ -12,7 +12,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = vj-cpu vj-gpu +program = main vj-cpu #=============================================================================== # Sets Flags @@ -63,7 +63,7 @@ rectangles.o: ../face-cuda/rectangles.cu $(HEADERS) vj-cpu: main.o haar-cpu.o image.o stdio-wrapper.o rectangles.o $(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS) -vj-gpu: main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o +main: main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o $(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS) clean: @@ -71,4 +71,4 @@ clean: run: build $(LAUNCHER) ./vj-cpu ../face-cuda/Face.pgm ../face-cuda/info.txt ../face-cuda/class.txt Output-cpu.pgm - $(LAUNCHER) ./vj-gpu ../face-cuda/Face.pgm ../face-cuda/info.txt ../face-cuda/class.txt Output-gpu.pgm + $(LAUNCHER) ./main ../face-cuda/Face.pgm ../face-cuda/info.txt ../face-cuda/class.txt Output-gpu.pgm diff --git a/src/face-omp/Makefile b/src/face-omp/Makefile index fa5821f2c4..a85b2f9efc 100644 --- a/src/face-omp/Makefile +++ b/src/face-omp/Makefile @@ -12,7 +12,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = vj-cpu vj-gpu +program = main vj-cpu #=============================================================================== # Sets Flags @@ -64,7 +64,7 @@ rectangles.o: ../face-sycl/rectangles.cpp $(HEADERS) vj-cpu: main.o haar-cpu.o image.o stdio-wrapper.o rectangles.o $(CC) $(CFLAGS) -o $@ $+ -vj-gpu: main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o +main: main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o $(CC) $(CFLAGS) $(OMP_TARGET_FLAGS) -o $@ $+ clean: @@ -72,4 +72,4 @@ clean: run: build $(LAUNCHER) ./vj-cpu ../face-cuda/Face.pgm ../face-cuda/info.txt ../face-cuda/class.txt Output-cpu.pgm - $(LAUNCHER) ./vj-gpu ../face-cuda/Face.pgm ../face-cuda/info.txt ../face-cuda/class.txt Output-gpu.pgm + $(LAUNCHER) ./main ../face-cuda/Face.pgm ../face-cuda/info.txt ../face-cuda/class.txt Output-gpu.pgm diff --git a/src/face-omp/Makefile.aomp b/src/face-omp/Makefile.aomp index bd07e2bc45..f6042a55d1 100644 --- a/src/face-omp/Makefile.aomp +++ b/src/face-omp/Makefile.aomp @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = vj-cpu vj-gpu +program = main #=============================================================================== # Sets Flags diff --git a/src/face-omp/Makefile.nvc b/src/face-omp/Makefile.nvc index 25d6ec9049..79ff618242 100644 --- a/src/face-omp/Makefile.nvc +++ b/src/face-omp/Makefile.nvc @@ -13,7 +13,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = vj-cpu vj-gpu +program = main #=============================================================================== # Sets Flags diff --git a/src/face-sycl/Makefile b/src/face-sycl/Makefile index 884fcd5f99..5d63146e90 100644 --- a/src/face-sycl/Makefile +++ b/src/face-sycl/Makefile @@ -19,7 +19,7 @@ HIP_ARCH = gfx908 # Program name & source code list #=============================================================================== -program = vj-cpu vj-gpu +program = main source = main.cpp @@ -98,8 +98,11 @@ vj-cpu: main.o haar-cpu.o image.o stdio-wrapper.o rectangles.o vj-gpu: main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o $(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS) +$(program): main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o + $(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS) + clean: - rm -f $(program) *.o Output-cpu.pgm Output-gpu.pgm + rm -f $(program) vj-cpu vj-gpu *.o Output-cpu.pgm Output-gpu.pgm run: build $(LAUNCHER) ./vj-cpu ../face-cuda/Face.pgm ../face-cuda/info.txt ../face-cuda/class.txt Output-cpu.pgm diff --git a/src/gamma-correction-hip/Makefile.hipcl b/src/gamma-correction-hip/Makefile.hipcl index b0d118f14c..536e103f67 100644 --- a/src/gamma-correction-hip/Makefile.hipcl +++ b/src/gamma-correction-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = gamma-correction +program = main source = main.cu diff --git a/src/grep-hip/Makefile.hipcl b/src/grep-hip/Makefile.hipcl index 7cce763dd4..4edffaa7d8 100644 --- a/src/grep-hip/Makefile.hipcl +++ b/src/grep-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = nfa +program = main source = main.cu nfautil.cu regex.cu diff --git a/src/grep-omp/Makefile.aomp b/src/grep-omp/Makefile.aomp index f0ee1e5f71..06e0b07219 100644 --- a/src/grep-omp/Makefile.aomp +++ b/src/grep-omp/Makefile.aomp @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = nfa +program = main source = main.cpp nfautil.cpp regex.cpp diff --git a/src/grep-omp/Makefile.nvc b/src/grep-omp/Makefile.nvc index 2a7b35b7e9..1b644d4201 100644 --- a/src/grep-omp/Makefile.nvc +++ b/src/grep-omp/Makefile.nvc @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = nfa +program = main source = main.cpp nfautil.cpp regex.cpp diff --git a/src/haccmk-hip/Makefile.hipcl b/src/haccmk-hip/Makefile.hipcl index d6baf4b8cb..1713d84e3c 100644 --- a/src/haccmk-hip/Makefile.hipcl +++ b/src/haccmk-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = haccmk +program = main source = haccmk.cu diff --git a/src/heartwall-cuda/Makefile b/src/heartwall-cuda/Makefile index 188208a968..33722e1638 100644 --- a/src/heartwall-cuda/Makefile +++ b/src/heartwall-cuda/Makefile @@ -28,7 +28,7 @@ ifeq ($(OPTIMIZE),yes) endif -heartwall: ./main.o \ +main: ./main.o \ ./kernel/kernel.o \ ./util/avi/avilib.o \ ./util/avi/avimod.o \ @@ -40,7 +40,7 @@ heartwall: ./main.o \ ./util/avi/avimod.o \ ./util/file/file.o \ ./util/timer/timer.o \ - $(LDFLAGS) -o heartwall + $(LDFLAGS) -o main # ======================================================================================================================================================150 # MAIN FUNCTION @@ -96,11 +96,11 @@ heartwall: ./main.o \ -c \ -o ./util/timer/timer.o -run: heartwall - $(LAUNCHER) ./heartwall 104 +run: main + $(LAUNCHER) ./main 104 clean: - rm -rf *.o heartwall \ + rm -rf *.o main \ ./kernel/*.o \ ./util/avi/*.o \ ./util/file/*.o \ diff --git a/src/heartwall-hip/Makefile b/src/heartwall-hip/Makefile index e2bdd80c34..76bb29fa3b 100644 --- a/src/heartwall-hip/Makefile +++ b/src/heartwall-hip/Makefile @@ -27,7 +27,7 @@ ifeq ($(OPTIMIZE),yes) endif -heartwall: ./main.o \ +main: ./main.o \ ./kernel/kernel.o \ ./util/avi/avilib.o \ ./util/avi/avimod.o \ @@ -39,7 +39,7 @@ heartwall: ./main.o \ ./util/avi/avimod.o \ ./util/file/file.o \ ./util/timer/timer.o \ - $(LDFLAGS) -o heartwall + $(LDFLAGS) -o main # ======================================================================================================================================================150 # MAIN FUNCTION @@ -95,12 +95,12 @@ heartwall: ./main.o \ -c \ -o ./util/timer/timer.o -run: heartwall - $(LAUNCHER) ./heartwall 104 +run: main + $(LAUNCHER) ./main 104 clean: - rm -rf *.o heartwall \ + rm -rf *.o main \ ./kernel/*.o \ ./util/avi/*.o \ ./util/file/*.o \ - ./util/timer/*.o + ./util/timer/*.o diff --git a/src/heartwall-hip/Makefile.hipcl b/src/heartwall-hip/Makefile.hipcl index 3649444ae4..ccaaf58f01 100644 --- a/src/heartwall-hip/Makefile.hipcl +++ b/src/heartwall-hip/Makefile.hipcl @@ -26,7 +26,7 @@ ifeq ($(OPTIMIZE),yes) endif -heartwall: ./main.o \ +main: ./main.o \ ./kernel/kernel.o \ ./util/avi/avilib.o \ ./util/avi/avimod.o \ @@ -38,7 +38,7 @@ heartwall: ./main.o \ ./util/avi/avimod.o \ ./util/file/file.o \ ./util/timer/timer.o \ - -o heartwall $(LDFLAGS) + -o main $(LDFLAGS) # ======================================================================================================================================================150 # MAIN FUNCTION @@ -94,11 +94,11 @@ heartwall: ./main.o \ -c \ -o ./util/timer/timer.o -run: heartwall - ./heartwall 104 +run: main + ./main 104 clean: - rm -rf *.o heartwall \ + rm -rf *.o main \ ./kernel/*.o \ ./util/avi/*.o \ ./util/file/*.o \ diff --git a/src/heartwall-omp/Makefile b/src/heartwall-omp/Makefile index a6093e4a8a..c76fd93feb 100644 --- a/src/heartwall-omp/Makefile +++ b/src/heartwall-omp/Makefile @@ -36,7 +36,7 @@ endif -heartwall: ./main.o \ +main: ./main.o \ ./kernel/kernel.o \ ./util/avi/avilib.o \ ./util/avi/avimod.o \ @@ -48,7 +48,7 @@ heartwall: ./main.o \ ./util/avi/avimod.o \ ./util/file/file.o \ ./util/timer/timer.o \ - $(LDFLAGS) -o heartwall + $(LDFLAGS) -o main # ======================================================================================================================================================150 # MAIN FUNCTION @@ -103,11 +103,11 @@ heartwall: ./main.o \ -c \ -o ./util/timer/timer.o -run: heartwall - $(LAUNCHER) ./heartwall 104 +run: main + $(LAUNCHER) ./main 104 clean: - rm -rf *.o heartwall \ + rm -rf *.o main \ ./kernel/*.o \ ./util/avi/*.o \ ./util/file/*.o \ diff --git a/src/heartwall-omp/Makefile.aomp b/src/heartwall-omp/Makefile.aomp index b9b58444e9..c07591f365 100644 --- a/src/heartwall-omp/Makefile.aomp +++ b/src/heartwall-omp/Makefile.aomp @@ -40,7 +40,7 @@ endif -heartwall: ./main.o \ +main: ./main.o \ ./kernel/kernel.o \ ./util/avi/avilib.o \ ./util/avi/avimod.o \ @@ -52,7 +52,7 @@ heartwall: ./main.o \ ./util/avi/avimod.o \ ./util/file/file.o \ ./util/timer/timer.o \ - $(LDFLAGS) -o heartwall + $(LDFLAGS) -o main # ======================================================================================================================================================150 # MAIN FUNCTION @@ -107,11 +107,11 @@ heartwall: ./main.o \ -c \ -o ./util/timer/timer.o -run: heartwall - $(LAUNCHER) ./heartwall 104 +run: main + $(LAUNCHER) ./main 104 clean: - rm -rf *.o heartwall \ + rm -rf *.o main \ ./kernel/*.o \ ./util/avi/*.o \ ./util/file/*.o \ diff --git a/src/heartwall-omp/Makefile.nvc b/src/heartwall-omp/Makefile.nvc index 32e73b204b..28c393014b 100644 --- a/src/heartwall-omp/Makefile.nvc +++ b/src/heartwall-omp/Makefile.nvc @@ -35,7 +35,7 @@ endif -heartwall: ./main.o \ +main: ./main.o \ ./kernel/kernel.o \ ./util/avi/avilib.o \ ./util/avi/avimod.o \ @@ -47,7 +47,7 @@ heartwall: ./main.o \ ./util/avi/avimod.o \ ./util/file/file.o \ ./util/timer/timer.o \ - $(LDFLAGS) -o heartwall + $(LDFLAGS) -o main # ======================================================================================================================================================150 # MAIN FUNCTION @@ -102,11 +102,11 @@ heartwall: ./main.o \ -c \ -o ./util/timer/timer.o -run: heartwall - $(LAUNCHER) ./heartwall 104 +run: main + $(LAUNCHER) ./main 104 clean: - rm -rf *.o heartwall \ + rm -rf *.o main \ ./kernel/*.o \ ./util/avi/*.o \ ./util/file/*.o \ diff --git a/src/heartwall-sycl/Makefile b/src/heartwall-sycl/Makefile index cc427dc773..dda948d6d0 100644 --- a/src/heartwall-sycl/Makefile +++ b/src/heartwall-sycl/Makefile @@ -75,7 +75,7 @@ endif # Targets to Build #=============================================================================== -heartwall:./main.o \ +main: ./main.o \ ./kernel/kernel.o \ ./util/avi/avilib.o \ ./util/avi/avimod.o \ @@ -87,7 +87,7 @@ heartwall:./main.o \ ./util/avi/avimod.o \ ./util/file/file.o \ ./util/timer/timer.o \ - $(LDFLAGS) -o heartwall + $(LDFLAGS) -o main # ======================================================================================================================================================150 # MAIN FUNCTION @@ -131,12 +131,11 @@ heartwall:./main.o \ -o ./util/timer/timer.o clean: - rm -rf *.o heartwall \ + rm -rf *.o main \ ./kernel/*.o \ ./util/avi/*.o \ ./util/file/*.o \ ./util/timer/*.o -run: heartwall - $(LAUNCHER) ./heartwall 104 - +run: main + $(LAUNCHER) ./main 104 diff --git a/src/hmm-hip/Makefile.hipcl b/src/hmm-hip/Makefile.hipcl index b25d2f0bd2..1362302079 100644 --- a/src/hmm-hip/Makefile.hipcl +++ b/src/hmm-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = hmm +program = main source = HiddenMarkovModel.cu ViterbiCPU.cu ViterbiGPU.cu diff --git a/src/hybridsort-cuda/Makefile b/src/hybridsort-cuda/Makefile index 97871b4220..aee79b60a0 100644 --- a/src/hybridsort-cuda/Makefile +++ b/src/hybridsort-cuda/Makefile @@ -30,8 +30,8 @@ ifdef TIMER override TIMER = -DTIMER endif -hybridsort: hybridsort.o bucketsort.o mergesort.o - $(CC) $(CFLAGS) -o hybridsort $(VERIFY) $(OUTPUT) $(TIMER) \ +main: hybridsort.o bucketsort.o mergesort.o + $(CC) $(CFLAGS) -o main $(VERIFY) $(OUTPUT) $(TIMER) \ hybridsort.o bucketsort.o mergesort.o $(LDFLAGS) hybridsort.o: hybridsort.cu bucketsort.h mergesort.h @@ -47,8 +47,8 @@ bucketsort.o: bucketsort.cu \ mergesort.o: mergesort.cu mergesort.h kernel_mergeSortPass.h $(CC) $(CFLAGS) -o mergesort.o -c mergesort.cu -run: hybridsort - $(LAUNCHER) ./hybridsort r +run: main + $(LAUNCHER) ./main r clean: - rm -f *.o hybridsort + rm -f *.o main diff --git a/src/hybridsort-hip/Makefile.hipcl b/src/hybridsort-hip/Makefile.hipcl index 4e19c95b89..bd6eac9a49 100644 --- a/src/hybridsort-hip/Makefile.hipcl +++ b/src/hybridsort-hip/Makefile.hipcl @@ -27,8 +27,8 @@ ifdef TIMER override TIMER = -DTIMER endif -hybridsort: hybridsort.o bucketsort.o mergesort.o - $(CC) -o hybridsort $(VERIFY) $(OUTPUT) $(TIMER) \ +main: hybridsort.o bucketsort.o mergesort.o + $(CC) -o main $(VERIFY) $(OUTPUT) $(TIMER) \ hybridsort.o bucketsort.o mergesort.o $(LDFLAGS) hybridsort.o: hybridsort.cu bucketsort.h mergesort.h @@ -44,8 +44,8 @@ bucketsort.o: bucketsort.cu \ mergesort.o: mergesort.cu mergesort.h kernel_mergeSortPass.h $(CC) $(CFLAGS) -o mergesort.o -c mergesort.cu -run: hybridsort - ./hybridsort r +run: main + ./main r clean: - rm -f *.o hybridsort + rm -f *.o main diff --git a/src/hybridsort-omp/Makefile b/src/hybridsort-omp/Makefile index 2281538957..8b79d2a13a 100644 --- a/src/hybridsort-omp/Makefile +++ b/src/hybridsort-omp/Makefile @@ -41,8 +41,8 @@ ifdef TIMER override TIMER = -DTIMER endif -hybridsort: hybridsort.o bucketsort.o mergesort.o - $(CC) $(CFLAGS) -o hybridsort $(VERIFY) $(OUTPUT) $(TIMER) \ +main: hybridsort.o bucketsort.o mergesort.o + $(CC) $(CFLAGS) -o main $(VERIFY) $(OUTPUT) $(TIMER) \ hybridsort.o \ bucketsort.o \ mergesort.o \ @@ -61,8 +61,8 @@ bucketsort.o: bucketsort.c \ mergesort.o: mergesort.c mergesort.h kernel_mergeSortPass.h $(CC) $(CFLAGS) -o mergesort.o -c mergesort.c -run: hybridsort - $(LAUNCHER) ./hybridsort r +run: main + $(LAUNCHER) ./main r clean: - rm -f *.o hybridsort + rm -f *.o main diff --git a/src/hybridsort-omp/Makefile.aomp b/src/hybridsort-omp/Makefile.aomp index a30c912ab7..7f8aea55ab 100644 --- a/src/hybridsort-omp/Makefile.aomp +++ b/src/hybridsort-omp/Makefile.aomp @@ -44,8 +44,8 @@ ifdef TIMER override TIMER = -DTIMER endif -hybridsort: hybridsort.o bucketsort.o mergesort.o - $(CC) $(CFLAGS) -o hybridsort $(VERIFY) $(OUTPUT) $(TIMER) \ +main: hybridsort.o bucketsort.o mergesort.o + $(CC) $(CFLAGS) -o main $(VERIFY) $(OUTPUT) $(TIMER) \ hybridsort.o \ bucketsort.o \ mergesort.o \ @@ -64,8 +64,8 @@ bucketsort.o: bucketsort.c \ mergesort.o: mergesort.c mergesort.h kernel_mergeSortPass.h $(CC) $(CFLAGS) -o mergesort.o -c mergesort.c -run: hybridsort - $(LAUNCHER) ./hybridsort r +run: main + $(LAUNCHER) ./main r clean: - rm -f *.o hybridsort + rm -f *.o main diff --git a/src/hybridsort-omp/Makefile.nvc b/src/hybridsort-omp/Makefile.nvc index 15250cdab1..4419be9b7f 100644 --- a/src/hybridsort-omp/Makefile.nvc +++ b/src/hybridsort-omp/Makefile.nvc @@ -41,8 +41,8 @@ ifdef TIMER override TIMER = -DTIMER endif -hybridsort: hybridsort.o bucketsort.o mergesort.o - $(CC) $(CFLAGS) -o hybridsort $(VERIFY) $(OUTPUT) $(TIMER) \ +main: hybridsort.o bucketsort.o mergesort.o + $(CC) $(CFLAGS) -o main $(VERIFY) $(OUTPUT) $(TIMER) \ hybridsort.o \ bucketsort.o \ mergesort.o \ @@ -61,8 +61,8 @@ bucketsort.o: bucketsort.c \ mergesort.o: mergesort.c mergesort.h kernel_mergeSortPass.h $(CC) $(CFLAGS) -o mergesort.o -c mergesort.c -run: hybridsort - $(LAUNCHER) ./hybridsort r +run: main + $(LAUNCHER) ./main r clean: - rm -f *.o hybridsort + rm -f *.o main diff --git a/src/hybridsort-sycl/Makefile b/src/hybridsort-sycl/Makefile index 2f4e13a597..9f86c9f41f 100644 --- a/src/hybridsort-sycl/Makefile +++ b/src/hybridsort-sycl/Makefile @@ -78,8 +78,8 @@ endif # Targets to Build #=============================================================================== -hybridsort: hybridsort.o bucketsort.o mergesort.o - $(CC) $(CFLAGS) -o hybridsort $(VERIFY) $(OUTPUT) $(TIMER) \ +main: hybridsort.o bucketsort.o mergesort.o + $(CC) $(CFLAGS) -o main $(VERIFY) $(OUTPUT) $(TIMER) \ hybridsort.o bucketsort.o mergesort.o $(LDFLAGS) hybridsort.o : hybridsort.c mergesort.h bucketsort.h @@ -95,8 +95,8 @@ bucketsort.o: bucketsort.c \ mergesort.o: mergesort.c mergesort.h kernel_mergeSortPass.sycl $(CC) $(CFLAGS) -o mergesort.o -c mergesort.c -run: hybridsort - $(LAUNCHER) ./hybridsort r +run: main + $(LAUNCHER) ./main r clean: - rm -f *.o hybridsort + rm -f *.o main diff --git a/src/inversek2j-hip/Makefile.hipcl b/src/inversek2j-hip/Makefile.hipcl index 48aee0136d..b70cdbad17 100644 --- a/src/inversek2j-hip/Makefile.hipcl +++ b/src/inversek2j-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = invkin +program = main source = main.cu diff --git a/src/iso2dfd-hip/Makefile.hipcl b/src/iso2dfd-hip/Makefile.hipcl index 83f3eaeef4..80098386b0 100644 --- a/src/iso2dfd-hip/Makefile.hipcl +++ b/src/iso2dfd-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = iso2dfd +program = main source = iso2dfd.cu diff --git a/src/keccaktreehash-hip/Makefile.hipcl b/src/keccaktreehash-hip/Makefile.hipcl index df89686e2c..440f5462a4 100644 --- a/src/keccaktreehash-hip/Makefile.hipcl +++ b/src/keccaktreehash-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = keccektree +program = main source = KeccakF.cu KeccakTreeCPU.cu KeccakTreeGPU.cu Test.cu main.cu diff --git a/src/kmeans-cuda/Makefile b/src/kmeans-cuda/Makefile index 47df41eb6d..d0ab486b8b 100644 --- a/src/kmeans-cuda/Makefile +++ b/src/kmeans-cuda/Makefile @@ -18,10 +18,10 @@ ifeq ($(OPTIMIZE),yes) CFLAGS += -O3 endif -all: kmeans +all: main -kmeans: cluster.o getopt.o read_input.o rmse.o kmeans.cpp - $(CC) $(KERNEL_DIM) $(CFLAGS) $^ -o kmeans $(LDFLAGS) +main: cluster.o getopt.o read_input.o rmse.o kmeans.cpp + $(CC) $(KERNEL_DIM) $(CFLAGS) $^ -o main $(LDFLAGS) %.o: %.cpp $(CC) $(CFLAGS) $< -c @@ -36,9 +36,9 @@ read_input.o: read_input.cpp kmeans.h rmse.o: rmse.cpp kmeans.h clean: - rm -f *.o *~ kmeans *.linkinfo + rm -f *.o *~ main *.linkinfo -run: kmeans - $(LAUNCHER) ./kmeans -r -n 5 -m 15 -l 10 -o -i ../data/kmeans/kdd_cup +run: main + $(LAUNCHER) ./main -r -n 5 -m 15 -l 10 -o -i ../data/kmeans/kdd_cup diff --git a/src/kmeans-hip/Makefile b/src/kmeans-hip/Makefile index b165cf7988..535503246c 100644 --- a/src/kmeans-hip/Makefile +++ b/src/kmeans-hip/Makefile @@ -17,10 +17,10 @@ ifeq ($(OPTIMIZE),yes) CFLAGS += -O3 endif -all: kmeans +all: main -kmeans: cluster.o getopt.o read_input.o rmse.o kmeans.cpp - $(CC) $(KERNEL_DIM) $(CFLAGS) $^ -o kmeans $(LDFLAGS) +main: cluster.o getopt.o read_input.o rmse.o kmeans.cpp + $(CC) $(KERNEL_DIM) $(CFLAGS) $^ -o main $(LDFLAGS) %.o: %.cpp $(CC) $(CFLAGS) $< -c @@ -35,9 +35,7 @@ read_input.o: read_input.cpp kmeans.h rmse.o: rmse.cpp kmeans.h clean: - rm -f *.o *~ kmeans *.linkinfo - -run: kmeans - $(LAUNCHER) ./kmeans -r -n 5 -m 15 -l 10 -o -i ../data/kmeans/kdd_cup - + rm -f *.o *~ main *.linkinfo +run: main + $(LAUNCHER) ./main -r -n 5 -m 15 -l 10 -o -i ../data/kmeans/kdd_cup diff --git a/src/kmeans-hip/Makefile.hipcl b/src/kmeans-hip/Makefile.hipcl index 50864024aa..1ff403bfde 100644 --- a/src/kmeans-hip/Makefile.hipcl +++ b/src/kmeans-hip/Makefile.hipcl @@ -17,10 +17,10 @@ ifeq ($(OPTIMIZE),yes) CFLAGS += -O3 endif -all: kmeans +all: main -kmeans: cluster.o getopt.o read_input.o rmse.o kmeans.cpp - $(CC) $(KERNEL_DIM) $^ -o kmeans $(LDFLAGS) +main: cluster.o getopt.o read_input.o rmse.o kmeans.cpp + $(CC) $(KERNEL_DIM) $^ -o main $(LDFLAGS) %.o: %.cpp $(CC) $(CFLAGS) $< -c @@ -35,9 +35,9 @@ read_input.o: read_input.cpp kmeans.h rmse.o: rmse.cpp kmeans.h clean: - rm -f *.o *~ kmeans *.linkinfo + rm -f *.o *~ main *.linkinfo -run: kmeans - ./kmeans -r -n 5 -m 15 -l 10 -o -i ../data/kmeans/kdd_cup +run: main + ./main -r -n 5 -m 15 -l 10 -o -i ../data/kmeans/kdd_cup diff --git a/src/kmeans-omp/Makefile b/src/kmeans-omp/Makefile index dc69b7df1c..f52607a314 100644 --- a/src/kmeans-omp/Makefile +++ b/src/kmeans-omp/Makefile @@ -33,10 +33,10 @@ else CFLAGS +=-qopenmp endif -all: kmeans +all: main -kmeans: cluster.o getopt.o read_input.o rmse.o kmeans.c - $(CC) $(KERNEL_DIM) $(CFLAGS) $^ -o kmeans $(LDFLAGS) +main: cluster.o getopt.o read_input.o rmse.o kmeans.c + $(CC) $(KERNEL_DIM) $(CFLAGS) $^ -o main $(LDFLAGS) %.o: %.c $(CC) $(CFLAGS) $< -c @@ -52,9 +52,9 @@ read_input.o: read_input.c kmeans.h rmse.o: rmse.c kmeans.h clean: - rm -f *.o *~ kmeans *.linkinfo + rm -f *.o *~ main *.linkinfo -run: kmeans - $(LAUNCHER) ./kmeans -r -n 5 -m 15 -l 10 -o -i ../data/kmeans/kdd_cup +run: main + $(LAUNCHER) ./main -r -n 5 -m 15 -l 10 -o -i ../data/kmeans/kdd_cup diff --git a/src/kmeans-omp/Makefile.aomp b/src/kmeans-omp/Makefile.aomp index 591488536a..7ca2cf5eb3 100644 --- a/src/kmeans-omp/Makefile.aomp +++ b/src/kmeans-omp/Makefile.aomp @@ -37,10 +37,10 @@ else CFLAGS +=-fopenmp endif -all: kmeans +all: main -kmeans: cluster.o getopt.o read_input.o rmse.o kmeans.c - $(CC) $(KERNEL_DIM) $(CFLAGS) $^ -o kmeans $(LDFLAGS) +main: cluster.o getopt.o read_input.o rmse.o kmeans.c + $(CC) $(KERNEL_DIM) $(CFLAGS) $^ -o main $(LDFLAGS) %.o: %.c $(CC) $(CFLAGS) $< -c @@ -56,9 +56,9 @@ read_input.o: read_input.c kmeans.h rmse.o: rmse.c kmeans.h clean: - rm -f *.o *~ kmeans *.linkinfo + rm -f *.o *~ main *.linkinfo -run: kmeans - $(LAUNCHER) ./kmeans -r -n 5 -m 15 -l 10 -o -i ../data/kmeans/kdd_cup +run: main + $(LAUNCHER) ./main -r -n 5 -m 15 -l 10 -o -i ../data/kmeans/kdd_cup diff --git a/src/kmeans-omp/Makefile.nvc b/src/kmeans-omp/Makefile.nvc index b7ae166337..ccae3ad18a 100644 --- a/src/kmeans-omp/Makefile.nvc +++ b/src/kmeans-omp/Makefile.nvc @@ -34,10 +34,10 @@ else CFLAGS +=-qopenmp endif -all: kmeans +all: main -kmeans: cluster.o getopt.o read_input.o rmse.o kmeans.c - $(CC) $(KERNEL_DIM) $(CFLAGS) $^ -o kmeans $(LDFLAGS) +main: cluster.o getopt.o read_input.o rmse.o kmeans.c + $(CC) $(KERNEL_DIM) $(CFLAGS) $^ -o main $(LDFLAGS) %.o: %.c $(CC) $(CFLAGS) $< -c @@ -53,9 +53,9 @@ read_input.o: read_input.c kmeans.h rmse.o: rmse.c kmeans.h clean: - rm -f *.o *~ kmeans *.linkinfo + rm -f *.o *~ main *.linkinfo -run: kmeans - $(LAUNCHER) ./kmeans -r -n 5 -m 15 -l 10 -o -i ../data/kmeans/kdd_cup +run: main + $(LAUNCHER) ./main -r -n 5 -m 15 -l 10 -o -i ../data/kmeans/kdd_cup diff --git a/src/leukocyte-cuda/Makefile b/src/leukocyte-cuda/Makefile index 66fbab82a3..a19a6502c9 100644 --- a/src/leukocyte-cuda/Makefile +++ b/src/leukocyte-cuda/Makefile @@ -29,7 +29,7 @@ ifeq ($(OPTIMIZE),yes) CFLAGS += -O3 endif -leukocyte: detect_main.o \ +main: detect_main.o \ avilib.o \ track_ellipse.o \ track_ellipse_gpu.o \ @@ -37,7 +37,7 @@ leukocyte: detect_main.o \ misc_math.o \ helper.o \ $(MATRIX_DIR)/meschach.a - $(CC) -o leukocyte avilib.o \ + $(CC) -o main avilib.o \ track_ellipse.o \ track_ellipse_gpu.o \ find_ellipse.o \ @@ -64,9 +64,9 @@ track_ellipse_gpu.o: track_ellipse_gpu.c track_ellipse.h kernel_IMGVF.h $(MATRIX_DIR)/meschach.a: cd $(MATRIX_DIR); make cleanup; make all CC=$(CC); make clean -run: leukocyte - $(LAUNCHER) ./leukocyte ../data/leukocyte/testfile.avi 100 +run: main + $(LAUNCHER) ./main ../data/leukocyte/testfile.avi 100 clean: - rm -f *.o *~ leukocyte + rm -f *.o *~ main cd $(MATRIX_DIR); make cleanup diff --git a/src/leukocyte-hip/Makefile b/src/leukocyte-hip/Makefile index 9811ccb015..fa8bd27d50 100644 --- a/src/leukocyte-hip/Makefile +++ b/src/leukocyte-hip/Makefile @@ -28,7 +28,7 @@ ifeq ($(OPTIMIZE),yes) CFLAGS += -O3 endif -leukocyte: detect_main.o \ +main: detect_main.o \ avilib.o \ track_ellipse.o \ track_ellipse_gpu.o \ @@ -36,7 +36,7 @@ leukocyte: detect_main.o \ misc_math.o \ helper.o \ $(MATRIX_DIR)/meschach.a - $(CC) -o leukocyte avilib.o \ + $(CC) -o main avilib.o \ track_ellipse.o \ track_ellipse_gpu.o \ find_ellipse.o \ @@ -63,9 +63,9 @@ track_ellipse_gpu.o: track_ellipse_gpu.c track_ellipse.h kernel_IMGVF.h $(MATRIX_DIR)/meschach.a: cd $(MATRIX_DIR); make cleanup; make all CC=$(CC); make clean -run: leukocyte - $(LAUNCHER) ./leukocyte ../data/leukocyte/testfile.avi 100 +run: main + $(LAUNCHER) ./main ../data/leukocyte/testfile.avi 100 clean: - rm -f *.o *~ leukocyte + rm -f *.o *~ main cd $(MATRIX_DIR); make cleanup diff --git a/src/leukocyte-hip/Makefile.hipcl b/src/leukocyte-hip/Makefile.hipcl index 79653640de..b36fe8595f 100644 --- a/src/leukocyte-hip/Makefile.hipcl +++ b/src/leukocyte-hip/Makefile.hipcl @@ -27,7 +27,7 @@ ifeq ($(OPTIMIZE),yes) CFLAGS += -O3 endif -leukocyte: detect_main.o \ +main: detect_main.o \ avilib.o \ track_ellipse.o \ track_ellipse_gpu.o \ @@ -35,7 +35,7 @@ leukocyte: detect_main.o \ misc_math.o \ helper.o \ $(MATRIX_DIR)/meschach.a - $(CC) -o leukocyte avilib.o \ + $(CC) -o main avilib.o \ track_ellipse.o \ track_ellipse_gpu.o \ find_ellipse.o \ @@ -62,9 +62,9 @@ track_ellipse_gpu.o: track_ellipse_gpu.c track_ellipse.h kernel_IMGVF.h $(MATRIX_DIR)/meschach.a: cd $(MATRIX_DIR); make cleanup; make all CC=$(CC); make clean -run: leukocyte - ./leukocyte ../data/leukocyte/testfile.avi 100 +run: main + ./main ../data/leukocyte/testfile.avi 100 clean: - rm -f *.o *~ leukocyte + rm -f *.o *~ main cd $(MATRIX_DIR); make cleanup diff --git a/src/leukocyte-omp/Makefile b/src/leukocyte-omp/Makefile index c01880d3b5..6c9b372149 100644 --- a/src/leukocyte-omp/Makefile +++ b/src/leukocyte-omp/Makefile @@ -35,7 +35,7 @@ else CFLAGS +=-qopenmp endif -leukocyte: detect_main.o \ +main: detect_main.o \ avilib.o \ track_ellipse.o \ track_ellipse_gpu.o \ @@ -43,7 +43,7 @@ leukocyte: detect_main.o \ misc_math.o \ helper.o \ $(MATRIX_DIR)/meschach.a - $(CC) $(CFLAGS) -o leukocyte avilib.o \ + $(CC) $(CFLAGS) -o main avilib.o \ track_ellipse.o \ track_ellipse_gpu.o \ find_ellipse.o \ @@ -70,9 +70,9 @@ track_ellipse_gpu.o: track_ellipse_gpu.c track_ellipse.h kernel_IMGVF.h $(MATRIX_DIR)/meschach.a: cd $(MATRIX_DIR); make cleanup; make all CC=$(CC); make clean -run: leukocyte - $(LAUNCHER) ./leukocyte ../data/leukocyte/testfile.avi 100 +run: main + $(LAUNCHER) ./main ../data/leukocyte/testfile.avi 100 clean: - rm -f *.o *~ leukocyte + rm -f *.o *~ main cd $(MATRIX_DIR); make cleanup diff --git a/src/leukocyte-omp/Makefile.aomp b/src/leukocyte-omp/Makefile.aomp index 7035f02526..2219e611e6 100644 --- a/src/leukocyte-omp/Makefile.aomp +++ b/src/leukocyte-omp/Makefile.aomp @@ -38,7 +38,7 @@ else CFLAGS +=-fopenmp endif -leukocyte: detect_main.o \ +main: detect_main.o \ avilib.o \ track_ellipse.o \ track_ellipse_gpu.o \ @@ -46,7 +46,7 @@ leukocyte: detect_main.o \ misc_math.o \ helper.o \ $(MATRIX_DIR)/meschach.a - $(CC) $(CFLAGS) -o leukocyte avilib.o \ + $(CC) $(CFLAGS) -o main avilib.o \ track_ellipse.o \ track_ellipse_gpu.o \ find_ellipse.o \ @@ -73,9 +73,9 @@ track_ellipse_gpu.o: track_ellipse_gpu.c track_ellipse.h kernel_IMGVF.h $(MATRIX_DIR)/meschach.a: cd $(MATRIX_DIR); make cleanup; make all CC=$(CC); make clean -run: leukocyte - $(LAUNCHER) ./leukocyte ../data/leukocyte/testfile.avi 100 +run: main + $(LAUNCHER) ./main ../data/leukocyte/testfile.avi 100 clean: - rm -f *.o *~ leukocyte + rm -f *.o *~ main cd $(MATRIX_DIR); make cleanup diff --git a/src/leukocyte-omp/Makefile.nvc b/src/leukocyte-omp/Makefile.nvc index 1c6dac37c1..81f49803fd 100644 --- a/src/leukocyte-omp/Makefile.nvc +++ b/src/leukocyte-omp/Makefile.nvc @@ -35,7 +35,7 @@ else CFLAGS +=-qopenmp endif -leukocyte: detect_main.o \ +main: detect_main.o \ avilib.o \ track_ellipse.o \ track_ellipse_gpu.o \ @@ -43,7 +43,7 @@ leukocyte: detect_main.o \ misc_math.o \ helper.o \ $(MATRIX_DIR)/meschach.a - $(CC) $(CFLAGS) -o leukocyte avilib.o \ + $(CC) $(CFLAGS) -o main avilib.o \ track_ellipse.o \ track_ellipse_gpu.o \ find_ellipse.o \ @@ -70,9 +70,9 @@ track_ellipse_gpu.o: track_ellipse_gpu.c track_ellipse.h kernel_IMGVF.h $(MATRIX_DIR)/meschach.a: cd $(MATRIX_DIR); make cleanup; make all CC=$(CC); make clean -run: leukocyte - $(LAUNCHER) ./leukocyte ../data/leukocyte/testfile.avi 100 +run: main + $(LAUNCHER) ./main ../data/leukocyte/testfile.avi 100 clean: - rm -f *.o *~ leukocyte + rm -f *.o *~ main cd $(MATRIX_DIR); make cleanup diff --git a/src/leukocyte-sycl/Makefile b/src/leukocyte-sycl/Makefile index 1bf89ea997..d8f183527f 100644 --- a/src/leukocyte-sycl/Makefile +++ b/src/leukocyte-sycl/Makefile @@ -67,7 +67,7 @@ endif # Targets to Build #=============================================================================== -leukocyte: detect_main.o \ +main: detect_main.o \ avilib.o \ track_ellipse.o \ track_ellipse_sycl.o \ @@ -75,7 +75,7 @@ leukocyte: detect_main.o \ misc_math.o \ helper.o \ $(MATRIX_DIR)/meschach.a - $(CC) $(CFLAGS) -o leukocyte avilib.o \ + $(CC) $(CFLAGS) -o main avilib.o \ track_ellipse.o \ track_ellipse_sycl.o \ find_ellipse.o \ @@ -104,8 +104,8 @@ $(MATRIX_DIR)/meschach.a: cd $(MATRIX_DIR); make cleanup; make all CC=$(CC) CFLAGS=-O3; make clean clean: - rm -f *.o leukocyte + rm -f *.o main cd $(MATRIX_DIR); make cleanup -run: leukocyte - $(LAUNCHER) ./leukocyte ../data/leukocyte/testfile.avi 100 +run: main + $(LAUNCHER) ./main ../data/leukocyte/testfile.avi 100 diff --git a/src/logan-cuda/Makefile b/src/logan-cuda/Makefile index 6d34add234..a314022e6f 100644 --- a/src/logan-cuda/Makefile +++ b/src/logan-cuda/Makefile @@ -65,7 +65,7 @@ src/logan_functions.o: src/logan_functions.cu \ clean: rm -rf $(program) $(obj) -demo: $(program) +main: $(program) ./$(program) inputs/example.txt 17 21 1 run: $(program) diff --git a/src/logan-hip/Makefile b/src/logan-hip/Makefile index 7ee8887f25..c9c1dd6536 100644 --- a/src/logan-hip/Makefile +++ b/src/logan-hip/Makefile @@ -63,7 +63,7 @@ src/logan_functions.o: src/logan_functions.cu \ clean: rm -rf $(program) $(obj) -demo: $(program) +main: $(program) ./$(program) ../logan-cuda/inputs/example.txt 17 21 1 run: $(program) diff --git a/src/lsqt-cuda/Makefile b/src/lsqt-cuda/Makefile index 0bd1718b64..63e8de3f38 100644 --- a/src/lsqt-cuda/Makefile +++ b/src/lsqt-cuda/Makefile @@ -17,19 +17,16 @@ HEADERS = sigma.h vector.h lsqt.h hamiltonian.h model.h anderson.h charge.h comm ODIR = obj_gpu OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ)) -all: builddir lsqt_gpu - -builddir: - mkdir -p $(ODIR) +all: main $(ODIR)/%.o: %.cu $(HEADERS) $(CC) $(CFLAGS) -c $< -o $@ -lsqt_gpu: $(OBJ) +main: $(OBJ) $(CC) $^ -o $@ clean: - rm -f $(ODIR)/*.o lsqt_gpu + rm -f $(ODIR)/*.o main -run: lsqt_gpu - ./lsqt_gpu examples/input.txt +run: main + $(LAUNCHER) ./main examples/input.txt diff --git a/src/lsqt-hip/Makefile b/src/lsqt-hip/Makefile index a13d47dca5..4f83e2103e 100644 --- a/src/lsqt-hip/Makefile +++ b/src/lsqt-hip/Makefile @@ -16,20 +16,17 @@ HEADERS = sigma.h vector.h lsqt.h hamiltonian.h model.h anderson.h charge.h comm ODIR = obj_gpu OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ)) -all: builddir lsqt_gpu - -builddir: - mkdir -p $(ODIR) +all: main $(ODIR)/%.o: %.cu $(HEADERS) $(CC) $(CFLAGS) -c $< -o $@ -lsqt_gpu: $(OBJ) +main: $(OBJ) $(CC) $^ -o $@ clean: - rm -f $(ODIR)/*.o lsqt_gpu *.out + rm -f $(ODIR)/*.o main *.out -run: lsqt_gpu - ./lsqt_gpu ../lsqt-cuda/examples/input.txt +run: main + $(LAUNCHER) ./main ../lsqt-cuda/examples/input.txt diff --git a/src/lsqt-omp/Makefile b/src/lsqt-omp/Makefile index 0a81702332..0921bf1a1e 100644 --- a/src/lsqt-omp/Makefile +++ b/src/lsqt-omp/Makefile @@ -29,16 +29,16 @@ HEADERS = sigma.h vector.h lsqt.h hamiltonian.h model.h anderson.h charge.h comm ODIR = obj_gpu OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ)) -all: lsqt_gpu +all: main $(ODIR)/%.o: %.cpp $(HEADERS) $(CC) $(CFLAGS) -c $< -o $@ -lsqt_gpu: $(OBJ) +main: $(OBJ) $(CC) $(CFLAGS) $^ -o $@ clean: - rm -f $(ODIR)/*.o lsqt_gpu *.out + rm -f $(ODIR)/*.o main *.out -run: lsqt_gpu - ./lsqt_gpu ../lsqt-cuda/examples/input.txt +run: main + $(LAUNCHER) ./main ../lsqt-cuda/examples/input.txt diff --git a/src/lud-hip/Makefile.hipcl b/src/lud-hip/Makefile.hipcl index cb1a2be209..1b6624a07d 100644 --- a/src/lud-hip/Makefile.hipcl +++ b/src/lud-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = lud +program = main source = lud.cu ./common/common.cu diff --git a/src/lulesh-cuda/Makefile b/src/lulesh-cuda/Makefile index e27928a3e9..0a5f3964c9 100644 --- a/src/lulesh-cuda/Makefile +++ b/src/lulesh-cuda/Makefile @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = lulesh +program = main source = lulesh.cu \ lulesh-viz.cu \ diff --git a/src/lulesh-hip/Makefile b/src/lulesh-hip/Makefile index e57c63b04d..404a834772 100644 --- a/src/lulesh-hip/Makefile +++ b/src/lulesh-hip/Makefile @@ -13,7 +13,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = lulesh +program = main source = lulesh.cu \ lulesh-viz.cu \ diff --git a/src/lulesh-hip/Makefile.hipcl b/src/lulesh-hip/Makefile.hipcl index 7c60134416..df5458d3f2 100644 --- a/src/lulesh-hip/Makefile.hipcl +++ b/src/lulesh-hip/Makefile.hipcl @@ -12,7 +12,7 @@ VERIFY = no # Program name & source code list #=============================================================================== -program = lulesh +program = main source = lulesh.cu \ lulesh-viz.cu \ diff --git a/src/lulesh-omp/Makefile b/src/lulesh-omp/Makefile index 3c42ab258c..2fd15ebb51 100644 --- a/src/lulesh-omp/Makefile +++ b/src/lulesh-omp/Makefile @@ -15,7 +15,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = lulesh +program = main source = lulesh.cc \ lulesh-viz.cc \ diff --git a/src/lulesh-omp/Makefile.aomp b/src/lulesh-omp/Makefile.aomp index 1db739601b..a2721db6ea 100644 --- a/src/lulesh-omp/Makefile.aomp +++ b/src/lulesh-omp/Makefile.aomp @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = lulesh +program = main source = lulesh.cc \ lulesh-viz.cc \ diff --git a/src/lulesh-omp/Makefile.nvc b/src/lulesh-omp/Makefile.nvc index 2475749751..094b03db11 100644 --- a/src/lulesh-omp/Makefile.nvc +++ b/src/lulesh-omp/Makefile.nvc @@ -16,7 +16,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = lulesh +program = main source = lulesh.cc \ lulesh-viz.cc \ diff --git a/src/lulesh-sycl/Makefile b/src/lulesh-sycl/Makefile index 20f4d189d3..d67718c4b5 100644 --- a/src/lulesh-sycl/Makefile +++ b/src/lulesh-sycl/Makefile @@ -20,7 +20,7 @@ HIP_ARCH = gfx908 # Program name & source code list #=============================================================================== -program = lulesh +program = main source = lulesh.cc \ lulesh-viz.cc \ diff --git a/src/mandelbrot-hip/Makefile.hipcl b/src/mandelbrot-hip/Makefile.hipcl index 9a5200730d..13c75ceee7 100644 --- a/src/mandelbrot-hip/Makefile.hipcl +++ b/src/mandelbrot-hip/Makefile.hipcl @@ -10,7 +10,7 @@ DEBUG = no #=============================================================================== # Program name & source code list #=============================================================================== -program = mandelbrot +program = main source = main.cu diff --git a/src/md5hash-cuda/Makefile b/src/md5hash-cuda/Makefile index 61ef674e1e..18534306d8 100644 --- a/src/md5hash-cuda/Makefile +++ b/src/md5hash-cuda/Makefile @@ -13,7 +13,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = MD5Hash +program = main source = MD5Hash.cu diff --git a/src/md5hash-hip/Makefile b/src/md5hash-hip/Makefile index c34df97d05..06e862aea5 100644 --- a/src/md5hash-hip/Makefile +++ b/src/md5hash-hip/Makefile @@ -12,7 +12,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = MD5Hash +program = main source = MD5Hash.cu diff --git a/src/md5hash-hip/Makefile.hipcl b/src/md5hash-hip/Makefile.hipcl index 52d0f36106..5bbdf7cb46 100644 --- a/src/md5hash-hip/Makefile.hipcl +++ b/src/md5hash-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = MD5Hash +program = main source = MD5Hash.cu diff --git a/src/md5hash-omp/Makefile b/src/md5hash-omp/Makefile index d0a663cb9a..8e66b37c10 100644 --- a/src/md5hash-omp/Makefile +++ b/src/md5hash-omp/Makefile @@ -13,7 +13,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = MD5Hash +program = main source = MD5Hash.cpp diff --git a/src/md5hash-omp/Makefile.aomp b/src/md5hash-omp/Makefile.aomp index 6f61439fee..e7d14e4528 100644 --- a/src/md5hash-omp/Makefile.aomp +++ b/src/md5hash-omp/Makefile.aomp @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = MD5Hash +program = main source = MD5Hash.cpp diff --git a/src/md5hash-omp/Makefile.nvc b/src/md5hash-omp/Makefile.nvc index bf5ff3dbb3..bfd2090cfb 100644 --- a/src/md5hash-omp/Makefile.nvc +++ b/src/md5hash-omp/Makefile.nvc @@ -15,7 +15,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = MD5Hash +program = main source = MD5Hash.cpp diff --git a/src/md5hash-sycl/Makefile b/src/md5hash-sycl/Makefile index 0fb21f268a..1598ca1103 100644 --- a/src/md5hash-sycl/Makefile +++ b/src/md5hash-sycl/Makefile @@ -19,7 +19,7 @@ HIP_ARCH = gfx908 # Program name & source code list #=============================================================================== -program = MD5Hash +program = main source = MD5Hash.cpp diff --git a/src/miniDGS-cuda/Makefile b/src/miniDGS-cuda/Makefile index 3d97a98938..c5c1db0b21 100644 --- a/src/miniDGS-cuda/Makefile +++ b/src/miniDGS-cuda/Makefile @@ -51,16 +51,16 @@ OBJS = \ src/MaxwellsKernel3d.o\ src/MaxwellsDriver3d.o -MaxwellsGPU3d:$(OBJS) - $(LD) $(LDFLAGS) -o MaxwellsGPU3d $(OBJS) $(LIBS) +main:$(OBJS) + $(LD) $(LDFLAGS) -o main $(OBJS) $(LIBS) # what to do if user types "make clean" clean : - rm -rf $(OBJS) MaxwellsGPU3d + rm -rf $(OBJS) main veryclean : make clean cd 3rdParty/ParMetis-3.1 && make clean run : - mpiexec -n $(NP) ./MaxwellsGPU3d Meshes/FS_K01022.neu + mpiexec -n $(NP) ./main Meshes/FS_K01022.neu diff --git a/src/miniDGS-cuda/README b/src/miniDGS-cuda/README index ae8094ab85..c698629fb9 100644 --- a/src/miniDGS-cuda/README +++ b/src/miniDGS-cuda/README @@ -18,7 +18,7 @@ make # When the number of processes is one, cuda-memcheck reports CUDA API errors # # Run the various configurations (in parallel using MPI) with sample meshes: -mpirun -np 2 ./MaxwellsGPU3d Meshes/FS_K01022.neu +mpirun -np 2 ./main Meshes/FS_K01022.neu # Only one GPU device is used in the driver (src/MaxwellsDriver3d.c). # diff --git a/src/miniFE-cuda/src/make_targets b/src/miniFE-cuda/src/make_targets index 6acaa484f3..f60fc742fe 100644 --- a/src/miniFE-cuda/src/make_targets +++ b/src/miniFE-cuda/src/make_targets @@ -17,10 +17,10 @@ MINIFE_KERNELS = 0 vpath %.cpp ../utils -all:common_files generate_info miniFE.x +all:common_files generate_info main -miniFE.x:common_files generate_info $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) *.hpp - $(INSTRUMENT) $(CXX) $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) -o miniFE.x $(LDFLAGS) $(OPTIONAL_LIBS) $(LIBS) +main:common_files generate_info $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) *.hpp + $(INSTRUMENT) $(CXX) $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) -o main $(LDFLAGS) $(OPTIONAL_LIBS) $(LIBS) common_files: ./get_common_files @@ -37,11 +37,11 @@ verify:all %.o:%.c *.h $(CC) $(CFLAGS) -c $< -run: miniFE.x - ./miniFE.x -nx 128 -ny 128 -nz 128 +run: main + $(LAUNCHER) ./main -nx 128 -ny 128 -nz 128 clean: - rm -f *.o *.a *.x *.linkinfo miniFE_info.hpp + rm -f *.o *.a main *.linkinfo miniFE_info.hpp realclean: clean rm -f gmon.out gprof.* *~ *.yaml *.TVD.* *.mtx* *.vec* minife_debug* diff --git a/src/miniFE-hip/src/make_targets b/src/miniFE-hip/src/make_targets index 6acaa484f3..f60fc742fe 100644 --- a/src/miniFE-hip/src/make_targets +++ b/src/miniFE-hip/src/make_targets @@ -17,10 +17,10 @@ MINIFE_KERNELS = 0 vpath %.cpp ../utils -all:common_files generate_info miniFE.x +all:common_files generate_info main -miniFE.x:common_files generate_info $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) *.hpp - $(INSTRUMENT) $(CXX) $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) -o miniFE.x $(LDFLAGS) $(OPTIONAL_LIBS) $(LIBS) +main:common_files generate_info $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) *.hpp + $(INSTRUMENT) $(CXX) $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) -o main $(LDFLAGS) $(OPTIONAL_LIBS) $(LIBS) common_files: ./get_common_files @@ -37,11 +37,11 @@ verify:all %.o:%.c *.h $(CC) $(CFLAGS) -c $< -run: miniFE.x - ./miniFE.x -nx 128 -ny 128 -nz 128 +run: main + $(LAUNCHER) ./main -nx 128 -ny 128 -nz 128 clean: - rm -f *.o *.a *.x *.linkinfo miniFE_info.hpp + rm -f *.o *.a main *.linkinfo miniFE_info.hpp realclean: clean rm -f gmon.out gprof.* *~ *.yaml *.TVD.* *.mtx* *.vec* minife_debug* diff --git a/src/miniFE-omp/src/make_targets b/src/miniFE-omp/src/make_targets index a13208a3b1..4eaa6cf999 100644 --- a/src/miniFE-omp/src/make_targets +++ b/src/miniFE-omp/src/make_targets @@ -17,10 +17,10 @@ MINIFE_KERNELS = 0 vpath %.cpp ../utils -all:common_files generate_info miniFE.x +all:common_files generate_info main -miniFE.x:common_files generate_info $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) *.hpp - $(INSTRUMENT) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) -o miniFE.x $(LDFLAGS) $(OPTIONAL_LIBS) $(LIBS) +main:common_files generate_info $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) *.hpp + $(INSTRUMENT) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) -o main $(LDFLAGS) $(OPTIONAL_LIBS) $(LIBS) common_files: ./get_common_files @@ -37,11 +37,11 @@ verify:all %.o:%.c *.h $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -run: miniFE.x - ./miniFE.x -nx 128 -ny 128 -nz 128 +run: main + $(LAUNCHER) ./main -nx 128 -ny 128 -nz 128 clean: - rm -f *.o *.a *.x *.linkinfo miniFE_info.hpp + rm -f *.o *.a main *.linkinfo miniFE_info.hpp realclean: clean rm -f gmon.out gprof.* *~ *.yaml *.TVD.* *.mtx* *.vec* minife_debug* diff --git a/src/miniFE-sycl/src/make_targets b/src/miniFE-sycl/src/make_targets index a13208a3b1..4eaa6cf999 100644 --- a/src/miniFE-sycl/src/make_targets +++ b/src/miniFE-sycl/src/make_targets @@ -17,10 +17,10 @@ MINIFE_KERNELS = 0 vpath %.cpp ../utils -all:common_files generate_info miniFE.x +all:common_files generate_info main -miniFE.x:common_files generate_info $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) *.hpp - $(INSTRUMENT) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) -o miniFE.x $(LDFLAGS) $(OPTIONAL_LIBS) $(LIBS) +main:common_files generate_info $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) *.hpp + $(INSTRUMENT) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(MAIN_OBJ) $(OBJS) $(UTIL_OBJS) $(OPTIONAL_OBJS) -o main $(LDFLAGS) $(OPTIONAL_LIBS) $(LIBS) common_files: ./get_common_files @@ -37,11 +37,11 @@ verify:all %.o:%.c *.h $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -run: miniFE.x - ./miniFE.x -nx 128 -ny 128 -nz 128 +run: main + $(LAUNCHER) ./main -nx 128 -ny 128 -nz 128 clean: - rm -f *.o *.a *.x *.linkinfo miniFE_info.hpp + rm -f *.o *.a main *.linkinfo miniFE_info.hpp realclean: clean rm -f gmon.out gprof.* *~ *.yaml *.TVD.* *.mtx* *.vec* minife_debug* diff --git a/src/minimap2-cuda/Makefile b/src/minimap2-cuda/Makefile index b4b98cd96c..c798a66f26 100644 --- a/src/minimap2-cuda/Makefile +++ b/src/minimap2-cuda/Makefile @@ -10,7 +10,7 @@ BUILD_CUDA_PATH = build/cuda BIN_PATH = $(BUILD_PATH)/bin # executable # -BIN_NAME = kernel-2d +BIN_NAME = main # extensions # SRC_EXT = cpp diff --git a/src/minimap2-hip/Makefile b/src/minimap2-hip/Makefile index 93c7d689c8..60710f9f4a 100644 --- a/src/minimap2-hip/Makefile +++ b/src/minimap2-hip/Makefile @@ -9,7 +9,7 @@ BUILD_HIP_PATH = build/hip BIN_PATH = $(BUILD_PATH)/bin # executable # -BIN_NAME = kernel +BIN_NAME = main # extensions # SRC_EXT = cpp @@ -29,7 +29,7 @@ DEPS = $(OBJECTS:.o=.d) # flags # COMPILE_FLAGS = -std=c++17 -Wall -Wextra -g -HIPCC_COMPILE_FLAGS = -std=c++17 -g -O3 +HIPCC_COMPILE_FLAGS = -std=c++17 -g -O3 INCLUDES = -I include/ -I /usr/local/include # Space-separated pkg-config libraries used by this project LIBS = diff --git a/src/minimap2-hip/Makefile.hipcl b/src/minimap2-hip/Makefile.hipcl index d37773af4e..c310b7ae55 100644 --- a/src/minimap2-hip/Makefile.hipcl +++ b/src/minimap2-hip/Makefile.hipcl @@ -9,7 +9,7 @@ BUILD_DEVICE_PATH = build/cuda BIN_PATH = $(BUILD_PATH)/bin # executable # -BIN_NAME = kernel +BIN_NAME = main # extensions # SRC_EXT = cpp diff --git a/src/multimaterial-cuda/Makefile b/src/multimaterial-cuda/Makefile index 1c842201dd..c236721faf 100644 --- a/src/multimaterial-cuda/Makefile +++ b/src/multimaterial-cuda/Makefile @@ -33,7 +33,7 @@ endif #=============================================================================== # Program name & source code list #=============================================================================== -program = multimat multimat_FL multimat_F +program = main multimat multimat_F all: $(program) @@ -43,16 +43,16 @@ multimat: $(source) $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) multimat_F: $(source) $(CC) $(CFLAGS) -DFUSED $^ -o $@ $(LDFLAGS) -multimat_FL: $(source) +main: $(source) $(CC) $(CFLAGS) -DFUSED -DLINKED $^ -o $@ $(LDFLAGS) clean: rm -rf $(program) run: $(program) - $(LAUNCHER) ./multimat_FL 2000 2000 + $(LAUNCHER) ./main 2000 2000 $(LAUNCHER) ./multimat_F 2000 2000 $(LAUNCHER) ./multimat 2000 2000 - $(LAUNCHER) ./multimat_FL 2000 2000 0.3 0.05 0.05 + $(LAUNCHER) ./main 2000 2000 0.3 0.05 0.05 $(LAUNCHER) ./multimat_F 2000 2000 0.3 0.05 0.05 $(LAUNCHER) ./multimat 2000 2000 0.3 0.05 0.05 diff --git a/src/multimaterial-hip/Makefile b/src/multimaterial-hip/Makefile index fac6df3526..3d07192e02 100644 --- a/src/multimaterial-hip/Makefile +++ b/src/multimaterial-hip/Makefile @@ -33,26 +33,18 @@ endif #=============================================================================== # Program name & source code list #=============================================================================== -program = multimat multimat_FL multimat_F +program = main all: $(program) source=compact.cu full_matrix.cu multimat.cu -multimat: $(source) - $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -multimat_F: $(source) - $(CC) $(CFLAGS) -DFUSED $^ -o $@ $(LDFLAGS) -multimat_FL: $(source) +$(program): $(source) $(CC) $(CFLAGS) -DFUSED -DLINKED $^ -o $@ $(LDFLAGS) clean: rm -rf $(program) run: $(program) - $(LAUNCHER) ./multimat_FL 2000 2000 - $(LAUNCHER) ./multimat_F 2000 2000 - $(LAUNCHER) ./multimat 2000 2000 - $(LAUNCHER) ./multimat_FL 2000 2000 0.3 0.05 0.05 - $(LAUNCHER) ./multimat_F 2000 2000 0.3 0.05 0.05 - $(LAUNCHER) ./multimat 2000 2000 0.3 0.05 0.05 + $(LAUNCHER) ./$(program) 2000 2000 + $(LAUNCHER) ./$(program) 2000 2000 0.3 0.05 0.05 diff --git a/src/multimaterial-hip/Makefile.hipcl b/src/multimaterial-hip/Makefile.hipcl index cb456a0bc5..cfe779ad28 100644 --- a/src/multimaterial-hip/Makefile.hipcl +++ b/src/multimaterial-hip/Makefile.hipcl @@ -32,7 +32,7 @@ endif #=============================================================================== # Program name & source code list #=============================================================================== -program = multimat multimat_FL multimat_F +program = main all: $(program) diff --git a/src/multimaterial-omp/Makefile b/src/multimaterial-omp/Makefile index 79819b53d4..3be6356a3f 100644 --- a/src/multimaterial-omp/Makefile +++ b/src/multimaterial-omp/Makefile @@ -12,7 +12,7 @@ LAUNCHER = #=============================================================================== # Program name & source code list #=============================================================================== -program= multimat multimat_FL multimat_F +program= main multimat multimat_F source=compact.cpp full_matrix.cpp multimat.cpp @@ -54,16 +54,16 @@ multimat: $(source) multimat_F: $(source) $(CC) $(CFLAGS) -DFUSED $^ -o $@ $(LDFLAGS) -multimat_FL: $(source) +main: $(source) $(CC) $(CFLAGS) -DFUSED -DLINKED $^ -o $@ $(LDFLAGS) clean: rm -rf $(program) $(obj) run: $(program) - $(LAUNCHER) ./multimat_FL 2000 2000 + $(LAUNCHER) ./main 2000 2000 $(LAUNCHER) ./multimat_F 2000 2000 $(LAUNCHER) ./multimat 2000 2000 - $(LAUNCHER) ./multimat_FL 2000 2000 0.3 0.05 0.05 + $(LAUNCHER) ./main 2000 2000 0.3 0.05 0.05 $(LAUNCHER) ./multimat_F 2000 2000 0.3 0.05 0.05 $(LAUNCHER) ./multimat 2000 2000 0.3 0.05 0.05 diff --git a/src/multimaterial-omp/Makefile.aomp b/src/multimaterial-omp/Makefile.aomp index 62731ea705..5f44e0ac8e 100644 --- a/src/multimaterial-omp/Makefile.aomp +++ b/src/multimaterial-omp/Makefile.aomp @@ -13,7 +13,7 @@ LAUNCHER = #=============================================================================== # Program name & source code list #=============================================================================== -program= multimat multimat_FL multimat_F +program = main source=compact.cpp full_matrix.cpp multimat.cpp diff --git a/src/multimaterial-omp/Makefile.nvc b/src/multimaterial-omp/Makefile.nvc index dad72c1c0f..00aa5afea1 100644 --- a/src/multimaterial-omp/Makefile.nvc +++ b/src/multimaterial-omp/Makefile.nvc @@ -13,7 +13,7 @@ LAUNCHER = #=============================================================================== # Program name & source code list #=============================================================================== -program= multimat multimat_FL multimat_F +program = main source=compact.cpp full_matrix.cpp multimat.cpp diff --git a/src/multimaterial-sycl/Makefile b/src/multimaterial-sycl/Makefile index 63b71578ee..9bfd2e02aa 100644 --- a/src/multimaterial-sycl/Makefile +++ b/src/multimaterial-sycl/Makefile @@ -19,7 +19,7 @@ HIP_ARCH = gfx908 # Program name & source code list #=============================================================================== -program = multimat multimat_FL multimat_F +program = main source=compact.cpp full_matrix.cpp multimat.cpp @@ -66,22 +66,12 @@ endif # Targets to Build #=============================================================================== -multimat: $(source) - $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) - -multimat_F: $(source) - $(CC) $(CFLAGS) -DFUSED $^ -o $@ $(LDFLAGS) - -multimat_FL: $(source) +$(program): $(source) $(CC) $(CFLAGS) -DFUSED -DLINKED $^ -o $@ $(LDFLAGS) clean: rm -rf $(program) run: $(program) - $(LAUNCHER) ./multimat_FL 2000 2000 - $(LAUNCHER) ./multimat_F 2000 2000 - $(LAUNCHER) ./multimat 2000 2000 - $(LAUNCHER) ./multimat_FL 2000 2000 0.3 0.05 0.05 - $(LAUNCHER) ./multimat_F 2000 2000 0.3 0.05 0.05 - $(LAUNCHER) ./multimat 2000 2000 0.3 0.05 0.05 + $(LAUNCHER) ./$(program) 2000 2000 + $(LAUNCHER) ./$(program) 2000 2000 0.3 0.05 0.05 diff --git a/src/myocyte-omp/Makefile b/src/myocyte-omp/Makefile index 6cb3016a12..94735bb02b 100644 --- a/src/myocyte-omp/Makefile +++ b/src/myocyte-omp/Makefile @@ -30,7 +30,7 @@ endif # EXECUTABLES (LINK OBJECTS TOGETHER INTO BINARY) -./myocyte.out: ./main.o \ +./main: ./main.o \ ./kernel/kernel_wrapper.o \ ./util/file/file.o \ ./util/num/num.o @@ -39,7 +39,7 @@ endif ./util/file/file.o \ ./util/num/num.o \ $(LDFLAGS) \ - -o myocyte.out + -o main # MAIN FUNCTION @@ -81,11 +81,11 @@ endif -o ./util/num/num.o \ -O3 -run: myocyte.out - $(LAUNCHER) ./myocyte.out -time 100 +run: main + $(LAUNCHER) ./main -time 100 clean: - rm -rf *.o *.out \ + rm -rf *.o main \ ./kernel/*.o \ ./util/file/*.o \ ./util/num/*.o \ diff --git a/src/myocyte-omp/Makefile.aomp b/src/myocyte-omp/Makefile.aomp index 522a2e7ceb..6ded78cfe7 100644 --- a/src/myocyte-omp/Makefile.aomp +++ b/src/myocyte-omp/Makefile.aomp @@ -32,7 +32,7 @@ ifeq ($(OPTIMIZE),yes) endif -./myocyte.out: ./main.o \ +./main: ./main.o \ ./kernel/kernel_wrapper.o \ ./util/file/file.o \ ./util/num/num.o @@ -41,7 +41,7 @@ endif ./util/file/file.o \ ./util/num/num.o \ $(LDFLAGS) \ - -o myocyte.out + -o main ./main.o: ./common.h ./main.c @@ -78,11 +78,11 @@ endif -o ./util/num/num.o \ -O3 -run: myocyte.out - $(LAUNCHER) ./myocyte.out -time 100 +run: main + $(LAUNCHER) ./main -time 100 clean: - rm -rf *.o *.out \ + rm -rf *.o main \ ./kernel/*.o \ ./util/file/*.o \ ./util/num/*.o \ diff --git a/src/myocyte-omp/Makefile.nvc b/src/myocyte-omp/Makefile.nvc index 942a6526a8..5a1a5386b2 100644 --- a/src/myocyte-omp/Makefile.nvc +++ b/src/myocyte-omp/Makefile.nvc @@ -30,16 +30,16 @@ ifeq ($(OPTIMIZE),yes) endif -./myocyte.out: ./main.o \ +./main: ./main.o \ ./kernel/kernel_wrapper.o \ ./util/file/file.o \ - ./util/num/num.o \ + ./util/num/num.o $(CC) $(CFLAGS) ./main.o \ ./kernel/kernel_wrapper.o \ ./util/file/file.o \ - ./util/num/num.o + ./util/num/num.o \ $(LDFLAGS) \ - -o myocyte.out + -o main ./main.o: ./common.h ./main.c $(CC) $(CFLAGS) ./main.c \ @@ -75,11 +75,11 @@ endif -o ./util/num/num.o \ -O3 -run: myocyte.out - $(LAUNCHER) ./myocyte.out -time 100 +run: main + $(LAUNCHER) ./main -time 100 clean: - rm -rf *.o *.out \ + rm -rf *.o main \ ./kernel/*.o \ ./util/file/*.o \ ./util/num/*.o \ diff --git a/src/nn-hip/Makefile.hipcl b/src/nn-hip/Makefile.hipcl index b3eb4f1702..f6a922da00 100644 --- a/src/nn-hip/Makefile.hipcl +++ b/src/nn-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = nn +program = main source = nearestNeighbor.cu utils.cu diff --git a/src/nw-hip/Makefile.hipcl b/src/nw-hip/Makefile.hipcl index da9db70306..eb4e91bb63 100644 --- a/src/nw-hip/Makefile.hipcl +++ b/src/nw-hip/Makefile.hipcl @@ -12,7 +12,7 @@ DUMP = no # Program name & source code list #=============================================================================== -program = nw +program = main source = nw.cu diff --git a/src/nw-omp/Makefile b/src/nw-omp/Makefile index 5729999e96..81e79bed14 100644 --- a/src/nw-omp/Makefile +++ b/src/nw-omp/Makefile @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = nw +program = main source = nw.cpp diff --git a/src/page-rank-hip/Makefile.hipcl b/src/page-rank-hip/Makefile.hipcl index f09c6603ec..1a57acfb47 100644 --- a/src/page-rank-hip/Makefile.hipcl +++ b/src/page-rank-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = page-rank +program = main source = main.cu diff --git a/src/particle-diffusion-hip/Makefile.hipcl b/src/particle-diffusion-hip/Makefile.hipcl index c96c82f494..57fc622601 100644 --- a/src/particle-diffusion-hip/Makefile.hipcl +++ b/src/particle-diffusion-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = motionsim +program = main source = motionsim.cu diff --git a/src/projectile-cuda/Makefile b/src/projectile-cuda/Makefile index bcd9ab7acf..86a3bfdb48 100644 --- a/src/projectile-cuda/Makefile +++ b/src/projectile-cuda/Makefile @@ -13,7 +13,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = Projectile +program = main source = Projectile.cu diff --git a/src/projectile-hip/Makefile b/src/projectile-hip/Makefile index e17b15d36a..e26fa38682 100644 --- a/src/projectile-hip/Makefile +++ b/src/projectile-hip/Makefile @@ -12,7 +12,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = Projectile +program = main source = Projectile.cu diff --git a/src/projectile-hip/Makefile.hipcl b/src/projectile-hip/Makefile.hipcl index ec24c6fbda..959f529653 100644 --- a/src/projectile-hip/Makefile.hipcl +++ b/src/projectile-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = Projectile +program = main source = Projectile.cu diff --git a/src/projectile-hip/Projectile b/src/projectile-hip/Projectile new file mode 100755 index 0000000000000000000000000000000000000000..cf84ebc02ea6485a9d6e7344359977116b3d474c GIT binary patch literal 39328 zcmeHw4|H4AndkGr#7T@LAW2goMI-_oXcWtKj75E4!RIRN5^VwaN`YDBZ5BbPm0l>HORFVb0ZP3U%*;bCvS3Y7*+lk84yo2;)e{))d(##2#_6Q*^s=s#gwEE>;@t{rV@UfbN{ zNhdrFqMUxQ4vwi!TefTEW7;$^rLW4#vz&<`memP*8F-dk?K+5@rV(R$-gs`r%FX|I z6AYa^B^V!)7 z|IaNH27f`3c5NtvXN%aszKH*|MeO{25&83r;Nc>6{$mk;ZZ0D4En@#4irBfUi2OH; z*xz3Sj~21hQ>5PMBJzJz#QrB?$AzOXrHaTOgy4MR^`VhOTu+;!l&R~M=)8i%(PXbN5>6g~3i823vNIHm zbtdA2(VWxdKg~sZHy=OcU#I0-e@AN4}{W&jM)h;XMVoXD73 zIvO9;!in^trf-k$kH#bVHY1%GF*I0Dqb<>NBHYl3v6V6t>{zrlEJxZ%C>qz&sZcxu zJUklG2QgG)91qDa$e$L z3*Xe)sW*D+wM_wkN9WF+$TxYst#jDMhB<7j2D$bQzwY%k&MEME?W~p88$69oXR|G{ z*#^&gZCyGU3LEQ^`;3^8-kVs5@nm8MuR~kbg)tlYFzeRs^LiRQUY^u3Rm-(9oQunF zy;LUt&eAG@RpN62j)f>K$CXlL@sM8_%McOjSXK!DF@@ma3`TzNkdvS@eKx>eENXS=d z8zpb9`64dmDzyN3Ci?Z3tgj9HH@IBF@lGz_ND9}2 z7JvA5i}D(Z*IX)1+i-PF#j>YuI67)J9k=1<%%Yn1f(^gKhM%zEm)dYm`dJ3-d^ciQmfHvDcI{xKVVpABDO!ymBWAGhIuXTvYF;SbsHi){E|8_sK9m8Qq6 z9OLi_1%f_3W--JswzA^$_?X2IcUf8S`NEjR5SLR?04Hp?oYDf%*>JZ&N*|>Nlp;`y zKq&&H2$UjFia;p>r3jQFP>Mh)0;LF)BJigcfzyspyyF{xwc0mX^@xt`oQY|(Jb&Cb z{$%x0(Uko9?*h(W`Yb*j7q=ltewbx5C-O*_K0%&aS~JH5|0sEGWz9?r{=bsv7S_x| zf`5>FCHV&g|DVZoD{JO%!T$|;Zeh)g3I2=Zxm_`n6#So)=a$vX9>IT>Jh!T5f`Y%5 zJh!N3+612>&#k_hdcog9zJ|O@@B`$zu>7m(*x)XbRR z&m+$*sF|eT7nA4K)65>hmy_p~(@aqC@7xUj0`hHwf0I17o@VL={|b3-InB5P{|oZm zYMOBh{=rXc+Th*bMdJAIzUI$9f3q+93*Y!JPX+tCz0=-jd{Y~LgHFvayC33j4SF0G z9}@DwzYc@Gsj3G_TF;ovFtoNnh(l{p{)FS=F$x})6!Hg!{Q6r-*1Ye_p7I@e{W{-~ zGZntFr+m-9Z!U#_wbDR!{=}f;;;ys$^lxnAcIaxEE4TZ`H@>nPSzq>7W{q!h<8t7+ zHR!cm1RqaTtp#89Y1BPiKlNw!qfq)Y@dL+QCt;!e#`YcU{e74kb-wIrfA;>> z<$Y6t}npTqutakdxpIqA8`fJC856#64 zulrQ{?)ID8^`nD>XWN4Y@APGFbGP`irn}xZ)x}(wyN$Ve=6t@X+uSbS6#Vy1^}DNm z*`Me3qlvyr)9sq!$zj$1+eM(a zGt>uPy%T}Y{)jar=C*9WH7j_zcBw>#N|Hq@M4W{*dE z{yE2?Dd+^UzkZCmf$Te?Hq3%%rwt z5V{hrJneH_F@4%`ML>+7s%tR&F$j;GcI=u)A4I`ERF)fnr}PpX)WXhkT9M;Qo%@P# z0RhduBy-N(512dnB>RK|<MtlImU_w7fy_U4+Xojv3p z1LL@HniIt3JBBd?UL&`MT$0@5!i6*xy1j3Ef8w2HpjKd(S-CcnO1H&0PhN-Kv5i;Q zZg-qp>28NLF3MVO_SgRLrT z{??u)5BrYHxXO-XzkB4Bi;w(%LD}(I=5Rp)-9S7*bs5IIVP5&(`S|;P`%mT1+Kit?K^x1 z2-5BT)?aoerl4t%bhv zY0+ze)>D~Z`6kiMiM&~ryAhtiwfk{Q(7ixej$@?0H~W4d`$_jCB5eh5;&Gh9{HX6r ztQ7?@dK_c)UlpU}bE32QcOp6`D-aRJ!WxK(hHN*x>J49O%ensYvH%PoTQIA#9;B0Q}Ji=Ni4^Z7lN$qzZ7n?efb zb4-ifE2~NRSJrT9nJcXcx6s|9QuFU%T*lBO){sTJCpMA-c6*CvE^K!^ys7i#@<0~ncZAm84s3S@tm>p+1odn~sYG?0Bg zAgXz78#=qCcpZdJeNaxxW&XzLEPH3VJ8rHmm8; z1C+v~c3Fe`3t({;`@kucYa*937c5=}i@7_6-dXSpg6RTq8Nr(Y=3aa=pFer&$?}s3 z-aw|nGyb$=`uxiPeFNu{Y_dF5R zoFC+#085ouK+j%3@`~Bzn_T%r1Rf`r3>M9e53my|sGU9P%T_%CR-ELxBI4BTn_B<& z77o^PK6M^Q_GdW1wjbunjTcx;poeoizwl|tD%~Vd7@_&8bGAUC{ShqeQVkbnxd(rP zil#OqJQ}W-T%Vd*gK>l}4Tq?TQMR#_x>#nH1#@vab*ySN5K+jly=U9P@4LJ_?ek~f z7T2Te!}y-}D8Gy54ndP+eu22i%Kj{OJ^+9A7<}uY5WjG8r0kY*J(U#X0DcAjS%PaQ z$c9m{Q3+Nn!6UPRizvvisA7C8L3~%REZ#RO_&OGVM}cc;BK)WFuClfK`gRw&)kecE`V~6fZ>5!DU~8nia;p>r3jQFP>Mh) z0;LF)B2bDzDFUSklp;`yz@JtG_=MArT7R3SHFX~S?M3bI{yIIGt>=#tYzcp2upbs~ zm9e}qweK@hp&`SyS3GFwGDeMXhED^!%;<=5wd>MBS6zC|Vr_dGLSWObYf?ti2$|O| z)`IPQeOgbuKcKb8hhiwzTssUr)Q2bZnBNwPQ$=(2C-8iiw5PdxL!;4=%!tcpM2Ch= zlr3jQFP>Mh)0;LF)B2bFJpH>8P zy))3hWs|rY5hz8V6oFC% zN)aeUpcH{p1WFMoMd1Hq1S-l`<9UWMtrqVXy+PJr0hccF9b~s$3p3}=j^=%R@oB7>Z7&23YPFN ziZHaThD@gLoFWZ(u}x?mp)UbQsc`5qJtg-@A(xxH(bIoBNWdh zg$=$efcG(YqD_s+3K_m2Ae@Nr^F%EkkB>_k@>SZ(+480)WPwzO_fC#vVxru|a?9p= ztGo*T4MN#$YPPTn@s7z*BqH=LW%&qwsub_Jk48q5sle@c*(t3dxjww8BHD^q15;IxT z)&T!wa}34si}TUi)Z2vj3NJ$5();7{j_U+-K6>Z~O=6i=3E4EefTt~@s zUfavrPxJ9go_(gumqDLvtav64lsx6ya4?Z)OkHGn46ar1%1s<V(?D31HtyFz00m*b!ZIOTYrQM#N1N`9>@ zQ}Pq2i+0xGpe>GvJ0-^R196Ut8d+Zh@?|($aj;zBJXa8>E#k^9&k?MX<49r6$P=e6 zrO$I0_1WJnS3a;FmT}xEeV*TFlVu9yIgUQCOxe5!d1aI3N|xt8>hn+-&w<40lfrl& zB+oL1wIffw&4zU#PnBTo&FGL6X>2t^LZy4IQE3~Y6aI($N>+6eh#$l$$VbC*$cW{lbFhG-KLd| zI?FDsSy;^%p%CY~@$@(IdCpO-YayE@<~PUnL;o$GKLt6h*4b0L;(EuD{ncaIbr)>7 zqS3vIa@60AV-)(;1Z3iPF>&lc8{Q&zeXX;jc11_6tG%|at2Q`Z^|{KsDn4Ic{$g!i zd#y_pL7@8Rv(Nn#{dow78|{u#x2twf`Hi*1UA0MnEh^~;bR36?@`vbKyRzL;Th~!r z-(K6Ysdl<-eBtL7OjX@g`T2@F$}7$FIp_UdqCUuG;$X^77BsI$?})F;U(ITOv@s zwa$JhvTaOdw*~{ECl=nn7Gw89)gNpd*H$0;csc5+)WLj&_Fc7bz9zM!vCv0ir&eOD z9EU&W3B>xy=gY2nrK0Lf4(-kbRrfozcNSLtwL|;HqL1C{(7sdiowC1oXfM^)Jm%1T zQ(Nr3jQFP>Mh)0;LF)B2bDzDFUSk z{3%9&o0>@K{~}I{FY)*u%`fLj@@uvB1in+-dH(N6JJ0{kXy^IAC+$4{_ahVcYME}W zuqgM8L~>c=9E)h~dMopB$*ceGsP=>TJ)epDzD(->IjVgJY$=HJ+xPPcW=3UwRTixI z7FrqZ*)lyK%NJX$_MqgsU&XY-B4V#sW(ARAT2Af}$YyHCWrq7BOtQM!y>RhncN<02ZQnudLwPq@#EyUhtJt@08@5{~MP72bRetKCON3`Q-WAOgVm` z2o}VRdc?;HaQ>b^T&-(hMe^gb46Bjrpv8+ABfDMT%V*aUt5nl&Lxy(L|CLqvokD(@ zrq(Bge-)Ye{Qss9SgHl%O46doKt#Jd7JsiSei4*@)=NLt`tX{-FVd2fIKBKX6=SHZq(on_&5Y3Nzt z=a!$1v$Ee+Zu#Sqfs}4({9VGOglzOJ;OCV)X3uM?=pEvUvC$gXSAArIwaZ1lcErkG z3*3ocOHYl>E!$i~ez%Z6JN}gxe@B_mAM5|u*UnxSM5V&t7Lk9Z2>vr!Z_7bdqeXuS z+%*>x-032AaQoHl@6>j+)xhWTzpn^BQUw2O5&W-;;9nCs;wygv{U%Q%$;9W)V?M3k0h?nCc!li1o=x2+_-(LhjRs=sGaIDX6%dYr6 z3)%B=K{j8zJVo$#@h$y%hRyqvRs_=`3vCZmS3n9o}b?!j;p%D z{~LaOk$T-l@J|9im%m=MS=Az3B5f!l-wXT__@n->w>mFGi^ywz;gsq1Byb~DXdtSa zp&<=G+RWg8R)n>Pkurv&Y12sQ=7=7SCE`XJl97Zy6iW<*VtNFxE=ud6%qVWo8%f3t z(};NL=a1hz$&8E~fQpU73y`Ab9MQ8kDtf{h4Hr4OF&Z|K zCLA7!8I4fK)0*l|OTJG@B16f{Ks1hfFXNGzA+f=bNo;>AluQ~Foc9e%b1br%5bW93 z-rKErZ|TzU;-yW2tsU(FK8V`a-LLnzci=HpP4BvCOM9=sQ^OmZMx!QlHf`Cicl)HO zuWOq&5{kyPbTmHLwkhE6=+qlL4W9LuYr#xeQU z(+|40O^$`0kl6tt+|P-j5Hdr0+6<-GR`h|A*%4yE2GVI+h@xJ!ED=V%4Xw~K_C>=6 z3Nr(Er1!&Ka^b@wOe8-TX&v=6g%cTbuH{`@Hust9!{&jc;SYCv8}X*D{n3aK7sIrBjvF4Y7Y*Ff zmsmd-Lubw{)KG7iXm{U%co=Po^Cn+?S0omkW5lx1n9P{n;Q~)uQ^p|XWISwq;8kEz zwsUk;$Cyqh*oEc+eP4ZB=gyt&9e&;G!6ZTR8tPRTV@7<)9M+9gDv=6qE~v<0ziRsS z`2J`-qHixB-Hp-OuiG2r zY1KshtnSzzR|}18aM4|FG?7M+rwu(89Y|r!38gvV@-#NU2#2mU>8x7RyxQgUZc1i? zp%g}+5!=>hHd`-T^V{E~))(^k)$85eeT_Q97)>X_4UHHuDKin9HP_f8I>u}kU6*Lo zcQkk#ur`Jw2e>qb_cr3G^0__k@wPHry~ap5iP<8DF&;(7o8CrLbix?i-tce;YiueM zHPaYl2$$(?M6;t|T}u10#=ynCW<9tWZc4YTnafymzN;9{o$Y!gotRw#Kf*1c7VL{!m%VL1u82F_|WHsRK^ z^nnp9<)DbUpu;MM#m`73HBUTY8lIte#)B`Q7~|#v31M`v32UNHmWzEKgp; z5g1e)Y6^$voTe+n5htau zzGv?MP7$TA_7fFV`-cz_iLth)o566ePU)-tIYsFolk#85DaxB zb!P08{}R@2MTWT2SNo5Os{Kb*ztUIjKP2@#q(QZxsi@ljq(1j(3-#{;#+Wd^BDv;L zwa+V2;j7A%W^vf{T`r=Url`1=&w|7!uB_+KzXWI3cdnAE zNKW(F{X4afSJ2$q@vHne4PA##U;X}|sFH(-NQzgK8=;K9s$YG7R8+}X+God~;%lJH zxuf*e{+gooGJa})DSN72_d(ZQ|6%$2g`)MUB1x6LqRXIc*H^!PC|b=zTT*(8exg8M z?OQ3T)){3&=_%e_ps)5p75y;%X6VzVil5qVQS`&~H^}-6\n"); + printf("Usage: ./main \n"); printf("Options include:\n"); printf(" -m Simulation method (history, event)\n"); printf(" -s Size of H-M Benchmark to run (small, large, XL, XXL)\n"); diff --git a/src/xsbench-hip/Makefile b/src/xsbench-hip/Makefile index 3e027c472e..1ca51c6fbd 100644 --- a/src/xsbench-hip/Makefile +++ b/src/xsbench-hip/Makefile @@ -12,7 +12,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = xsbench +program = main source = Main.cu \ Simulation.cu\ diff --git a/src/xsbench-hip/Makefile.hipcl b/src/xsbench-hip/Makefile.hipcl index 7f356f6b79..c40b3fd377 100644 --- a/src/xsbench-hip/Makefile.hipcl +++ b/src/xsbench-hip/Makefile.hipcl @@ -11,7 +11,7 @@ DEBUG = no # Program name & source code list #=============================================================================== -program = xsbench +program = main source = \ Main.cu \ diff --git a/src/xsbench-omp/Makefile b/src/xsbench-omp/Makefile index 25ea7d1e2f..739c0217c2 100644 --- a/src/xsbench-omp/Makefile +++ b/src/xsbench-omp/Makefile @@ -15,7 +15,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = XSBench +program = main obj = Main.o io.o Simulation.o GridInit.o XSutils.o Materials.o diff --git a/src/xsbench-omp/Makefile.aomp b/src/xsbench-omp/Makefile.aomp index 011f2a7bfb..87557be63c 100644 --- a/src/xsbench-omp/Makefile.aomp +++ b/src/xsbench-omp/Makefile.aomp @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = XSBench +program = main obj = Main.o io.o Simulation.o GridInit.o XSutils.o Materials.o diff --git a/src/xsbench-omp/Makefile.nvc b/src/xsbench-omp/Makefile.nvc index 5bdb1fa91e..40e872626a 100644 --- a/src/xsbench-omp/Makefile.nvc +++ b/src/xsbench-omp/Makefile.nvc @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = XSBench +program = main obj = Main.o io.o Simulation.o GridInit.o XSutils.o Materials.o From a13db7f9764794fd926d5d48328273bc58cfd4db Mon Sep 17 00:00:00 2001 From: Zheming Jin <57232910+zjin-lcf@users.noreply.github.com> Date: Sat, 7 Mar 2026 14:00:36 -0500 Subject: [PATCH 5/6] Update Makefile.aomp replace vj-gpu with main --- src/face-omp/Makefile.aomp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/face-omp/Makefile.aomp b/src/face-omp/Makefile.aomp index f6042a55d1..20aa572a74 100644 --- a/src/face-omp/Makefile.aomp +++ b/src/face-omp/Makefile.aomp @@ -14,7 +14,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = main +program = main vj-cpu #=============================================================================== # Sets Flags @@ -69,7 +69,7 @@ rectangles.o: ../face-sycl/rectangles.cpp $(HEADERS) vj-cpu: main.o haar-cpu.o image.o stdio-wrapper.o rectangles.o $(CC) $(CFLAGS) -o $@ $+ -vj-gpu: main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o +main: main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o $(CC) $(CFLAGS) $(OMP_TARGET_FLAGS) -o $@ $+ clean: @@ -77,4 +77,4 @@ clean: run: build $(LAUNCHER) ./vj-cpu ../face-cuda/Face.pgm ../face-cuda/info.txt ../face-cuda/class.txt Output-cpu.pgm - $(LAUNCHER) ./vj-gpu ../face-cuda/Face.pgm ../face-cuda/info.txt ../face-cuda/class.txt Output-gpu.pgm + $(LAUNCHER) ./main ../face-cuda/Face.pgm ../face-cuda/info.txt ../face-cuda/class.txt Output-gpu.pgm From ed6b06c877e0ee427b48eb674a16478acdb919b1 Mon Sep 17 00:00:00 2001 From: Paulius Velesko Date: Tue, 10 Mar 2026 16:43:46 +0200 Subject: [PATCH 6/6] Address PR review feedback for executable rename - face-omp (aomp, nvc), face-sycl: restore vj-cpu in program variable, rename vj-gpu target to main - logan-cuda/hip: revert Makefile changes (restore demo target, c++14) - lsqt-cuda/hip: add missing builddir target for obj_gpu directory - multimaterial-hip, -hip/hipcl, -sycl, -omp/aomp, -omp/nvc: restore multimat and multimat_F targets, rename multimat_FL to main - projectile-hip: remove accidentally committed Projectile binary - face-sycl: fix $(program) target override that broke vj-cpu recipe - multimaterial-sycl: add missing all: target so make builds everything --- src/face-omp/Makefile.aomp | 2 +- src/face-omp/Makefile.nvc | 6 +++--- src/face-sycl/Makefile | 4 ++-- src/logan-cuda/Makefile | 4 ++-- src/logan-hip/Makefile | 2 +- src/lsqt-cuda/Makefile | 5 ++++- src/lsqt-hip/Makefile | 5 ++++- src/multimaterial-hip/Makefile | 18 +++++++++++++----- src/multimaterial-hip/Makefile.hipcl | 10 +++++----- src/multimaterial-omp/Makefile.aomp | 8 ++++---- src/multimaterial-omp/Makefile.nvc | 8 ++++---- src/multimaterial-sycl/Makefile | 20 ++++++++++++++++---- src/projectile-hip/Projectile | Bin 39328 -> 0 bytes 13 files changed, 59 insertions(+), 33 deletions(-) delete mode 100755 src/projectile-hip/Projectile diff --git a/src/face-omp/Makefile.aomp b/src/face-omp/Makefile.aomp index 20aa572a74..ad83f2de1b 100644 --- a/src/face-omp/Makefile.aomp +++ b/src/face-omp/Makefile.aomp @@ -70,7 +70,7 @@ vj-cpu: main.o haar-cpu.o image.o stdio-wrapper.o rectangles.o $(CC) $(CFLAGS) -o $@ $+ main: main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o - $(CC) $(CFLAGS) $(OMP_TARGET_FLAGS) -o $@ $+ + $(CC) $(CFLAGS) $(OMP_TARGET_FLAGS) -o $@ $+ clean: rm -f $(program) *.o Output-cpu.pgm Output-gpu.pgm diff --git a/src/face-omp/Makefile.nvc b/src/face-omp/Makefile.nvc index 79ff618242..1693db9486 100644 --- a/src/face-omp/Makefile.nvc +++ b/src/face-omp/Makefile.nvc @@ -13,7 +13,7 @@ LAUNCHER = # Program name & source code list #=============================================================================== -program = main +program = main vj-cpu #=============================================================================== # Sets Flags @@ -63,7 +63,7 @@ rectangles.o: ../face-sycl/rectangles.cpp $(HEADERS) vj-cpu: main.o haar-cpu.o image.o stdio-wrapper.o rectangles.o $(CC) $(CFLAGS) -o $@ $+ -vj-gpu: main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o +main: main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o $(CC) $(CFLAGS) -mp=gpu -gpu=$(SM) -o $@ $+ clean: @@ -71,4 +71,4 @@ clean: run: build $(LAUNCHER) ./vj-cpu ../face-cuda/Face.pgm ../face-cuda/info.txt ../face-cuda/class.txt Output-cpu.pgm - $(LAUNCHER) ./vj-gpu ../face-cuda/Face.pgm ../face-cuda/info.txt ../face-cuda/class.txt Output-gpu.pgm + $(LAUNCHER) ./main ../face-cuda/Face.pgm ../face-cuda/info.txt ../face-cuda/class.txt Output-gpu.pgm diff --git a/src/face-sycl/Makefile b/src/face-sycl/Makefile index 5d63146e90..d995476d06 100644 --- a/src/face-sycl/Makefile +++ b/src/face-sycl/Makefile @@ -19,7 +19,7 @@ HIP_ARCH = gfx908 # Program name & source code list #=============================================================================== -program = main +program = main vj-cpu source = main.cpp @@ -98,7 +98,7 @@ vj-cpu: main.o haar-cpu.o image.o stdio-wrapper.o rectangles.o vj-gpu: main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o $(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS) -$(program): main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o +main: main.o haar-gpu.o image.o stdio-wrapper.o rectangles.o $(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS) clean: diff --git a/src/logan-cuda/Makefile b/src/logan-cuda/Makefile index a314022e6f..5c85383787 100644 --- a/src/logan-cuda/Makefile +++ b/src/logan-cuda/Makefile @@ -24,7 +24,7 @@ obj = $(source:.cu=.o) #=============================================================================== # Standard Flags -CFLAGS := $(EXTRA_CFLAGS) -std=c++17 \ +CFLAGS := $(EXTRA_CFLAGS) -std=c++14 \ -Xcompiler -Wall -Xcompiler -fopenmp \ -arch=$(ARCH) -Isrc @@ -65,7 +65,7 @@ src/logan_functions.o: src/logan_functions.cu \ clean: rm -rf $(program) $(obj) -main: $(program) +demo: $(program) ./$(program) inputs/example.txt 17 21 1 run: $(program) diff --git a/src/logan-hip/Makefile b/src/logan-hip/Makefile index c9c1dd6536..7ee8887f25 100644 --- a/src/logan-hip/Makefile +++ b/src/logan-hip/Makefile @@ -63,7 +63,7 @@ src/logan_functions.o: src/logan_functions.cu \ clean: rm -rf $(program) $(obj) -main: $(program) +demo: $(program) ./$(program) ../logan-cuda/inputs/example.txt 17 21 1 run: $(program) diff --git a/src/lsqt-cuda/Makefile b/src/lsqt-cuda/Makefile index 63e8de3f38..5a894ed48c 100644 --- a/src/lsqt-cuda/Makefile +++ b/src/lsqt-cuda/Makefile @@ -17,7 +17,10 @@ HEADERS = sigma.h vector.h lsqt.h hamiltonian.h model.h anderson.h charge.h comm ODIR = obj_gpu OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ)) -all: main +all: builddir main + +builddir: + mkdir -p $(ODIR) $(ODIR)/%.o: %.cu $(HEADERS) $(CC) $(CFLAGS) -c $< -o $@ diff --git a/src/lsqt-hip/Makefile b/src/lsqt-hip/Makefile index 4f83e2103e..a639d34647 100644 --- a/src/lsqt-hip/Makefile +++ b/src/lsqt-hip/Makefile @@ -16,7 +16,10 @@ HEADERS = sigma.h vector.h lsqt.h hamiltonian.h model.h anderson.h charge.h comm ODIR = obj_gpu OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ)) -all: main +all: builddir main + +builddir: + mkdir -p $(ODIR) $(ODIR)/%.o: %.cu $(HEADERS) $(CC) $(CFLAGS) -c $< -o $@ diff --git a/src/multimaterial-hip/Makefile b/src/multimaterial-hip/Makefile index 3d07192e02..bfa9f44895 100644 --- a/src/multimaterial-hip/Makefile +++ b/src/multimaterial-hip/Makefile @@ -33,18 +33,26 @@ endif #=============================================================================== # Program name & source code list #=============================================================================== -program = main +program = main multimat multimat_F all: $(program) source=compact.cu full_matrix.cu multimat.cu -$(program): $(source) +multimat: $(source) + $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) +multimat_F: $(source) + $(CC) $(CFLAGS) -DFUSED $^ -o $@ $(LDFLAGS) +main: $(source) $(CC) $(CFLAGS) -DFUSED -DLINKED $^ -o $@ $(LDFLAGS) -clean: +clean: rm -rf $(program) run: $(program) - $(LAUNCHER) ./$(program) 2000 2000 - $(LAUNCHER) ./$(program) 2000 2000 0.3 0.05 0.05 + $(LAUNCHER) ./main 2000 2000 + $(LAUNCHER) ./multimat_F 2000 2000 + $(LAUNCHER) ./multimat 2000 2000 + $(LAUNCHER) ./main 2000 2000 0.3 0.05 0.05 + $(LAUNCHER) ./multimat_F 2000 2000 0.3 0.05 0.05 + $(LAUNCHER) ./multimat 2000 2000 0.3 0.05 0.05 diff --git a/src/multimaterial-hip/Makefile.hipcl b/src/multimaterial-hip/Makefile.hipcl index cfe779ad28..9dc7cf9a49 100644 --- a/src/multimaterial-hip/Makefile.hipcl +++ b/src/multimaterial-hip/Makefile.hipcl @@ -32,7 +32,7 @@ endif #=============================================================================== # Program name & source code list #=============================================================================== -program = main +program = main multimat multimat_F all: $(program) @@ -42,17 +42,17 @@ multimat: $(source) $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) multimat_F: $(source) $(CC) $(CFLAGS) -DFUSED $^ -o $@ $(LDFLAGS) -multimat_FL: $(source) +main: $(source) $(CC) $(CFLAGS) -DFUSED -DLINKED $^ -o $@ $(LDFLAGS) -clean: +clean: rm -rf $(program) run: $(program) - ./multimat_FL 2000 2000 + ./main 2000 2000 ./multimat_F 2000 2000 ./multimat 2000 2000 - ./multimat_FL 2000 2000 0.3 0.05 0.05 + ./main 2000 2000 0.3 0.05 0.05 ./multimat_F 2000 2000 0.3 0.05 0.05 ./multimat 2000 2000 0.3 0.05 0.05 diff --git a/src/multimaterial-omp/Makefile.aomp b/src/multimaterial-omp/Makefile.aomp index 5f44e0ac8e..c9a8a4a810 100644 --- a/src/multimaterial-omp/Makefile.aomp +++ b/src/multimaterial-omp/Makefile.aomp @@ -13,7 +13,7 @@ LAUNCHER = #=============================================================================== # Program name & source code list #=============================================================================== -program = main +program = main multimat multimat_F source=compact.cpp full_matrix.cpp multimat.cpp @@ -58,16 +58,16 @@ multimat: $(source) multimat_F: $(source) $(CC) $(CFLAGS) -DFUSED $^ -o $@ $(LDFLAGS) -multimat_FL: $(source) +main: $(source) $(CC) $(CFLAGS) -DFUSED -DLINKED $^ -o $@ $(LDFLAGS) clean: rm -rf $(program) $(obj) run: $(program) - $(LAUNCHER) ./multimat_FL 2000 2000 + $(LAUNCHER) ./main 2000 2000 $(LAUNCHER) ./multimat_F 2000 2000 $(LAUNCHER) ./multimat 2000 2000 - $(LAUNCHER) ./multimat_FL 2000 2000 0.3 0.05 0.05 + $(LAUNCHER) ./main 2000 2000 0.3 0.05 0.05 $(LAUNCHER) ./multimat_F 2000 2000 0.3 0.05 0.05 $(LAUNCHER) ./multimat 2000 2000 0.3 0.05 0.05 diff --git a/src/multimaterial-omp/Makefile.nvc b/src/multimaterial-omp/Makefile.nvc index 00aa5afea1..3dedaaddc3 100644 --- a/src/multimaterial-omp/Makefile.nvc +++ b/src/multimaterial-omp/Makefile.nvc @@ -13,7 +13,7 @@ LAUNCHER = #=============================================================================== # Program name & source code list #=============================================================================== -program = main +program = main multimat multimat_F source=compact.cpp full_matrix.cpp multimat.cpp @@ -55,16 +55,16 @@ multimat: $(source) multimat_F: $(source) $(CC) $(CFLAGS) -DFUSED $^ -o $@ $(LDFLAGS) -multimat_FL: $(source) +main: $(source) $(CC) $(CFLAGS) -DFUSED -DLINKED $^ -o $@ $(LDFLAGS) clean: rm -rf $(program) $(obj) run: $(program) - $(LAUNCHER) ./multimat_FL 2000 2000 + $(LAUNCHER) ./main 2000 2000 $(LAUNCHER) ./multimat_F 2000 2000 $(LAUNCHER) ./multimat 2000 2000 - $(LAUNCHER) ./multimat_FL 2000 2000 0.3 0.05 0.05 + $(LAUNCHER) ./main 2000 2000 0.3 0.05 0.05 $(LAUNCHER) ./multimat_F 2000 2000 0.3 0.05 0.05 $(LAUNCHER) ./multimat 2000 2000 0.3 0.05 0.05 diff --git a/src/multimaterial-sycl/Makefile b/src/multimaterial-sycl/Makefile index 9bfd2e02aa..5c7d2b0724 100644 --- a/src/multimaterial-sycl/Makefile +++ b/src/multimaterial-sycl/Makefile @@ -19,7 +19,7 @@ HIP_ARCH = gfx908 # Program name & source code list #=============================================================================== -program = main +program = main multimat multimat_F source=compact.cpp full_matrix.cpp multimat.cpp @@ -66,12 +66,24 @@ endif # Targets to Build #=============================================================================== -$(program): $(source) +all: $(program) + +multimat: $(source) + $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) + +multimat_F: $(source) + $(CC) $(CFLAGS) -DFUSED $^ -o $@ $(LDFLAGS) + +main: $(source) $(CC) $(CFLAGS) -DFUSED -DLINKED $^ -o $@ $(LDFLAGS) clean: rm -rf $(program) run: $(program) - $(LAUNCHER) ./$(program) 2000 2000 - $(LAUNCHER) ./$(program) 2000 2000 0.3 0.05 0.05 + $(LAUNCHER) ./main 2000 2000 + $(LAUNCHER) ./multimat_F 2000 2000 + $(LAUNCHER) ./multimat 2000 2000 + $(LAUNCHER) ./main 2000 2000 0.3 0.05 0.05 + $(LAUNCHER) ./multimat_F 2000 2000 0.3 0.05 0.05 + $(LAUNCHER) ./multimat 2000 2000 0.3 0.05 0.05 diff --git a/src/projectile-hip/Projectile b/src/projectile-hip/Projectile deleted file mode 100755 index cf84ebc02ea6485a9d6e7344359977116b3d474c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 39328 zcmeHw4|H4AndkGr#7T@LAW2goMI-_oXcWtKj75E4!RIRN5^VwaN`YDBZ5BbPm0l>HORFVb0ZP3U%*;bCvS3Y7*+lk84yo2;)e{))d(##2#_6Q*^s=s#gwEE>;@t{rV@UfbN{ zNhdrFqMUxQ4vwi!TefTEW7;$^rLW4#vz&<`memP*8F-dk?K+5@rV(R$-gs`r%FX|I z6AYa^B^V!)7 z|IaNH27f`3c5NtvXN%aszKH*|MeO{25&83r;Nc>6{$mk;ZZ0D4En@#4irBfUi2OH; z*xz3Sj~21hQ>5PMBJzJz#QrB?$AzOXrHaTOgy4MR^`VhOTu+;!l&R~M=)8i%(PXbN5>6g~3i823vNIHm zbtdA2(VWxdKg~sZHy=OcU#I0-e@AN4}{W&jM)h;XMVoXD73 zIvO9;!in^trf-k$kH#bVHY1%GF*I0Dqb<>NBHYl3v6V6t>{zrlEJxZ%C>qz&sZcxu zJUklG2QgG)91qDa$e$L z3*Xe)sW*D+wM_wkN9WF+$TxYst#jDMhB<7j2D$bQzwY%k&MEME?W~p88$69oXR|G{ z*#^&gZCyGU3LEQ^`;3^8-kVs5@nm8MuR~kbg)tlYFzeRs^LiRQUY^u3Rm-(9oQunF zy;LUt&eAG@RpN62j)f>K$CXlL@sM8_%McOjSXK!DF@@ma3`TzNkdvS@eKx>eENXS=d z8zpb9`64dmDzyN3Ci?Z3tgj9HH@IBF@lGz_ND9}2 z7JvA5i}D(Z*IX)1+i-PF#j>YuI67)J9k=1<%%Yn1f(^gKhM%zEm)dYm`dJ3-d^ciQmfHvDcI{xKVVpABDO!ymBWAGhIuXTvYF;SbsHi){E|8_sK9m8Qq6 z9OLi_1%f_3W--JswzA^$_?X2IcUf8S`NEjR5SLR?04Hp?oYDf%*>JZ&N*|>Nlp;`y zKq&&H2$UjFia;p>r3jQFP>Mh)0;LF)BJigcfzyspyyF{xwc0mX^@xt`oQY|(Jb&Cb z{$%x0(Uko9?*h(W`Yb*j7q=ltewbx5C-O*_K0%&aS~JH5|0sEGWz9?r{=bsv7S_x| zf`5>FCHV&g|DVZoD{JO%!T$|;Zeh)g3I2=Zxm_`n6#So)=a$vX9>IT>Jh!T5f`Y%5 zJh!N3+612>&#k_hdcog9zJ|O@@B`$zu>7m(*x)XbRR z&m+$*sF|eT7nA4K)65>hmy_p~(@aqC@7xUj0`hHwf0I17o@VL={|b3-InB5P{|oZm zYMOBh{=rXc+Th*bMdJAIzUI$9f3q+93*Y!JPX+tCz0=-jd{Y~LgHFvayC33j4SF0G z9}@DwzYc@Gsj3G_TF;ovFtoNnh(l{p{)FS=F$x})6!Hg!{Q6r-*1Ye_p7I@e{W{-~ zGZntFr+m-9Z!U#_wbDR!{=}f;;;ys$^lxnAcIaxEE4TZ`H@>nPSzq>7W{q!h<8t7+ zHR!cm1RqaTtp#89Y1BPiKlNw!qfq)Y@dL+QCt;!e#`YcU{e74kb-wIrfA;>> z<$Y6t}npTqutakdxpIqA8`fJC856#64 zulrQ{?)ID8^`nD>XWN4Y@APGFbGP`irn}xZ)x}(wyN$Ve=6t@X+uSbS6#Vy1^}DNm z*`Me3qlvyr)9sq!$zj$1+eM(a zGt>uPy%T}Y{)jar=C*9WH7j_zcBw>#N|Hq@M4W{*dE z{yE2?Dd+^UzkZCmf$Te?Hq3%%rwt z5V{hrJneH_F@4%`ML>+7s%tR&F$j;GcI=u)A4I`ERF)fnr}PpX)WXhkT9M;Qo%@P# z0RhduBy-N(512dnB>RK|<MtlImU_w7fy_U4+Xojv3p z1LL@HniIt3JBBd?UL&`MT$0@5!i6*xy1j3Ef8w2HpjKd(S-CcnO1H&0PhN-Kv5i;Q zZg-qp>28NLF3MVO_SgRLrT z{??u)5BrYHxXO-XzkB4Bi;w(%LD}(I=5Rp)-9S7*bs5IIVP5&(`S|;P`%mT1+Kit?K^x1 z2-5BT)?aoerl4t%bhv zY0+ze)>D~Z`6kiMiM&~ryAhtiwfk{Q(7ixej$@?0H~W4d`$_jCB5eh5;&Gh9{HX6r ztQ7?@dK_c)UlpU}bE32QcOp6`D-aRJ!WxK(hHN*x>J49O%ensYvH%PoTQIA#9;B0Q}Ji=Ni4^Z7lN$qzZ7n?efb zb4-ifE2~NRSJrT9nJcXcx6s|9QuFU%T*lBO){sTJCpMA-c6*CvE^K!^ys7i#@<0~ncZAm84s3S@tm>p+1odn~sYG?0Bg zAgXz78#=qCcpZdJeNaxxW&XzLEPH3VJ8rHmm8; z1C+v~c3Fe`3t({;`@kucYa*937c5=}i@7_6-dXSpg6RTq8Nr(Y=3aa=pFer&$?}s3 z-aw|nGyb$=`uxiPeFNu{Y_dF5R zoFC+#085ouK+j%3@`~Bzn_T%r1Rf`r3>M9e53my|sGU9P%T_%CR-ELxBI4BTn_B<& z77o^PK6M^Q_GdW1wjbunjTcx;poeoizwl|tD%~Vd7@_&8bGAUC{ShqeQVkbnxd(rP zil#OqJQ}W-T%Vd*gK>l}4Tq?TQMR#_x>#nH1#@vab*ySN5K+jly=U9P@4LJ_?ek~f z7T2Te!}y-}D8Gy54ndP+eu22i%Kj{OJ^+9A7<}uY5WjG8r0kY*J(U#X0DcAjS%PaQ z$c9m{Q3+Nn!6UPRizvvisA7C8L3~%REZ#RO_&OGVM}cc;BK)WFuClfK`gRw&)kecE`V~6fZ>5!DU~8nia;p>r3jQFP>Mh) z0;LF)B2bDzDFUSklp;`yz@JtG_=MArT7R3SHFX~S?M3bI{yIIGt>=#tYzcp2upbs~ zm9e}qweK@hp&`SyS3GFwGDeMXhED^!%;<=5wd>MBS6zC|Vr_dGLSWObYf?ti2$|O| z)`IPQeOgbuKcKb8hhiwzTssUr)Q2bZnBNwPQ$=(2C-8iiw5PdxL!;4=%!tcpM2Ch= zlr3jQFP>Mh)0;LF)B2bFJpH>8P zy))3hWs|rY5hz8V6oFC% zN)aeUpcH{p1WFMoMd1Hq1S-l`<9UWMtrqVXy+PJr0hccF9b~s$3p3}=j^=%R@oB7>Z7&23YPFN ziZHaThD@gLoFWZ(u}x?mp)UbQsc`5qJtg-@A(xxH(bIoBNWdh zg$=$efcG(YqD_s+3K_m2Ae@Nr^F%EkkB>_k@>SZ(+480)WPwzO_fC#vVxru|a?9p= ztGo*T4MN#$YPPTn@s7z*BqH=LW%&qwsub_Jk48q5sle@c*(t3dxjww8BHD^q15;IxT z)&T!wa}34si}TUi)Z2vj3NJ$5();7{j_U+-K6>Z~O=6i=3E4EefTt~@s zUfavrPxJ9go_(gumqDLvtav64lsx6ya4?Z)OkHGn46ar1%1s<V(?D31HtyFz00m*b!ZIOTYrQM#N1N`9>@ zQ}Pq2i+0xGpe>GvJ0-^R196Ut8d+Zh@?|($aj;zBJXa8>E#k^9&k?MX<49r6$P=e6 zrO$I0_1WJnS3a;FmT}xEeV*TFlVu9yIgUQCOxe5!d1aI3N|xt8>hn+-&w<40lfrl& zB+oL1wIffw&4zU#PnBTo&FGL6X>2t^LZy4IQE3~Y6aI($N>+6eh#$l$$VbC*$cW{lbFhG-KLd| zI?FDsSy;^%p%CY~@$@(IdCpO-YayE@<~PUnL;o$GKLt6h*4b0L;(EuD{ncaIbr)>7 zqS3vIa@60AV-)(;1Z3iPF>&lc8{Q&zeXX;jc11_6tG%|at2Q`Z^|{KsDn4Ic{$g!i zd#y_pL7@8Rv(Nn#{dow78|{u#x2twf`Hi*1UA0MnEh^~;bR36?@`vbKyRzL;Th~!r z-(K6Ysdl<-eBtL7OjX@g`T2@F$}7$FIp_UdqCUuG;$X^77BsI$?})F;U(ITOv@s zwa$JhvTaOdw*~{ECl=nn7Gw89)gNpd*H$0;csc5+)WLj&_Fc7bz9zM!vCv0ir&eOD z9EU&W3B>xy=gY2nrK0Lf4(-kbRrfozcNSLtwL|;HqL1C{(7sdiowC1oXfM^)Jm%1T zQ(Nr3jQFP>Mh)0;LF)B2bDzDFUSk z{3%9&o0>@K{~}I{FY)*u%`fLj@@uvB1in+-dH(N6JJ0{kXy^IAC+$4{_ahVcYME}W zuqgM8L~>c=9E)h~dMopB$*ceGsP=>TJ)epDzD(->IjVgJY$=HJ+xPPcW=3UwRTixI z7FrqZ*)lyK%NJX$_MqgsU&XY-B4V#sW(ARAT2Af}$YyHCWrq7BOtQM!y>RhncN<02ZQnudLwPq@#EyUhtJt@08@5{~MP72bRetKCON3`Q-WAOgVm` z2o}VRdc?;HaQ>b^T&-(hMe^gb46Bjrpv8+ABfDMT%V*aUt5nl&Lxy(L|CLqvokD(@ zrq(Bge-)Ye{Qss9SgHl%O46doKt#Jd7JsiSei4*@)=NLt`tX{-FVd2fIKBKX6=SHZq(on_&5Y3Nzt z=a!$1v$Ee+Zu#Sqfs}4({9VGOglzOJ;OCV)X3uM?=pEvUvC$gXSAArIwaZ1lcErkG z3*3ocOHYl>E!$i~ez%Z6JN}gxe@B_mAM5|u*UnxSM5V&t7Lk9Z2>vr!Z_7bdqeXuS z+%*>x-032AaQoHl@6>j+)xhWTzpn^BQUw2O5&W-;;9nCs;wygv{U%Q%$;9W)V?M3k0h?nCc!li1o=x2+_-(LhjRs=sGaIDX6%dYr6 z3)%B=K{j8zJVo$#@h$y%hRyqvRs_=`3vCZmS3n9o}b?!j;p%D z{~LaOk$T-l@J|9im%m=MS=Az3B5f!l-wXT__@n->w>mFGi^ywz;gsq1Byb~DXdtSa zp&<=G+RWg8R)n>Pkurv&Y12sQ=7=7SCE`XJl97Zy6iW<*VtNFxE=ud6%qVWo8%f3t z(};NL=a1hz$&8E~fQpU73y`Ab9MQ8kDtf{h4Hr4OF&Z|K zCLA7!8I4fK)0*l|OTJG@B16f{Ks1hfFXNGzA+f=bNo;>AluQ~Foc9e%b1br%5bW93 z-rKErZ|TzU;-yW2tsU(FK8V`a-LLnzci=HpP4BvCOM9=sQ^OmZMx!QlHf`Cicl)HO zuWOq&5{kyPbTmHLwkhE6=+qlL4W9LuYr#xeQU z(+|40O^$`0kl6tt+|P-j5Hdr0+6<-GR`h|A*%4yE2GVI+h@xJ!ED=V%4Xw~K_C>=6 z3Nr(Er1!&Ka^b@wOe8-TX&v=6g%cTbuH{`@Hust9!{&jc;SYCv8}X*D{n3aK7sIrBjvF4Y7Y*Ff zmsmd-Lubw{)KG7iXm{U%co=Po^Cn+?S0omkW5lx1n9P{n;Q~)uQ^p|XWISwq;8kEz zwsUk;$Cyqh*oEc+eP4ZB=gyt&9e&;G!6ZTR8tPRTV@7<)9M+9gDv=6qE~v<0ziRsS z`2J`-qHixB-Hp-OuiG2r zY1KshtnSzzR|}18aM4|FG?7M+rwu(89Y|r!38gvV@-#NU2#2mU>8x7RyxQgUZc1i? zp%g}+5!=>hHd`-T^V{E~))(^k)$85eeT_Q97)>X_4UHHuDKin9HP_f8I>u}kU6*Lo zcQkk#ur`Jw2e>qb_cr3G^0__k@wPHry~ap5iP<8DF&;(7o8CrLbix?i-tce;YiueM zHPaYl2$$(?M6;t|T}u10#=ynCW<9tWZc4YTnafymzN;9{o$Y!gotRw#Kf*1c7VL{!m%VL1u82F_|WHsRK^ z^nnp9<)DbUpu;MM#m`73HBUTY8lIte#)B`Q7~|#v31M`v32UNHmWzEKgp; z5g1e)Y6^$voTe+n5htau zzGv?MP7$TA_7fFV`-cz_iLth)o566ePU)-tIYsFolk#85DaxB zb!P08{}R@2MTWT2SNo5Os{Kb*ztUIjKP2@#q(QZxsi@ljq(1j(3-#{;#+Wd^BDv;L zwa+V2;j7A%W^vf{T`r=Url`1=&w|7!uB_+KzXWI3cdnAE zNKW(F{X4afSJ2$q@vHne4PA##U;X}|sFH(-NQzgK8=;K9s$YG7R8+}X+God~;%lJH zxuf*e{+gooGJa})DSN72_d(ZQ|6%$2g`)MUB1x6LqRXIc*H^!PC|b=zTT*(8exg8M z?OQ3T)){3&=_%e_ps)5p75y;%X6VzVil5qVQS`&~H^}-6