Skip to content

COMP: Set the strict store-copy format with a configured header - #1982

Open
imikejackson wants to merge 2 commits into
BlueQuartzSoftware:developfrom
imikejackson:topic/store_copy_strict_format_header
Open

imikejackson wants to merge 2 commits into
BlueQuartzSoftware:developfrom
imikejackson:topic/store_copy_strict_format_header

Conversation

@imikejackson

Copy link
Copy Markdown
Contributor

Summary

The strict store-copy format switch (SIMPLNX_STORE_COPY_STRICT_FORMAT) was a compile definition that the out-of-core build added to the simplnx target as PUBLIC, so it reached every file that uses simplnx. This pull request makes it a simplnx cache option that writes a small generated header, and fixes a CTest ordering bug found while testing it.

  • Add the cache option SIMPLNX_STORE_COPY_STRICT_FORMAT (default OFF). When ON, a store copy to a storage format with no registered I/O manager fails instead of falling back to in-memory storage. With the option OFF, behavior is unchanged.
  • Generate simplnx/Common/StoreCopyConfig.hpp with #cmakedefine01. Only StoreCopyUtilities.cpp, DataArrayTest.cpp, MemorySafetyTest.cpp and StorageFormatPlanTest.cpp include it, so changing the option recompiles only those files. It is a separate header, not part of SimplnxConfig.hpp, for that reason.
  • Move the test-only PlaceholderPlanManager into UnitTestCommon and register it for the HDF5-OOC format in the strict-mode test branches. The simplnx tests no longer include code from the private out-of-core storage plugin, and a simplnx-only build with the option ON now compiles and runs them. Registration keeps an I/O manager that is already registered for that format.
  • Run include(CTest) before add_subdirectory(src/apps). BUILD_TESTING comes from include(CTest), so in a new build directory the first configure registered none of the nxrunner tests guarded by if(BUILD_TESTING) (the 7 nxrunner_pipeline_flush_* tests, nxrunner OOC threshold preferences, nxrunner cache memory budget CLI). The redundant enable_testing() in src/apps is removed.

Merge order

DREAM3D-NX sets the new option from DREAM3DNX_ENABLE_OOC before it adds simplnx: BlueQuartzSoftware/DREAM3DNX#1256. Merge that pull request first. If this one merged first, the generated header would define the switch as 0 in out-of-core builds and override the definition they pass today, so those builds would silently fall back to memory. After both merge, the out-of-core plugin stops passing the definition and requires the option instead.

Test Plan

Release builds, macOS arm64, ci-macos-arm64 preset with the Python bindings off:

  • Option OFF, rebased on develop (8cad1e8): full ctest -j 1: 4029/4029 passed.
  • Option ON, simplnx only: full ctest -j 1: 3928/3928 passed, plus the 9 nxrunner tests 9/9. The 3 C8 finalizer tests exist only in non-strict builds.
  • Option OFF and ON after the review fixes: DataArray, MemorySafety, StorageFormatPlan and placeholder tests: 317/317 each.
  • Fresh build directory, one configure: the 9 nxrunner tests and 11 NXINFO tests are registered.
  • DREAM3D-NX out-of-core build with this branch and DREAM3DNX#1256: no macro-redefinition warning; nxrunner, NXINFO, DataArray, MemorySafety, StoreCopy and StorageFormatPlan tests 375/375; all out-of-core labeled tests 1051/1052 (one DREAM3D-NX histogram test failed once and passed 6 of 6 times alone; it looks intermittent and unrelated).
  • clang-format 19.1.1 and git diff --check.
  • CI passes.

Related Issue

Related to #1777 (this changes how the switch is set, not the unknown-format policy that issue decides)

* Add the cache option SIMPLNX_STORE_COPY_STRICT_FORMAT (default OFF).
  When ON, a store copy to a storage format that has no registered I/O
  manager fails instead of falling back to in-memory storage.
* Generate simplnx/Common/StoreCopyConfig.hpp from the option. Only
  StoreCopyUtilities.cpp and the tests that check the behavior include
  it, so changing the option recompiles only those files. Before, an
  out-of-core build passed the macro as a PUBLIC compile definition to
  every file that uses simplnx.
* Print the option in the configuration summary.
* Move PlaceholderPlanManager into UnitTestCommon and register it for
  the HDF5-OOC format in the strict-mode tests, so the simplnx tests no
  longer include the out-of-core storage plugin and a simplnx-only
  build with the option ON compiles and runs them.

Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
* Run include(CTest) before add_subdirectory(src/apps). BUILD_TESTING
  is defined by include(CTest), so the nxrunner tests and the
  nxrunner_pipeline_flush tests were registered only after a second
  configure of a new build directory.
* Remove the enable_testing() call in src/apps, which the earlier
  include(CTest) makes redundant.

Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
@imikejackson imikejackson self-assigned this Nov 14, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@imikejackson

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

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.

1 participant