3 #***********************************************************************
4 #* GNU Lesser General Public License
6 #* This file is part of the GFDL Flexible Modeling System (FMS).
8 #* FMS is free software: you can redistribute it and/or modify it under
9 #* the terms of the GNU Lesser General Public License as published by
10 #* the Free Software Foundation, either version 3 of the License, or (at
11 #* your option) any later version.
13 #* FMS is distributed in the hope that it will be useful, but WITHOUT
14 #* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 #* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 #* You should have received a copy of the GNU Lesser General Public
19 #* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
20 #***********************************************************************
22 # Set common test settings.
25 if [ -z "${skipflag}" ]; then
26 # create and enter directory for in/output files
29 cat <<_EOF > diag_table.yaml
31 base_date: 2 1 1 0 0 0
69 - file_name: test_sum_regional
89 printf "&diag_manager_nml \n use_modern_diag=.true. \n / \n&test_reduction_methods_nml \n test_case = 0 \n/" |
cat > input.nml
90 test_expect_success
"Running diag_manager with "sum" reduction method (test $my_test_count)" '
91 mpirun -n 6 ../test_reduction_methods
93 test_expect_success
"Checking answers for the "sum" reduction method (test $my_test_count)" '
94 mpirun -n 1 ../check_time_sum
97 my_test_count
=`expr $my_test_count + 1`
98 printf "&diag_manager_nml \n use_modern_diag=.true. \n / \n &test_reduction_methods_nml \n test_case = 0 \n mask_case = 1 \n \n/" |
cat > input.nml
99 test_expect_success
"Running diag_manager with "sum" reduction method, logical mask (test $my_test_count)" '
100 mpirun -n 6 ../test_reduction_methods
102 test_expect_success
"Checking answers for the "sum" reduction method, logical mask (test $my_test_count)" '
103 mpirun -n 1 ../check_time_sum
106 my_test_count
=`expr $my_test_count + 1`
107 printf "&diag_manager_nml \n use_modern_diag=.true. \n / \n &test_reduction_methods_nml \n test_case = 0 \n mask_case = 2 \n \n/" |
cat > input.nml
108 test_expect_success
"Running diag_manager with "sum" reduction method, real mask (test $my_test_count)" '
109 mpirun -n 6 ../test_reduction_methods
111 test_expect_success
"Checking answers for the "sum" reduction method, real mask (test $my_test_count)" '
112 mpirun -n 1 ../check_time_sum
115 export OMP_NUM_THREADS
=1
116 my_test_count
=`expr $my_test_count + 1`
117 printf "&diag_manager_nml \n use_modern_diag=.true. \n / \n&test_reduction_methods_nml \n test_case = 1 \n \n/" |
cat > input.nml
118 test_expect_success
"Running diag_manager with "sum" reduction method with openmp (test $my_test_count)" '
119 mpirun -n 6 ../test_reduction_methods
121 test_expect_success
"Checking answers for the "sum" reduction method with openmp (test $my_test_count)" '
122 mpirun -n 1 ../check_time_sum
125 my_test_count
=`expr $my_test_count + 1`
126 printf "&diag_manager_nml \n use_modern_diag=.true. \n / \n&test_reduction_methods_nml \n test_case = 1 \n mask_case = 1 \n \n/" |
cat > input.nml
127 test_expect_success
"Running diag_manager with "sum" reduction method with openmp, logical mask (test $my_test_count)" '
128 mpirun -n 6 ../test_reduction_methods
130 test_expect_success
"Checking answers for the "sum" reduction method with openmp, logical mask (test $my_test_count)" '
131 mpirun -n 1 ../check_time_sum
134 my_test_count
=`expr $my_test_count + 1`
135 printf "&diag_manager_nml \n use_modern_diag=.true. \n / \n&test_reduction_methods_nml \n test_case = 1 \n mask_case = 2 \n \n/" |
cat > input.nml
136 test_expect_success
"Running diag_manager with "sum" reduction method with openmp, real mask (test $my_test_count)" '
137 mpirun -n 6 ../test_reduction_methods
139 test_expect_success
"Checking answers for the "sum" reduction method with openmp, real mask (test $my_test_count)" '
140 mpirun -n 1 ../check_time_sum
142 export OMP_NUM_THREADS
=2
144 my_test_count
=`expr $my_test_count + 1`
145 printf "&diag_manager_nml \n use_modern_diag=.true. \n / \n&test_reduction_methods_nml \n test_case = 2 \n \n/" |
cat > input.nml
146 test_expect_success
"Running diag_manager with "sum" reduction method with halo output (test $my_test_count)" '
147 mpirun -n 6 ../test_reduction_methods
149 test_expect_success
"Checking answers for the "sum" reduction method with halo output (test $my_test_count)" '
150 mpirun -n 1 ../check_time_sum
153 my_test_count
=`expr $my_test_count + 1`
154 printf "&diag_manager_nml \n use_modern_diag=.true. \n / \n&test_reduction_methods_nml \n test_case = 2 \n mask_case = 1 \n \n/" |
cat > input.nml
155 test_expect_success
"Running diag_manager with "sum" reduction method with halo output with logical mask (test $my_test_count)" '
156 mpirun -n 6 ../test_reduction_methods
158 test_expect_success
"Checking answers for the "sum" reduction method with halo output with logical mask (test $my_test_count)" '
159 mpirun -n 1 ../check_time_sum
162 my_test_count
=`expr $my_test_count + 1`
163 printf "&diag_manager_nml \n use_modern_diag=.true. \n / \n&test_reduction_methods_nml \n test_case = 2 \n mask_case = 2 \n \n/" |
cat > input.nml
164 test_expect_success
"Running diag_manager with "sum" reduction method with halo output with real mask (test $my_test_count)" '
165 mpirun -n 6 ../test_reduction_methods
167 test_expect_success
"Checking answers for the "sum" reduction method with halo output with real mask (test $my_test_count)" '
168 mpirun -n 1 ../check_time_sum