From b2d04755d37314e74606102f85c755aae4749bd2 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Wed, 16 Nov 2016 11:20:19 +0100 Subject: [PATCH] Some headers can be used in IMT mode without TBB. Implement the necessary scaffolding and install headers only if IMT is enabled. --- configure | 22 ++++++++++++++++++++-- core/thread/Module.mk | 4 ++++ tmva/tmva/Module.mk | 9 ++++++++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 2469430cbf421..3acf81ebdd887 100755 --- a/configure +++ b/configure @@ -88,6 +88,7 @@ options=" \ enable_gsl_shared \ enable_hdfs \ enable_http \ + enable_imt \ enable_krb5 \ enable_ldap \ enable_mathmore \ @@ -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 @@ -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 @@ -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 \ @@ -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 @@ -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 ########################################################################## # diff --git a/core/thread/Module.mk b/core/thread/Module.mk index 8a09db21d972d..c1ba84130c264 100644 --- a/core/thread/Module.mk +++ b/core/thread/Module.mk @@ -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 \ diff --git a/tmva/tmva/Module.mk b/tmva/tmva/Module.mk index 020088a29abbe..878f29484a14b 100644 --- a/tmva/tmva/Module.mk +++ b/tmva/tmva/Module.mk @@ -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 \ @@ -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))