Skip to content

Add native Windows CI build and remove unused allocations in CGNS surface reader#2739

Open
mohanakatari119-bit wants to merge 2 commits intosu2code:developfrom
mohanakatari119-bit:fix/windows-cgns-segfault
Open

Add native Windows CI build and remove unused allocations in CGNS surface reader#2739
mohanakatari119-bit wants to merge 2 commits intosu2code:developfrom
mohanakatari119-bit:fix/windows-cgns-segfault

Conversation

@mohanakatari119-bit
Copy link

@mohanakatari119-bit mohanakatari119-bit commented Feb 28, 2026

Proposed Changes

Adds a native Windows GitHub Actions workflow that builds SU2 on a windows-latest runner using MSYS2/MinGW64, replacing the cross-compiled Windows binaries that were previously built on Linux. Also removes four unused vector allocations (connElemCGNS, elemTypes, nPoinPerElem, elemGlobalID) in CCGNSMeshReaderFVM::ReadCGNSSurfaceSection that were allocated based on a stale nElems[val_section] value (always zero at that point in the call sequence) and were never read, left over from a prior refactoring.

Related Work

Resolves #2737 (SU2_DEF Windows binaries segfaulting when converting CGNS meshes). The root cause is that the existing release workflow cross-compiles Windows binaries on Linux, which prevents H5detect from running natively during the HDF5 build. This means type-detection falls back to a generic H5T_init.cross file that may not match the actual Windows runtime, causing memory corruption and segfaults in the CGNS reader. Building natively on Windows eliminates this mismatch. Related to issue #1468.

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

@mohanakatari119-bit mohanakatari119-bit changed the base branch from master to develop February 28, 2026 19:33
@joshkellyjak
Copy link
Contributor

Thank you for identifying the source of this issue. I think from a maintainer standpoint it would be useful if we could resolve the issue from the Linux to Windows perspective, is this possible from your investigations?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SU2_DEF Windows binaries seg faulting when converting CGNS meshes

3 participants