You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
Bash
40 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
source "${script_dir}/../common/testlib.sh"
|
|
|
|
# Variables definition
|
|
dir1="serial"
|
|
dir2="parallel"
|
|
num_procs=$(get_num_procs)
|
|
log_dir="logs"
|
|
log_file_name="${log_dir}/psblas_gedot_test.log"
|
|
|
|
ensure_dirs runs serial parallel vectors "${log_dir}"
|
|
log_header "${log_file_name}" "psb_gedot"
|
|
|
|
|
|
# Check if the executable ELF file exists
|
|
if [ ! -f "./runs/psb_gedot_test" ]; then
|
|
warn "Executable not found. Running make..."
|
|
make
|
|
if [ ! -f "./runs/psb_gedot_test" ]; then
|
|
err "Failed to create executable. Check make command."
|
|
fi
|
|
else
|
|
info "The executable already exists. Skipping the make process."
|
|
fi
|
|
|
|
|
|
# Excecute tests and save results
|
|
info "Running the PSBLAS psb_gedot test..."
|
|
echo "" >> "${log_file_name}"
|
|
run_mpi 1 ./runs/psb_gedot_test "single process computation"
|
|
run_mpi "$num_procs" ./runs/psb_gedot_test "${num_procs} processes computation"
|
|
|
|
|
|
# Iterate through files in the first directory
|
|
PSBLAS_TEST_EPS_MODE=gamma_n PSBLAS_TEST_N=10000 PSBLAS_TEST_UNIT_ROUNDOFF=1.19e-7 \
|
|
compare_dirs "$dir1" "$dir2" "${log_file_name}"
|
|
|
|
info "PSBLAS psb_gedot test successfully completed." |