1# Copyright (c) 2017-2018, Lawrence Livermore National Security, LLC. 2# Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707. 3# All Rights reserved. See files LICENSE and NOTICE for details. 4# 5# This file is part of CEED, a collection of benchmarks, miniapps, software 6# libraries and APIs for efficient high-order finite element and spectral 7# element discretizations for exascale applications. For more information and 8# source code availability see http://github.com/ceed. 9# 10# The CEED research is supported by the Exascale Computing Project 17-SC-20-SC, 11# a collaborative effort of two U.S. Department of Energy organizations (Office 12# of Science and the National Nuclear Security Administration) responsible for 13# the planning and preparation of a capable exascale ecosystem, including 14# software, applications, hardware, advanced system engineering and early 15# testbed platforms, in support of the nation's exascale computing imperative. 16 17 18function run_tests() 19{ 20 $dry_run cd "$test_exe_dir" 21 22 # Some of the available options are: 23 # -degree <1>: Polynomial degree of tensor product basis 24 # -qextra <2>: Number of extra quadrature points 25 # -ceed </cpu/self>: CEED resource specifier 26 # -local <1000>: Target number of locally (per rank) owned degrees of freedom 27 28 # The variables 'max_dofs_node', and 'max_p' can be set on the command line 29 # invoking the 'benchmark.sh' script. 30 local ceed="${ceed:-/cpu/self}" 31 local common_args=(-ceed $ceed -pc_type none -benchmark) 32 local max_dofs_node_def=$((3*2**20)) 33 local max_dofs_node=${max_dofs_node:-$max_dofs_node_def} 34 local max_loc_dofs=$((max_dofs_node/num_proc_node)) 35 local max_p=${max_p:-8} 36 local sol_p= 37 for ((sol_p = 1; sol_p <= max_p; sol_p++)); do 38 local loc_el= 39 for ((loc_el = 1; loc_el*sol_p**3 <= max_loc_dofs; loc_el = 2*loc_el)); do 40 local loc_dofs=$((loc_el*sol_p**3)) 41 local all_args=("${common_args[@]}" -degree $sol_p -local $loc_dofs -problem $bp) 42 if [ -z "$dry_run" ]; then 43 echo 44 echo "Running test:" 45 quoted_echo $mpi_run ./petsc-bps "${all_args[@]}" 46 $mpi_run ./petsc-bps "${all_args[@]}" || \ 47 printf "\nError in the test, error code: $?\n\n" 48 else 49 $dry_run $mpi_run ./petsc-bps "${all_args[@]}" 50 fi 51 done 52 done 53} 54 55test_required_examples="petsc-bps" 56