1# Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and other CEED contributors. 2# All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3# 4# SPDX-License-Identifier: BSD-2-Clause 5# 6# This file is part of CEED: http://github.com/ceed 7 8function run_tests() 9{ 10 $dry_run cd "$test_exe_dir" 11 12 # Some of the available options are: 13 # -degree <1>: Polynomial degree of tensor product basis 14 # -q_extra <1>: Number of extra quadrature points 15 # -ceed </cpu/self>: CEED resource specifier 16 # -local <1000>: Target number of locally (per rank) owned nodes 17 18 # The variables 'max_dofs_node', and 'max_p' can be set on the command line 19 # invoking the 'benchmark.sh' script. 20 local ceed="${ceed:-/cpu/self}" 21 local common_args=(-ceed $ceed -pc_type none -benchmark) 22 local max_dofs_node_def=$((3*2**20)) 23 local max_dofs_node=${max_dofs_node:-$max_dofs_node_def} 24 local max_loc_nodes=$((max_dofs_node/num_proc_node)) 25 local max_p=${max_p:-8} 26 local sol_p= 27 for ((sol_p = 1; sol_p <= max_p; sol_p++)); do 28 local loc_el= 29 for ((loc_el = 1; loc_el*sol_p**3 <= max_loc_nodes; loc_el = 2*loc_el)); do 30 local loc_dofs=$((loc_el*sol_p**3)) 31 local all_args=("${common_args[@]}" -degree $sol_p -local $loc_dofs -problem $bp) 32 if [ -z "$dry_run" ]; then 33 echo 34 echo "Running test:" 35 quoted_echo $mpi_run ./petsc-bpsraw "${all_args[@]}" 36 $mpi_run ./petsc-bpsraw "${all_args[@]}" || \ 37 printf "\nError in the test, error code: $?\n\n" 38 else 39 $dry_run $mpi_run ./petsc-bpsraw "${all_args[@]}" 40 fi 41 done 42 done 43} 44 45test_required_examples="petsc-bpsraw" 46