Skip to content

VERS: Update to EbsdLib v3.1.4 - #1976

Merged
imikejackson merged 2 commits into
BlueQuartzSoftware:developfrom
imikejackson:topic/ebsdlib_ver_update
Nov 14, 2026
Merged

imikejackson merged 2 commits into
BlueQuartzSoftware:developfrom
imikejackson:topic/ebsdlib_ver_update

Conversation

@imikejackson

Copy link
Copy Markdown
Contributor

No description provided.

@imikejackson

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

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

@azure-pipelines

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

@jmarquisbq jmarquisbq left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR 1976 Code Review

Reviewed all three changed files at a811154914566a14a9762ab3023905b388da242a.

1. Implementation findings

  • 1.1 [Important, CONFIRMED] Handle space group 0 in GrainMapper preflight. The reader accepts the HDF5 SpaceGroup value without a range check. With SpaceGroup = 0, EbsdLib 3.1.3 returned a Laue operator, but 3.1.4 returns null. The preflight code dereferences that result. Reject values outside 1–230 with an error that names the file, phase, and value. Add a regression test for 0. EbsdReaderUtilities.hpp:327 · EbsdLib lookup
  • 1.2 [Minor, CONFIRMED] Correct the EbsdLib package source hash. The registry portfile supplies 98e8dad2… to Version::GitHash(), while the v3.1.4 tag points to d0f4769e…. The archive SHA-512 matches. Publish a corrected port revision and verify the hash that the package reports. Registry portfile:9 · EbsdLib v3.1.4 source

2. Current architectural problems

  • 2.1 [Important, CONFIRMED] Raise the Conda pin with the vcpkg pin. The Conda recipe still builds EbsdLib 3.1.3, which lacks GetLaueOpsFromSpaceGroupNumber(). An MSVC syntax check of the GrainMapper translation unit passed with the base code and 3.1.3 headers. It failed with the PR code and 3.1.3 headers and passed with the PR code and 3.1.4 headers. Update the Conda pin and verify a package build. conda/meta.yaml:12
  • 2.2 [Important, CONFIRMED] Handle crystal-structure value 11 at the dependency boundary. The GMT exporter indexes the library’s Laue operator vector with the selected phase’s stored crystal-structure value. EbsdLib 3.1.3 returned orthorhombic operators at slot 11. EbsdLib 3.1.4 removes that slot, so the same input now reads past the vector. Reject unsupported values with an error or explicitly map 11 if compatibility is required. Add a regression case and check other consumers of the vector for the same change. WriteGBCDGMTFile.cpp:155

3. Verified and pending evidence

  • 3.1 The pin points to the official registry baseline and changes only EbsdLib. The registry tree matches the 3.1.4 port entry, and the source archive matches its SHA-512. The new lookup maps space group 194 to hexagonal-high, consistent with the upstream reference test. Registry PR #40 · EbsdLib PR #67
  • 3.2 Clang-format 19.1.1 and the comment audit passed. Scoped clang-tidy exited nonzero on unchanged lines and produced no diagnostic on the changed line. The vcpkg dry run stalled during registry fetch. Azure results, full builds, runtime tests, and DREAM3D-NX validation remain unverified. Azure build 10731

REQUEST CHANGES — Address the Conda build failure and both crash paths before merging.

@imikejackson
imikejackson force-pushed the topic/ebsdlib_ver_update branch 3 times, most recently from 5a79231 to 9c6f625 Compare November 13, 2026 21:12
@imikejackson

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

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

@imikejackson

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

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

@jmarquisbq jmarquisbq left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR 1976 re-review

Reviewed all seven changed files at f504afec3ad4aefe4630bf4990f2eda3a74173bd. Three of the four items from the original review are addressed.

1. Original review items

  • 1.1 GrainMapper space group. Partially fixed. Preflight now displays Unknown for an invalid space group and allows execution. See finding 2.1.
  • 1.2 Registry source hash. Fixed. The portfile embeds the commit behind v3.1.4. The port tree and source archive SHA-512 match. Registry commit
  • 2.1 Conda build. Pin fixed. The Conda recipe now uses 3.1.4. The GrainMapper source passed a focused MSVC syntax check with those headers. A full Conda build remains unverified. Conda pin
  • 2.2 GMT export. Fixed in source. Execute checks both indexes before use. The new test covers crystal-structure values 11 and 999 and a phase missing from the Crystal Structures array. Regression test

2. Re-review findings

  • 2.1 [Important, CONFIRMED] Current architectural problem. Use the same checked space-group mapping in preflight and execute. A GrainMapper file with SpaceGroup = 231 now passes preflight as Unknown, then execute silently writes cubic-high into CrystalStructures. With 0, the execute lookup underflows its table index and throws. The PR exposes the existing execute defect by allowing these inputs past preflight. Validate the file value against 1–230 in the shared phase reader and return an error with the file, phase, and value. Use the checked EbsdLib mapping for valid inputs and add regression cases for 0 and 231. Preflight lookup · Execute lookup
  • 2.2 [Minor, CONFIRMED] Update the CTF validation record. The revised test correctly expects EbsdLib error -102312 for ZCells = 0. The filter comment and V&V coverage table still say that this fixture exercises the simplnx -19603 guard. Update both to say that the reader rejects the fixture before the copy guard, and record the guard’s coverage separately. Filter comment · V&V coverage

3. Validation

Focused MSVC syntax checks with EbsdLib 3.1.4 headers, clang-format 19.1.1, and the comment audit passed. Scoped clang-tidy exited nonzero on include and style diagnostics, including Catch2 macro diagnostics. Azure test results, full builds, runtime tests, and DREAM3D-NX/OOC validation remain unverified. Azure build 10739

REQUEST CHANGES. Make GrainMapper handle invalid space groups consistently in preflight and execute before merging.

@imikejackson

Copy link
Copy Markdown
Contributor Author

@jmarquisbq Here's where your re-review items stand:

2.1 (GrainMapper space groups): fixed in #1973 (from #1962). GrainMapper3DUtilities::ValidateSpaceGroups() rejects values outside 1–230 with error -67600 in both preflight and execute. It names the file, phase and value. Execute now uses EbsdLib's checked GetLaueOpsIndexFromSpaceGroupNumber(), and the old GetLaueIndexFromSpaceGroup() table is gone. Tests cover 0, -1, 231 and INT32_MAX.

2.2 (CTF validation record): #1973 also rewrites the CTF V&V record. The ZCells 0 fixture is now rejected in preflight, and row 11 records the -19603 guard separately. The ReadCtfDataFilter.cpp:136 comment still needs updating.

#1976 has to merge first because #1973 needs EbsdLib 3.1.4, so I'd like to merge this one with both items tracked in #1973.

@imikejackson
imikejackson force-pushed the topic/ebsdlib_ver_update branch from f504afe to 13f6308 Compare November 14, 2026 18:12
@imikejackson

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

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

Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
…hold

- WriteGBCDGMTFile returns -96714 when the selected phase's crystal structure
  is outside the LaueOps table (0-10). EbsdLib 3.1.4 removed slot 11, so the
  value 11 and the 999 Unknown sentinel previously read past the table.
- WriteGBCDGMTFile returns -96715 when the selected phase index is outside the
  Crystal Structures array.
- Add a regression test for crystal structures 11 and 999 and a missing phase.
- ReadCtfData: EbsdLib 3.1.4 rejects a ZCells 0 header itself with -102312;
  update the test to expect that code.

Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
@imikejackson
imikejackson force-pushed the topic/ebsdlib_ver_update branch from 13f6308 to bcdd9e4 Compare November 14, 2026 19:22
@imikejackson
imikejackson merged commit 8cad1e8 into BlueQuartzSoftware:develop Nov 14, 2026
1 check passed
@imikejackson
imikejackson deleted the topic/ebsdlib_ver_update branch November 14, 2026 19:23
@imikejackson

Copy link
Copy Markdown
Contributor Author

@jmarquisbq A correction to my comment above about 2.2: the ReadCtfDataFilter.cpp:136 comment does not need any more work. #1973 already updates it to say that an absent ZCells key keeps the reader's default of 1, and that an explicit zero is rejected. So #1973 fully covers 2.2.

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.

2 participants