Skip to content

Commit c52e9f8

Browse files
committed
BUG: guard distance_wrap directives
* Related to scipygh-21887, but not a full resolution, just for `spatial` test suite. * This patch avoids the segfaults/hard crashes in the SciPy testsuite `spatial` module on MacOS when building with GNU toolchain (but doesn't fix all other modules). * This incantation now passes locally on OS `14.7` M series with `homebrew` gcc `14.2.0`: `CC=gcc-14 CXX=g++-14 FC=gfortran-14 python dev.py test -s spatial` * Note that there are additional complications--it seems we'll need further shims for `xdist`-based testing in this scenario, though they appear to be minor, for assertios related to certain memory tracking properties. For example, `test_ckdtree_memuse` gets moody at really high `-j` values (2 is just fine locally, 16 makes it complain). [skip cirrus] [skip circle]
1 parent ae5f5bb commit c52e9f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scipy/spatial/src/distance_wrap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*/
3434

3535
#if !defined(__clang__) && defined(__GNUC__) && defined(__GNUC_MINOR__)
36-
#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
36+
#if !defined(__APPLE__) && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
3737
/* enable auto-vectorizer */
3838
#pragma GCC optimize("tree-vectorize")
3939
/* float associativity required to vectorize reductions */

0 commit comments

Comments
 (0)