Dear all,
I’m stuck with a weird issue on Windows with MSYS2-gfortran (No problems on macOS and UNIX systems).
I have a 3D tree data structure that is built recursively; it also calls a pure recursive
sorting routine internally. The sorting routine is used to keep track of point IDs between the scattered dataset and the tree ordering. Both routines have the bare minimum of local variables and use no local arrays:
From gdb
, I find that for mildly large datasets (~10^5 points, at tree depth ~3,000), this causes a segfault on Windows and I’m worried I may be hitting the Windows stacksize which seems to be 1MB by default.
Both the tree and the sorting routines would be counterintuitive to write again in a non-recursive way, so I’m looking for ways I could work around this. Are there ways/coding strategies this could be controlled with that do not involve playing with compiler flags? Appreciate any hints!