diff --git a/.clang-tidy b/.clang-tidy index 0f6c12c6c..b9508ffa0 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -41,6 +41,7 @@ Checks: >- -clang-analyzer-cplusplus.Move, -clang-analyzer-cplusplus.NewDeleteLeaks, -clang-analyzer-deadcode.DeadStores, + -clang-diagnostic-error, -clang-diagnostic-unused-lambda-capture, -cppcoreguidelines-avoid-c-arrays, -modernize-avoid-c-arrays, diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c9419f1a6..033df42cc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ exclude: | )$ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -22,7 +22,7 @@ repos: hooks: - id: black - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.4.1 + rev: v1.7.0 hooks: - id: mypy # args: [--verbose] @@ -50,26 +50,27 @@ repos: hooks: - id: clang-format args: [--style=file, -i] - # - id: clang-tidy - # # Skipping lue/framework for now because of issues with using clang icw build setup for gcc - # # Also skipping a few other files (unused ones, ...) - # exclude: | - # (?x)^( - # source/command/.*| - # source/data_model/test/include/lue/test/print.hpp| - # source/data_model/translate/include/lue/translate/command.hpp| - # source/data_model/translate/include/lue/translate/format.hpp| - # source/data_model/translate/include/lue/translate/format/gdal_stack.hpp| - # source/data_model/translate/include/lue/translate/format/gdal_stacks.hpp| - # source/data_model/translate/src/format/gdal_stack.cpp| - # source/data_model/translate/src/format/gdal_stacks.cpp| - # source/data_model/translate/src/format/geo_eas.cpp| - # source/data_model/utility/include/lue/utility/utility.hpp| - # source/framework/.*| - # source/framework/algorithm/benchmark/.*| - # source/framework/benchmark/.*| - # source/framework/case_study/.*| - # source/imgui/main.cpp| - # source/view/vulkan/.*| - # source/view/view/src/vulkan_application.cpp| - # )$ + - id: clang-tidy + args: [--quiet] + # Skipping lue/framework for now because of issues with using clang icw build setup for gcc + # Also skipping a few other files (unused ones, ...) + exclude: | + (?x)^( + source/data_model/cxx/include/lue/core/configuration.hpp| + source/data_model/test/include/lue/test/print.hpp| + source/data_model/translate/include/lue/translate/command.hpp| + source/data_model/translate/include/lue/translate/format.hpp| + source/data_model/translate/include/lue/translate/format/gdal_stack.hpp| + source/data_model/translate/include/lue/translate/format/gdal_stacks.hpp| + source/data_model/translate/src/format/gdal_stack.cpp| + source/data_model/translate/src/format/gdal_stacks.cpp| + source/data_model/translate/src/format/geo_eas.cpp| + source/data_model/utility/include/lue/utility/utility.hpp| + source/framework/.*| + source/framework/algorithm/benchmark/.*| + source/framework/benchmark/.*| + source/framework/case_study/.*| + source/view/imgui/.*| + source/view/vulkan/.*| + source/view/view/src/vulkan_application.cpp| + )$ diff --git a/document/luepy/ext/generated_image.py b/document/luepy/ext/generated_image.py index 5b636f9b1..8c8f3e673 100644 --- a/document/luepy/ext/generated_image.py +++ b/document/luepy/ext/generated_image.py @@ -32,7 +32,6 @@ def depart_generated_image_node(self, node): class GeneratedImageDirective(Directive): - required_arguments = 1 has_content = False diff --git a/environment/script/edit_dot_graph.py b/environment/script/edit_dot_graph.py index a3df3b2e1..e6c4cf0be 100755 --- a/environment/script/edit_dot_graph.py +++ b/environment/script/edit_dot_graph.py @@ -44,7 +44,6 @@ def wrapper(*args, **kwargs): @checked_call def add_attribute(graph_name, output_name, node_name, attribute_name, attribute_value): - graph = open(graph_name, "r").read() snippet = "{attribute}={value}".format( attribute=attribute_name, value=attribute_value diff --git a/environment/script/lue_describe.py b/environment/script/lue_describe.py index b8d506080..ca5ce1614 100755 --- a/environment/script/lue_describe.py +++ b/environment/script/lue_describe.py @@ -21,20 +21,17 @@ def print_message(indent, message): - tabsize = 2 print("{}{}".format(indent * tabsize * " ", message)) def print_messages(indent, messages): - for message in messages: print_message(indent, message) def print_heading(indent, length): - print_messages( indent, [ @@ -71,7 +68,6 @@ def print_heading(indent, length): def describe_file(file, indent): - print_message(indent, "file") print_messages( indent + 1, @@ -106,7 +102,6 @@ def describe_file(file, indent): def describe_property_set(property_set, indent): - print_message(indent, "property_set: {}".format(property_set.id.name)) indent += 1 @@ -120,7 +115,6 @@ def describe_property_set(property_set, indent): def describe_property_sets(property_sets, indent): - print_message(indent, "property_sets") indent += 1 @@ -129,7 +123,6 @@ def describe_property_sets(property_sets, indent): def describe_phenomenon(phenomenon, indent): - print_message(indent, "phenomenon: {}".format(phenomenon.id.name)) indent += 1 @@ -139,7 +132,6 @@ def describe_phenomenon(phenomenon, indent): def describe_phenomena(phenomena, indent): - print_message(indent, "phenomena") indent += 1 @@ -148,12 +140,10 @@ def describe_phenomena(phenomena, indent): def describe_universe(universe, indent): - assert False # TODO def describe_universes(universes, indent): - print_message(indent, "unverses") indent += 1 @@ -162,7 +152,6 @@ def describe_universes(universes, indent): def describe_dataset(dataset, indent): - print_message( indent, "dataset: {}".format(os.path.splitext(os.path.basename(dataset.pathname))[0]), @@ -176,7 +165,6 @@ def describe_dataset(dataset, indent): def describe_datasets(pathnames, indent=0): - print_message(indent, "datasets") indent += 1 diff --git a/environment/script/raster_to_lue_json.py b/environment/script/raster_to_lue_json.py index 9779b99a8..d20b4fd69 100755 --- a/environment/script/raster_to_lue_json.py +++ b/environment/script/raster_to_lue_json.py @@ -32,7 +32,6 @@ def raster_to_lue_json(raster_pathnames, lue_file, extent, discretization): - object_id = 5 properties = [ { diff --git a/environment/script/templatize.py b/environment/script/templatize.py index 74815b075..a08e4eb92 100755 --- a/environment/script/templatize.py +++ b/environment/script/templatize.py @@ -9,7 +9,6 @@ def main(): - usage = """\ Read a file, replace some placeholders with values, and write the result to a file diff --git a/environment/script/write_conan_profile.py b/environment/script/write_conan_profile.py index 6c0a282ac..cbe010432 100755 --- a/environment/script/write_conan_profile.py +++ b/environment/script/write_conan_profile.py @@ -332,7 +332,6 @@ def write_conan_profile(compiler_filename, profile_pathname): # we just add the newer version to the list of supported versions. Otherwise Conan wil # not install packages. if compiler_version not in compiler_versions: - String = type(compiler_versions[0]) compiler_versions.append(String(compiler_version)) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index e26f6f8e4..80e43628f 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -1,7 +1,5 @@ add_subdirectory(shared) -# add_subdirectory(command) - if(LUE_BUILD_DATA_MODEL) add_subdirectory(data_model) endif() diff --git a/source/command/CMakeLists.txt b/source/command/CMakeLists.txt deleted file mode 100644 index e9bfa6d2e..000000000 --- a/source/command/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory(describe_flow_direction) diff --git a/source/command/describe_flow_direction/CMakeLists.txt b/source/command/describe_flow_direction/CMakeLists.txt deleted file mode 100644 index 8a421d62e..000000000 --- a/source/command/describe_flow_direction/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -add_hpx_executable(lue_describe_flow_direction - ESSENTIAL - SOURCES src/describe_flow_direction.cpp - src/main.cpp -) - - -# add_executable(lue_describe_flow_direction -# src/describe_flow_direction.cpp -# src/main.cpp -# ) - -target_link_libraries(lue_describe_flow_direction - PRIVATE - lue::data_model_hl - lue::framework_core - lue::framework_io - lue::utility -) diff --git a/source/command/describe_flow_direction/src/describe_flow_direction.cpp b/source/command/describe_flow_direction/src/describe_flow_direction.cpp deleted file mode 100644 index 88cc43e48..000000000 --- a/source/command/describe_flow_direction/src/describe_flow_direction.cpp +++ /dev/null @@ -1,249 +0,0 @@ -#include "describe_flow_direction.hpp" -#include "lue/framework/algorithm/inflow_count.hpp" -#include "lue/framework/algorithm/inter_partition_stream.hpp" -#include "lue/framework/algorithm/policy.hpp" -// #include "lue/framework/core/define.hpp" -// #include "lue/framework/core/component/partitioned_array.hpp" -#include "lue/framework/io.hpp" -#include "lue/data_model/hl/raster_view.hpp" -#include -#include -#include - - -namespace { - - std::string const usage = fmt::format( - R"( -Describe flow direction data - -usage: - {0} - {0} (-h | --help) | --version - -options: - -h --help Show this screen - --version Show version - -See '{0} --help' for more information on a command. -)", - "lue_describe_flow_direction"); - -} // Anonymous namespace - - -namespace lue { - namespace utility { - - DescribeFlowDirection::DescribeFlowDirection(std::vector const& arguments): - - Application(usage, arguments) - - { - } - - - int DescribeFlowDirection::run_implementation() - { - H5Eset_auto(H5E_DEFAULT, nullptr, nullptr); - - auto const input_dataset_pathname = argument(""); - auto const phenomenon_name = argument(""); - auto const property_set_name = argument(""); - auto const elevation_layer_name = argument(""); - auto const flow_direction_layer_name = argument(""); - auto const partition_shape_string = argument(""); - auto const output_dataset_pathname = argument(""); - - namespace lh5 = lue::hdf5; - namespace ldm = lue::data_model; - - using DatasetPtr = std::shared_ptr; - using RasterView = ldm::constant::RasterView; - using SpaceBox = typename RasterView::SpaceBox; - - SpaceBox space_box{}; - lh5::Shape grid_shape{}; - ldm::ID object_id{}; - - // ------------------------------------------------------------------------- - // Determine raster shape - - // Open and query dataset. Close it again before the actual read - // is performed! - { - auto input_dataset_ptr = - std::make_shared(ldm::open_dataset(input_dataset_pathname, H5F_ACC_RDONLY)); - - // Open a view on the raster - RasterView input_raster_view{input_dataset_ptr, phenomenon_name, property_set_name}; - - // Open raster layer and determine its shape - auto const flow_direction_layer{input_raster_view.layer(flow_direction_layer_name)}; - - space_box = input_raster_view.space_box(); - grid_shape = lh5::Shape{input_raster_view.grid_shape()}; - object_id = input_raster_view.object_id(); - } - - // Create partitioned array for reading the flow direction into - lue::Rank const rank = 2; - - // TODO Read element types from input rasters - // type_id(array_pathname) - using ElevationElement = float; - using FlowDirectionElement = std::uint8_t; - - using ElevationArray = PartitionedArray; - using FlowDirectionArray = PartitionedArray; - - using Shape = ShapeT; - Shape const partition_shape = [](std::string const& partition_shape_string) - { - std::vector extents; - boost::split(extents, partition_shape_string, [](char c) { return c == 'x'; }); - if (extents.size() != 2) - { - throw std::runtime_error("Partition shape must be formatted as x"); - } - return Shape{std::stoi(extents[0]), std::stoi(extents[1])}; - }(partition_shape_string); - - std::string array_pathname; - - // Read layer into partitioned array, updating the existing partitions - array_pathname = fmt::format( - "{}/{}/{}/{}", - input_dataset_pathname, - phenomenon_name, - property_set_name, - elevation_layer_name); - ElevationArray elevation_array{ - read, ElevationElement, rank>( - policy::read_into::DefaultValuePolicies{}, - array_pathname, - partition_shape, - object_id)}; - - array_pathname = fmt::format( - "{}/{}/{}/{}", - input_dataset_pathname, - phenomenon_name, - property_set_name, - flow_direction_layer_name); - FlowDirectionArray flow_direction_array{read< - policy::read_into::DefaultValuePolicies, - FlowDirectionElement, - rank>( - policy::read_into::DefaultValuePolicies{}, - array_pathname, - partition_shape, - object_id)}; - - // ------------------------------------------------------------------------- - // Call operations for characterizing the flow direction network - - using InflowCountElement = std::uint8_t; - using InflowCountPolicies = policy::OutputPolicies>; - using FlowDirectionPolicies = - policy::InputPolicies>; - using InflowCountOperationPolicies = policy::Policies< - policy::OutputsPolicies, - policy::InputsPolicies>; - - InflowCountPolicies inflow_count_policies{policy::MarkNoDataByValue{}}; - FlowDirectionPolicies flow_direction_policies{ - policy::DetectNoDataByValue{}}; - - InflowCountOperationPolicies inflow_count_operation_policies{ - inflow_count_policies, flow_direction_policies}; - auto inflow_count_array = lue::inflow_count( - inflow_count_operation_policies, flow_direction_array); - - using BooleanElement = std::uint8_t; - using CountElement = std::uint64_t; - using StreamPolicies = - lue::policy::OutputPolicies>; - using FlowDirectionPolicies = - lue::policy::InputPolicies>; - using InterPartitionStreamOperationPolicies = lue::policy::Policies< - lue::policy::OutputsPolicies, - lue::policy::InputsPolicies>; - - StreamPolicies stream_policies{lue::policy::MarkNoDataByValue{}}; - // FlowDirectionPolicies - // flow_direction_policies{lue::policy::DetectNoDataByValue{}}; - - InterPartitionStreamOperationPolicies inter_partition_stream_operation_policies{ - stream_policies, flow_direction_policies}; - - auto const [stream_array, partition_io] = - inter_partition_stream( - inter_partition_stream_operation_policies, flow_direction_array); - - // Export partition IDs - // TODO - - // Aggregate information per partition - // TODO - - // ------------------------------------------------------------------------- - // Write information to a new dataset - - // Create new dataset and add output rasters to it - { - auto output_dataset_ptr = - std::make_shared(ldm::create_dataset(output_dataset_pathname)); - - auto output_raster_view = ldm::constant::create_raster_view( - output_dataset_ptr, phenomenon_name, property_set_name, grid_shape, space_box); - object_id = output_raster_view.object_id(); - - // Original flow direction (round-trip from partitioned array) - output_raster_view.add_layer("elevation"); - output_raster_view.add_layer("flow_direction"); - output_raster_view.add_layer("inflow_count"); - output_raster_view.add_layer("inter_partition_stream"); - } - - { - std::string array_pathname; - std::vector> arrays_written; - - array_pathname = fmt::format( - "{}/{}/{}/{}", output_dataset_pathname, phenomenon_name, property_set_name, "elevation"); - arrays_written.push_back(write_into(elevation_array, array_pathname, object_id)); - - array_pathname = fmt::format( - "{}/{}/{}/{}", - output_dataset_pathname, - phenomenon_name, - property_set_name, - "flow_direction"); - arrays_written.push_back(write_into(flow_direction_array, array_pathname, object_id)); - - array_pathname = fmt::format( - "{}/{}/{}/{}", - output_dataset_pathname, - phenomenon_name, - property_set_name, - "inflow_count"); - arrays_written.push_back(write_into(inflow_count_array, array_pathname, object_id)); - - array_pathname = fmt::format( - "{}/{}/{}/{}", - output_dataset_pathname, - phenomenon_name, - property_set_name, - "inter_partition_stream"); - arrays_written.push_back(write_into(stream_array, array_pathname, object_id)); - - // Wait for all writes to have happened - lue::detail::when_all_get(move(arrays_written)).get(); - } - - return 0; - } - - } // namespace utility -} // namespace lue diff --git a/source/command/describe_flow_direction/src/describe_flow_direction.hpp b/source/command/describe_flow_direction/src/describe_flow_direction.hpp deleted file mode 100644 index fbae9281e..000000000 --- a/source/command/describe_flow_direction/src/describe_flow_direction.hpp +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once -#include "lue/utility/application.hpp" - - -namespace lue { - namespace utility { - - class DescribeFlowDirection: public Application - - { - - public: - - explicit DescribeFlowDirection(std::vector const& arguments); - - - int run_implementation(); - - private: - }; - - } // namespace utility -} // namespace lue diff --git a/source/command/describe_flow_direction/src/main.cpp b/source/command/describe_flow_direction/src/main.cpp deleted file mode 100644 index 1e918a632..000000000 --- a/source/command/describe_flow_direction/src/main.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include "describe_flow_direction.hpp" -#include - - -int main(int argc, char* argv[]) -{ - return lue::utility::DescribeFlowDirection({argv + 1, argv + argc}).run(); -} diff --git a/source/data_model/python/test/case_study/raster_test.py b/source/data_model/python/test/case_study/raster_test.py index 05e5c467b..8b56be3f7 100644 --- a/source/data_model/python/test/case_study/raster_test.py +++ b/source/data_model/python/test/case_study/raster_test.py @@ -6,7 +6,6 @@ class RasterTest(lue_test.TestCase): def test_case_study(self): - dataset = ldm.create_dataset("areas.lue") areas = dataset.add_phenomenon("areas") diff --git a/source/data_model/python/test/case_study/string_test.py b/source/data_model/python/test/case_study/string_test.py index 8e8a51119..4cd98a753 100644 --- a/source/data_model/python/test/case_study/string_test.py +++ b/source/data_model/python/test/case_study/string_test.py @@ -6,7 +6,6 @@ class StringTest(lue_test.TestCase): def test_case_study(self): - dataset = ldm.create_dataset("planets.lue") planets = dataset.add_phenomenon("planets") diff --git a/source/data_model/python/test/case_study/time_series1_test.py b/source/data_model/python/test/case_study/time_series1_test.py index bd12fd8fb..a2c86c9dd 100644 --- a/source/data_model/python/test/case_study/time_series1_test.py +++ b/source/data_model/python/test/case_study/time_series1_test.py @@ -6,7 +6,6 @@ class TimeSeriesTest(lue_test.TestCase): def test_case_study(self): - # Time series as implemented here: # - Discharge at catchment outlets # - Located at fixed points in space @@ -30,7 +29,6 @@ def test_case_study(self): ) def discharge_property(phenomenon): - nr_outlets = 10 ids = numpy.arange(nr_outlets, dtype=numpy.uint64) @@ -122,7 +120,6 @@ def discharge_property(phenomenon): return discharge def discretization_property(phenomenon): - # Property set collection = phenomenon.add_collection_property_set( "outlets_collection", phenomenon.property_sets["outlets"].time_domain diff --git a/source/data_model/python/test/case_study/time_series2_test.py b/source/data_model/python/test/case_study/time_series2_test.py index e55c0834e..87fb7323b 100644 --- a/source/data_model/python/test/case_study/time_series2_test.py +++ b/source/data_model/python/test/case_study/time_series2_test.py @@ -8,7 +8,6 @@ class TimeSeriesTest(lue_test.TestCase): def test_case_study(self): - # Time series as implemented here: # - Discharge at catchment outlets # - Located at fixed points in space @@ -82,7 +81,6 @@ def test_case_study(self): # Iterate over the time boxes for t in range(nr_time_boxes): - # Store additional time box and count time_box = numpy.array([t, t + 1], dtype=time_coordinate_datatype) time_domain.value.expand(1)[-1] = time_box @@ -91,7 +89,6 @@ def test_case_study(self): # Iterate over the time cells within each time box for c in range(count): - # Store IDs of objects in the active set object_index = active_object_id.nr_ids active_set_index.expand(1)[-1] = object_index diff --git a/source/data_model/python/test/case_study/tree_crown_test.py b/source/data_model/python/test/case_study/tree_crown_test.py index 6dccbcc35..3e646874e 100644 --- a/source/data_model/python/test/case_study/tree_crown_test.py +++ b/source/data_model/python/test/case_study/tree_crown_test.py @@ -6,7 +6,6 @@ class TreeCrownTest(lue_test.TestCase): def test_case_study1(self): - # A number of trees # - Location of tree in space is stored as 2D points # - Location of crown in space is stored as 2D boxes with @@ -19,7 +18,6 @@ def test_case_study1(self): ids = np.arange(nr_trees, dtype=np.uint64) def add_stem_properties(phenomenon): - # Property-set for properties attached to tree stems. Stems # are located in space using stationary 2D points. @@ -48,7 +46,6 @@ def add_stem_properties(phenomenon): return stem_points def discretized_presence(property_set): - # Set-up a boolean property and a discretization property for # storing temporal boolean grids representing the presence # in space of tree crowns through time @@ -91,7 +88,6 @@ def discretized_presence(property_set): return presence def add_crown_properties(phenomenon): - # Property-set for properties attached to tree crowns. Crowns # are located in space using stationary 2D boxes within # which the presence is discretized. The presence of the @@ -169,7 +165,6 @@ def add_crown_properties(phenomenon): ldm.assert_is_valid(dataset) def test_case_study2(self): - dataset = ldm.create_dataset("forest.lue") # We are assuming here that we can model biomass of trees in a @@ -335,7 +330,6 @@ def test_case_study2(self): ) for y in range(nr_years): - # Time domain item for this growth season t_start = (y * nr_days_per_year) + start_of_growth_season t_end = t_start + nr_days_per_growth_season @@ -434,7 +428,6 @@ def test_case_study2(self): nr_trees = len(crowns.space_domain.value) if nr_trees > 0: - # Store IDs of starting trees in collection of IDs forests.object_id.expand(1)[-1] = 0 diff --git a/source/data_model/python/test/core/array_test.py b/source/data_model/python/test/core/array_test.py index 59f6b76b5..b33fcfad6 100644 --- a/source/data_model/python/test/core/array_test.py +++ b/source/data_model/python/test/core/array_test.py @@ -8,7 +8,6 @@ class ArrayTest(lue_test.TestCase): def setUp(self): - dataset_name = "my_dataset.lue" lue_test.remove_file_if_existant(dataset_name) self.dataset = ldm.create_dataset(dataset_name) @@ -49,14 +48,11 @@ def setUp(self): ldm.assert_is_valid(self.dataset) def tearDown(self): - del self.dataset def test_no_index(self): - # Shape of values is: (nr_objects, nr_rows, nr_cols) def compare_values(): - # Verify current value self.assertArraysEqual( self.lue_numeric_values[:], self.numpy_numeric_values @@ -93,7 +89,6 @@ def compare_values(): # compare_values() def test_one_slice_index(self): - # Value of first item # [[0 1] # [2 3] @@ -152,7 +147,6 @@ def test_one_slice_index(self): ) def test_one_integer_index(self): - # Value of an item for i in range(self.nr_objects): self.assertArraysEqual( @@ -179,7 +173,6 @@ def test_one_integer_index(self): ) def test_two_slice_indices(self): - nr_objects = self.nr_objects nr_rows = self.nr_rows @@ -222,7 +215,6 @@ def test_two_slice_indices(self): ) def test_two_integer_indices(self): - nr_objects = self.nr_objects nr_rows = self.nr_rows @@ -268,7 +260,6 @@ def test_two_integer_indices(self): ) def test_three_slice_indices(self): - nr_objects = self.nr_objects nr_rows = self.nr_rows nr_cols = self.nr_cols @@ -338,7 +329,6 @@ def test_three_slice_indices(self): ) def test_three_integer_indices(self): - nr_objects = self.nr_objects nr_rows = self.nr_rows nr_cols = self.nr_cols @@ -390,7 +380,6 @@ def test_three_integer_indices(self): # ) def test_too_many_indices(self): - with self.assertRaises(IndexError) as numpy_context: self.numpy_numeric_values[0, 0, 0, 0] @@ -405,7 +394,6 @@ def test_too_many_indices(self): # TODO Test assign def test_unsupported_index_type(self): - # String with self.assertRaises(IndexError) as lue_context: self.lue_numeric_values["meh"] @@ -428,7 +416,6 @@ def test_unsupported_index_type(self): # TODO Test assign def test_iterate(self): - with self.assertRaises(ValueError) as lue_context: for _ in self.phenomenon.object_id: pass diff --git a/source/data_model/python/test/dataset_test.py b/source/data_model/python/test/dataset_test.py index 36e4514bb..84568c56b 100644 --- a/source/data_model/python/test/dataset_test.py +++ b/source/data_model/python/test/dataset_test.py @@ -9,7 +9,6 @@ class DatasetTest(lue_test.TestCase): def test_create(self): - dataset_name = "dataset_create.lue" lue_test.remove_file_if_existant(dataset_name) @@ -26,7 +25,6 @@ def test_create(self): self.assertFalse(os.access(dataset_name, os.X_OK)) def test_object_name(self): - dataset_name = "dataset_object_name.lue" dataset = self.create_dataset(dataset_name) @@ -34,7 +32,6 @@ def test_object_name(self): self.assertEqual(dataset.id.name, "") def test_object_pathname(self): - dataset_name = "dataset_object_pathname.lue" dataset = self.create_dataset(dataset_name) @@ -42,7 +39,6 @@ def test_object_pathname(self): self.assertEqual(dataset.id.pathname, "/") def test_pathname(self): - dataset_name = "dataset_pathname.lue" dataset = self.create_dataset(dataset_name) @@ -50,13 +46,11 @@ def test_pathname(self): self.assertEqual(dataset.pathname, dataset_name) def test_open_existing_readable(self): - dataset_name = "dataset_open_existing_readable.lue" dataset = self.create_dataset(dataset_name) existing_dataset = ldm.open_dataset(dataset_name, "r") def test_add_universe(self): - dataset_name = "dataset_add_universe.lue" dataset = self.create_dataset(dataset_name) @@ -65,7 +59,6 @@ def test_add_universe(self): self.assertTrue("my_universe" in dataset.universes) def test_add_universe_twice(self): - dataset_name = "dataset_add_universe_twice.lue" dataset = self.create_dataset(dataset_name) @@ -73,7 +66,6 @@ def test_add_universe_twice(self): self.assertRaises(RuntimeError, dataset.add_universe, "my_universe") def test_add_phenomenon(self): - dataset_name = "dataset_add_phenomenon.lue" dataset = self.create_dataset(dataset_name) @@ -82,7 +74,6 @@ def test_add_phenomenon(self): self.assertTrue("my_phenomenon" in dataset.phenomena) def test_add_phenomenon_twice(self): - dataset_name = "dataset_add_phenomenon_twice.lue" dataset = self.create_dataset(dataset_name) diff --git a/source/data_model/python/test/hdf5/file_test.py b/source/data_model/python/test/hdf5/file_test.py index 5bbbb24bb..fbec6f126 100644 --- a/source/data_model/python/test/hdf5/file_test.py +++ b/source/data_model/python/test/hdf5/file_test.py @@ -7,7 +7,6 @@ class FileTest(lue_test.TestCase): def test_create_remove(self): - file_pathname = "file_create.h5" lue_test.remove_file_if_existant(file_pathname) @@ -31,7 +30,6 @@ def test_create_remove(self): self.assertFalse(lh5.file_exists(file_pathname)) def test_pathname(self): - # Relative path file_pathname = "file_pathname.h5" lue_test.remove_file_if_existant(file_pathname) diff --git a/source/data_model/python/test/lue_test/util.py b/source/data_model/python/test/lue_test/util.py index 3850e7804..daf8edeec 100644 --- a/source/data_model/python/test/lue_test/util.py +++ b/source/data_model/python/test/lue_test/util.py @@ -2,7 +2,6 @@ def remove_file_if_existant(pathname): - if os.path.isfile(pathname): os.remove(pathname) @@ -10,7 +9,6 @@ def remove_file_if_existant(pathname): def relative_pathname(pathname1, pathname2): - common_path = os.path.commonprefix([pathname1, pathname2]) return pathname2[len(common_path) :] diff --git a/source/data_model/python/test/package_test.py b/source/data_model/python/test/package_test.py index ae3be8d69..59e94ad54 100644 --- a/source/data_model/python/test/package_test.py +++ b/source/data_model/python/test/package_test.py @@ -4,6 +4,5 @@ class PackageTest(lue_test.TestCase): def test_version(self): - self.assertTrue(hasattr(lue, "__version__")) self.assertTrue(lue.__version__) diff --git a/source/framework/case_study/land_use/change_land_use.py b/source/framework/case_study/land_use/change_land_use.py index 28628d9e9..55a25a4b6 100644 --- a/source/framework/case_study/land_use/change_land_use.py +++ b/source/framework/case_study/land_use/change_land_use.py @@ -70,7 +70,6 @@ def count_if(array): - counts = dict(zip(*np.unique(array, return_counts=True))) return counts[True] if True in counts else 0 @@ -93,14 +92,12 @@ def map_range(array): def square_kernel(radius, dtype=np.float64): - size = 2 * radius + 1 return np.ones(shape=(size, size), dtype=dtype) def convolve(array, kernel): - return signal.fftconvolve(array, kernel, mode="same") @@ -115,7 +112,6 @@ def convolve(array, kernel): def window_total(array, kernel_radius, skip_center_cell=False): - kernel = square_kernel(kernel_radius, np.float64) if skip_center_cell: @@ -126,7 +122,6 @@ def window_total(array, kernel_radius, skip_center_cell=False): def slope(array, cell_width, cell_height): def function(data, cell_width, cell_height): - rise = ( (data[6] + (2 * data[7]) + data[8]) - (data[0] + (2 * data[1]) + data[2]) ) / (8 * cell_height) @@ -147,7 +142,6 @@ def function(data, cell_width, cell_height): def write_grid(array, name, time_step): - figure, ax = plt.subplots(figsize=(5, 5)) if np.issubdtype(array.dtype, np.bool_): @@ -189,7 +183,6 @@ def write_grid(array, name, time_step): def write_raster(array, name, time_step=None): - name = "{}_{}".format(name, time_step) if time_step is not None else name nr_rows, nr_cols = array.shape @@ -226,18 +219,15 @@ def write_raster(array, name, time_step=None): class ChangeLandUse(object): def __init__(self, environment): - self.environment = environment def __call__(self): - sys.stdout.write("[") sys.stdout.flush() self.initialize() for time_step in range(self.environment.nr_time_steps): - self.simulate(time_step) sys.stdout.write(".") @@ -247,7 +237,6 @@ def __call__(self): sys.stdout.flush() def initialize(self): - data = self.environment self.land_use = np.copy(data.initial_land_use) @@ -261,14 +250,12 @@ def initialize(self): write_raster(data.slope, "slope") def simulate(self, time_step): - data = self.environment original_land_use = np.copy(self.land_use) cells_changed_this_time_step = np.full_like(self.land_use, False, dtype=np.bool) for land_use_type in data.active_land_use_types: - suitability = self.suitability(time_step, land_use_type, self.land_use) write_raster( @@ -284,7 +271,6 @@ def simulate(self, time_step): # Cells are converted to or removed from this land-use # until the total yield equals meets the total demand if total_demand > total_yield: - # Consider suitabilities of those cells that have # not been converted during the current time step. # Mark all other suitabilities with 0. @@ -294,7 +280,6 @@ def simulate(self, time_step): # Expand area occupied with current land-use type. while total_demand > total_yield: - # Consider suitabilities of those cells that # do not already contain the current land-use # type. Scale suitabilities to [0, 1]. @@ -312,7 +297,6 @@ def simulate(self, time_step): ) elif total_demand < total_yield: - # Consider suitabilities of those cells that have # not been converted during the current time step. # Mark all other suitabilities with 1. @@ -322,7 +306,6 @@ def simulate(self, time_step): # Contract area occupied with current land-use type while total_demand < total_yield: - # Consider suitabilities of those cells that # do already contain the current land-use type. # Scale suitabilities to [0, 1]. @@ -354,12 +337,10 @@ def simulate(self, time_step): write_raster(self.land_use, "land_use", time_step + 1) def suitability(self, time_step, land_use_type, land_use): - data = self.environment suitability = np.zeros_like(land_use, dtype=np.float64) for suitability_factor in data.suitability_factors[land_use_type]: - suitability += suitability_factor.weight * suitability_factor( time_step, land_use_type, land_use ) @@ -373,7 +354,6 @@ def suitability(self, time_step, land_use_type, land_use): return suitability def total_demand(self, time_step, land_use_type): - data = self.environment # Number of inhabitants at current time-step @@ -392,7 +372,6 @@ def total_demand(self, time_step, land_use_type): return nr_inhabitants * demand_per_capita * self_sufficiency_ratio def potential_yield(self, time_step, land_use_type): - data = self.environment # Maximum possible product yield of products from current @@ -411,14 +390,12 @@ def potential_yield(self, time_step, land_use_type): return max_potential_product_yield * actual_yield_fraction def current_yield(self, land_use_type, potential_yield, land_use): - # Current yield of products from current land-use type at current # time-step is potential yield in cells that contain that # land-use type (kg / kmĀ² / year) return np.where(land_use == land_use_type, potential_yield, 0) def total_yield(self, land_use_type, potential_yield, land_use): - data = self.environment current_yield = self.current_yield(land_use_type, potential_yield, land_use) @@ -430,7 +407,6 @@ def total_yield(self, land_use_type, potential_yield, land_use): ) def expand_land_use_type(self, land_use, land_use_type, suitability): - # When the land-use type expands, it allocates # new cells of this type at locations with the # highest suitability. @@ -456,7 +432,6 @@ def expand_land_use_type(self, land_use, land_use_type, suitability): return land_use def contract_land_use_type(self, land_use, land_use_type, suitability): - # When the land-use type contracts, it removes cells # of this type at locations with the lowest suitability. @@ -484,25 +459,20 @@ def contract_land_use_type(self, land_use, land_use_type, suitability): class SuitabilityFactor(object): def __init__(self, weight): - self.weight = weight def __call__(self, time_step, land_use_type, land_use): - return self.calculate(time_step, land_use_type, land_use) def calculate(self, time_step, land_use_type, land_use): - raise NotImplementedError("SuitabilityFactor.calculate") class Autocorrelation(SuitabilityFactor): def __init__(self, weight): - SuitabilityFactor.__init__(self, weight) def calculate(self, time_step, land_use_type, land_use): - # Count the number of occurrences of value in the neighborhood # of each cell. The more occurrences, the better. Scale # occurrences between 0(no occurrences) and 1(8 occurrences). @@ -519,22 +489,18 @@ def calculate(self, time_step, land_use_type, land_use): class Randomness(SuitabilityFactor): def __init__(self, weight): - SuitabilityFactor.__init__(self, weight) def calculate(self, time_step, land_use_type, land_use): - return map_range(np.random.uniform(size=land_use.shape)) class SuitableArea(SuitabilityFactor): def __init__(self, weight, selection): - SuitabilityFactor.__init__(self, weight) self.selection = selection.astype(np.float64) def calculate(self, time_step, land_use_type, land_use): - suitability = self.selection assert np.all(0 <= suitability) @@ -599,7 +565,6 @@ def __init__(self): # Iterate over all active land-use types for land_use_type in self.active_land_use_types: - # Demand ------------------------------------------------------------------- self.demand_per_capita[land_use_type] = [ # FIXME vary this(?) diff --git a/source/framework/case_study/wildfire/wildfire.py b/source/framework/case_study/wildfire/wildfire.py index 7fe1ebc42..e1206c8d0 100644 --- a/source/framework/case_study/wildfire/wildfire.py +++ b/source/framework/case_study/wildfire/wildfire.py @@ -22,12 +22,10 @@ class ForestFireModel(DynamicModel): def __init__(self): - DynamicModel.__init__(self) setclone("clone.map") def initial(self): - # Initial burning locations, self.fire represents area that is # burning or has burnt down # self.fire = order(uniform(1)) < 5 @@ -57,7 +55,6 @@ def initial(self): self.report(self.spot_ignite_probability, "spot_ignite_probability") def dynamic(self): - # Find pixels where at least one neighbour is burning and that # are not yet burning or burnt down. This should be window4total # (NOT a Moore neighbourhood) diff --git a/source/framework/python/framework/__init__.py b/source/framework/python/framework/__init__.py index 090bc1f7f..4640003f9 100644 --- a/source/framework/python/framework/__init__.py +++ b/source/framework/python/framework/__init__.py @@ -42,7 +42,6 @@ def runtime_scope(user_main): """ def decorated_function(*args, **kwargs): - lfr.start_hpx_runtime(default_hpx_runtime_configuration) if lfr.on_root_locality(): diff --git a/source/framework/python/framework/support.py b/source/framework/python/framework/support.py index c5c67522f..d9d1079c3 100644 --- a/source/framework/python/framework/support.py +++ b/source/framework/python/framework/support.py @@ -219,7 +219,6 @@ def current_sample_nr(self, sample_nr: int): class MonteCarloModelRunner(object): @staticmethod def initialize_sample_directories(model, remove_existing_directories): - for sample_nr in range(model.first_sample_nr, model.last_sample_nr + 1): directory_pathname = f"{sample_nr}" @@ -239,7 +238,6 @@ def __init__(self, framework_model, nr_samples, remove_existing_directories): ) def run(self, rate_limit=0): - assert rate_limit >= 0, rate_limit assert ( self.framework_model.first_time_step == 1 diff --git a/source/framework/python/test/algorithm/abs_test.py b/source/framework/python/test/algorithm/abs_test.py index 12417fe4c..638a4b842 100644 --- a/source/framework/python/test/algorithm/abs_test.py +++ b/source/framework/python/test/algorithm/abs_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class AbsTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 diff --git a/source/framework/python/test/algorithm/accu3_test.py b/source/framework/python/test/algorithm/accu3_test.py index 76a3e5422..994ef3da3 100644 --- a/source/framework/python/test/algorithm/accu3_test.py +++ b/source/framework/python/test/algorithm/accu3_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class Accu3Test(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) for direction in [1, 2, 3, 4, 5, 6, 7, 8, 9]: diff --git a/source/framework/python/test/algorithm/accu_fraction_test.py b/source/framework/python/test/algorithm/accu_fraction_test.py index 6f5be30e0..57e89a3b3 100644 --- a/source/framework/python/test/algorithm/accu_fraction_test.py +++ b/source/framework/python/test/algorithm/accu_fraction_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class AccuFractionTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) direction = 2 diff --git a/source/framework/python/test/algorithm/accu_info_test.py b/source/framework/python/test/algorithm/accu_info_test.py index 95c2f5e70..17f949f35 100644 --- a/source/framework/python/test/algorithm/accu_info_test.py +++ b/source/framework/python/test/algorithm/accu_info_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class AccuInfoTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) direction = 4 diff --git a/source/framework/python/test/algorithm/accu_test.py b/source/framework/python/test/algorithm/accu_test.py index 3f04f1742..565c9ae12 100644 --- a/source/framework/python/test/algorithm/accu_test.py +++ b/source/framework/python/test/algorithm/accu_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class AccuTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) direction = 4 diff --git a/source/framework/python/test/algorithm/accu_threshold3_test.py b/source/framework/python/test/algorithm/accu_threshold3_test.py index 3e4509933..7d3e1f98a 100644 --- a/source/framework/python/test/algorithm/accu_threshold3_test.py +++ b/source/framework/python/test/algorithm/accu_threshold3_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class AccuThreshold3Test(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) for direction in [1, 2, 3, 4, 5, 6, 7, 8, 9]: diff --git a/source/framework/python/test/algorithm/accu_threshold_test.py b/source/framework/python/test/algorithm/accu_threshold_test.py index 27d56b604..d842db616 100644 --- a/source/framework/python/test/algorithm/accu_threshold_test.py +++ b/source/framework/python/test/algorithm/accu_threshold_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class AccuThresholdTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) for direction in [1, 2, 3, 4, 5, 6, 7, 8, 9]: diff --git a/source/framework/python/test/algorithm/acos_test.py b/source/framework/python/test/algorithm/acos_test.py index 15f6247d2..3a3c7e30b 100644 --- a/source/framework/python/test/algorithm/acos_test.py +++ b/source/framework/python/test/algorithm/acos_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class ACosTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5.5 diff --git a/source/framework/python/test/algorithm/array_partition_id_test.py b/source/framework/python/test/algorithm/array_partition_id_test.py index aabce866a..5cc122274 100644 --- a/source/framework/python/test/algorithm/array_partition_id_test.py +++ b/source/framework/python/test/algorithm/array_partition_id_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class ArrayPartitionIDTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) array = lfr.create_array(array_shape, np.uint8, fill_value=5) diff --git a/source/framework/python/test/algorithm/asin_test.py b/source/framework/python/test/algorithm/asin_test.py index a958f903f..4cff05658 100644 --- a/source/framework/python/test/algorithm/asin_test.py +++ b/source/framework/python/test/algorithm/asin_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class ASinTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5.5 diff --git a/source/framework/python/test/algorithm/aspect_test.py b/source/framework/python/test/algorithm/aspect_test.py index 1db5c3f52..a40c21aa4 100644 --- a/source/framework/python/test/algorithm/aspect_test.py +++ b/source/framework/python/test/algorithm/aspect_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class AspectTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 diff --git a/source/framework/python/test/algorithm/atan2_test.py b/source/framework/python/test/algorithm/atan2_test.py index 1356fbdcd..2fd158651 100644 --- a/source/framework/python/test/algorithm/atan2_test.py +++ b/source/framework/python/test/algorithm/atan2_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class ATan2Test(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5.5 diff --git a/source/framework/python/test/algorithm/atan_test.py b/source/framework/python/test/algorithm/atan_test.py index 379e7c215..9541bbae9 100644 --- a/source/framework/python/test/algorithm/atan_test.py +++ b/source/framework/python/test/algorithm/atan_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class ATanTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5.5 diff --git a/source/framework/python/test/algorithm/cast_test.py b/source/framework/python/test/algorithm/cast_test.py index c291cb492..65988d79b 100644 --- a/source/framework/python/test/algorithm/cast_test.py +++ b/source/framework/python/test/algorithm/cast_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class CastTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 diff --git a/source/framework/python/test/algorithm/cos_test.py b/source/framework/python/test/algorithm/cos_test.py index 8847a4e7c..1b8312712 100644 --- a/source/framework/python/test/algorithm/cos_test.py +++ b/source/framework/python/test/algorithm/cos_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class CosTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5.5 diff --git a/source/framework/python/test/algorithm/d8_flow_direction_test.py b/source/framework/python/test/algorithm/d8_flow_direction_test.py index 358cb2a80..0e618a725 100644 --- a/source/framework/python/test/algorithm/d8_flow_direction_test.py +++ b/source/framework/python/test/algorithm/d8_flow_direction_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class D8FlowDirectionTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) direction = 6 @@ -25,7 +24,6 @@ def test_overloads(self): @lue_test.framework_test_case def test_directions(self): - array_shape = (60, 40) for direction in [1, 2, 3, 4, 5, 6, 7, 8, 9]: diff --git a/source/framework/python/test/algorithm/downstream_distance_test.py b/source/framework/python/test/algorithm/downstream_distance_test.py index 95798ca7a..22df8a261 100644 --- a/source/framework/python/test/algorithm/downstream_distance_test.py +++ b/source/framework/python/test/algorithm/downstream_distance_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class DownstreamDistanceTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) direction = 1 diff --git a/source/framework/python/test/algorithm/downstream_test.py b/source/framework/python/test/algorithm/downstream_test.py index 9b3a465b9..574282df3 100644 --- a/source/framework/python/test/algorithm/downstream_test.py +++ b/source/framework/python/test/algorithm/downstream_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class DownstreamTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) direction = 1 diff --git a/source/framework/python/test/algorithm/exp_test.py b/source/framework/python/test/algorithm/exp_test.py index 0b1dec290..03c815357 100644 --- a/source/framework/python/test/algorithm/exp_test.py +++ b/source/framework/python/test/algorithm/exp_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class ExpTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5.5 diff --git a/source/framework/python/test/algorithm/focal_operation/focal_diversity_test.py b/source/framework/python/test/algorithm/focal_operation/focal_diversity_test.py index 4477cdfda..20cbcf576 100644 --- a/source/framework/python/test/algorithm/focal_operation/focal_diversity_test.py +++ b/source/framework/python/test/algorithm/focal_operation/focal_diversity_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class FocalDiversityTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 kernel = np.full((3, 3), 1, dtype=np.uint8) diff --git a/source/framework/python/test/algorithm/focal_operation/focal_high_pass_test.py b/source/framework/python/test/algorithm/focal_operation/focal_high_pass_test.py index f7b84f1d0..f1ffc08b9 100644 --- a/source/framework/python/test/algorithm/focal_operation/focal_high_pass_test.py +++ b/source/framework/python/test/algorithm/focal_operation/focal_high_pass_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class FocalHighPassTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 kernel = np.full((3, 3), 1, dtype=np.uint8) diff --git a/source/framework/python/test/algorithm/focal_operation/focal_majority_test.py b/source/framework/python/test/algorithm/focal_operation/focal_majority_test.py index 929986081..1a18d183e 100644 --- a/source/framework/python/test/algorithm/focal_operation/focal_majority_test.py +++ b/source/framework/python/test/algorithm/focal_operation/focal_majority_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class FocalMajorityTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 kernel = np.full((3, 3), 1, dtype=np.uint8) diff --git a/source/framework/python/test/algorithm/focal_operation/focal_maximum_test.py b/source/framework/python/test/algorithm/focal_operation/focal_maximum_test.py index 55164d163..1fd1ff018 100644 --- a/source/framework/python/test/algorithm/focal_operation/focal_maximum_test.py +++ b/source/framework/python/test/algorithm/focal_operation/focal_maximum_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class FocalMaximumTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 kernel = np.full((3, 3), 1, dtype=np.uint8) diff --git a/source/framework/python/test/algorithm/focal_operation/focal_mean_test.py b/source/framework/python/test/algorithm/focal_operation/focal_mean_test.py index 25aef5f04..d34e03431 100644 --- a/source/framework/python/test/algorithm/focal_operation/focal_mean_test.py +++ b/source/framework/python/test/algorithm/focal_operation/focal_mean_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class FocalMeanTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 kernel = np.full((3, 3), 1, dtype=np.uint8) diff --git a/source/framework/python/test/algorithm/focal_operation/focal_minimum_test.py b/source/framework/python/test/algorithm/focal_operation/focal_minimum_test.py index b810c9fbb..6dedaa952 100644 --- a/source/framework/python/test/algorithm/focal_operation/focal_minimum_test.py +++ b/source/framework/python/test/algorithm/focal_operation/focal_minimum_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class FocalMinimumTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 kernel = np.full((3, 3), 1, dtype=np.uint8) diff --git a/source/framework/python/test/algorithm/focal_operation/focal_sum_test.py b/source/framework/python/test/algorithm/focal_operation/focal_sum_test.py index c83b539c8..673711666 100644 --- a/source/framework/python/test/algorithm/focal_operation/focal_sum_test.py +++ b/source/framework/python/test/algorithm/focal_operation/focal_sum_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class FocalSumTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 kernel = np.full((3, 3), 1, dtype=np.uint8) diff --git a/source/framework/python/test/algorithm/global_operation/reclassify_test.py b/source/framework/python/test/algorithm/global_operation/reclassify_test.py index ba8f7c2a5..fd16df28a 100644 --- a/source/framework/python/test/algorithm/global_operation/reclassify_test.py +++ b/source/framework/python/test/algorithm/global_operation/reclassify_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class ReclassifyTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) id_ = 3 diff --git a/source/framework/python/test/algorithm/inflow_count3_test.py b/source/framework/python/test/algorithm/inflow_count3_test.py index 8d941d5e0..b466d07c4 100644 --- a/source/framework/python/test/algorithm/inflow_count3_test.py +++ b/source/framework/python/test/algorithm/inflow_count3_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class InflowCount3Test(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) for direction in [1, 2, 3, 4, 5, 6, 7, 8, 9]: diff --git a/source/framework/python/test/algorithm/inflow_count_test.py b/source/framework/python/test/algorithm/inflow_count_test.py index bf74bdb25..ba3a79fc9 100644 --- a/source/framework/python/test/algorithm/inflow_count_test.py +++ b/source/framework/python/test/algorithm/inflow_count_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class InflowCountTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) for direction in [1, 2, 3, 4, 5, 6, 7, 8, 9]: diff --git a/source/framework/python/test/algorithm/inter_partition_stream_test.py b/source/framework/python/test/algorithm/inter_partition_stream_test.py index 890ed1eb8..372e88cae 100644 --- a/source/framework/python/test/algorithm/inter_partition_stream_test.py +++ b/source/framework/python/test/algorithm/inter_partition_stream_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class InterPartitionStreamTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) direction = 4 diff --git a/source/framework/python/test/algorithm/iterate_per_element_test.py b/source/framework/python/test/algorithm/iterate_per_element_test.py index ed2a57578..f1d2d2933 100644 --- a/source/framework/python/test/algorithm/iterate_per_element_test.py +++ b/source/framework/python/test/algorithm/iterate_per_element_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class IteratePerElementTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 diff --git a/source/framework/python/test/algorithm/local_operation/logical_and_test.py b/source/framework/python/test/algorithm/local_operation/logical_and_test.py index 02bd07782..f7de76806 100644 --- a/source/framework/python/test/algorithm/local_operation/logical_and_test.py +++ b/source/framework/python/test/algorithm/local_operation/logical_and_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class LogicalAndTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 diff --git a/source/framework/python/test/algorithm/local_operation/logical_exclusive_or_test.py b/source/framework/python/test/algorithm/local_operation/logical_exclusive_or_test.py index 4aff3ed2c..14ebb9d50 100644 --- a/source/framework/python/test/algorithm/local_operation/logical_exclusive_or_test.py +++ b/source/framework/python/test/algorithm/local_operation/logical_exclusive_or_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class LogicalInclusiveOrTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 diff --git a/source/framework/python/test/algorithm/local_operation/logical_inclusive_or_test.py b/source/framework/python/test/algorithm/local_operation/logical_inclusive_or_test.py index eb5e1f0a3..3510cbb1e 100644 --- a/source/framework/python/test/algorithm/local_operation/logical_inclusive_or_test.py +++ b/source/framework/python/test/algorithm/local_operation/logical_inclusive_or_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class LogicalInclusiveOrTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 diff --git a/source/framework/python/test/algorithm/local_operation/logical_not_test.py b/source/framework/python/test/algorithm/local_operation/logical_not_test.py index 4b00063b7..70c427365 100644 --- a/source/framework/python/test/algorithm/local_operation/logical_not_test.py +++ b/source/framework/python/test/algorithm/local_operation/logical_not_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class LogicalNotTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 diff --git a/source/framework/python/test/algorithm/local_operation/unique_id_test.py b/source/framework/python/test/algorithm/local_operation/unique_id_test.py index ef3e14801..f6359a26e 100644 --- a/source/framework/python/test/algorithm/local_operation/unique_id_test.py +++ b/source/framework/python/test/algorithm/local_operation/unique_id_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class UniqueIDTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 diff --git a/source/framework/python/test/algorithm/locality_id_test.py b/source/framework/python/test/algorithm/locality_id_test.py index 3c596cb45..0fcfe08b3 100644 --- a/source/framework/python/test/algorithm/locality_id_test.py +++ b/source/framework/python/test/algorithm/locality_id_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class LocalityIDTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) for type_ in [ diff --git a/source/framework/python/test/algorithm/log_test.py b/source/framework/python/test/algorithm/log_test.py index ed95c7432..05d84d734 100644 --- a/source/framework/python/test/algorithm/log_test.py +++ b/source/framework/python/test/algorithm/log_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class LogTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) dtype = np.float64 fill_value = 5.5 diff --git a/source/framework/python/test/algorithm/routing_operation/kinematic_wave_test.py b/source/framework/python/test/algorithm/routing_operation/kinematic_wave_test.py index 837131a9f..2643f97eb 100644 --- a/source/framework/python/test/algorithm/routing_operation/kinematic_wave_test.py +++ b/source/framework/python/test/algorithm/routing_operation/kinematic_wave_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class KinematicWaveTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) direction = 3 alpha = 1.5 diff --git a/source/framework/python/test/algorithm/sin_test.py b/source/framework/python/test/algorithm/sin_test.py index c769aaa7d..11ca99f10 100644 --- a/source/framework/python/test/algorithm/sin_test.py +++ b/source/framework/python/test/algorithm/sin_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class SinTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5.5 diff --git a/source/framework/python/test/algorithm/slope_test.py b/source/framework/python/test/algorithm/slope_test.py index 355ca56d1..454588373 100644 --- a/source/framework/python/test/algorithm/slope_test.py +++ b/source/framework/python/test/algorithm/slope_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class SlopeTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 diff --git a/source/framework/python/test/algorithm/sqrt_test.py b/source/framework/python/test/algorithm/sqrt_test.py index 33b968dcb..fbe6f93a9 100644 --- a/source/framework/python/test/algorithm/sqrt_test.py +++ b/source/framework/python/test/algorithm/sqrt_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class SqrtTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5.5 diff --git a/source/framework/python/test/algorithm/tan_test.py b/source/framework/python/test/algorithm/tan_test.py index 573f2fb8b..f651beaae 100644 --- a/source/framework/python/test/algorithm/tan_test.py +++ b/source/framework/python/test/algorithm/tan_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class TanTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5.5 diff --git a/source/framework/python/test/algorithm/timestamp_test.py b/source/framework/python/test/algorithm/timestamp_test.py index 325f659bd..d9f5d2b53 100644 --- a/source/framework/python/test/algorithm/timestamp_test.py +++ b/source/framework/python/test/algorithm/timestamp_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class TimestampTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) for type_ in [ diff --git a/source/framework/python/test/algorithm/uniform_test.py b/source/framework/python/test/algorithm/uniform_test.py index 11eb5c9ec..434fb7e52 100644 --- a/source/framework/python/test/algorithm/uniform_test.py +++ b/source/framework/python/test/algorithm/uniform_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class UniformTest(lue_test.TestCase): @lue_test.framework_test_case def test_overload1(self): - array_shape = (60, 40) min_value = 33 max_value = 55 @@ -44,7 +43,6 @@ def test_overload1(self): @lue_test.framework_test_case def test_overload2(self): - array_shape = (60, 40) min_value = 33 max_value = 55 diff --git a/source/framework/python/test/algorithm/upstream_test.py b/source/framework/python/test/algorithm/upstream_test.py index 81c37d2c2..006323031 100644 --- a/source/framework/python/test/algorithm/upstream_test.py +++ b/source/framework/python/test/algorithm/upstream_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class UpstreamTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) direction = 3 diff --git a/source/framework/python/test/algorithm/valid_test.py b/source/framework/python/test/algorithm/valid_test.py index f70a4b1ce..9df89ee35 100644 --- a/source/framework/python/test/algorithm/valid_test.py +++ b/source/framework/python/test/algorithm/valid_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class ValidTest(lue_test.TestCase): @lue_test.framework_test_case def test_all_valid(self): - array_shape = (60, 40) dtype = np.int32 fill_value = 5 # Valid value @@ -27,7 +26,6 @@ def test_all_valid(self): @lue_test.framework_test_case def test_all_invalid(self): - array_shape = (60, 40) dtype = np.dtype(np.int32) fill_value = 5 # Valid value diff --git a/source/framework/python/test/algorithm/zonal_operation/zonal_area_test.py b/source/framework/python/test/algorithm/zonal_operation/zonal_area_test.py index 977a313ca..2b189686a 100644 --- a/source/framework/python/test/algorithm/zonal_operation/zonal_area_test.py +++ b/source/framework/python/test/algorithm/zonal_operation/zonal_area_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class ZonalAreaTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_zone = 3 diff --git a/source/framework/python/test/algorithm/zonal_operation/zonal_diversity_test.py b/source/framework/python/test/algorithm/zonal_operation/zonal_diversity_test.py index 01492ac7f..27b90fd38 100644 --- a/source/framework/python/test/algorithm/zonal_operation/zonal_diversity_test.py +++ b/source/framework/python/test/algorithm/zonal_operation/zonal_diversity_test.py @@ -17,7 +17,6 @@ def tearDownModule(): class ZonalDiversityTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 fill_zone = 3 diff --git a/source/framework/python/test/algorithm/zonal_operation/zonal_majority_test.py b/source/framework/python/test/algorithm/zonal_operation/zonal_majority_test.py index d78a003d3..d2ff5e714 100644 --- a/source/framework/python/test/algorithm/zonal_operation/zonal_majority_test.py +++ b/source/framework/python/test/algorithm/zonal_operation/zonal_majority_test.py @@ -17,7 +17,6 @@ def tearDownModule(): class ZonalMajorityTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 fill_zone = 3 diff --git a/source/framework/python/test/algorithm/zonal_operation/zonal_maximum_test.py b/source/framework/python/test/algorithm/zonal_operation/zonal_maximum_test.py index e4c83614d..3a0d7b253 100644 --- a/source/framework/python/test/algorithm/zonal_operation/zonal_maximum_test.py +++ b/source/framework/python/test/algorithm/zonal_operation/zonal_maximum_test.py @@ -17,7 +17,6 @@ def tearDownModule(): class ZonalMaximumTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 fill_zone = 3 diff --git a/source/framework/python/test/algorithm/zonal_operation/zonal_mean_test.py b/source/framework/python/test/algorithm/zonal_operation/zonal_mean_test.py index bb66f4fbb..868baf3a9 100644 --- a/source/framework/python/test/algorithm/zonal_operation/zonal_mean_test.py +++ b/source/framework/python/test/algorithm/zonal_operation/zonal_mean_test.py @@ -17,7 +17,6 @@ def tearDownModule(): class ZonalMeanTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 fill_zone = 3 diff --git a/source/framework/python/test/algorithm/zonal_operation/zonal_minimum_test.py b/source/framework/python/test/algorithm/zonal_operation/zonal_minimum_test.py index 0d8aab471..cd5d7caf9 100644 --- a/source/framework/python/test/algorithm/zonal_operation/zonal_minimum_test.py +++ b/source/framework/python/test/algorithm/zonal_operation/zonal_minimum_test.py @@ -17,7 +17,6 @@ def tearDownModule(): class ZonalMinimumTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 fill_zone = 3 diff --git a/source/framework/python/test/algorithm/zonal_operation/zonal_normal_test.py b/source/framework/python/test/algorithm/zonal_operation/zonal_normal_test.py index 1c9175768..2e58d02f0 100644 --- a/source/framework/python/test/algorithm/zonal_operation/zonal_normal_test.py +++ b/source/framework/python/test/algorithm/zonal_operation/zonal_normal_test.py @@ -17,7 +17,6 @@ def tearDownModule(): class ZonalNormalTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_zone = 3 diff --git a/source/framework/python/test/algorithm/zonal_operation/zonal_sum_test.py b/source/framework/python/test/algorithm/zonal_operation/zonal_sum_test.py index fc0573847..eb3bc9b1c 100644 --- a/source/framework/python/test/algorithm/zonal_operation/zonal_sum_test.py +++ b/source/framework/python/test/algorithm/zonal_operation/zonal_sum_test.py @@ -17,7 +17,6 @@ def tearDownModule(): class ZonalSumTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_value = 5 fill_zone = 3 diff --git a/source/framework/python/test/algorithm/zonal_operation/zonal_uniform_test.py b/source/framework/python/test/algorithm/zonal_operation/zonal_uniform_test.py index 722dbc595..2003a4371 100644 --- a/source/framework/python/test/algorithm/zonal_operation/zonal_uniform_test.py +++ b/source/framework/python/test/algorithm/zonal_operation/zonal_uniform_test.py @@ -17,7 +17,6 @@ def tearDownModule(): class ZonalUniformTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): - array_shape = (60, 40) fill_zone = 3 diff --git a/source/framework/python/test/create_array_test.py b/source/framework/python/test/create_array_test.py index a6c1373d9..76092acde 100644 --- a/source/framework/python/test/create_array_test.py +++ b/source/framework/python/test/create_array_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class CreateArrayTest(lue_test.TestCase): @lue_test.framework_test_case def test_create_array01(self): - array_shape = (60, 40) partition_shape = (10, 10) dtype = np.int32 @@ -32,7 +31,6 @@ def test_create_array01(self): @lue_test.framework_test_case def test_create_array02(self): - array_shape = (60, 40) dtype = np.int32 fill_value = 5 diff --git a/source/framework/python/test/local_operation_test.py b/source/framework/python/test/local_operation_test.py index 307290b2c..26c95a7fb 100644 --- a/source/framework/python/test/local_operation_test.py +++ b/source/framework/python/test/local_operation_test.py @@ -18,7 +18,6 @@ def tearDownModule(): class LocalOperationTest(lue_test.TestCase): @lue_test.framework_test_case def test_sqrt(self): - partitions = (100,) values = np.random.random(1000000) # partitioned_array = lfr.create_array(values, partitions) diff --git a/source/framework/python/test/lue_unit_test.py b/source/framework/python/test/lue_unit_test.py index 0874540c4..1b79294e9 100644 --- a/source/framework/python/test/lue_unit_test.py +++ b/source/framework/python/test/lue_unit_test.py @@ -31,7 +31,6 @@ if __name__ == "__main__": - hpx_arguments = [ argument for argument in sys.argv[1:] if argument.startswith("--hpx") ] diff --git a/source/framework/python/test/model_test.py b/source/framework/python/test/model_test.py index 90cc7debb..0630e7661 100644 --- a/source/framework/python/test/model_test.py +++ b/source/framework/python/test/model_test.py @@ -11,5 +11,4 @@ def tearDownModule(): class ModelTest(lue_test.TestCase): - pass diff --git a/source/framework/python/test/pcraster/conversion_operation_test.py b/source/framework/python/test/pcraster/conversion_operation_test.py index 568cd6f30..4ae307e9f 100644 --- a/source/framework/python/test/pcraster/conversion_operation_test.py +++ b/source/framework/python/test/pcraster/conversion_operation_test.py @@ -9,7 +9,6 @@ class ConversionOperationTest(OperationTest): @lue_test.framework_test_case def test_boolean(self): - for expression_type in [ int, float, @@ -34,7 +33,6 @@ def test_boolean(self): @lue_test.framework_test_case def test_nominal(self): - for expression_type in [ int, float, @@ -60,7 +58,6 @@ def test_nominal(self): @lue_test.framework_test_case def test_scalar(self): - for expression_type in [ int, float, diff --git a/source/framework/python/test/read_array_test.py b/source/framework/python/test/read_array_test.py index df82d682f..51519bbb7 100644 --- a/source/framework/python/test/read_array_test.py +++ b/source/framework/python/test/read_array_test.py @@ -16,7 +16,6 @@ def tearDownModule(): class ReadArrayTest(lue_test.TestCase): @lue_test.framework_test_case def test_read_constant_array(self): - # Create a dataset containing a constant raster dataset_pathname = "read_constant_array.lue" phenomenon_name = "earth" @@ -50,7 +49,6 @@ def test_read_constant_array(self): @lue_test.framework_test_case def test_read_variable_array(self): - # Create an in-memory dataset containing a variable raster dataset_pathname = "read_variable_array.lue" phenomenon_name = "earth" @@ -104,7 +102,6 @@ def test_read_variable_array(self): @lue_test.framework_test_case def test_read_array_subset(self): - # Create a dataset containing a constant raster dataset_pathname = "read_subset.lue" phenomenon_name = "earth" diff --git a/source/framework/python/test/to_numpy_test.py b/source/framework/python/test/to_numpy_test.py index 1b46c3fbf..732cb5c76 100644 --- a/source/framework/python/test/to_numpy_test.py +++ b/source/framework/python/test/to_numpy_test.py @@ -15,7 +15,6 @@ def tearDownModule(): class ToNumPyTest(lue_test.TestCase): @lue_test.framework_test_case def test_array(self): - array_shape = (60, 40) dtype = np.int32 fill_value = 5 @@ -29,7 +28,6 @@ def test_array(self): @lue_test.framework_test_case def test_mark_no_data(self): - array_shape = (60, 40) dtype = np.int32 @@ -42,7 +40,6 @@ def test_mark_no_data(self): @lue_test.framework_test_case def test_small_array(self): - array_shape = (1, 1) dtype = np.int32 fill_value = 5 @@ -67,7 +64,6 @@ def test_dtype(self): np.uint32, np.uint64, ]: - input_dtype = np.dtype(input_type) lue_array = lfr.create_array(array_shape, input_dtype, input_type(5)) @@ -84,7 +80,6 @@ def test_dtype(self): np.int32, np.int64, ]: - input_dtype = np.dtype(input_type) lue_array = lfr.create_array(array_shape, input_dtype, input_type(5)) @@ -103,7 +98,6 @@ def test_dtype(self): np.float32, np.float64, ]: - input_dtype = np.dtype(input_type) lue_array = lfr.create_array(array_shape, input_dtype, input_type(5)) @@ -121,7 +115,6 @@ def test_dtype(self): @lue_test.framework_test_case def test_result_of_multiple_operations(self): - array_shape = (60, 40) dtype = np.dtype(np.int32) fill_value = 5 @@ -135,7 +128,6 @@ def test_result_of_multiple_operations(self): @lue_test.framework_test_case def test_numpy_roundtrip(self): - array_shape = (60, 40) nr_cells = 60 * 40 partition_shape = (10, 10) @@ -157,7 +149,6 @@ def test_numpy_roundtrip(self): @lue_test.framework_test_case def test_numpy_roundtrip_result_of_multiple_operations(self): - array_shape = (60, 40) nr_cells = 60 * 40 partition_shape = (10, 10) diff --git a/source/framework/python/test/write_array_test.py b/source/framework/python/test/write_array_test.py index 4f0e409b5..67f79df91 100644 --- a/source/framework/python/test/write_array_test.py +++ b/source/framework/python/test/write_array_test.py @@ -16,7 +16,6 @@ def tearDownModule(): class WriteArrayTest(lue_test.TestCase): @lue_test.framework_test_case def test_write_constant_array(self): - # TODO https://github.com/computationalgeography/lue/issues/483 return @@ -59,7 +58,6 @@ def test_write_constant_array(self): @lue_test.framework_test_case def test_write_variable_array(self): - # Create t arrays, write them to a dataset, ready them back in, # and verify the arrays read are equal to the arrays written. diff --git a/source/qa/cxx/src/scalability/io.cpp b/source/qa/cxx/src/scalability/io.cpp index 4018f66ea..6797640e7 100644 --- a/source/qa/cxx/src/scalability/io.cpp +++ b/source/qa/cxx/src/scalability/io.cpp @@ -91,7 +91,7 @@ namespace lue::qa { // Create new json file and dump the information about this experiment std::ofstream stream{pathname}; - if(!stream) + if (!stream) { throw std::runtime_error("File " + pathname + " could not be opened for saving results to"); } diff --git a/source/qa/python/qa/scalability/__init__.py b/source/qa/python/qa/scalability/__init__.py index f8d4db3e2..88338cf20 100644 --- a/source/qa/python/qa/scalability/__init__.py +++ b/source/qa/python/qa/scalability/__init__.py @@ -2,7 +2,6 @@ def perform_experiment_task(experiment_name, task_name, configuration_data): - experiment_by_name = { "partition_shape": partition_shape, "weak_scalability": weak_scalability, diff --git a/source/qa/python/qa/scalability/core/hpx.py b/source/qa/python/qa/scalability/core/hpx.py index 1f073645d..433cdd61f 100644 --- a/source/qa/python/qa/scalability/core/hpx.py +++ b/source/qa/python/qa/scalability/core/hpx.py @@ -1,16 +1,13 @@ def thread_binding(nr_threads): - # Bind OS threads to the first processing unit of each core return "thread:0-{}=core:0-{}.pu:0".format(nr_threads - 1, nr_threads - 1) def performance_counter_name_to_property_name(counter_name): - assert counter_name.find("|") == -1, counter_name return counter_name.replace("/", "|") def property_name_to_performance_counter_name(property_name): - assert property_name.find("/") == -1, counter_name return property_name.replace("|", "/") diff --git a/source/qa/python/qa/scalability/core/json.py b/source/qa/python/qa/scalability/core/json.py index 4e599329d..958306e41 100644 --- a/source/qa/python/qa/scalability/core/json.py +++ b/source/qa/python/qa/scalability/core/json.py @@ -8,7 +8,6 @@ def json_to_data(pathname): - pathname = os.path.expandvars(pathname) assert os.path.isfile(pathname), pathname diff --git a/source/qa/python/qa/scalability/core/math.py b/source/qa/python/qa/scalability/core/math.py index 91e7f1b20..c722d776a 100644 --- a/source/qa/python/qa/scalability/core/math.py +++ b/source/qa/python/qa/scalability/core/math.py @@ -2,7 +2,6 @@ def is_monotonically_increasing(array): - # np.diff returns the difference between consecutive elements # Cast to float64 because when the type is unsigned int, this diff --git a/source/qa/python/qa/scalability/core/plot.py b/source/qa/python/qa/scalability/core/plot.py index 051638a75..2d12d1a43 100644 --- a/source/qa/python/qa/scalability/core/plot.py +++ b/source/qa/python/qa/scalability/core/plot.py @@ -23,7 +23,6 @@ class SquareRootScale(mscale.ScaleBase): name = "square_root" def __init__(self, axis, **kwargs): - mscale.ScaleBase.__init__(self) def set_default_locators_and_formatters(self, axis): diff --git a/source/qa/python/qa/scalability/core/process.py b/source/qa/python/qa/scalability/core/process.py index bd35d513d..8b233c083 100644 --- a/source/qa/python/qa/scalability/core/process.py +++ b/source/qa/python/qa/scalability/core/process.py @@ -5,7 +5,6 @@ def execute_command(command): - result = subprocess.call(shlex.split(command)) if result != 0: @@ -13,12 +12,10 @@ def execute_command(command): def lue_translate(): - return os.path.expandvars("$LUE_OBJECTS/bin/lue_translate") def import_lue_json(lue_json_pathname, lue_dataset_pathname): - command = "{} import --add {} {}".format( lue_translate(), lue_dataset_pathname, lue_json_pathname ) diff --git a/source/qa/python/qa/scalability/experiment/benchmark.py b/source/qa/python/qa/scalability/experiment/benchmark.py index a7d7711e9..138182140 100644 --- a/source/qa/python/qa/scalability/experiment/benchmark.py +++ b/source/qa/python/qa/scalability/experiment/benchmark.py @@ -5,11 +5,9 @@ class HPX(object): def __init__(self, data): - self.from_json(data) def from_json(self, data): - self.performance_counters = ( data["performance_counters"] if "performance_counters" in data else None ) @@ -90,7 +88,6 @@ def __init__(self, data, cluster): ), self.worker.max_nr_threads elif self.worker.type == "numa_node": - assert self.locality_per == "numa_node" self.nr_logical_cores_per_locality = ( @@ -118,7 +115,6 @@ def __init__(self, data, cluster): ), self.worker.max_nr_threads elif self.worker.type == "cluster_node": - assert self.locality_per == "numa_node" self.nr_logical_cores_per_locality = ( @@ -151,7 +147,6 @@ def __str__(self): return "Benchmark(count={}, worker={})".format(self.count, self.worker) def from_json(self, data, cluster): - self.scenario_name = data["scenario"] if "scenario" in data else "default" self.count = data["count"] diff --git a/source/qa/python/qa/scalability/experiment/cluster.py b/source/qa/python/qa/scalability/experiment/cluster.py index 7071671ab..82000defb 100644 --- a/source/qa/python/qa/scalability/experiment/cluster.py +++ b/source/qa/python/qa/scalability/experiment/cluster.py @@ -1,20 +1,16 @@ class Core(object): def __init__(self, data): - self.from_json(data) def __str__(self): - return "Core(nr_threads={})".format( self.nr_threads, ) def from_json(self, data): - self.nr_threads = data["nr_threads"] def to_json(self): - return { "nr_threads": self.nr_threads, } @@ -22,11 +18,9 @@ def to_json(self): class NUMANode(object): def __init__(self, data): - self.from_json(data) def __str__(self): - return "NUMANode(memory={}, nr_cores={}, core={})".format( self.memory, self.nr_cores, @@ -35,17 +29,14 @@ def __str__(self): @property def nr_threads(self): - return self.nr_cores * self.core.nr_threads def from_json(self, data): - self.memory = data["memory"] self.nr_cores = data["nr_cores"] self.core = Core(data["core"]) def to_json(self): - return { "memory": self.memory, "nr_cores": self.nr_cores, @@ -55,7 +46,6 @@ def to_json(self): class Package(object): def __init__(self, data): - self.from_json(data) def __str__(self): @@ -66,31 +56,25 @@ def __str__(self): @property def nr_numa_nodes(self): - return self._nr_numa_nodes @property def memory(self): - return self._nr_numa_nodes * self.numa_node.memory @property def nr_cores(self): - return self._nr_numa_nodes * self.numa_node.nr_cores @property def nr_threads(self): - return self._nr_numa_nodes * self.numa_node.nr_threads def from_json(self, data): - self._nr_numa_nodes = data["nr_numa_nodes"] self.numa_node = NUMANode(data["numa_node"]) def to_json(self): - return { "nr_numa_nodes": self.nr_numa_nodes, "numa_node": self.numa_node.to_json(), @@ -99,11 +83,9 @@ def to_json(self): class ClusterNode(object): def __init__(self, data): - self.from_json(data) def __str__(self): - return "ClusterNode(nr_packages={}, package={})".format( self.nr_packages, self.package, @@ -111,31 +93,25 @@ def __str__(self): @property def nr_numa_nodes(self): - return self.nr_packages * self.package.nr_numa_nodes @property def memory(self): - return self.nr_packages * self.package.memory @property def nr_cores(self): - return self.nr_packages * self.package.nr_cores @property def nr_threads(self): - return self.nr_packages * self.package.nr_threads def from_json(self, data): - self.nr_packages = data["nr_packages"] self.package = Package(data["package"]) def to_json(self): - return { "nr_packages": self.nr_packages, "package": self.package.to_json(), @@ -144,42 +120,34 @@ def to_json(self): class Scheduler(object): def __init__(self, data): - self._from_json(data) def _from_json(self, data): - self.kind = data["kind"] def to_json(self): - return {"kind": self.kind} class ShellScheduler(Scheduler): def __init__(self, data): - super(ShellScheduler, self).__init__(data) def to_json(self): - return super(ShellScheduler, self).to_json() class SlurmSettings(object): def __init__(self, data): - self.from_json(data) def from_json(self, data): - self.partition_name = data["partition"] self.sbatch_options = data["sbatch_options"] if "sbatch_options" in data else "" self.mpirun_options = data["mpirun_options"] if "mpirun_options" in data else "" self.srun_options = data["srun_options"] if "srun_options" in data else "" def to_json(self): - result = { "partition": self.partition_name, } @@ -198,16 +166,13 @@ def to_json(self): class SlurmScheduler(Scheduler): def __init__(self, data): - super(SlurmScheduler, self).__init__(data) self.from_json(data) def from_json(self, data): - self.settings = SlurmSettings(data["settings"]) def to_json(self): - result = super(SlurmScheduler, self).to_json() result["settings"] = self.settings.to_json() @@ -217,22 +182,18 @@ def to_json(self): class SoftwareEnvironment(object): def __init__(self, data): - self.from_json(data) def from_json(self, data): - self.module_names = data["modules"] def to_json(self): - return { "modules": self.module_names, } @property def configuration(self): - commands = [] if self.module_names: @@ -245,11 +206,9 @@ def configuration(self): class Cluster(object): def __init__(self, data): - self.from_json(data) def from_json(self, data): - self.name = data["name"] scheduler_json = data["scheduler"] scheduler_kind = scheduler_json["kind"] @@ -269,7 +228,6 @@ def from_json(self, data): ) def to_json(self): - result = { "name": self.name, "scheduler": self.scheduler.to_json(), diff --git a/source/qa/python/qa/scalability/experiment/configuration.py b/source/qa/python/qa/scalability/experiment/configuration.py index cb7c8eb6a..559d55f66 100644 --- a/source/qa/python/qa/scalability/experiment/configuration.py +++ b/source/qa/python/qa/scalability/experiment/configuration.py @@ -8,11 +8,9 @@ class Configuration(object): def __init__(self, data): - self._from_json(data) def _from_json(self, data): - self.command_pathname = os.path.expandvars(data["command_pathname"]) self.script_pathname = os.path.expandvars(data["script_pathname"]) self.result_prefix = os.path.expandvars(data["result_prefix"]) diff --git a/source/qa/python/qa/scalability/experiment/dataset.py b/source/qa/python/qa/scalability/experiment/dataset.py index 487c9cbfd..f96fe8199 100644 --- a/source/qa/python/qa/scalability/experiment/dataset.py +++ b/source/qa/python/qa/scalability/experiment/dataset.py @@ -9,7 +9,6 @@ def write_benchmark_settings(lue_dataset, cluster, benchmark, experiment): - ldm.assert_is_valid(lue_dataset, fail_on_warning=False) phenomenon = lue_dataset.add_phenomenon("benchmark") @@ -37,7 +36,6 @@ def write_benchmark_settings(lue_dataset, cluster, benchmark, experiment): def write_script(lue_dataset, script): - ldm.assert_is_valid(lue_dataset) script_property = lue_dataset.benchmark.meta_information.add_property( @@ -49,7 +47,6 @@ def write_script(lue_dataset, script): def read_benchmark_settings(lue_dataset, Experiment): - ldm.assert_is_valid(lue_dataset, fail_on_warning=False) phenomenon = lue_dataset.benchmark @@ -65,7 +62,6 @@ def read_benchmark_settings(lue_dataset, Experiment): def raw_results_already_imported(lue_dataset): - ldm.assert_is_valid(lue_dataset, fail_on_warning=False) # Test for something that is being imported diff --git a/source/qa/python/qa/scalability/experiment/experiment.py b/source/qa/python/qa/scalability/experiment/experiment.py index 0ce21ea98..cd735e9f3 100644 --- a/source/qa/python/qa/scalability/experiment/experiment.py +++ b/source/qa/python/qa/scalability/experiment/experiment.py @@ -3,7 +3,6 @@ class Arguments(object): def __init__(self, json_dict): - self.positionals = ( json_dict["positionals"] if "positionals" in json_dict else [] ) @@ -11,7 +10,6 @@ def __init__(self, json_dict): @property def to_list(self): - result = [] for positional in self.positionals: @@ -27,7 +25,6 @@ def to_list(self): class Experiment(object): def __init__(self, data, name, description): - # Name (kind) of the experiment self.name = name @@ -46,7 +43,6 @@ def __init__(self, data, name, description): self.program_name = os.path.basename(self.command_pathname) def to_json(self): - result = { "command_pathname": self.command_pathname, # "nr_time_steps": self.nr_time_steps, @@ -80,7 +76,6 @@ def workspace_pathname(self, result_prefix, cluster_name, scenario_name): def result_pathname( self, result_prefix, cluster_name, scenario_name, basename, extension ): - return os.path.join( self.workspace_pathname(result_prefix, cluster_name, scenario_name), "{}.{}".format(basename, extension), diff --git a/source/qa/python/qa/scalability/experiment/job.py b/source/qa/python/qa/scalability/experiment/job.py index 6a9cf411b..a30d85f22 100644 --- a/source/qa/python/qa/scalability/experiment/job.py +++ b/source/qa/python/qa/scalability/experiment/job.py @@ -49,7 +49,6 @@ def program_configuration( result_pathname=None, nr_workers=None, ): - assert nr_workers is not None if result_pathname is None: @@ -164,7 +163,6 @@ def program_configuration( def write_script(commands, script_pathname): - with open(script_pathname, "w") as script: script.write( """\ @@ -192,7 +190,6 @@ def create_slurm_script( max_duration, job_steps, ): - # HPX doc: # You can change the number of localities started per node # (for example to account for NUMA effects) by specifying the @@ -264,7 +261,6 @@ def lue_scalability_dataset_basename(): def lue_raw_dataset_pathname(result_prefix, cluster, benchmark, experiment): - return experiment.result_pathname( result_prefix, cluster.name, @@ -275,7 +271,6 @@ def lue_raw_dataset_pathname(result_prefix, cluster, benchmark, experiment): def lue_scalability_dataset_pathname(result_prefix, cluster, benchmark, experiment): - return experiment.result_pathname( result_prefix, cluster.name, @@ -286,7 +281,6 @@ def lue_scalability_dataset_pathname(result_prefix, cluster, benchmark, experime def create_raw_lue_dataset(result_prefix, cluster, benchmark, experiment): - dataset_pathname = lue_raw_dataset_pathname( result_prefix, cluster, benchmark, experiment ) @@ -305,7 +299,6 @@ def create_raw_lue_dataset(result_prefix, cluster, benchmark, experiment): def open_raw_lue_dataset(result_prefix, cluster, benchmark, experiment, open_mode): - dataset_pathname = lue_raw_dataset_pathname( result_prefix, cluster, benchmark, experiment ) @@ -318,7 +311,6 @@ def open_raw_lue_dataset(result_prefix, cluster, benchmark, experiment, open_mod def open_scalability_lue_dataset( result_prefix, cluster, benchmark, experiment, open_mode ): - dataset_pathname = lue_scalability_dataset_pathname( result_prefix, cluster, benchmark, experiment ) @@ -329,7 +321,6 @@ def open_scalability_lue_dataset( def scalability_lue_dataset_exists(result_prefix, cluster, benchmark, experiment): - dataset_pathname = lue_scalability_dataset_pathname( result_prefix, cluster, benchmark, experiment ) @@ -337,7 +328,6 @@ def scalability_lue_dataset_exists(result_prefix, cluster, benchmark, experiment def copy_raw_to_scalability_lue_dataset(result_prefix, cluster, benchmark, experiment): - raw_dataset_pathname = lue_raw_dataset_pathname( result_prefix, cluster, benchmark, experiment ) diff --git a/source/qa/python/qa/scalability/experiment/partition_shape/__init__.py b/source/qa/python/qa/scalability/experiment/partition_shape/__init__.py index e684e3a2a..737ab1012 100644 --- a/source/qa/python/qa/scalability/experiment/partition_shape/__init__.py +++ b/source/qa/python/qa/scalability/experiment/partition_shape/__init__.py @@ -4,7 +4,6 @@ def perform_task(task_name, configuration_data): - task_by_name = { "script": generate_script, "import": import_results, diff --git a/source/qa/python/qa/scalability/experiment/partition_shape/configuration.py b/source/qa/python/qa/scalability/experiment/partition_shape/configuration.py index aad9701f3..321692d0b 100644 --- a/source/qa/python/qa/scalability/experiment/partition_shape/configuration.py +++ b/source/qa/python/qa/scalability/experiment/partition_shape/configuration.py @@ -6,12 +6,10 @@ class Configuration(configuration.Configuration): def __init__(self, data): - super(Configuration, self).__init__(data) self.from_json(data) def from_json(self, data): - experiment_data = json_to_data(data["experiment"]) experiment_data["command_pathname"] = self.command_pathname self.experiment = experiment.Experiment(experiment_data) diff --git a/source/qa/python/qa/scalability/experiment/partition_shape/experiment.py b/source/qa/python/qa/scalability/experiment/partition_shape/experiment.py index b09ef6895..a2b07837d 100644 --- a/source/qa/python/qa/scalability/experiment/partition_shape/experiment.py +++ b/source/qa/python/qa/scalability/experiment/partition_shape/experiment.py @@ -5,7 +5,6 @@ class Experiment(experiment.Experiment): def __init__(self, data): - super(Experiment, self).__init__( data, "partition_shape", @@ -22,12 +21,10 @@ def __init__(self, data): self.from_json(data) def from_json(self, data): - self.array = shape.Shape(data["array"]) self.partition = shape.Shape(data["partition"]) def to_json(self): - result = super(Experiment, self).to_json() result["array"] = self.array.to_json() result["partition"] = self.partition.to_json() @@ -43,7 +40,6 @@ def benchmark_result_pathname( basename, extension, ): - return os.path.join( self.workspace_pathname(result_prefix, cluster_name, scenario_name), "x".join([str(extent) for extent in array_shape]), diff --git a/source/qa/python/qa/scalability/experiment/partition_shape/generate_script.py b/source/qa/python/qa/scalability/experiment/partition_shape/generate_script.py index d0e0deb83..8c597296a 100644 --- a/source/qa/python/qa/scalability/experiment/partition_shape/generate_script.py +++ b/source/qa/python/qa/scalability/experiment/partition_shape/generate_script.py @@ -7,7 +7,6 @@ def nr_workers(worker): - if worker.type == "thread": result = worker.nr_threads elif worker.type == "numa_node": @@ -21,7 +20,6 @@ def nr_workers(worker): def generate_script_slurm( result_prefix, cluster, benchmark, experiment, script_pathname ): - # We are not scaling workers, but testing partition sizes assert benchmark.worker.nr_cluster_nodes_range == 0 assert benchmark.worker.nr_numa_nodes_range == 0 @@ -37,7 +35,6 @@ def generate_script_slurm( for array_shape in experiment.array.shapes: for partition_shape in experiment.partition.shapes: - result_pathname = experiment.benchmark_result_pathname( result_prefix, cluster.name, @@ -129,7 +126,6 @@ def generate_script_slurm( def generate_script_shell( result_prefix, cluster, benchmark, experiment, script_pathname ): - assert benchmark.worker.type == "thread" # Iterate over all combinations of array shapes and partition shapes @@ -141,7 +137,6 @@ def generate_script_shell( for array_shape in experiment.array.shapes: for partition_shape in experiment.partition.shapes: - result_pathname = experiment.benchmark_result_pathname( result_prefix, cluster.name, diff --git a/source/qa/python/qa/scalability/experiment/partition_shape/import_results.py b/source/qa/python/qa/scalability/experiment/partition_shape/import_results.py index 5c257bebc..710941514 100644 --- a/source/qa/python/qa/scalability/experiment/partition_shape/import_results.py +++ b/source/qa/python/qa/scalability/experiment/partition_shape/import_results.py @@ -16,7 +16,6 @@ def benchmark_meta_to_lue_json( benchmark_pathname, lue_dataset_pathname, cluster, benchmark, experiment ): - # Read benchmark JSON benchmark_json = json.loads(open(benchmark_pathname).read()) environment_json = benchmark_json["environment"] @@ -95,7 +94,6 @@ def benchmark_meta_to_lue_json( def benchmark_to_lue_json(benchmark_pathname, lue_json_pathname, epoch): - # Read benchmark JSON benchmark_json = json.loads(open(benchmark_pathname).read()) @@ -215,7 +213,6 @@ def benchmark_to_lue_json(benchmark_pathname, lue_json_pathname, epoch): def determine_epoch(result_prefix, cluster, benchmark, experiment): - array_shapes = experiment.array.shapes partition_shapes = experiment.partition.shapes @@ -223,7 +220,6 @@ def determine_epoch(result_prefix, cluster, benchmark, experiment): for array_shape in array_shapes: for partition_shape in partition_shapes: - benchmark_pathname = experiment.benchmark_result_pathname( result_prefix, cluster.name, @@ -274,7 +270,6 @@ def import_raw_results( for array_shape in array_shapes: for partition_shape in partition_shapes: - result_pathname = experiment.benchmark_result_pathname( result_prefix, cluster.name, @@ -305,7 +300,6 @@ def import_raw_results( def write_scalability_results(lue_dataset): - count = lue_dataset.benchmark.measurement.duration.value.shape[1] # Write phenomenon to dataset containing the shapes of the arrays @@ -418,7 +412,6 @@ def write_scalability_results(lue_dataset): def import_results(configuration_data): - configuration = Configuration(configuration_data) cluster = configuration.cluster benchmark = configuration.benchmark @@ -444,7 +437,6 @@ def import_results(configuration_data): if not raw_results_already_imported or not job.scalability_lue_dataset_exists( result_prefix, cluster, benchmark, experiment ): - # Copy dataset and write scalability results job.copy_raw_to_scalability_lue_dataset( result_prefix, cluster, benchmark, experiment diff --git a/source/qa/python/qa/scalability/experiment/partition_shape/postprocess_results.py b/source/qa/python/qa/scalability/experiment/partition_shape/postprocess_results.py index 08e2d3567..c5a3732a1 100644 --- a/source/qa/python/qa/scalability/experiment/partition_shape/postprocess_results.py +++ b/source/qa/python/qa/scalability/experiment/partition_shape/postprocess_results.py @@ -48,7 +48,6 @@ def post_process_raw_results(lue_dataset, result_prefix, plot_pathname, experime assert math.is_monotonically_increasing(partition_sizes), partition_sizes def plot_duration(axis, array_idx, partition_sizes, partition_shapes): - if count == 1: duration = lue_dataset.partition.partition.properties[ "duration_{}".format(array_idx) @@ -103,7 +102,6 @@ def plot_duration(axis, array_idx, partition_sizes, partition_shapes): # size, the spread of durations per partition size # for array_shape in array_shapes: for array_idx in range(len(array_shapes)): - array_shape = array_shapes[array_idx] figure, axis = plt.subplots(figsize=(15, 10)) # Inches... @@ -166,7 +164,6 @@ def plot_duration(axis, array_idx, partition_sizes, partition_shapes): def postprocess_results(configuration_data): - configuration = Configuration(configuration_data) cluster = configuration.cluster benchmark = configuration.benchmark diff --git a/source/qa/python/qa/scalability/experiment/pool.py b/source/qa/python/qa/scalability/experiment/pool.py index f6e41acbb..00a2fcc58 100644 --- a/source/qa/python/qa/scalability/experiment/pool.py +++ b/source/qa/python/qa/scalability/experiment/pool.py @@ -1,12 +1,10 @@ class WorkerRange(object): def __init__(self, data): - self._from_json(data) self.max_size = self.permutation_size(self.nr_permutations - 1) def _from_json(self, data): - self.min_size = data["min_size"] self.max_size = data["max_size"] @@ -14,7 +12,6 @@ def _from_json(self, data): assert self.min_size <= self.max_size def to_json(self): - return { "min_size": self.min_size, "max_size": self.max_size, @@ -23,12 +20,10 @@ def to_json(self): class MultipliedWorkerRange(WorkerRange): def __init__(self, data): - self.from_json(data) super(MultipliedWorkerRange, self).__init__(data) def __str__(self): - return "MultipliedWorkerRange(min_size={}, max_size={}, multiplier={})".format( self.min_size, self.max_size, @@ -36,12 +31,10 @@ def __str__(self): ) def from_json(self, data): - self.multiplier = data["multiplier"] assert self.multiplier > 1 def to_json(self): - result = super(MultipliedWorkerRange, self).to_json() result["multiplier"] = self.multiplier @@ -49,7 +42,6 @@ def to_json(self): @property def nr_permutations(self): - size = self.min_size nr = 1 @@ -60,7 +52,6 @@ def nr_permutations(self): return nr def permutation_size(self, idx): - assert idx in range(self.nr_permutations), idx size = self.min_size @@ -75,12 +66,10 @@ def permutation_size(self, idx): class IncrementedWorkerRange(WorkerRange): def __init__(self, data): - self.from_json(data) super(IncrementedWorkerRange, self).__init__(data) def __str__(self): - return ( "IncrementedWorkerRange(min_size={}, max_size={}, incrementor={})".format( self.min_size, @@ -90,12 +79,10 @@ def __str__(self): ) def from_json(self, data): - self.incrementor = data["incrementor"] assert self.incrementor >= 1 def to_json(self): - result = super(IncrementedWorkerRange, self).to_json() result["incrementor"] = self.incrementor @@ -103,7 +90,6 @@ def to_json(self): @property def nr_permutations(self): - size = self.min_size nr = 1 @@ -116,7 +102,6 @@ def nr_permutations(self): return nr def permutation_size(self, idx): - assert idx in range(self.nr_permutations), idx size = self.min_size @@ -136,7 +121,6 @@ class EmptyWorkerRange(WorkerRange): """ def __init__(self, data): - self.from_json(data) super(EmptyWorkerRange, self).__init__( @@ -148,30 +132,25 @@ def __str__(self): return "EmptyWorkerRange(size={})".format(self.size) def from_json(self, data): - self.size = data["size"] assert self.size >= 1 def to_json(self): - return { "size": self.size, } @property def nr_permutations(self): - return 1 def permutation_size(self, idx): - assert idx == 0 return self.size class Pool(object): def __init__(self, data): - if "multiplier" in data: self.range = MultipliedWorkerRange(data) elif "incrementor" in data: @@ -180,24 +159,19 @@ def __init__(self, data): self.range = EmptyWorkerRange(data) def to_json(self): - return self.range.to_json() @property def min_size(self): - return self.range.min_size @property def max_size(self): - return self.range.max_size @property def nr_permutations(self): - return self.range.nr_permutations def permutation_size(self, idx): - return self.range.permutation_size(idx) diff --git a/source/qa/python/qa/scalability/experiment/shape.py b/source/qa/python/qa/scalability/experiment/shape.py index 88cfe44fb..12645f979 100644 --- a/source/qa/python/qa/scalability/experiment/shape.py +++ b/source/qa/python/qa/scalability/experiment/shape.py @@ -61,7 +61,6 @@ def ranges_of_partition_shape_multipliers( def shape_ranges(min_shape, max_shape, step): - assert len(min_shape) == len(max_shape) assert step > 0 rank = len(min_shape) @@ -72,7 +71,6 @@ def shape_ranges(min_shape, max_shape, step): def partition_shapes(min_shape, max_shape, step): - # TODO Rename this function. Related to shapes, not partition shapes shape_ranges_ = shape_ranges(min_shape, max_shape, step) @@ -90,11 +88,9 @@ def range_of_shapes(min_shape, max_nr_elements, multiplier, method): """ def nr_elements(shape): - return reduce(lambda e1, e2: e1 * e2, shape) def shape(nr_elements, normalized_shape): - rank = len(normalized_shape) nr_elements_per_dimension = nr_elements ** (1.0 / rank) @@ -113,7 +109,6 @@ def shape(nr_elements, normalized_shape): assert multiplier > 1, multiplier if method == "linear": - # Increase the number of cells linearly, by # i * (multiplier - 1) * sizes[0] new_size = lambda i: sizes[0] + i * (multiplier - 1) * sizes[0] @@ -124,7 +119,6 @@ def shape(nr_elements, normalized_shape): i += 1 elif method == "exponential": - # Increase the number of cells exponentially, by multiplier * # previous number of elements while multiplier * sizes[-1] <= max_nr_elements: @@ -142,11 +136,9 @@ def shape(nr_elements, normalized_shape): class Range(object): def __init__(self, data): - self.from_json(data) def from_json(self, data): - self.max_nr_elements = data["max_nr_elements"] self.multiplier = data["multiplier"] self.method = data["method"] @@ -157,7 +149,6 @@ def from_json(self, data): assert self.multiplier > 1 def to_json(self): - return { "max_nr_elements": self.max_nr_elements, "multiplier": self.multiplier, @@ -167,16 +158,13 @@ def to_json(self): class Shape(object): def __init__(self, data): - self.from_json(data) def from_json(self, data): - self._shape = tuple(data["shape"]) self._range = Range(data["range"]) if "range" in data else None def to_json(self): - result = {"shape": self._shape} if self._range: @@ -185,12 +173,10 @@ def to_json(self): return result def is_fixed(self): - return self._range is None @property def shapes(self): - if self.is_fixed(): result = [self._shape] else: diff --git a/source/qa/python/qa/scalability/experiment/strong_scalability/__init__.py b/source/qa/python/qa/scalability/experiment/strong_scalability/__init__.py index e684e3a2a..737ab1012 100644 --- a/source/qa/python/qa/scalability/experiment/strong_scalability/__init__.py +++ b/source/qa/python/qa/scalability/experiment/strong_scalability/__init__.py @@ -4,7 +4,6 @@ def perform_task(task_name, configuration_data): - task_by_name = { "script": generate_script, "import": import_results, diff --git a/source/qa/python/qa/scalability/experiment/strong_scalability/configuration.py b/source/qa/python/qa/scalability/experiment/strong_scalability/configuration.py index aad9701f3..321692d0b 100644 --- a/source/qa/python/qa/scalability/experiment/strong_scalability/configuration.py +++ b/source/qa/python/qa/scalability/experiment/strong_scalability/configuration.py @@ -6,12 +6,10 @@ class Configuration(configuration.Configuration): def __init__(self, data): - super(Configuration, self).__init__(data) self.from_json(data) def from_json(self, data): - experiment_data = json_to_data(data["experiment"]) experiment_data["command_pathname"] = self.command_pathname self.experiment = experiment.Experiment(experiment_data) diff --git a/source/qa/python/qa/scalability/experiment/strong_scalability/experiment.py b/source/qa/python/qa/scalability/experiment/strong_scalability/experiment.py index b7272db6e..3a5c0c7ee 100644 --- a/source/qa/python/qa/scalability/experiment/strong_scalability/experiment.py +++ b/source/qa/python/qa/scalability/experiment/strong_scalability/experiment.py @@ -5,7 +5,6 @@ class Experiment(experiment.Experiment): def __init__(self, data): - super(Experiment, self).__init__( data, "strong_scalability", @@ -22,12 +21,10 @@ def __init__(self, data): self.from_json(data) def from_json(self, data): - self.array = shape.Shape(data["array"]) self.partition = shape.Shape(data["partition"]) def to_json(self): - result = super(Experiment, self).to_json() result["array"] = self.array.to_json() result["partition"] = self.partition.to_json() @@ -37,7 +34,6 @@ def to_json(self): def benchmark_result_pathname( self, result_prefix, cluster_name, scenario_name, nr_workers, extension ): - return os.path.join( self.workspace_pathname(result_prefix, cluster_name, scenario_name), "{}.{}".format(nr_workers, extension), diff --git a/source/qa/python/qa/scalability/experiment/strong_scalability/generate_script.py b/source/qa/python/qa/scalability/experiment/strong_scalability/generate_script.py index 53bf7c833..2d60bcde1 100644 --- a/source/qa/python/qa/scalability/experiment/strong_scalability/generate_script.py +++ b/source/qa/python/qa/scalability/experiment/strong_scalability/generate_script.py @@ -19,7 +19,6 @@ def generate_script_slurm_threads( partition_shape = experiment.partition.shape for benchmark_idx in range(benchmark.worker.nr_benchmarks): - nr_workers = benchmark.worker.nr_workers(benchmark_idx) nr_threads = nr_workers result_pathname = experiment.benchmark_result_pathname( @@ -114,7 +113,6 @@ def generate_script_slurm_numa_nodes( nr_threads = benchmark.worker.nr_threads for benchmark_idx in range(benchmark.worker.nr_benchmarks): - nr_workers = benchmark.worker.nr_workers(benchmark_idx) nr_localities = nr_workers result_pathname = experiment.benchmark_result_pathname( @@ -222,7 +220,6 @@ def generate_script_slurm_cluster_nodes( nr_threads = benchmark.worker.nr_threads for benchmark_idx in range(benchmark.worker.nr_benchmarks): - nr_workers = benchmark.worker.nr_workers(benchmark_idx) nr_localities = nr_workers * benchmark.worker.nr_numa_nodes @@ -309,7 +306,6 @@ def generate_script_slurm_cluster_nodes( def generate_script_slurm( result_prefix, cluster, benchmark, experiment, script_pathname ): - assert benchmark.worker.type in ["cluster_node", "numa_node", "thread"] if benchmark.worker.nr_cluster_nodes_range > 0: @@ -329,7 +325,6 @@ def generate_script_slurm( def generate_script_shell( result_prefix, cluster, benchmark, experiment, script_pathname ): - assert benchmark.worker.type == "thread" assert benchmark.worker.nr_cluster_nodes_range == 0 assert benchmark.worker.nr_numa_nodes_range == 0 @@ -343,7 +338,6 @@ def generate_script_shell( partition_shape = experiment.partition.shape for benchmark_idx in range(benchmark.worker.nr_benchmarks): - nr_workers = benchmark.worker.nr_workers(benchmark_idx) nr_threads = nr_workers result_pathname = experiment.benchmark_result_pathname( diff --git a/source/qa/python/qa/scalability/experiment/strong_scalability/import_results.py b/source/qa/python/qa/scalability/experiment/strong_scalability/import_results.py index ba6ffe0a4..a20771961 100644 --- a/source/qa/python/qa/scalability/experiment/strong_scalability/import_results.py +++ b/source/qa/python/qa/scalability/experiment/strong_scalability/import_results.py @@ -16,7 +16,6 @@ def benchmark_meta_to_lue_json( benchmark_pathname, lue_dataset_pathname, cluster, benchmark, experiment ): - array_shape = experiment.array.shape partition_shape = experiment.partition.shape @@ -116,7 +115,6 @@ def benchmark_meta_to_lue_json( def benchmark_to_lue_json(benchmark_pathname, lue_json_pathname, epoch): - # Read benchmark JSON benchmark_json = json.loads(open(benchmark_pathname).read()) @@ -245,7 +243,6 @@ def import_raw_results( metadata_written = False for benchmark_idx in benchmark_idxs: - nr_workers = benchmark.worker.nr_workers(benchmark_idx) result_pathname = experiment.benchmark_result_pathname( @@ -269,7 +266,6 @@ def import_raw_results( def write_scalability_results(lue_dataset): - count = lue_dataset.benchmark.measurement.duration.value.shape[1] lue_measurement = lue_dataset.benchmark.measurement @@ -586,7 +582,6 @@ def write_scalability_results(lue_dataset): def import_results(configuration_data): - configuration = Configuration(configuration_data) cluster = configuration.cluster benchmark = configuration.benchmark @@ -612,7 +607,6 @@ def import_results(configuration_data): if not raw_results_already_imported or not job.scalability_lue_dataset_exists( result_prefix, cluster, benchmark, experiment ): - # Copy dataset and write scalability results job.copy_raw_to_scalability_lue_dataset( result_prefix, cluster, benchmark, experiment diff --git a/source/qa/python/qa/scalability/experiment/strong_scalability/postprocess_results.py b/source/qa/python/qa/scalability/experiment/strong_scalability/postprocess_results.py index 906f9f90e..1cab241cb 100644 --- a/source/qa/python/qa/scalability/experiment/strong_scalability/postprocess_results.py +++ b/source/qa/python/qa/scalability/experiment/strong_scalability/postprocess_results.py @@ -56,14 +56,12 @@ def post_process_raw_results(lue_dataset, result_prefix, plot_pathname): lue_scaling = lue_dataset.benchmark.scaling def annotate_plot(axis, y_label): - axis.set_xlabel("workers ({})".format(worker_type)) axis.set_xticks(nr_workers) axis.set_ylabel(y_label) axis.grid() def plot_duration(axis): - if count == 1: duration = lue_measurement.duration.value[:][sort_idxs] y_label = "duration ({})".format(time_point_units) @@ -112,7 +110,6 @@ def plot_duration(axis): annotate_plot(axis, y_label) def plot_relative_speed_up(axis): - if count == 1: relative_speed_up = lue_scaling.relative_speed_up.value[:][sort_idxs] plot_actual = lambda data: axis.plot( @@ -159,7 +156,6 @@ def plot_relative_speed_up(axis): annotate_plot(axis, y_label) def plot_relative_efficiency(axis): - if count == 1: relative_efficiency = lue_scaling.relative_efficiency.value[:][sort_idxs] plot_actual = lambda data: axis.plot( diff --git a/source/qa/python/qa/scalability/experiment/util.py b/source/qa/python/qa/scalability/experiment/util.py index 7daad68f8..23548bd41 100644 --- a/source/qa/python/qa/scalability/experiment/util.py +++ b/source/qa/python/qa/scalability/experiment/util.py @@ -6,11 +6,9 @@ def sort_benchmarks_by_time(result_prefix, cluster, benchmark, experiment): - items = [] for benchmark_idx in range(benchmark.worker.nr_benchmarks): - nr_workers = benchmark.worker.nr_workers(benchmark_idx) benchmark_pathname = experiment.benchmark_result_pathname( result_prefix, cluster.name, benchmark.scenario_name, nr_workers, "json" diff --git a/source/qa/python/qa/scalability/experiment/weak_scalability/__init__.py b/source/qa/python/qa/scalability/experiment/weak_scalability/__init__.py index e684e3a2a..737ab1012 100644 --- a/source/qa/python/qa/scalability/experiment/weak_scalability/__init__.py +++ b/source/qa/python/qa/scalability/experiment/weak_scalability/__init__.py @@ -4,7 +4,6 @@ def perform_task(task_name, configuration_data): - task_by_name = { "script": generate_script, "import": import_results, diff --git a/source/qa/python/qa/scalability/experiment/weak_scalability/configuration.py b/source/qa/python/qa/scalability/experiment/weak_scalability/configuration.py index aad9701f3..321692d0b 100644 --- a/source/qa/python/qa/scalability/experiment/weak_scalability/configuration.py +++ b/source/qa/python/qa/scalability/experiment/weak_scalability/configuration.py @@ -6,12 +6,10 @@ class Configuration(configuration.Configuration): def __init__(self, data): - super(Configuration, self).__init__(data) self.from_json(data) def from_json(self, data): - experiment_data = json_to_data(data["experiment"]) experiment_data["command_pathname"] = self.command_pathname self.experiment = experiment.Experiment(experiment_data) diff --git a/source/qa/python/qa/scalability/experiment/weak_scalability/experiment.py b/source/qa/python/qa/scalability/experiment/weak_scalability/experiment.py index e0d0f3b12..343466cf6 100644 --- a/source/qa/python/qa/scalability/experiment/weak_scalability/experiment.py +++ b/source/qa/python/qa/scalability/experiment/weak_scalability/experiment.py @@ -5,7 +5,6 @@ class Experiment(experiment.Experiment): def __init__(self, data): - super(Experiment, self).__init__( data, "weak_scalability", @@ -35,7 +34,6 @@ def to_json(self): def benchmark_result_pathname( self, result_prefix, cluster_name, scenario_name, nr_workers, extension ): - return os.path.join( self.workspace_pathname(result_prefix, cluster_name, scenario_name), "{}.{}".format(nr_workers, extension), diff --git a/source/qa/python/qa/scalability/experiment/weak_scalability/generate_script.py b/source/qa/python/qa/scalability/experiment/weak_scalability/generate_script.py index d48d19465..bdf1fb2a1 100644 --- a/source/qa/python/qa/scalability/experiment/weak_scalability/generate_script.py +++ b/source/qa/python/qa/scalability/experiment/weak_scalability/generate_script.py @@ -11,12 +11,10 @@ # nr_workers * 1. In higher dimensional cases, the work scale factor # lies between 1 and nr_workers. def work_scale_multiplier(rank, nr_workers): - return nr_workers ** (1.0 / rank) def scale_array_shape(array_shape_per_worker, nr_workers): - rank = len(array_shape_per_worker) work_size_per_worker = reduce((lambda x, y: x * y), array_shape_per_worker) multiplier = work_scale_multiplier(rank, nr_workers) @@ -48,7 +46,6 @@ def generate_script_slurm_threads( partition_shape = experiment.partition.shape for benchmark_idx in range(benchmark.worker.nr_benchmarks): - nr_workers = benchmark.worker.nr_workers(benchmark_idx) nr_threads = nr_workers array_shape = scale_array_shape(array_shape_per_worker, nr_workers) @@ -150,7 +147,6 @@ def generate_script_slurm_numa_nodes( nr_threads = benchmark.worker.nr_threads for benchmark_idx in range(benchmark.worker.nr_benchmarks): - nr_workers = benchmark.worker.nr_workers(benchmark_idx) nr_localities = nr_workers array_shape = scale_array_shape(array_shape_per_worker, nr_workers) @@ -262,7 +258,6 @@ def generate_script_slurm_cluster_nodes( nr_threads = benchmark.worker.nr_threads for benchmark_idx in range(benchmark.worker.nr_benchmarks): - nr_workers = benchmark.worker.nr_workers(benchmark_idx) nr_localities = nr_workers * benchmark.worker.nr_numa_nodes @@ -351,7 +346,6 @@ def generate_script_slurm_cluster_nodes( def generate_script_slurm( result_prefix, cluster, benchmark, experiment, script_pathname ): - assert benchmark.worker.type in ["cluster_node", "numa_node", "thread"] if benchmark.worker.nr_cluster_nodes_range > 0: @@ -371,7 +365,6 @@ def generate_script_slurm( def generate_script_shell( result_prefix, cluster, benchmark, experiment, script_pathname ): - assert benchmark.worker.type == "thread" assert benchmark.worker.nr_cluster_nodes_range == 0 assert benchmark.worker.nr_numa_nodes_range == 0 @@ -385,7 +378,6 @@ def generate_script_shell( partition_shape = experiment.partition.shape for benchmark_idx in range(benchmark.worker.nr_benchmarks): - nr_workers = benchmark.worker.nr_workers(benchmark_idx) nr_threads = nr_workers array_shape = scale_array_shape(array_shape_per_worker, nr_workers) diff --git a/source/qa/python/qa/scalability/experiment/weak_scalability/import_results.py b/source/qa/python/qa/scalability/experiment/weak_scalability/import_results.py index 1a3688403..11b914ed4 100644 --- a/source/qa/python/qa/scalability/experiment/weak_scalability/import_results.py +++ b/source/qa/python/qa/scalability/experiment/weak_scalability/import_results.py @@ -16,7 +16,6 @@ def benchmark_meta_to_lue_json( benchmark_pathname, lue_dataset_pathname, cluster, benchmark, experiment ): - array_shape = experiment.array.shape partition_shape = experiment.partition.shape @@ -118,7 +117,6 @@ def benchmark_meta_to_lue_json( def benchmark_to_lue_json( nr_workers, benchmark_pathname, lue_json_pathname, epoch, benchmark ): - # Read benchmark JSON benchmark_json = json.loads(open(benchmark_pathname).read()) @@ -258,7 +256,6 @@ def import_raw_results( metadata_written = False for benchmark_idx in benchmark_idxs: - nr_workers = benchmark.worker.nr_workers(benchmark_idx) result_pathname = experiment.benchmark_result_pathname( @@ -284,7 +281,6 @@ def import_raw_results( def write_scalability_results(lue_dataset): - count = lue_dataset.benchmark.measurement.duration.value.shape[1] lue_measurement = lue_dataset.benchmark.measurement @@ -419,7 +415,6 @@ def write_scalability_results(lue_dataset): def import_results(configuration_data): - configuration = Configuration(configuration_data) cluster = configuration.cluster benchmark = configuration.benchmark @@ -445,7 +440,6 @@ def import_results(configuration_data): if not raw_results_already_imported or not job.scalability_lue_dataset_exists( result_prefix, cluster, benchmark, experiment ): - # Copy dataset and write scalability results job.copy_raw_to_scalability_lue_dataset( result_prefix, cluster, benchmark, experiment diff --git a/source/qa/python/qa/scalability/experiment/weak_scalability/postprocess_results.py b/source/qa/python/qa/scalability/experiment/weak_scalability/postprocess_results.py index 6aaf46a14..744f8ddb1 100644 --- a/source/qa/python/qa/scalability/experiment/weak_scalability/postprocess_results.py +++ b/source/qa/python/qa/scalability/experiment/weak_scalability/postprocess_results.py @@ -55,7 +55,6 @@ def annotate_plot(axis, y_label): axis.grid() def plot_duration(axis): - if count == 1: duration = lue_measurement.duration.value[:][sort_idxs] y_label = "duration ({})".format(time_point_units) @@ -102,7 +101,6 @@ def plot_duration(axis): annotate_plot(axis, y_label) def plot_relative_efficiency(axis): - if count == 1: relative_efficiency = lue_scaling.relative_efficiency.value[:][sort_idxs] plot_actual = lambda data: axis.plot( diff --git a/source/qa/python/qa/scalability/experiment/worker.py b/source/qa/python/qa/scalability/experiment/worker.py index c2a3cbb3b..cdfbdc31b 100644 --- a/source/qa/python/qa/scalability/experiment/worker.py +++ b/source/qa/python/qa/scalability/experiment/worker.py @@ -55,21 +55,18 @@ def __init__(self, data, cluster, locality_per): assert 1 <= self.min_nr_threads <= self.max_nr_threads def __str__(self): - return "Worker(type={}, pool={})".format( self.type, self.pool, ) def from_json(self, data): - self.type = data["type"] assert self.type in ["thread", "numa_node", "cluster_node"], self.type self.pool = pool.Pool(data["pool"]) def to_json(self): - return { "type": self.type, "pool": self.pool.to_json(), diff --git a/source/qa/python/test/array_shape_test.py b/source/qa/python/test/array_shape_test.py index c4f84a89f..fda26eacf 100644 --- a/source/qa/python/test/array_shape_test.py +++ b/source/qa/python/test/array_shape_test.py @@ -10,7 +10,6 @@ class ArrayShapeTest(unittest.TestCase): def test_array_shape(self): - memory = 100 rank = 1 nr_arrays = 1 @@ -21,7 +20,6 @@ def test_array_shape(self): self.assertEqual(shape, (100,)) def test_array_shape_rank(self): - memory = 100 rank = 2 nr_arrays = 1 @@ -32,7 +30,6 @@ def test_array_shape_rank(self): self.assertEqual(shape, (10, 10)) def test_array_shape_nr_arrays(self): - memory = 100 rank = 1 nr_arrays = 2 @@ -43,7 +40,6 @@ def test_array_shape_nr_arrays(self): self.assertEqual(shape, (50,)) def test_array_shape_size_of_element(self): - memory = 100 rank = 1 nr_arrays = 1 diff --git a/source/qa/python/test/partition_shape_test.py b/source/qa/python/test/partition_shape_test.py index f3ddef4cc..8dcfeae31 100644 --- a/source/qa/python/test/partition_shape_test.py +++ b/source/qa/python/test/partition_shape_test.py @@ -10,7 +10,6 @@ class PartitionShapeTest(unittest.TestCase): def test_partition_shape_multipliers(self): - shape = (10, 10) partition_shape = (1, 1) @@ -34,7 +33,6 @@ def test_partition_shape_multipliers(self): self.assertEqual(multipliers, [2, 5]) def test_ranges_of_partition_shape_multipliers(self): - shape = (10, 10) min_partition_shape = (1, 1) @@ -62,7 +60,6 @@ def test_ranges_of_partition_shape_multipliers(self): self.assertEqual(multiplier_ranges[1], range(2, 2, -1)) def test_ranges_of_shapes(self): - min_shape = (1, 1) max_shape = (10, 10) step = 1 @@ -72,7 +69,6 @@ def test_ranges_of_shapes(self): self.assertEqual(ranges[1], range(1, 11, step)) def test_partition_shapes(self): - min_shape = (480, 480) max_shape = (500, 500) step = 10 diff --git a/source/qa/python/test/pool_test.py b/source/qa/python/test/pool_test.py index 030a58510..586115b17 100644 --- a/source/qa/python/test/pool_test.py +++ b/source/qa/python/test/pool_test.py @@ -10,7 +10,6 @@ class PoolTest(unittest.TestCase): def _test_case_multiplier(self, min_size, max_size, multiplier, permutation_sizes): - data = { "min_size": min_size, "max_size": max_size, @@ -47,7 +46,6 @@ def test_case_4_37_3_multiplier(self): def _test_case_incrementor( self, min_size, max_size, incrementor, permutation_sizes ): - data = { "min_size": min_size, "max_size": max_size, diff --git a/source/qa/script/benchmark_to_lue_json.py b/source/qa/script/benchmark_to_lue_json.py index 9994dde71..a2a84d72f 100755 --- a/source/qa/script/benchmark_to_lue_json.py +++ b/source/qa/script/benchmark_to_lue_json.py @@ -35,7 +35,6 @@ def benchmark_meta_to_lue_json(benchmark_pathname, lue_pathname): - # Read benchmark JSON benchmark_json = json.loads(open(benchmark_pathname).read()) @@ -77,7 +76,6 @@ def benchmark_meta_to_lue_json(benchmark_pathname, lue_pathname): def benchmark_to_lue_json(benchmark_pathname, lue_pathname, epoch=None): - # Read benchmark JSON benchmark_json = json.loads(open(benchmark_pathname).read()) diff --git a/source/qa/script/export_benchmark_results.py b/source/qa/script/export_benchmark_results.py index bd81b8c58..8f948b5ca 100755 --- a/source/qa/script/export_benchmark_results.py +++ b/source/qa/script/export_benchmark_results.py @@ -7,7 +7,6 @@ os.path.join(os.path.split(__file__)[0], "..", "..", "benchmark", "lue") ] + sys.path import docopt - from benchmark import export_results diff --git a/source/qa/script/post_process_benchmarks.py b/source/qa/script/post_process_benchmarks.py index 44353a300..f195e023d 100755 --- a/source/qa/script/post_process_benchmarks.py +++ b/source/qa/script/post_process_benchmarks.py @@ -34,7 +34,6 @@ def post_process_strong_scaling_benchmarks( name, time_point, system_name, environment, durations ): - # TODO # - Add units to y-axis duration plot # - Add subtitle @@ -164,13 +163,11 @@ def post_process_strong_scaling_benchmarks( def post_process_weak_scaling_benchmarks( name, time_point, system_name, environment, durations ): - # TODO pass def post_process_benchmarks(lue_pathname): - lue_dataset = lue.open_dataset(lue_pathname) lue_benchmark = lue_dataset.phenomena["benchmark"] diff --git a/source/view/vulkan/include/lue/vulkan/queue_family.hpp b/source/view/vulkan/include/lue/vulkan/queue_family.hpp index deb052b04..8aba708c6 100644 --- a/source/view/vulkan/include/lue/vulkan/queue_family.hpp +++ b/source/view/vulkan/include/lue/vulkan/queue_family.hpp @@ -1,6 +1,6 @@ #pragma once -#include #include +#include namespace lue::vulkan {