diff --git a/.github/workflows/prebuild.yaml b/.github/workflows/prebuild.yaml new file mode 100644 index 00000000..80e34608 --- /dev/null +++ b/.github/workflows/prebuild.yaml @@ -0,0 +1,47 @@ +name: ccpp-prebuild + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +defaults: + run: + shell: bash + +jobs: + unit-tests: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10"] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: ccpp-prebuild unit tests + run: | + export PYTHONPATH=$(pwd)/scripts:$(pwd)/scripts/parse_tools + cd test_prebuild + python3 test_metadata_parser.py + python3 test_mkstatic.py + - name: ccpp-prebuild blocked data tests + run: | + cd test_prebuild/test_blocked_data + python3 ../../scripts/ccpp_prebuild.py --config=ccpp_prebuild_config.py --builddir=build + cd build + cmake .. + make + ./test_blocked_data.x diff --git a/CMakeLists.txt b/CMakeLists.txt index 4daf855b..41e163ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ project(ccpp_framework #------------------------------------------------------------------------------ # Set package definitions set(PACKAGE "ccpp-framework") -set(AUTHORS "Dom Heinzeller" "Grant Firl" "Mike Kavulich" "Steve Goldhaber") +set(AUTHORS "Dom Heinzeller" "Grant Firl" "Mike Kavulich" "Dustin Swales" "Courtney Peverley") string(TIMESTAMP YEAR "%Y") #------------------------------------------------------------------------------ diff --git a/scripts/ccpp_datafile.py b/scripts/ccpp_datafile.py index 7a4c3d8d..1fd5f830 100755 --- a/scripts/ccpp_datafile.py +++ b/scripts/ccpp_datafile.py @@ -654,7 +654,7 @@ def _new_var_entry(parent, var, full_entry=True): "diagnostic_name", "diagnostic_name_fixed", "kind", "persistence", "polymorphic", "protected", "state_variable", "type", "units", "molar_mass", - "advected"]) + "advected", "top_at_one"]) prop_list.extend(Var.constituent_property_names()) # end if ventry = ET.SubElement(parent, "var") diff --git a/scripts/metavar.py b/scripts/metavar.py index c7be0f5c..0c5a87d2 100755 --- a/scripts/metavar.py +++ b/scripts/metavar.py @@ -204,6 +204,8 @@ class Var: default_in='.true.'), VariableProperty('polymorphic', bool, optional_in=True, default_in=False), + VariableProperty('top_at_one', bool, optional_in=True, + default_in=False), VariableProperty('target', bool, optional_in=True, default_in=False)] @@ -376,15 +378,17 @@ def compatible(self, other, run_env): sunits = self.get_prop_value('units') sstd_name = self.get_prop_value('standard_name') sloc_name = self.get_prop_value('local_name') + stopp = self.get_prop_value('top_at_one') sdims = self.get_dimensions() otype = other.get_prop_value('type') okind = other.get_prop_value('kind') ounits = other.get_prop_value('units') ostd_name = other.get_prop_value('standard_name') oloc_name = other.get_prop_value('local_name') + otopp = other.get_prop_value('top_at_one') odims = other.get_dimensions() - compat = VarCompatObj(sstd_name, stype, skind, sunits, sdims, sloc_name, - ostd_name, otype, okind, ounits, odims, oloc_name, + compat = VarCompatObj(sstd_name, stype, skind, sunits, sdims, sloc_name, stopp, + ostd_name, otype, okind, ounits, odims, oloc_name, otopp, run_env, v1_context=self.context, v2_context=other.context) if (not compat) and (run_env.logger is not None): diff --git a/scripts/suite_objects.py b/scripts/suite_objects.py index c52c7c4d..b97c9ce6 100644 --- a/scripts/suite_objects.py +++ b/scripts/suite_objects.py @@ -20,6 +20,7 @@ from parse_tools import init_log, set_log_to_null from var_props import is_horizontal_dimension, find_horizontal_dimension from var_props import find_vertical_dimension +from var_props import VarCompatObj # pylint: disable=too-many-lines @@ -816,7 +817,7 @@ def find_variable(self, standard_name=None, source_var=None, # end if return found_var - def match_variable(self, var, vstdname=None, vdims=None): + def match_variable(self, var, run_env): """Try to find a source for in this SuiteObject's dictionary tree. Several items are returned: found_var: True if a match was found @@ -825,21 +826,19 @@ def match_variable(self, var, vstdname=None, vdims=None): missing_vert: Vertical dim in parent but not in perm: Permutation (XXgoldyXX: Not yet implemented) """ - if vstdname is None: - vstdname = var.get_prop_value('standard_name') - # end if - if vdims is None: - vdims = var.get_dimensions() - # end if + vstdname = var.get_prop_value('standard_name') + vdims = var.get_dimensions() if (not vdims) and self.run_phase(): vmatch = VarDictionary.loop_var_match(vstdname) else: vmatch = None # end if + found_var = False missing_vert = None new_vdims = list() var_vdim = var.has_vertical_dimension(dims=vdims) + compat_obj = None # Does this variable exist in the calling tree? dict_var = self.find_variable(source_var=var, any_scope=True) if dict_var is None: @@ -872,6 +871,10 @@ def match_variable(self, var, vstdname=None, vdims=None): new_vdims = list() new_dict_dims = dict_dims match = True + # Create compatability object, containing any necessary forward/reverse + # transforms from and + compat_obj = var.compatible(dict_var, run_env) + # end if # Add the variable to the parent call tree if dict_dims == new_dict_dims: @@ -894,7 +897,7 @@ def match_variable(self, var, vstdname=None, vdims=None): # end if # end if # end if - return found_var, var_vdim, new_vdims, missing_vert + return found_var, var_vdim, new_vdims, missing_vert, compat_obj def in_process_split(self): """Find out if we are in a process-split region""" @@ -1077,6 +1080,8 @@ def __init__(self, scheme_xml, context, parent, run_env): self.__lib = scheme_xml.get('lib', None) self.__has_vertical_dimension = False self.__group = None + self.__forward_transforms = list() + self.__reverse_transforms = list() super().__init__(name, context, parent, run_env, active_call_list=True) def update_group_call_list_variable(self, var): @@ -1144,8 +1149,8 @@ def analyze(self, phase, group, scheme_library, suite_vars, level): def_val = var.get_prop_value('default_value') vdims = var.get_dimensions() vintent = var.get_prop_value('intent') - args = self.match_variable(var, vstdname=vstdname, vdims=vdims) - found, vert_dim, new_dims, missing_vert = args + args = self.match_variable(var, self.run_env) + found, vert_dim, new_dims, missing_vert, compat_obj = args if found: if not self.has_vertical_dim: self.__has_vertical_dimension = vert_dim is not None @@ -1200,6 +1205,12 @@ def analyze(self, phase, group, scheme_library, suite_vars, level): vstdname)) # end if # end if + # Are there any forward/reverse transforms for this variable? + if compat_obj is not None and (compat_obj.has_vert_transforms or + compat_obj.has_unit_transforms or + compat_obj.has_kind_transforms): + self.add_var_transform(var, compat_obj, vert_dim) + # end for if self.needs_vertical is not None: self.parent.add_part(self, replace=True) # Should add a vloop @@ -1211,6 +1222,81 @@ def analyze(self, phase, group, scheme_library, suite_vars, level): # end if return scheme_mods + def add_var_transform(self, var, compat_obj, vert_dim): + """Register any variable transformation needed by for this Scheme. + For any transformation identified in , create dummy variable + from to perform the transformation. Determine the indices needed + for the transform and save for use during write stage""" + + # Add dummy variable (_local) needed for transformation. + dummy = var.clone(var.get_prop_value('local_name')+'_local') + self.__group.manage_variable(dummy) + + # Create indices (default) for transform. + lindices = [':']*var.get_rank() + rindices = [':']*var.get_rank() + + # If needed, modify vertical dimension for vertical orientation flipping + _, vdim = find_vertical_dimension(var.get_dimensions()) + vdim_name = vert_dim.split(':')[-1] + group_vvar = self.__group.call_list.find_variable(vdim_name) + vname = group_vvar.get_prop_value('local_name') + lindices[vdim] = '1:'+vname + rindices[vdim] = '1:'+vname + if compat_obj.has_vert_transforms: + rindices[vdim] = vname+':1:-1' + + # If needed, modify horizontal dimension for loop substitution. + # NOT YET IMPLEMENTED + #hdim = find_horizontal_dimension(var.get_dimensions()) + #if compat_obj.has_dim_transforms: + + # + # Register any reverse (pre-Scheme) transforms. + # + if (var.get_prop_value('intent') != 'out'): + self.__reverse_transforms.append([dummy.get_prop_value('local_name'), + var.get_prop_value('local_name'), + rindices, lindices, compat_obj]) + + # + # Register any forward (post-Scheme) transforms. + # + if (var.get_prop_value('intent') != 'in'): + self.__forward_transforms.append([var.get_prop_value('local_name'), + dummy.get_prop_value('local_name'), + lindices, rindices, compat_obj]) + + def write_var_transform(self, var, dummy, rindices, lindices, compat_obj, + outfile, indent, forward): + """Write variable transformation needed to call this Scheme in . + is the varaible that needs transformation before and after calling Scheme. + is the local variable needed for the transformation.. + are the LHS indices of for reverse transforms (before Scheme). + are the RHS indices of for reverse transforms (before Scheme). + are the LHS indices of for forward transforms (after Scheme). + are the RHS indices of for forward transforms (after Scheme). + """ + # + # Write reverse (pre-Scheme) transform. + # + if not forward: + # dummy(lindices) = var(rindices) + stmt = compat_obj.reverse_transform(lvar_lname=dummy, + rvar_lname=var, + lvar_indices=lindices, + rvar_indices=rindices) + # + # Write forward (post-Scheme) transform. + # + else: + # var(lindices) = dummy(rindices) + stmt = compat_obj.forward_transform(lvar_lname=var, + rvar_lname=dummy, + lvar_indices=rindices, + rvar_indices=lindices) + outfile.write(stmt, indent+1) + def write(self, outfile, errcode, indent): # Unused arguments are for consistent write interface # pylint: disable=unused-argument @@ -1222,9 +1308,18 @@ def write(self, outfile, errcode, indent): my_args = self.call_list.call_string(cldicts=cldicts, is_func_call=True, subname=self.subroutine_name) - stmt = 'call {}({})' + outfile.write('if ({} == 0) then'.format(errcode), indent) + # Write any reverse (pre-Scheme) transforms. + for (dummy, var, rindices, lindices, compat_obj) in self.__reverse_transforms: + tstmt = self.write_var_transform(var, dummy, rindices, lindices, compat_obj, outfile, indent, False) + # Write the scheme call. + stmt = 'call {}({})' outfile.write(stmt.format(self.subroutine_name, my_args), indent+1) + # Write any forward (post-Scheme) transforms. + for (var, dummy, lindices, rindices, compat_obj) in self.__forward_transforms: + tstmt = self.write_var_transform(var, dummy, rindices, lindices, compat_obj, outfile, indent, True) + # outfile.write('end if', indent) def schemes(self): diff --git a/scripts/var_props.py b/scripts/var_props.py index 78656df8..dc16fd0f 100755 --- a/scripts/var_props.py +++ b/scripts/var_props.py @@ -791,62 +791,54 @@ class VarCompatObj: kind_types=["kind_phys=REAL64", \ "kind_dyn=REAL32", \ "kind_host=REAL64"]) - >>> VarCompatObj("var_stdname", "real", "kind_phys", "m", [], \ - "var1_lname", "var_stdname", "real", "kind_phys", \ - "m", [], "var2_lname", _DOCTEST_RUNENV) #doctest: +ELLIPSIS + >>> VarCompatObj("var_stdname", "real", "kind_phys", "m", [], "var1_lname", False,\ + "var_stdname", "real", "kind_phys", "m", [], "var2_lname", False,\ + _DOCTEST_RUNENV) #doctest: +ELLIPSIS # Test that a 2-D var with no horizontal transform works - >>> VarCompatObj("var_stdname", "real", "kind_phys", "m", \ - ['horizontal_dimension'], "var1_lname", "var_stdname", \ - "real", "kind_phys", "m", ['horizontal_dimension'], \ - "var2_lname", _DOCTEST_RUNENV) #doctest: +ELLIPSIS + >>> VarCompatObj("var_stdname", "real", "kind_phys", "m", ['horizontal_dimension'], "var1_lname", False, \ + "var_stdname", "real", "kind_phys", "m", ['horizontal_dimension'], "var2_lname", False, \ + _DOCTEST_RUNENV) #doctest: +ELLIPSIS # Test that a 2-D var with a horizontal transform works - >>> VarCompatObj("var_stdname", "real", "kind_phys", "m", \ - ['horizontal_dimension'], "var1_lname", "var_stdname", \ - "real", "kind_phys", "m", ['horizontal_loop_extent'], \ - "var2_lname", _DOCTEST_RUNENV) #doctest: +ELLIPSIS + >>> VarCompatObj("var_stdname", "real", "kind_phys", "m", ['horizontal_dimension'], "var1_lname", False, \ + "var_stdname", "real", "kind_phys", "m", ['horizontal_loop_extent'], "var2_lname", False, \ + _DOCTEST_RUNENV) #doctest: +ELLIPSIS # Test that a 2-D var with unit conversion m->km works - >>> VarCompatObj("var_stdname", "real", "kind_phys", "m", \ - ['horizontal_dimension'], "var1_lname", "var_stdname", \ - "real", "kind_phys", "km", ['horizontal_dimension'], \ - "var2_lname", _DOCTEST_RUNENV) #doctest: +ELLIPSIS + >>> VarCompatObj("var_stdname", "real", "kind_phys", "m", ['horizontal_dimension'], "var1_lname", False, \ + "var_stdname", "real", "kind_phys", "km", ['horizontal_dimension'], "var2_lname", False, \ + _DOCTEST_RUNENV) #doctest: +ELLIPSIS # Test that a 2-D var with unit conversion m->km works and that it # produces the correct forward transformation - >>> VarCompatObj("var_stdname", "real", "kind_phys", "m", \ - ['horizontal_dimension'], "var1_lname", "var_stdname", \ - "real", "kind_phys", "km", ['horizontal_dimension'], \ - "var2_lname", _DOCTEST_RUNENV).forward_transform( \ - "var1_lname", "var2_lname", ('i')) + >>> VarCompatObj("var_stdname", "real", "kind_phys", "m", ['horizontal_dimension'], "var1_lname", False, \ + "var_stdname", "real", "kind_phys", "km", ['horizontal_dimension'], "var2_lname", False, \ + _DOCTEST_RUNENV).forward_transform("var1_lname", "var2_lname", 'i', 'i') 'var1_lname(i) = 1.0E-3_kind_phys*var2_lname(i)' # Test that a 3-D var with unit conversion m->km and vertical flipping # works and that it produces the correct reverse transformation - >>> VarCompatObj("var_stdname", "real", "kind_phys", "m", \ - ['horizontal_dimension', 'vertical_layer_dimension'], \ - "var1_lname", "var_stdname", "real", "kind_phys", "km",\ - ['horizontal_dimension', 'vertical_layer_dimension'], \ - "var2_lname", _DOCTEST_RUNENV).reverse_transform( \ - "var1_lname", "var2_lname", ('i','k'), flip_vdim='nk') + >>> VarCompatObj("var_stdname", "real", "kind_phys", "m", ['horizontal_dimension', 'vertical_layer_dimension'], "var1_lname", False,\ + "var_stdname", "real", "kind_phys", "km",['horizontal_dimension', 'vertical_layer_dimension'], "var2_lname", True, \ + _DOCTEST_RUNENV).reverse_transform("var1_lname", "var2_lname", ('i','k'), ('i','nk-k+1')) 'var1_lname(i,nk-k+1) = 1.0E+3_kind_phys*var2_lname(i,k)' """ def __init__(self, var1_stdname, var1_type, var1_kind, var1_units, - var1_dims, var1_lname, var2_stdname, var2_type, var2_kind, - var2_units, var2_dims, var2_lname, run_env, v1_context=None, + var1_dims, var1_lname, var1_top, var2_stdname, var2_type, var2_kind, + var2_units, var2_dims, var2_lname, var2_top, run_env, v1_context=None, v2_context=None): """Initialize this object with information on the equivalence and/or conformability of two variables. variable 1 is described by , , , - , , , and . + , , , , and . variable 2 is described by , , , - , , , and . + , , , , and . is the CCPPFrameworkEnv object used here to verify kind equivalence or to produce kind transformations. """ @@ -861,6 +853,7 @@ def __init__(self, var1_stdname, var1_type, var1_kind, var1_units, self.__dim_transforms = None self.__kind_transforms = None self.__unit_transforms = None + self.has_vert_transforms = False incompat_reason = list() # First, check for fatal incompatibilities if var1_stdname != var2_stdname: @@ -926,6 +919,13 @@ def __init__(self, var1_stdname, var1_type, var1_kind, var1_units, var2_units) # end if # end if + if self.__compat: + # Check for vertical array flipping (do later) + if var1_top != var2_top: + self.__compat = True + self.has_vert_transforms = True + # end if + # end if if self.__compat: # Check dimensions ##XXgoldyXX: For now, we always have to create a dimension @@ -945,13 +945,15 @@ def __init__(self, var1_stdname, var1_type, var1_kind, var1_units, # end if self.__incompat_reason = " and ".join([x for x in incompat_reason if x]) - def forward_transform(self, lvar_lname, rvar_lname, indices, + def forward_transform(self, lvar_lname, rvar_lname, rvar_indices, lvar_indices, adjust_hdim=None, flip_vdim=None): """Compute and return the the forward transform from "var1" to "var2". is the local name of "var2". is the local name of "var1". - is a tuple of the loop indices for "var1" (i.e., "var1" - will show up in the RHS of the transform as "var1(indices)". + is a tuple of the loop indices for "var1" (i.e., "var1" + will show up in the RHS of the transform as "var1(rvar_indices)". + is a tuple of the loop indices for "var2" (i.e., "var2" + will show up in the LHS of the transform as "var2(lvar_indices)". If is not None, it should be a string containing the local name of the "horizontal_loop_begin" variable. This is used to compute the offset in the horizontal axis index between one and @@ -963,16 +965,10 @@ def forward_transform(self, lvar_lname, rvar_lname, indices, "var2" (i.e., "vertical_layer_dimension" or "vertical_interface_dimension"). """ - # Grab any dimension transform - if self.has_dim_transforms: - dtrans = self.__dim_transforms - lhs_term = dtrans.forward_transform(lvar_lname, indices, - adjust_hdim=adjust_hdim, - flip_vdim=flip_vdim) - else: - lhs_term = f"{lvar_lname}({','.join(indices)})" - # end if - rhs_term = f"{rvar_lname}({','.join(indices)})" + # Dimension transform (Indices handled externally) + rhs_term = f"{rvar_lname}({','.join(rvar_indices)})" + lhs_term = f"{lvar_lname}({','.join(lvar_indices)})" + if self.has_kind_transforms: kind = self.__kind_transforms[1] rhs_term = f"real({rhs_term}, {kind})" @@ -989,13 +985,15 @@ def forward_transform(self, lvar_lname, rvar_lname, indices, # end if return f"{lhs_term} = {rhs_term}" - def reverse_transform(self, lvar_lname, rvar_lname, indices, + def reverse_transform(self, lvar_lname, rvar_lname, rvar_indices, lvar_indices, adjust_hdim=None, flip_vdim=None): """Compute and return the the reverse transform from "var2" to "var1". is the local name of "var1". is the local name of "var2". - is a tuple of the loop indices for "var2" (i.e., "var2" - will show up in the RHS of the transform as "var2(indices)". + is a tuple of the loop indices for "var1" (i.e., "var1" + will show up in the RHS of the transform as "var1(rvar_indices)". + is a tuple of the loop indices for "var2" (i.e., "var2" + will show up in the LHS of the transform as "var2(lvar_indices)". If is not None, it should be a string containing the local name of the "horizontal_loop_begin" variable. This is used to compute the offset in the horizontal axis index between one and @@ -1007,16 +1005,10 @@ def reverse_transform(self, lvar_lname, rvar_lname, indices, "var2" (i.e., "vertical_layer_dimension" or "vertical_interface_dimension"). """ - # Grab any dimension transform - if self.has_dim_transforms: - dtrans = self.__dim_transforms - lhs_term = dtrans.reverse_transform(lvar_lname, indices, - adjust_hdim=adjust_hdim, - flip_vdim=flip_vdim) - else: - lhs_term = f"{lvar_lname}({','.join(indices)})" - # end if - rhs_term = f"{rvar_lname}({','.join(indices)})" + # Dimension transforms (Indices handled externally) + lhs_term = f"{lvar_lname}({','.join(lvar_indices)})" + rhs_term = f"{rvar_lname}({','.join(rvar_indices)})" + if self.has_kind_transforms: kind = self.__kind_transforms[0] rhs_term = f"real({rhs_term}, {kind})" @@ -1054,9 +1046,9 @@ def _get_kind_convstrs(self, var1_kind, var2_kind, run_env): >>> _DOCTEST_CONTEXT1 = ParseContext(linenum=3, filename='foo.F90') >>> _DOCTEST_CONTEXT2 = ParseContext(linenum=5, filename='bar.F90') >>> _DOCTEST_VCOMPAT = VarCompatObj("var_stdname", "real", "kind_phys", \ - "m", [], "var1_lname", "var_stdname", \ + "m", [], "var1_lname", False, "var_stdname", \ "real", "kind_phys", "m", [], \ - "var2_lname", _DOCTEST_RUNENV, \ + "var2_lname", False, _DOCTEST_RUNENV, \ v1_context=_DOCTEST_CONTEXT1, \ v2_context=_DOCTEST_CONTEXT2) @@ -1108,9 +1100,9 @@ def _get_unit_convstrs(self, var1_units, var2_units): >>> _DOCTEST_CONTEXT1 = ParseContext(linenum=3, filename='foo.F90') >>> _DOCTEST_CONTEXT2 = ParseContext(linenum=5, filename='bar.F90') >>> _DOCTEST_VCOMPAT = VarCompatObj("var_stdname", "real", "kind_phys", \ - "m", [], "var1_lname", "var_stdname", \ + "m", [], "var1_lname", False, "var_stdname", \ "real", "kind_phys", "m", [], \ - "var2_lname", _DOCTEST_RUNENV, \ + "var2_lname", False, _DOCTEST_RUNENV, \ v1_context=_DOCTEST_CONTEXT1, \ v2_context=_DOCTEST_CONTEXT2) @@ -1180,9 +1172,9 @@ def _get_dim_transforms(self, var1_dims, var2_dims): >>> _DOCTEST_CONTEXT1 = ParseContext(linenum=3, filename='foo.F90') >>> _DOCTEST_CONTEXT2 = ParseContext(linenum=5, filename='bar.F90') >>> _DOCTEST_VCOMPAT = VarCompatObj("var_stdname", "real", "kind_phys", \ - "m", [], "var1_lname", "var_stdname", \ + "m", [], "var1_lname", False, "var_stdname", \ "real", "kind_phys", "m", [], \ - "var2_lname", _DOCTEST_RUNENV, \ + "var2_lname", False, _DOCTEST_RUNENV, \ v1_context=_DOCTEST_CONTEXT1, \ v2_context=_DOCTEST_CONTEXT2) diff --git a/test/run_fortran_tests.sh b/test/run_fortran_tests.sh index 8b0f5bcb..cd6436fb 100755 --- a/test/run_fortran_tests.sh +++ b/test/run_fortran_tests.sh @@ -37,15 +37,13 @@ if [ $res -ne 0 ]; then echo "Failure running advection test" fi -# Run var_action test -# TODO: Re-enable after feature fully implemented. -# ./var_action_test/run_test -# res=$? -# errcnt=$((errcnt + res)) -# if [ $res -ne 0 ]; then -# echo "Failure running var_action test" -# fi -echo "Skipping var_action_test/run_test until feature is fully implemented" +# Run var_compatability test + ./var_compatability_test/run_test + res=$? + errcnt=$((errcnt + res)) + if [ $res -ne 0 ]; then + echo "Failure running var_compatability test" + fi if [ $errcnt -eq 0 ]; then echo "All tests PASSed!" diff --git a/test/unit_tests/test_var_transforms.py b/test/unit_tests/test_var_transforms.py old mode 100644 new mode 100755 index ae71008f..94a6c4a0 --- a/test/unit_tests/test_var_transforms.py +++ b/test/unit_tests/test_var_transforms.py @@ -282,13 +282,12 @@ def test_valid_dim_transforms(self): self.assertIsInstance(compat, VarCompatObj, msg=self.__inst_emsg.format(type(compat))) rindices = ("hind", "vind") - fwd_stmt = compat.forward_transform(v2_lname, v1_lname, rindices, - adjust_hdim=None, flip_vdim=None) + lindices = rindices + fwd_stmt = compat.forward_transform(v2_lname, v1_lname, rindices, lindices) ind_str = ','.join(rindices) expected = f"{v2_lname}({ind_str}) = {v1_lname}({ind_str})" self.assertEqual(fwd_stmt, expected) - rev_stmt = compat.reverse_transform(v1_lname, v2_lname, rindices, - adjust_hdim=None, flip_vdim=None) + rev_stmt = compat.reverse_transform(v1_lname, v2_lname, rindices, lindices) expected = f"{v1_lname}({ind_str}) = {v2_lname}({ind_str})" self.assertEqual(rev_stmt, expected) @@ -298,17 +297,13 @@ def test_valid_dim_transforms(self): msg=self.__inst_emsg.format(type(compat))) rindices = ("hind", "vind") lindices = ("hind-col_start+1", "vind") - fwd_stmt = compat.forward_transform(v2_lname, v1_lname, rindices, - adjust_hdim='col_start', - flip_vdim=None) + fwd_stmt = compat.forward_transform(v2_lname, v1_lname, rindices, lindices) lind_str = ','.join(lindices) rind_str = ','.join(rindices) expected = f"{v2_lname}({lind_str}) = {v1_lname}({rind_str})" self.assertEqual(fwd_stmt, expected) - rev_stmt = compat.reverse_transform(v1_lname, v2_lname, rindices, - adjust_hdim='col_start', - flip_vdim=None) lindices = ("hind+col_start-1", "vind") + rev_stmt = compat.reverse_transform(v1_lname, v2_lname, rindices, lindices) lind_str = ','.join(lindices) expected = f"{v1_lname}({lind_str}) = {v2_lname}({rind_str})" self.assertEqual(rev_stmt, expected) @@ -320,17 +315,13 @@ def test_valid_dim_transforms(self): msg=self.__inst_emsg.format(type(compat))) rindices = ("hind", "vind") lindices = ("hind-col_start+1", "pver-vind+1") - fwd_stmt = compat.forward_transform(v2_lname, v1_lname, rindices, - adjust_hdim='col_start', - flip_vdim='pver') + fwd_stmt = compat.forward_transform(v2_lname, v1_lname, rindices, lindices) lind_str = ','.join(lindices) rind_str = ','.join(rindices) expected = f"{v2_lname}({lind_str}) = {v1_lname}({rind_str})" self.assertEqual(fwd_stmt, expected) - rev_stmt = compat.reverse_transform(v1_lname, v2_lname, rindices, - adjust_hdim='col_start', - flip_vdim='pver') lindices = ("hind+col_start-1", "pver-vind+1") + rev_stmt = compat.reverse_transform(v1_lname, v2_lname, rindices, lindices) lind_str = ','.join(lindices) expected = f"{v1_lname}({lind_str}) = {v2_lname}({rind_str})" self.assertEqual(rev_stmt, expected) @@ -342,17 +333,13 @@ def test_valid_dim_transforms(self): rindices = ("hind", "vind") lindices = ("hind-col_start+1", "vind") conv = f"273.15_{real_array1.get_prop_value('kind')}" - fwd_stmt = compat.forward_transform(v3_lname, v1_lname, rindices, - adjust_hdim='col_start', - flip_vdim=None) + fwd_stmt = compat.forward_transform(v3_lname, v1_lname, rindices, lindices) lind_str = ','.join(lindices) rind_str = ','.join(rindices) expected = f"{v3_lname}({lind_str}) = {v1_lname}({rind_str})+{conv}" self.assertEqual(fwd_stmt, expected) - rev_stmt = compat.reverse_transform(v1_lname, v3_lname, rindices, - adjust_hdim='col_start', - flip_vdim=None) lindices = ("hind+col_start-1", "vind") + rev_stmt = compat.reverse_transform(v1_lname, v3_lname, rindices, lindices) lind_str = ','.join(lindices) conv = f"273.15_{real_array2.get_prop_value('kind')}" expected = f"{v1_lname}({lind_str}) = {v3_lname}({rind_str})-{conv}" @@ -364,18 +351,14 @@ def test_valid_dim_transforms(self): msg=self.__inst_emsg.format(type(compat))) rindices = ("hind", "vind") lindices = ("hind", "vind") - fwd_stmt = compat.forward_transform(v4_lname, v3_lname, rindices, - adjust_hdim='col_start', - flip_vdim=None) + fwd_stmt = compat.forward_transform(v4_lname, v3_lname, rindices, lindices) lind_str = ','.join(lindices) rind_str = ','.join(rindices) rkind = real_array3.get_prop_value('kind') expected = f"{v4_lname}({lind_str}) = real({v3_lname}({rind_str}), {rkind})" self.assertEqual(fwd_stmt, expected) - rev_stmt = compat.reverse_transform(v3_lname, v4_lname, rindices, - adjust_hdim='col_start', - flip_vdim=None) lindices = ("hind", "vind") + rev_stmt = compat.reverse_transform(v3_lname, v4_lname, rindices, lindices) lind_str = ','.join(lindices) rkind = real_array4.get_prop_value('kind') expected = f"{v3_lname}({lind_str}) = real({v4_lname}({rind_str}), {rkind})" @@ -389,17 +372,13 @@ def test_valid_dim_transforms(self): lindices = ("hind-col_start+1", "vind") rkind = real_array4.get_prop_value('kind') conv = f"273.15_{rkind}" - fwd_stmt = compat.forward_transform(v2_lname, v1_lname, rindices, - adjust_hdim='col_start', - flip_vdim=None) + fwd_stmt = compat.forward_transform(v2_lname, v1_lname, rindices, lindices) lind_str = ','.join(lindices) rind_str = ','.join(rindices) expected = f"{v2_lname}({lind_str}) = real({v1_lname}({rind_str}), {rkind})+{conv}" self.assertEqual(fwd_stmt, expected) - rev_stmt = compat.reverse_transform(v1_lname, v2_lname, rindices, - adjust_hdim='col_start', - flip_vdim=None) lindices = ("hind+col_start-1", "vind") + rev_stmt = compat.reverse_transform(v1_lname, v2_lname, rindices, lindices) lind_str = ','.join(lindices) rkind = real_array1.get_prop_value('kind') conv = f"273.15_{rkind}" @@ -413,9 +392,7 @@ def test_valid_dim_transforms(self): msg=self.__inst_emsg.format(type(compat))) rindices = ("hind", "vind") lindices = ("pver-vind+1", "hind-col_start+1") - fwd_stmt = compat.forward_transform(v4_lname, v5_lname, rindices, - adjust_hdim='col_start', - flip_vdim='pver') + fwd_stmt = compat.forward_transform(v4_lname, v5_lname, rindices, lindices) lind_str = ','.join(lindices) rind_str = ','.join(rindices) rkind = real_array3.get_prop_value('kind') @@ -423,10 +400,8 @@ def test_valid_dim_transforms(self): self.assertEqual(fwd_stmt, expected) rindices = ("vind", "hind") rind_str = ','.join(rindices) - rev_stmt = compat.reverse_transform(v5_lname, v4_lname, rindices, - adjust_hdim='col_start', - flip_vdim='pver') lindices = ("hind+col_start-1", "pver-vind+1") + rev_stmt = compat.reverse_transform(v5_lname, v4_lname, rindices, lindices) lind_str = ','.join(lindices) rkind = real_array4.get_prop_value('kind') expected = f"{v5_lname}({lind_str}) = {v4_lname}({rind_str})" diff --git a/test/var_action_test/.gitignore b/test/var_compatability_test/.gitignore similarity index 100% rename from test/var_action_test/.gitignore rename to test/var_compatability_test/.gitignore diff --git a/test/var_action_test/CMakeLists.txt b/test/var_compatability_test/CMakeLists.txt similarity index 98% rename from test/var_action_test/CMakeLists.txt rename to test/var_compatability_test/CMakeLists.txt index 4b9daab8..7e3590a6 100644 --- a/test/var_action_test/CMakeLists.txt +++ b/test/var_compatability_test/CMakeLists.txt @@ -19,9 +19,9 @@ get_filename_component(CCPP_ROOT "${TEST_ROOT}" DIRECTORY) # Paths should be relative to CMAKE_SOURCE_DIR (this file's directory) # #------------------------------------------------------------------------------ -LIST(APPEND SCHEME_FILES "var_action_files.txt") +LIST(APPEND SCHEME_FILES "var_compatability_files.txt") LIST(APPEND HOST_FILES "test_host_data" "test_host_mod") -LIST(APPEND SUITE_FILES "var_action_suite.xml") +LIST(APPEND SUITE_FILES "var_compatability_suite.xml") # HOST is the name of the executable we will build. # We assume there are files ${HOST}.meta and ${HOST}.F90 in CMAKE_SOURCE_DIR SET(HOST "${CMAKE_PROJECT_NAME}") diff --git a/test/var_action_test/README.md b/test/var_compatability_test/README.md similarity index 58% rename from test/var_action_test/README.md rename to test/var_compatability_test/README.md index b593a1f9..066cf771 100644 --- a/test/var_action_test/README.md +++ b/test/var_compatability_test/README.md @@ -1,6 +1,6 @@ -var_action test +var_compatability test ================ -To build and run the var_action test, run ./run_test +To build and run the var_compatability test, run ./run_test This script will build and run the test. The exit code is zero (0) on PASS and non-zero on FAIL. diff --git a/test/var_action_test/effr_calc.F90 b/test/var_compatability_test/effr_calc.F90 similarity index 95% rename from test/var_action_test/effr_calc.F90 rename to test/var_compatability_test/effr_calc.F90 index 50804a24..d01408c6 100644 --- a/test/var_action_test/effr_calc.F90 +++ b/test/var_compatability_test/effr_calc.F90 @@ -23,7 +23,7 @@ subroutine effr_calc_run(ncol, nlev, effrr_in, effrl_inout, & real(kind_phys), intent(in) :: effrr_in(:,:) real(kind_phys), intent(inout) :: effrl_inout(:,:) real(kind_phys), intent(out) :: effri_out(:,:) - real(kind_phys), intent(inout) :: effrs_inout(:,:) + real(8),intent(inout) :: effrs_inout(:,:) character(len=512), intent(out) :: errmsg integer, intent(out) :: errflg !---------------------------------------------------------------- diff --git a/test/var_action_test/effr_calc.meta b/test/var_compatability_test/effr_calc.meta similarity index 97% rename from test/var_action_test/effr_calc.meta rename to test/var_compatability_test/effr_calc.meta index 12e3dac6..78243ce9 100644 --- a/test/var_action_test/effr_calc.meta +++ b/test/var_compatability_test/effr_calc.meta @@ -25,6 +25,7 @@ type = real kind = kind_phys intent = in + top_at_one = .true. [effrl_inout] standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle long_name = effective radius of cloud liquid water particle in micrometer @@ -47,8 +48,9 @@ units = um dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real - kind = kind_phys + kind = 8 intent = inout + top_at_one = .true. [ errmsg ] standard_name = ccpp_error_message long_name = Error message for error handling in CCPP diff --git a/test/var_action_test/run_test b/test/var_compatability_test/run_test similarity index 72% rename from test/var_action_test/run_test rename to test/var_compatability_test/run_test index 2b4db0ac..ca185966 100755 --- a/test/var_action_test/run_test +++ b/test/var_compatability_test/run_test @@ -118,36 +118,36 @@ frame_src="${framework}/src" ## NB: This has to be after build_dir is finalized ## host_files="${build_dir}/ccpp/test_host_ccpp_cap.F90" -suite_files="${build_dir}/ccpp/ccpp_var_action_suite_cap.F90" +suite_files="${build_dir}/ccpp/ccpp_var_compatability_suite_cap.F90" utility_files="${build_dir}/ccpp/ccpp_kinds.F90" utility_files="${utility_files},${frame_src}/ccpp_constituent_prop_mod.F90" utility_files="${utility_files},${frame_src}/ccpp_hashable.F90" utility_files="${utility_files},${frame_src}/ccpp_hash_table.F90" ccpp_files="${utility_files}" ccpp_files="${ccpp_files},${build_dir}/ccpp/test_host_ccpp_cap.F90" -ccpp_files="${ccpp_files},${build_dir}/ccpp/ccpp_var_action_suite_cap.F90" +ccpp_files="${ccpp_files},${build_dir}/ccpp/ccpp_var_compatability_suite_cap.F90" #process_list="" module_list="effr_calc" #dependencies="" -suite_list="var_action_suite" -required_vars_var_action="ccpp_error_code,ccpp_error_message" -required_vars_var_action="${required_vars_var_action},effective_radius_of_stratiform_cloud_ice_particle" -required_vars_var_action="${required_vars_var_action},effective_radius_of_stratiform_cloud_liquid_water_particle" -required_vars_var_action="${required_vars_var_action},effective_radius_of_stratiform_cloud_rain_particle" -required_vars_var_action="${required_vars_var_action},effective_radius_of_stratiform_cloud_snow_particle" -required_vars_var_action="${required_vars_var_action},horizontal_loop_begin" -required_vars_var_action="${required_vars_var_action},horizontal_loop_end" -required_vars_var_action="${required_vars_var_action},vertical_layer_dimension" -input_vars_var_action="effective_radius_of_stratiform_cloud_liquid_water_particle" -input_vars_var_action="${input_vars_var_action},effective_radius_of_stratiform_cloud_rain_particle" -input_vars_var_action="${input_vars_var_action},effective_radius_of_stratiform_cloud_snow_particle" -input_vars_var_action="${input_vars_var_action},horizontal_loop_begin" -input_vars_var_action="${input_vars_var_action},horizontal_loop_end" -input_vars_var_action="${input_vars_var_action},vertical_layer_dimension" -output_vars_var_action="ccpp_error_code,ccpp_error_message" -output_vars_var_action="${output_vars_var_action},effective_radius_of_stratiform_cloud_ice_particle" -output_vars_var_action="${output_vars_var_action},effective_radius_of_stratiform_cloud_liquid_water_particle" -output_vars_var_action="${output_vars_var_action},effective_radius_of_stratiform_cloud_snow_particle" +suite_list="var_compatability_suite" +required_vars_var_compatability="ccpp_error_code,ccpp_error_message" +required_vars_var_compatability="${required_vars_var_compatability},effective_radius_of_stratiform_cloud_ice_particle" +required_vars_var_compatability="${required_vars_var_compatability},effective_radius_of_stratiform_cloud_liquid_water_particle" +required_vars_var_compatability="${required_vars_var_compatability},effective_radius_of_stratiform_cloud_rain_particle" +required_vars_var_compatability="${required_vars_var_compatability},effective_radius_of_stratiform_cloud_snow_particle" +required_vars_var_compatability="${required_vars_var_compatability},horizontal_loop_begin" +required_vars_var_compatability="${required_vars_var_compatability},horizontal_loop_end" +required_vars_var_compatability="${required_vars_var_compatability},vertical_layer_dimension" +input_vars_var_compatability="effective_radius_of_stratiform_cloud_liquid_water_particle" +input_vars_var_compatability="${input_vars_var_compatability},effective_radius_of_stratiform_cloud_rain_particle" +input_vars_var_compatability="${input_vars_var_compatability},effective_radius_of_stratiform_cloud_snow_particle" +input_vars_var_compatability="${input_vars_var_compatability},horizontal_loop_begin" +input_vars_var_compatability="${input_vars_var_compatability},horizontal_loop_end" +input_vars_var_compatability="${input_vars_var_compatability},vertical_layer_dimension" +output_vars_var_compatability="ccpp_error_code,ccpp_error_message" +output_vars_var_compatability="${output_vars_var_compatability},effective_radius_of_stratiform_cloud_ice_particle" +output_vars_var_compatability="${output_vars_var_compatability},effective_radius_of_stratiform_cloud_liquid_water_particle" +output_vars_var_compatability="${output_vars_var_compatability},effective_radius_of_stratiform_cloud_snow_particle" ## ## Run a database report and check the return string @@ -215,13 +215,13 @@ check_datatable ${report_prog} ${datafile} "--module-list" ${module_list} #check_datatable ${report_prog} ${datafile} "--dependencies" ${dependencies} check_datatable ${report_prog} ${datafile} "--suite-list" ${suite_list} \ --sep ";" -echo -e "\nChecking variables for var_action suite from command line" +echo -e "\nChecking variables for var_compatability suite from command line" check_datatable ${report_prog} ${datafile} "--required-variables" \ - ${required_vars_var_action} "var_action_suite" + ${required_vars_var_compatability} "var_compatability_suite" check_datatable ${report_prog} ${datafile} "--input-variables" \ - ${input_vars_var_action} "var_action_suite" + ${input_vars_var_compatability} "var_compatability_suite" check_datatable ${report_prog} ${datafile} "--output-variables" \ - ${output_vars_var_action} "var_action_suite" + ${output_vars_var_compatability} "var_compatability_suite" # Run make make res=$? diff --git a/test/var_action_test/test_host.F90 b/test/var_compatability_test/test_host.F90 similarity index 99% rename from test/var_action_test/test_host.F90 rename to test/var_compatability_test/test_host.F90 index 885c2e62..6de9597c 100644 --- a/test/var_action_test/test_host.F90 +++ b/test/var_compatability_test/test_host.F90 @@ -8,7 +8,7 @@ module test_prog public test_host ! Public data and interfaces - integer, public, parameter :: cs = 16 + integer, public, parameter :: cs = 32 integer, public, parameter :: cm = 60 !> \section arg_table_suite_info Argument Table @@ -375,7 +375,7 @@ program test logical :: run_okay ! Setup expected test suite info - test_suites(1)%suite_name = 'var_action_suite' + test_suites(1)%suite_name = 'var_compatability_suite' test_suites(1)%suite_parts => test_parts1 test_suites(1)%suite_input_vars => test_invars1 test_suites(1)%suite_output_vars => test_outvars1 diff --git a/test/var_action_test/test_host.meta b/test/var_compatability_test/test_host.meta similarity index 100% rename from test/var_action_test/test_host.meta rename to test/var_compatability_test/test_host.meta diff --git a/test/var_action_test/test_host_data.F90 b/test/var_compatability_test/test_host_data.F90 similarity index 100% rename from test/var_action_test/test_host_data.F90 rename to test/var_compatability_test/test_host_data.F90 diff --git a/test/var_action_test/test_host_data.meta b/test/var_compatability_test/test_host_data.meta similarity index 100% rename from test/var_action_test/test_host_data.meta rename to test/var_compatability_test/test_host_data.meta diff --git a/test/var_action_test/test_host_mod.F90 b/test/var_compatability_test/test_host_mod.F90 similarity index 97% rename from test/var_action_test/test_host_mod.F90 rename to test/var_compatability_test/test_host_mod.F90 index d6191814..b0501c0c 100644 --- a/test/var_action_test/test_host_mod.F90 +++ b/test/var_compatability_test/test_host_mod.F90 @@ -36,7 +36,7 @@ logical function compare_data() real(kind_phys), parameter :: effrl_expected = 5.0E-5 ! 50 microns, in meter real(kind_phys), parameter :: effri_expected = 7.5E-5 ! 75 microns, in meter real(kind_phys), parameter :: effrs_expected = 5.1E-4 ! 510 microns, in meter - real(kind_phys), parameter :: tolerance = 1.0E-10 ! used as scaling factor for expected value + real(kind_phys), parameter :: tolerance = 1.0E-6 ! used as scaling factor for expected value compare_data = .true. diff --git a/test/var_action_test/test_host_mod.meta b/test/var_compatability_test/test_host_mod.meta similarity index 100% rename from test/var_action_test/test_host_mod.meta rename to test/var_compatability_test/test_host_mod.meta diff --git a/test/var_action_test/test_reports.py b/test/var_compatability_test/test_reports.py similarity index 94% rename from test/var_action_test/test_reports.py rename to test/var_compatability_test/test_reports.py index fff8603d..a8dc6eea 100755 --- a/test/var_action_test/test_reports.py +++ b/test/var_compatability_test/test_reports.py @@ -57,16 +57,16 @@ def usage(errmsg=None): # Check data _HOST_FILES = [os.path.join(_BUILD_DIR, "ccpp", "test_host_ccpp_cap.F90")] -_SUITE_FILES = [os.path.join(_BUILD_DIR, "ccpp", "ccpp_var_action_suite_cap.F90")] +_SUITE_FILES = [os.path.join(_BUILD_DIR, "ccpp", "ccpp_var_compatability_suite_cap.F90")] _UTILITY_FILES = [os.path.join(_BUILD_DIR, "ccpp", "ccpp_kinds.F90"), os.path.join(_SRC_DIR, "ccpp_constituent_prop_mod.F90"), os.path.join(_SRC_DIR, "ccpp_hashable.F90"), os.path.join(_SRC_DIR, "ccpp_hash_table.F90")] _CCPP_FILES = _UTILITY_FILES + \ [os.path.join(_BUILD_DIR, "ccpp", "test_host_ccpp_cap.F90"), - os.path.join(_BUILD_DIR, "ccpp", "ccpp_var_action_suite_cap.F90")] + os.path.join(_BUILD_DIR, "ccpp", "ccpp_var_compatability_suite_cap.F90")] _MODULE_LIST = ["effr_calc"] -_SUITE_LIST = ["var_action_suite"] +_SUITE_LIST = ["var_compatability_suite"] _INPUT_VARS_VAR_ACTION = ["horizontal_loop_begin", "horizontal_loop_end", "vertical_layer_dimension", "effective_radius_of_stratiform_cloud_liquid_water_particle", "effective_radius_of_stratiform_cloud_rain_particle", @@ -140,15 +140,15 @@ def check_datatable(database, report_type, check_list, _MODULE_LIST) NUM_ERRORS += check_datatable(_DATABASE, DatatableReport("suite_list"), _SUITE_LIST) -print("\nChecking variables for var_action suite from python") +print("\nChecking variables for var_compatability suite from python") NUM_ERRORS += check_datatable(_DATABASE, DatatableReport("required_variables", - value="var_action_suite"), + value="var_compatability_suite"), _REQUIRED_VARS_VAR_ACTION) NUM_ERRORS += check_datatable(_DATABASE, DatatableReport("input_variables", - value="var_action_suite"), + value="var_compatability_suite"), _INPUT_VARS_VAR_ACTION) NUM_ERRORS += check_datatable(_DATABASE, DatatableReport("output_variables", - value="var_action_suite"), + value="var_compatability_suite"), _OUTPUT_VARS_VAR_ACTION) sys.exit(NUM_ERRORS) diff --git a/test/var_action_test/var_action_files.txt b/test/var_compatability_test/var_compatability_files.txt similarity index 100% rename from test/var_action_test/var_action_files.txt rename to test/var_compatability_test/var_compatability_files.txt diff --git a/test/var_action_test/var_action_suite.xml b/test/var_compatability_test/var_compatability_suite.xml similarity index 69% rename from test/var_action_test/var_action_suite.xml rename to test/var_compatability_test/var_compatability_suite.xml index 72a7b80f..ae75d9f7 100644 --- a/test/var_action_test/var_action_suite.xml +++ b/test/var_compatability_test/var_compatability_suite.xml @@ -1,6 +1,6 @@ - + effr_calc diff --git a/test_prebuild/test_blocked_data/CMakeLists.txt b/test_prebuild/test_blocked_data/CMakeLists.txt new file mode 100644 index 00000000..921c87e6 --- /dev/null +++ b/test_prebuild/test_blocked_data/CMakeLists.txt @@ -0,0 +1,90 @@ +#------------------------------------------------------------------------------ +cmake_minimum_required(VERSION 3.0) + +project(ccpp_blocked_data + VERSION 1.0.0 + LANGUAGES Fortran) + +#------------------------------------------------------------------------------ +# Request a static build +option(BUILD_SHARED_LIBS "Build a shared library" OFF) + +#------------------------------------------------------------------------------ +# Set the sources: physics type definitions +set(TYPEDEFS $ENV{CCPP_TYPEDEFS}) +if(TYPEDEFS) + message(STATUS "Got CCPP TYPEDEFS from environment variable: ${TYPEDEFS}") +else(TYPEDEFS) + include(${CMAKE_CURRENT_BINARY_DIR}/CCPP_TYPEDEFS.cmake) + message(STATUS "Got CCPP TYPEDEFS from cmakefile include file: ${TYPEDEFS}") +endif(TYPEDEFS) + +# Generate list of Fortran modules from the CCPP type +# definitions that need need to be installed +foreach(typedef_module ${TYPEDEFS}) + list(APPEND MODULES_F90 ${CMAKE_CURRENT_BINARY_DIR}/${typedef_module}) +endforeach() + +#------------------------------------------------------------------------------ +# Set the sources: physics schemes +set(SCHEMES $ENV{CCPP_SCHEMES}) +if(SCHEMES) + message(STATUS "Got CCPP SCHEMES from environment variable: ${SCHEMES}") +else(SCHEMES) + include(${CMAKE_CURRENT_BINARY_DIR}/CCPP_SCHEMES.cmake) + message(STATUS "Got CCPP SCHEMES from cmakefile include file: ${SCHEMES}") +endif(SCHEMES) + +# Set the sources: physics scheme caps +set(CAPS $ENV{CCPP_CAPS}) +if(CAPS) + message(STATUS "Got CCPP CAPS from environment variable: ${CAPS}") +else(CAPS) + include(${CMAKE_CURRENT_BINARY_DIR}/CCPP_CAPS.cmake) + message(STATUS "Got CCPP CAPS from cmakefile include file: ${CAPS}") +endif(CAPS) + +# Set the sources: physics scheme caps +set(API $ENV{CCPP_API}) +if(API) + message(STATUS "Got CCPP API from environment variable: ${API}") +else(API) + include(${CMAKE_CURRENT_BINARY_DIR}/CCPP_API.cmake) + message(STATUS "Got CCPP API from cmakefile include file: ${API}") +endif(API) + +set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O0 -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check -ggdb -fbacktrace -ffree-line-length-none") + +#------------------------------------------------------------------------------ +add_library(ccpp_blocked_data STATIC ${SCHEMES} ${CAPS} ${API}) +# Generate list of Fortran modules from defined sources +foreach(source_f90 ${CAPS} ${API}) + get_filename_component(tmp_source_f90 ${source_f90} NAME) + string(REGEX REPLACE ".F90" ".mod" tmp_module_f90 ${tmp_source_f90}) + string(TOLOWER ${tmp_module_f90} module_f90) + list(APPEND MODULES_F90 ${CMAKE_CURRENT_BINARY_DIR}/${module_f90}) +endforeach() + +set_target_properties(ccpp_blocked_data PROPERTIES VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_VERSION_MAJOR}) + +add_executable(test_blocked_data.x main.F90) +add_dependencies(test_blocked_data.x ccpp_blocked_data) +target_link_libraries(test_blocked_data.x ccpp_blocked_data) +set_target_properties(test_blocked_data.x PROPERTIES LINKER_LANGUAGE Fortran) + +# Define where to install the library +install(TARGETS ccpp_blocked_data + EXPORT ccpp_blocked_data-targets + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION lib +) +# Export our configuration +install(EXPORT ccpp_blocked_data-targets + FILE ccpp_blocked_data-config.cmake + DESTINATION lib/cmake +) +# Define where to install the C headers and Fortran modules +#install(FILES ${HEADERS_C} DESTINATION include) +install(FILES ${MODULES_F90} DESTINATION include) diff --git a/test_prebuild/test_blocked_data/README.md b/test_prebuild/test_blocked_data/README.md new file mode 100644 index 00000000..ad977913 --- /dev/null +++ b/test_prebuild/test_blocked_data/README.md @@ -0,0 +1,13 @@ +# How to build the blocked data test + +1. Set compiler environment as appropriate for your system +2. Run the following commands: +``` +cd test_prebuild/test_blocked_data/ +rm -fr build +mkdir build +../../scripts/ccpp_prebuild.py --config=ccpp_prebuild_config.py --builddir=build +cd build +cmake .. 2>&1 | tee log.cmake +make 2>&1 | tee log.make +``` diff --git a/test_prebuild/test_blocked_data/blocked_data_scheme.F90 b/test_prebuild/test_blocked_data/blocked_data_scheme.F90 new file mode 100644 index 00000000..eeda2206 --- /dev/null +++ b/test_prebuild/test_blocked_data/blocked_data_scheme.F90 @@ -0,0 +1,118 @@ +!>\file blocked_data_scheme.F90 +!! This file contains a blocked_data_scheme CCPP scheme that does nothing +!! except requesting the minimum, mandatory variables. + +module blocked_data_scheme + + use, intrinsic :: iso_fortran_env, only: error_unit + implicit none + + private + public :: blocked_data_scheme_init, & + blocked_data_scheme_timestep_init, & + blocked_data_scheme_run, & + blocked_data_scheme_timestep_finalize, & + blocked_data_scheme_finalize + + ! This is for unit testing only + integer, parameter, dimension(4) :: data_array_sizes = (/6,6,6,3/) + + contains + +!! \section arg_table_blocked_data_scheme_init Argument Table +!! \htmlinclude blocked_data_scheme_init.html +!! + subroutine blocked_data_scheme_init(data_array, errmsg, errflg) + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + integer, intent(in) :: data_array(:) + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + ! Check size of data array + write(error_unit,'(a,i3)') 'In blocked_data_scheme_init: checking size of data array to be', sum(data_array_sizes) + if (size(data_array)/=sum(data_array_sizes)) then + write(errmsg,'(2(a,i3))') "Error, expected size(data_array)==", sum(data_array_sizes), "but got ", size(data_array) + errflg = 1 + return + end if + end subroutine blocked_data_scheme_init + +!! \section arg_table_blocked_data_scheme_timestep_init Argument Table +!! \htmlinclude blocked_data_scheme_timestep_init.html +!! + subroutine blocked_data_scheme_timestep_init(data_array, errmsg, errflg) + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + integer, intent(in) :: data_array(:) + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + ! Check size of data array + write(error_unit,'(a,i3)') 'In blocked_data_scheme_timestep_init: checking size of data array to be', sum(data_array_sizes) + if (size(data_array)/=sum(data_array_sizes)) then + write(errmsg,'(2(a,i3))') "Error, expected size(data_array)==", sum(data_array_sizes), " but got ", size(data_array) + errflg = 1 + return + end if + end subroutine blocked_data_scheme_timestep_init + +!! \section arg_table_blocked_data_scheme_run Argument Table +!! \htmlinclude blocked_data_scheme_run.html +!! + subroutine blocked_data_scheme_run(nb, data_array, errmsg, errflg) + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + integer, intent(in) :: nb + integer, intent(in) :: data_array(:) + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + ! Check size of data array + write(error_unit,'(2(a,i3))') 'In blocked_data_scheme_run: checking size of data array for block', nb, ' to be', data_array_sizes(nb) + if (size(data_array)/=data_array_sizes(nb)) then + write(errmsg,'(a,i4)') "Error in blocked_data_scheme_run, expected size(data_array)==6, got ", size(data_array) + errflg = 1 + return + end if + end subroutine blocked_data_scheme_run + + !! \section arg_table_blocked_data_scheme_timestep_finalize Argument Table + !! \htmlinclude blocked_data_scheme_timestep_finalize.html + !! + subroutine blocked_data_scheme_timestep_finalize(data_array, errmsg, errflg) + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + integer, intent(in) :: data_array(:) + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + ! Check size of data array + write(error_unit,'(a,i3)') 'In blocked_data_scheme_timestep_finalize: checking size of data array to be', sum(data_array_sizes) + if (size(data_array)/=sum(data_array_sizes)) then + write(errmsg,'(2(a,i3))') "Error, expected size(data_array)==", sum(data_array_sizes), "but got ", size(data_array) + errflg = 1 + return + end if + end subroutine blocked_data_scheme_timestep_finalize + +!! \section arg_table_blocked_data_scheme_finalize Argument Table +!! \htmlinclude blocked_data_scheme_finalize.html +!! + subroutine blocked_data_scheme_finalize(data_array, errmsg, errflg) + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + integer, intent(in) :: data_array(:) + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + ! Check size of data array + write(error_unit,'(a,i3)') 'In blocked_data_scheme_finalize: checking size of data array to be', sum(data_array_sizes) + if (size(data_array)/=sum(data_array_sizes)) then + write(errmsg,'(2(a,i3))') "Error, expected size(data_array)==", sum(data_array_sizes), "but got ", size(data_array) + errflg = 1 + return + end if + end subroutine blocked_data_scheme_finalize + +end module blocked_data_scheme diff --git a/test_prebuild/test_blocked_data/blocked_data_scheme.meta b/test_prebuild/test_blocked_data/blocked_data_scheme.meta new file mode 100644 index 00000000..d92b0da6 --- /dev/null +++ b/test_prebuild/test_blocked_data/blocked_data_scheme.meta @@ -0,0 +1,147 @@ +[ccpp-table-properties] + name = blocked_data_scheme + type = scheme + dependencies = + +######################################################################## +[ccpp-arg-table] + name = blocked_data_scheme_init + type = scheme +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out +[data_array] + standard_name = blocked_data_array + long_name = blocked data array + units = 1 + dimensions = (horizontal_dimension) + type = integer + intent = in + +######################################################################## +[ccpp-arg-table] + name = blocked_data_scheme_timestep_init + type = scheme +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out +[data_array] + standard_name = blocked_data_array + long_name = blocked data array + units = 1 + dimensions = (horizontal_dimension) + type = integer + intent = in + +######################################################################## +[ccpp-arg-table] + name = blocked_data_scheme_run + type = scheme +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out +[nb] + standard_name = ccpp_block_number + long_name = number of block for explicit data blocking in CCPP + units = index + dimensions = () + type = integer + intent = in +[data_array] + standard_name = blocked_data_array + long_name = blocked data array + units = 1 + dimensions = (horizontal_loop_extent) + type = integer + intent = in + +######################################################################## +[ccpp-arg-table] + name = blocked_data_scheme_timestep_finalize + type = scheme +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out +[data_array] + standard_name = blocked_data_array + long_name = blocked data array + units = 1 + dimensions = (horizontal_dimension) + type = integer + intent = in + +######################################################################## +[ccpp-arg-table] + name = blocked_data_scheme_finalize + type = scheme +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out +[data_array] + standard_name = blocked_data_array + long_name = blocked data array + units = 1 + dimensions = (horizontal_dimension) + type = integer + intent = in + diff --git a/test_prebuild/test_blocked_data/ccpp_prebuild_config.py b/test_prebuild/test_blocked_data/ccpp_prebuild_config.py new file mode 100644 index 00000000..700d9f76 --- /dev/null +++ b/test_prebuild/test_blocked_data/ccpp_prebuild_config.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python + +# CCPP prebuild config for GFDL Finite-Volume Cubed-Sphere Model (FV3) + +############################################################################### +# Definitions # +############################################################################### + +HOST_MODEL_IDENTIFIER = "FV3" + +# Add all files with metadata tables on the host model side and in CCPP, +# relative to basedir = top-level directory of host model. This includes +# kind and type definitions used in CCPP physics. Also add any internal +# dependencies of these files to the list. +VARIABLE_DEFINITION_FILES = [ + # actual variable definition files + '../../src/ccpp_types.F90', + 'data.F90', + ] + +TYPEDEFS_NEW_METADATA = { + 'ccpp_types' : { + 'ccpp_t' : 'cdata', + 'ccpp_types' : '', + }, + 'data' : { + 'blocked_data_type' : 'blocked_data_instance(cdata%blk_no)', + 'data' : '', + }, + } + +# Add all physics scheme files relative to basedir +SCHEME_FILES = [ + 'blocked_data_scheme.F90', + ] + +# Default build dir, relative to current working directory, +# if not specified as command-line argument +DEFAULT_BUILD_DIR = 'build' + +# Auto-generated makefile/cmakefile snippets that contain all type definitions +TYPEDEFS_MAKEFILE = '{build_dir}/CCPP_TYPEDEFS.mk' +TYPEDEFS_CMAKEFILE = '{build_dir}/CCPP_TYPEDEFS.cmake' +TYPEDEFS_SOURCEFILE = '{build_dir}/CCPP_TYPEDEFS.sh' + +# Auto-generated makefile/cmakefile snippets that contain all schemes +SCHEMES_MAKEFILE = '{build_dir}/CCPP_SCHEMES.mk' +SCHEMES_CMAKEFILE = '{build_dir}/CCPP_SCHEMES.cmake' +SCHEMES_SOURCEFILE = '{build_dir}/CCPP_SCHEMES.sh' + +# Auto-generated makefile/cmakefile snippets that contain all caps +CAPS_MAKEFILE = '{build_dir}/CCPP_CAPS.mk' +CAPS_CMAKEFILE = '{build_dir}/CCPP_CAPS.cmake' +CAPS_SOURCEFILE = '{build_dir}/CCPP_CAPS.sh' + +# Directory where to put all auto-generated physics caps +CAPS_DIR = '{build_dir}' + +# Directory where the suite definition files are stored +SUITES_DIR = '.' + +# Optional arguments - only required for schemes that use +# optional arguments. ccpp_prebuild.py will throw an exception +# if it encounters a scheme subroutine with optional arguments +# if no entry is made here. Possible values are: 'all', 'none', +# or a list of standard_names: [ 'var1', 'var3' ]. +OPTIONAL_ARGUMENTS = {} + +# Directory where to write static API to +STATIC_API_DIR = '{build_dir}' +STATIC_API_CMAKEFILE = '{build_dir}/CCPP_API.cmake' +STATIC_API_SOURCEFILE = '{build_dir}/CCPP_API.sh' + +# Directory for writing HTML pages generated from metadata files +METADATA_HTML_OUTPUT_DIR = '{build_dir}' + +# HTML document containing the model-defined CCPP variables +HTML_VARTABLE_FILE = '{build_dir}/CCPP_VARIABLES_BLOCKED_DATA.html' + +# LaTeX document containing the provided vs requested CCPP variables +LATEX_VARTABLE_FILE = '{build_dir}/CCPP_VARIABLES_BLOCKED_DATA.tex' diff --git a/test_prebuild/test_blocked_data/data.F90 b/test_prebuild/test_blocked_data/data.F90 new file mode 100644 index 00000000..97ad051e --- /dev/null +++ b/test_prebuild/test_blocked_data/data.F90 @@ -0,0 +1,41 @@ +module data + +!! \section arg_table_data Argument Table +!! \htmlinclude data.html +!! + use ccpp_types, only: ccpp_t + + implicit none + + private + + public nblks, blksz, ncols + public ccpp_data_domain, ccpp_data_blocks, blocked_data_type, blocked_data_instance + + integer, parameter :: nblks = 4 + type(ccpp_t), target :: ccpp_data_domain + type(ccpp_t), dimension(nblks), target :: ccpp_data_blocks + + integer, parameter, dimension(nblks) :: blksz = (/6,6,6,3/) + integer, parameter :: ncols = sum(blksz) + +!! \section arg_table_blocked_data_type +!! \htmlinclude blocked_data_type.html +!! + type blocked_data_type + integer, dimension(:), allocatable :: array_data + contains + procedure :: create => blocked_data_create + end type blocked_data_type + + type(blocked_data_type), dimension(nblks) :: blocked_data_instance + +contains + + subroutine blocked_data_create(blocked_data_instance, ncol) + class(blocked_data_type), intent(inout) :: blocked_data_instance + integer, intent(in) :: ncol + allocate(blocked_data_instance%array_data(ncol)) + end subroutine blocked_data_create + +end module data diff --git a/test_prebuild/test_blocked_data/data.meta b/test_prebuild/test_blocked_data/data.meta new file mode 100644 index 00000000..c5fa2842 --- /dev/null +++ b/test_prebuild/test_blocked_data/data.meta @@ -0,0 +1,69 @@ +[ccpp-table-properties] + name = blocked_data_type + type = ddt + dependencies = +[ccpp-arg-table] + name = blocked_data_type + type = ddt +[array_data] + standard_name = blocked_data_array + long_name = blocked data array + units = 1 + dimensions = (horizontal_loop_extent) + type = integer + +[ccpp-table-properties] + name = data + type = module + dependencies = +[ccpp-arg-table] + name = data + type = module +[cdata] + standard_name = ccpp_t_instance + long_name = instance of derived data type ccpp_t + units = DDT + dimensions = () + type = ccpp_t +[nblks] + standard_name = ccpp_block_count + long_name = for explicit data blocking: number of blocks + units = count + dimensions = () + type = integer +[blksz] + standard_name = ccpp_block_sizes + long_name = for explicit data blocking: block sizes of all blocks + units = count + dimensions = (ccpp_block_count) + type = integer +[blksz(ccpp_block_number)] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer +[ncols] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count + dimensions = () + type = integer +[blocked_data_type] + standard_name = blocked_data_type + long_name = definition of type blocked_data_type + units = DDT + dimensions = () + type = blocked_data_type +[blocked_data_instance(ccpp_block_number)] + standard_name = blocked_data_type_instance + long_name = instance of derived data type blocked_data_type + units = DDT + dimensions = () + type = blocked_data_type +[blocked_data_instance] + standard_name = blocked_data_type_instance_all_blocks + long_name = instance of derived data type blocked_data_type + units = DDT + dimensions = (ccpp_block_count) + type = blocked_data_type diff --git a/test_prebuild/test_blocked_data/main.F90 b/test_prebuild/test_blocked_data/main.F90 new file mode 100644 index 00000000..cc57f618 --- /dev/null +++ b/test_prebuild/test_blocked_data/main.F90 @@ -0,0 +1,107 @@ +program test_blocked_data + + use, intrinsic :: iso_fortran_env, only: error_unit + + use ccpp_types, only: ccpp_t + use data, only: nblks, blksz, ncols + use data, only: ccpp_data_domain, ccpp_data_blocks, & + blocked_data_type, blocked_data_instance + + use ccpp_static_api, only: ccpp_physics_init, & + ccpp_physics_timestep_init, & + ccpp_physics_run, & + ccpp_physics_timestep_finalize, & + ccpp_physics_finalize + + implicit none + + character(len=*), parameter :: ccpp_suite = 'blocked_data_suite' + integer :: ib, ierr + type(ccpp_t), pointer :: cdata => null() + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! CCPP init step ! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + ! For physics running over the entire domain, block and thread + ! number are not used; set to safe values + ccpp_data_domain%blk_no = 1 + ccpp_data_domain%thrd_no = 1 + + ! Loop over all blocks and threads for ccpp_data_blocks + do ib=1,nblks + ! Assign the correct block numbers, only one thread + ccpp_data_blocks(ib)%blk_no = ib + ccpp_data_blocks(ib)%thrd_no = 1 + end do + + do ib=1,size(blocked_data_instance) + allocate(blocked_data_instance(ib)%array_data(blksz(ib))) + write(error_unit,'(2(a,i3))') "Allocated array_data for block", ib, " to size", size(blocked_data_instance(ib)%array_data) + end do + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! CCPP physics init step ! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + cdata => ccpp_data_domain + call ccpp_physics_init(cdata, suite_name=trim(ccpp_suite), ierr=ierr) + if (ierr/=0) then + write(error_unit,'(a)') "An error occurred in ccpp_physics_init:" + write(error_unit,'(a)') trim(cdata%errmsg) + stop 1 + end if + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! CCPP physics timestep init step ! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + cdata => ccpp_data_domain + call ccpp_physics_timestep_init(cdata, suite_name=trim(ccpp_suite), ierr=ierr) + if (ierr/=0) then + write(error_unit,'(a)') "An error occurred in ccpp_physics_timestep_init:" + write(error_unit,'(a)') trim(cdata%errmsg) + stop 1 + end if + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! CCPP physics run step ! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + do ib=1,nblks + cdata => ccpp_data_blocks(ib) + call ccpp_physics_run(cdata, suite_name=trim(ccpp_suite), ierr=ierr) + if (ierr/=0) then + write(error_unit,'(a,i3,a)') "An error occurred in ccpp_physics_run for block", ib, ":" + write(error_unit,'(a)') trim(cdata%errmsg) + stop 1 + end if + end do + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! CCPP physics timestep finalize step ! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + cdata => ccpp_data_domain + call ccpp_physics_timestep_finalize(cdata, suite_name=trim(ccpp_suite), ierr=ierr) + if (ierr/=0) then + write(error_unit,'(a)') "An error occurred in ccpp_physics_timestep_init:" + write(error_unit,'(a)') trim(cdata%errmsg) + stop 1 + end if + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! CCPP physics finalize step ! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + cdata => ccpp_data_domain + call ccpp_physics_finalize(cdata, suite_name=trim(ccpp_suite), ierr=ierr) + if (ierr/=0) then + write(error_unit,'(a)') "An error occurred in ccpp_physics_timestep_init:" + write(error_unit,'(a)') trim(cdata%errmsg) + stop 1 + end if + +contains + +end program test_blocked_data \ No newline at end of file diff --git a/test_prebuild/test_blocked_data/suite_blocked_data_suite.xml b/test_prebuild/test_blocked_data/suite_blocked_data_suite.xml new file mode 100644 index 00000000..cf4fe9a4 --- /dev/null +++ b/test_prebuild/test_blocked_data/suite_blocked_data_suite.xml @@ -0,0 +1,9 @@ + + + + + + blocked_data_scheme + + + diff --git a/tests/test_metadata_parser.py b/test_prebuild/test_metadata_parser.py similarity index 100% rename from tests/test_metadata_parser.py rename to test_prebuild/test_metadata_parser.py diff --git a/tests/test_mkstatic.py b/test_prebuild/test_mkstatic.py similarity index 100% rename from tests/test_mkstatic.py rename to test_prebuild/test_mkstatic.py