Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Out-of-Core #703

Merged

Conversation

mmarineBlueQuartz
Copy link
Collaborator

@mmarineBlueQuartz mmarineBlueQuartz commented Sep 26, 2023

  • Update filters and unit tests to enable out-of-core data.
  • Update Application to require static methods for creation and destruction.
  • Update ParallelAlgorithm classes for disabling onout-of-core data.
  • Add memory utilities for checking available and total memory.

Naming Conventions

Naming of variables should descriptive where needed. Loop Control Variables can use i if warranted. Most of these conventions are enforced through the clang-tidy and clang-format configuration files. See the file complex/docs/Code_Style_Guide.md for a more in depth explanation.

Filter Checklist

The help file complex/docs/Porting_Filters.md has documentation to help you port or write new filters. At the top is a nice checklist of items that should be noted when porting a filter.

Unit Testing

The idea of unit testing is to test the filter for proper execution and error handling. How many variations on a unit test each filter needs is entirely dependent on what the filter is doing. Generally, the variations can fall into a few categories:

  • 1 Unit test to test output from the filter against known exemplar set of data
  • 1 Unit test to test invalid input code paths that are specific to a filter. Don't test that a DataPath does not exist since that test is already performed as part of the SelectDataArrayAction.

Code Cleanup

  • No commented out code (rare exceptions to this is allowed..)
  • No API changes were made (or the changes have been approved)
  • No major design changes were made (or the changes have been approved)
  • Added test (or behavior not changed)
  • Updated API documentation (or API not changed)
  • Added license to new files (if any)
  • Added example pipelines that use the filter
  • Classes and methods are properly documented

Copy link
Contributor

@joeykleingers joeykleingers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor things to remove, but otherwise this looks pretty good. I'll be testing Solomon's pipelines again over the next few days and will record filter execution time statistics.

@JDuffeyBQ JDuffeyBQ force-pushed the feature/Solomon_OOC branch 3 times, most recently from c588f5c to 349711c Compare October 31, 2023 18:18
Copy link
Collaborator

@JDuffeyBQ JDuffeyBQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Joey's comments about some leftover debugging code also should be addressed.

inputValues->FindSummation, inputValues->FindHistogram, inputValues->MinRange, inputValues->MaxRange, inputValues->UseFullRange,
inputValues->NumBins, inputValues->FindModalBinRanges, mask, featureIds, source, featureHasDataPtr, lengthArrayPtr, minArrayPtr, maxArrayPtr,
meanArrayPtr, modeArrayPtr, stdDevArrayPtr, summationArrayPtr, histArrayPtr, mostPopulatedBinPtr, modalBinsArrayPtr, filter));
indexAlg.setParallelizationEnabled(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still needs to be validated as to why it is disabled?

Comment on lines 663 to 664
// #ifdef COMPLEX_ENABLE_MULTICORE
#if 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmarineBlueQuartz Can we validate that this parallelization has to be disabled?

@@ -244,6 +246,7 @@ Result<> PartitionGeometry::partitionCellBasedGeometry(const IGridGeometry& inpu

ParallelData3DAlgorithm dataAlg;
dataAlg.setRange(dims[0], dims[1], dims[2]);
dataAlg.setParallelizationEnabled(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmarineBlueQuartz Does this need to be disabled? Can we do the same checks for out-of-core arrays versus in-core arrays?

mmarineBlueQuartz and others added 17 commits November 8, 2023 17:05
* Update filters and unit tests to enable out-of-core data.
* Update Application to require static methods for creation and destruction.
* Update ParallelAlgorithm classes for disabling onout-of-core data.
* Add memory utilities for checking available and total memory.
* Removed debugging code from NX Runner
Fix IOFormat and DataArrayTest
Signed-off-by: Jared Duffey <jared.duffey@bluequartz.net>
Signed-off-by: Jared Duffey <jared.duffey@bluequartz.net>
Signed-off-by: Jared Duffey <jared.duffey@bluequartz.net>
Signed-off-by: Jared Duffey <jared.duffey@bluequartz.net>
Signed-off-by: Jared Duffey <jared.duffey@bluequartz.net>
Signed-off-by: Jared Duffey <jared.duffey@bluequartz.net>
* Added out-of-core array checks. Fixed ConvertColorToGrayScale parallelization code for out-of-core datastores.
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
@imikejackson imikejackson merged commit 5d12251 into BlueQuartzSoftware:develop Nov 10, 2023
7 checks passed
@imikejackson imikejackson deleted the feature/Solomon_OOC branch November 10, 2023 17:04
imikejackson added a commit that referenced this pull request Nov 10, 2023
* Enable Out-of-Core

* Update filters and unit tests to enable out-of-core data.
* Update Application to require static methods for creation and destruction.
* Update ParallelAlgorithm classes for disabling onout-of-core data.
* Add memory utilities for checking available and total memory.
* Moved out of core check in ITK filters to execute helper function
* Added out-of-core array checks.
* Fixed ConvertColorToGrayScale parallelization code for out-of-core datastores.

---------

Signed-off-by: Jared Duffey <jared.duffey@bluequartz.net>
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
Co-authored-by: Jared Duffey <jared.duffey@bluequartz.net>
Co-authored-by: Michael Jackson <mike.jackson@bluequartz.net>
imikejackson added a commit to imikejackson/simplnx that referenced this pull request Oct 20, 2024
* Enable Out-of-Core

* Update filters and unit tests to enable out-of-core data.
* Update Application to require static methods for creation and destruction.
* Update ParallelAlgorithm classes for disabling onout-of-core data.
* Add memory utilities for checking available and total memory.
* Moved out of core check in ITK filters to execute helper function
* Added out-of-core array checks.
* Fixed ConvertColorToGrayScale parallelization code for out-of-core datastores.

---------

Signed-off-by: Jared Duffey <jared.duffey@bluequartz.net>
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
Co-authored-by: Jared Duffey <jared.duffey@bluequartz.net>
Co-authored-by: Michael Jackson <mike.jackson@bluequartz.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants