Skip to content

Commit a244809

Browse files
committed
Deploying to r-dev from @ 61c1c02 🚀
1 parent 1a27f5b commit a244809

File tree

5 files changed

+2
-13
lines changed

5 files changed

+2
-13
lines changed

configure

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,6 @@ PACKAGE_URL=''
608608
ac_subst_vars='LTLIBOBJS
609609
LIBOBJS
610610
STOCHTREE_CPPFLAGS
611-
OPENMP_AVAILABILITY_FLAGS
612611
OPENMP_LIB
613612
OPENMP_CXXFLAGS
614613
target_alias
@@ -1762,14 +1761,12 @@ OPENMP_CXXFLAGS=""
17621761
if test `uname -s` = "Linux"
17631762
then
17641763
OPENMP_CXXFLAGS="\$(SHLIB_OPENMP_CXXFLAGS)"
1765-
OPENMP_AVAILABILITY_FLAGS='-DSTOCHTREE_OPENMP_AVAILABLE'
17661764
fi
17671765

17681766
if test `uname -s` = "Darwin"
17691767
then
17701768
OPENMP_CXXFLAGS='-Xclang -fopenmp'
17711769
OPENMP_LIB='-lomp'
1772-
OPENMP_AVAILABILITY_FLAGS='-DSTOCHTREE_OPENMP_AVAILABLE'
17731770

17741771
# libomp 15.0+ from brew is keg-only (i.e. not symlinked into the standard paths search by the linker),
17751772
# so need to search in other locations.
@@ -1830,7 +1827,6 @@ printf "%s\n" "${ac_pkg_openmp}" >&6; }
18301827
if test "${ac_pkg_openmp}" = no; then
18311828
OPENMP_CXXFLAGS=''
18321829
OPENMP_LIB=''
1833-
OPENMP_AVAILABILITY_FLAGS=''
18341830
echo '***********************************************************************************************'
18351831
echo ' OpenMP is unavailable on this macOS system. stochtree code will run single-threaded as a result.'
18361832
echo ' To use all CPU cores for training jobs, you should install OpenMP by running'
@@ -1844,7 +1840,6 @@ fi
18441840

18451841

18461842

1847-
18481843
ac_config_files="$ac_config_files src/Makevars"
18491844

18501845

configure.ac

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,12 @@ OPENMP_CXXFLAGS=""
4747
if test `uname -s` = "Linux"
4848
then
4949
OPENMP_CXXFLAGS="\$(SHLIB_OPENMP_CXXFLAGS)"
50-
OPENMP_AVAILABILITY_FLAGS='-DSTOCHTREE_OPENMP_AVAILABLE'
5150
fi
5251

5352
if test `uname -s` = "Darwin"
5453
then
5554
OPENMP_CXXFLAGS='-Xclang -fopenmp'
5655
OPENMP_LIB='-lomp'
57-
OPENMP_AVAILABILITY_FLAGS='-DSTOCHTREE_OPENMP_AVAILABLE'
5856

5957
# libomp 15.0+ from brew is keg-only (i.e. not symlinked into the standard paths search by the linker),
6058
# so need to search in other locations.
@@ -104,7 +102,6 @@ then
104102
if test "${ac_pkg_openmp}" = no; then
105103
OPENMP_CXXFLAGS=''
106104
OPENMP_LIB=''
107-
OPENMP_AVAILABILITY_FLAGS=''
108105
echo '***********************************************************************************************'
109106
echo ' OpenMP is unavailable on this macOS system. stochtree code will run single-threaded as a result.'
110107
echo ' To use all CPU cores for training jobs, you should install OpenMP by running'
@@ -117,7 +114,6 @@ fi
117114
# substitute variables from this script into Makevars.in
118115
AC_SUBST(OPENMP_CXXFLAGS)
119116
AC_SUBST(OPENMP_LIB)
120-
AC_SUBST(OPENMP_AVAILABILITY_FLAGS)
121117
AC_SUBST(STOCHTREE_CPPFLAGS)
122118
AC_CONFIG_FILES([src/Makevars])
123119

configure.win

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ STOCHTREE_CPPFLAGS="${STOCHTREE_CPPFLAGS} -DEIGEN_MPL2_ONLY -DEIGEN_DONT_PARALLE
2626
# OpenMP #
2727
##########
2828

29-
STOCHTREE_CPPFLAGS="${STOCHTREE_CPPFLAGS} -DSTOCHTREE_OPENMP_AVAILABLE"
29+
STOCHTREE_CPPFLAGS="${STOCHTREE_CPPFLAGS}"
3030

3131
#########################
3232
# Generate Makevars.win #

src/Makevars.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ PKGROOT=..
44

55
STOCHTREE_CPPFLAGS = \
66
@STOCHTREE_CPPFLAGS@ \
7-
@OPENMP_AVAILABILITY_FLAGS@ \
87
-DSTOCHTREE_R_BUILD
98

109
PKG_CPPFLAGS = \

src/include/stochtree/openmp_utils.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace StochTree {
88

9-
#ifdef STOCHTREE_OPENMP_AVAILABLE
9+
#ifdef _OPENMP
1010

1111
#include <omp.h>
1212
#define STOCHTREE_HAS_OPENMP 1
@@ -40,7 +40,6 @@ inline void set_num_threads(int num_threads) {
4040
#else
4141
#define STOCHTREE_HAS_OPENMP 0
4242

43-
// Fallback implementations when OpenMP is not available
4443
inline int get_max_threads() {return 1;}
4544

4645
inline int get_thread_num() {return 0;}

0 commit comments

Comments
 (0)