Skip to content

Commit

Permalink
Some headers can be used in IMT mode without TBB.
Browse files Browse the repository at this point in the history
Implement the necessary scaffolding and install headers only if IMT is enabled.
  • Loading branch information
vgvassilev committed Dec 14, 2016
1 parent 47005b3 commit b2d0475
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
22 changes: 20 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ options=" \
enable_gsl_shared \
enable_hdfs \
enable_http \
enable_imt \
enable_krb5 \
enable_ldap \
enable_mathmore \
Expand Down Expand Up @@ -174,6 +175,7 @@ enable_globus=no
enable_explicitlink=no
enable_gsl_shared=no
enable_http=no
enable_imt=no
enable_qt=no
enable_qtgsi=no
enable_r=no
Expand Down Expand Up @@ -1747,6 +1749,7 @@ enable/disable options, prefix with either --enable- or --disable-
gsl-shared Enable linking against shared libraries for GSL (default no)
hdfs HDFS support; requires libhdfs from HDFS >= 0.19.1
http Build the HTTP server library
imt Enable ROOT multi processing support
krb5 Kerberos5 support, requires Kerberos libs
ldap LDAP support, requires (Open)LDAP libs
genvector Build the new libGenVector library
Expand Down Expand Up @@ -6577,7 +6580,7 @@ check_explicit "$enable_shadowpw" "$enable_shadowpw_explicit" \
### echo %%% TBB Support - Third party libraries
#
useimt="undef"
if test ! "x$enable_tbb" = "xno" ; then
if test "x$enable_tbb" = "xyes" ; then
check_header "tbb/tbb.h" "$tbbincdir" \
$TBB ${TBB:+$TBB/include} \
/usr/local/include \
Expand All @@ -6593,8 +6596,12 @@ if test ! "x$enable_tbb" = "xno" ; then

if test "x$tbbincdir" = "x" || test "x$tbblib" = "x"; then
enable_tbb="no"
enable_imt="no"
result "no"
exit 1
else
useimt="define"
enable_imt="yes"
# on OSX libtbb.dylib is build with @rpath/libtbb.dylib so it
# should reside in the application's lib/
if test "x$platform" = "xmacosx" ; then
Expand All @@ -6604,10 +6611,21 @@ if test ! "x$enable_tbb" = "xno" ; then
message "Copying $found_raw_dir/$found_raw_lib to lib"
cp -f $found_raw_dir/$found_raw_lib lib
fi
result "yes"
fi
fi
check_explicit "$enable_tbb" "$enable_tbb_explicit" \
"Explicitly required TBB dependencies not fulfilled"
"Explicitly required TBB dependencies not fulfilled"

##########################################################################
#
### echo %%% imt - Enable ROOT multi processing support
#
useimt="undef"
if test "x$enable_imt" = "xyes"; then
usecxxmodules="define"
result "yes"
fi

##########################################################################
#
Expand Down
4 changes: 4 additions & 0 deletions core/thread/Module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ THREADH := $(MODDIRI)/TCondition.h $(MODDIRI)/TConditionImp.h \
$(MODDIRI)/ROOT/TExecutor.hxx $(MODDIRI)/ROOT/TThreadedObject.hxx \
$(MODDIRI)/ROOT/TSpinMutex.hxx

ifeq ($(IMT),yes)
THREADH += $(MODDIRI)/ROOT/TThreadExecutor.hxx
endif

ifneq ($(ARCH),win32)
THREADH += $(MODDIRI)/TPosixCondition.h $(MODDIRI)/TPosixMutex.h \
$(MODDIRI)/TPosixThread.h $(MODDIRI)/TPosixThreadFactory.h \
Expand Down
9 changes: 8 additions & 1 deletion tmva/tmva/Module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ TMVAH1 := Configurable.h Event.h Factory.h MethodBase.h MethodCompositeBas
MethodKNN.h MethodCFMlpANN.h MethodCFMlpANN_Utils.h MethodLikelihood.h \
MethodHMatrix.h MethodPDERS.h MethodBDT.h MethodDT.h MethodSVM.h MethodBayesClassifier.h \
MethodFDA.h MethodMLP.h MethodCommittee.h MethodBoost.h \
MethodPDEFoam.h MethodLD.h MethodCategory.h MethodNN.h
MethodPDEFoam.h MethodLD.h MethodCategory.h MethodNN.h MethodDNN.h
TMVAH2 := TSpline2.h TSpline1.h PDF.h BinaryTree.h BinarySearchTreeNode.h BinarySearchTree.h \
Timer.h RootFinder.h CrossEntropy.h DecisionTree.h DecisionTreeNode.h MisClassificationError.h \
Node.h SdivSqrtSplusB.h SeparationBase.h RegressionVariance.h Tools.h Reader.h \
Expand All @@ -45,6 +45,13 @@ TMVAH4 := TNeuron.h TSynapse.h TActivationChooser.h TActivation.h TActivat
VariableGaussTransform.h VariableNormalizeTransform.h VariableRearrangeTransform.h ROCCalc.h
TMVADNN := $(wildcard $(MODDIRI)/TMVA/DNN/*.h) $(wildcard $(MODDIRI)/TMVA/DNN/Architectures/*.h) \
$(wildcard $(MODDIRI)/TMVA/DNN/Architectures/*/*.h)
ifneq ($(IMT),yes)
# FIXME: Add separate check if cuda was enabled.
TMVA_CUDAH := $(MODDIRI)/TMVA/DNN/Architectures/Cuda.h $(wildcard $(MODDIRI)/TMVA/DNN/Architectures/Cuda/*)
TMVA_CPUH := $(MODDIRI)/TMVA/DNN/Architectures/Cpu.h $(wildcard $(MODDIRI)/TMVA/DNN/Architectures/Cpu/*)
TMVADNN := $(filter-out $(TMVA_CUDAH),$(TMVADNN))
TMVADNN := $(filter-out $(TMVA_CPUH),$(TMVADNN))
endif

TMVAH1 := $(patsubst %,$(MODDIRI)/TMVA/%,$(TMVAH1))
TMVAH2 := $(patsubst %,$(MODDIRI)/TMVA/%,$(TMVAH2))
Expand Down

0 comments on commit b2d0475

Please sign in to comment.