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 17function run_tests() 18{ 19 $dry_run cd "$test_exe_dir" 20 21 # Some of the available options are: 22 # -degree <1>: Polynomial degree of tensor product basis 23 # -q_extra <1>: Number of extra quadrature points 24 # -ceed </cpu/self>: CEED resource specifier 25 # -local <1000>: Target number of locally (per rank) owned nodes 26 27 # The variables 'max_dofs_node', and 'max_p' can be set on the command line 28 # invoking the 'benchmark.sh' script. 29 local ceed="${ceed:-/cpu/self}" 30 local common_args=(-ceed $ceed -pc_type none -benchmark) 31 local max_dofs_node_def=$((3*2**20)) 32 local max_dofs_node=${max_dofs_node:-$max_dofs_node_def} 33 local max_loc_nodes=$((max_dofs_node/num_proc_node)) 34 local max_p=${max_p:-8} 35 local sol_p= 36 for ((sol_p = 1; sol_p <= max_p; sol_p++)); do 37 local loc_el= 38 for ((loc_el = 1; loc_el*sol_p**3 <= max_loc_nodes; loc_el = 2*loc_el)); do 39 local loc_dofs=$((loc_el*sol_p**3)) 40 local all_args=("${common_args[@]}" -degree $sol_p -local $loc_dofs -problem $bp) 41 if [ -z "$dry_run" ]; then 42 echo 43 echo "Running test:" 44 quoted_echo $mpi_run ./petsc-bpsraw "${all_args[@]}" 45 $mpi_run ./petsc-bpsraw "${all_args[@]}" || \ 46 printf "\nError in the test, error code: $?\n\n" 47 else 48 $dry_run $mpi_run ./petsc-bpsraw "${all_args[@]}" 49 fi 50 done 51 done 52} 53 54test_required_examples="petsc-bpsraw" 55