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 # -cells <10,10,10>: Target number of locally (per rank) owned mesh cells 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 loc_cell=$(echo "e(l($loc_dofs)/3)" | bc -l) 42 loc_cell=${loc_cell%.*} 43 local all_args=("${common_args[@]}" -degree $sol_p -cells $loc_cell,$loc_cell,$loc_cell -problem $bp) 44 if [ -z "$dry_run" ]; then 45 echo 46 echo "Running test:" 47 quoted_echo $mpi_run ./petsc-bps "${all_args[@]}" 48 $mpi_run ./petsc-bps "${all_args[@]}" || \ 49 printf "\nError in the test, error code: $?\n\n" 50 else 51 $dry_run $mpi_run ./petsc-bps "${all_args[@]}" 52 fi 53 done 54 done 55} 56 57test_required_examples="petsc-bps" 58