fix: improve modern diag manager performance (#1634)
[FMS.git] / test_fms / diag_manager / test_multiple_send_data.sh
blob1240e1d41433a764756aeb0b28b1149150ce8ce9
1 #!/bin/sh
3 #***********************************************************************
4 #* GNU Lesser General Public License
5 #*
6 #* This file is part of the GFDL Flexible Modeling System (FMS).
7 #*
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
16 #* for more details.
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.
23 . ../test-lib.sh
25 if [ -z "${skipflag}" ]; then
26 # create and enter directory for in/output files
27 output_dir
29 cat <<_EOF > diag_table.yaml
30 title: test_multiple_sends
31 base_date: 2 1 1 0 0 0
32 diag_files:
33 - file_name: test_multiple_sends
34 time_units: hours
35 unlimdim: time
36 freq: 1 days
37 varlist:
38 - module: atmos
39 var_name: ua
40 reduction: average
41 kind: r4
42 - module: atmos
43 var_name: va
44 reduction: average
45 kind: r4
46 _EOF
48 # remove any existing files that would result in false passes during checks
49 rm -f *.nc
51 my_test_count=1
52 printf "&diag_manager_nml \n use_modern_diag=.true. \n/" | cat > input.nml
53 test_expect_success "Running diag_manager with fields that call send_data multiple times for the same time (test $my_test_count)" '
54 mpirun -n 1 ../test_multiple_send_data
57 test_done