fabsig / GPBoost

Combining tree-boosting with Gaussian process and mixed effects models
Other
574 stars 46 forks source link

R: fix OpenMP detection on macOS with GCC #96

Closed barracuda156 closed 1 year ago

barracuda156 commented 1 year ago

Fixes: https://github.com/fabsig/GPBoost/issues/95

barracuda156 commented 1 year ago

Gimme a min, it also has to be removed from PKG_LIBS, otherwise linking is left broken.

UPD. Should be made conditional on compiler, otherwise configure forces linking to non-existing libomp. Eh.

barracuda156 commented 1 year ago

Everything working now.

R version 4.3.0 (2023-04-21) -- "Already Tomorrow"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.0.0d2 (32-bit)

> library(testthat)
> library(gpboost)
Loading required package: R6
> 
> test_check(
+     package = "gpboost"
+     , stop_on_failure = TRUE
+     , stop_on_warning = FALSE
+ )
[ FAIL 0 | WARN 0 | SKIP 0 | PASS 728 ]
> 
> proc.time()
   user  system elapsed 
 97.189  24.973  91.253 

P. S. PowerPC also needs a fix for Eigen, since GPBoost at the moment uses an old version of its headers where Altivec/VSX bug is not fixed.