3 from joblib
import Parallel, delayed
8 outDir = os.environ[
"DOXYGEN_NOTEBOOK_PATH_PARALLEL"]
10 inputs = [input.replace(
"../../tutorials/",
"")
for input
in subprocess.check_output([
"grep",
"-r",
"-l",
"/// \\\\notebook\|## \\\\notebook", os.path.expandvars(
"$DOXYGEN_SOURCE_DIRECTORY/tutorials")]).split()]
12 dependenciesgraph = dagger.dagger()
14 for element
in inputs:
15 dependenciesgraph.add(element)
17 dependenciesgraph.add(
"analysis/unfold/testUnfold5d.C",[
"analysis/unfold/testUnfold5c.C"])
18 dependenciesgraph.add(
"analysis/unfold/testUnfold5c.C",[
"analysis/unfold/testUnfold5b.C"])
19 dependenciesgraph.add(
"analysis/unfold/testUnfold5b.C",[
"analysis/unfold/testUnfold5a.C"])
20 dependenciesgraph.add(
"io/xml/xmlreadfile.C",[
"io/xml/xmlnewfile.C"])
21 dependenciesgraph.add(
"roofit/roofit/rf503_wspaceread.C",[
"roofit/roofit/rf502_wspacewrite.C"])
22 dependenciesgraph.add(
"io/readCode.C",[
"io/importCode.C"])
23 dependenciesgraph.add(
"math/fit/fit1.C",[
"hist/hist001_TH1_fillrandom.C"])
24 dependenciesgraph.add(
"math/fit/myfit.C",[
"math/fit/fitslicesy.C"])
25 dependenciesgraph.add(
"math/foam/foam_demopers.C",[
"math/foam/foam_demo.C"])
26 dependenciesgraph.add(
"io/tree/tree502_staff.C",[
"io/tree/tree500_cernbuild.C"])
27 dependenciesgraph.add(
"io/tree/tree501_cernstaff.C",[
"io/tree/tree500_cernbuild.C"])
28 dependenciesgraph.add(
"hist/hist006_TH1_bar_charts.C",[
"io/tree/tree500_cernbuild.C"])
29 dependenciesgraph.add(
"io/tree/ntuple1.py",[
"hsimple.py"])
30 dependenciesgraph.add(
"math/fit/fit1.py",[
"hist/hist001_TH1_fillrandom.py"])
31 dependenciesgraph.add(
"machine_learning/TMVAClassificationApplication.C",[
"machine_learning/TMVAClassification.C"])
32 dependenciesgraph.add(
"machine_learning/TMVAClassificationCategory.C",[
"machine_learning/TMVAClassification.C"])
33 dependenciesgraph.add(
"machine_learning/TMVAClassificationCategoryApplication.C",[
"machine_learning/TMVAClassificationCategory.C"])
34 dependenciesgraph.add(
"machine_learning/TMVAMulticlass.C",[
"machine_learning/TMVAMultipleBackgroundExample.C"])
35 dependenciesgraph.add(
"machine_learning/TMVAMulticlassApplication.C",[
"machine_learning/TMVAMulticlass.C"])
36 dependenciesgraph.add(
"machine_learning/TMVARegressionApplication.C",[
"machine_learning/TMVARegression.C"])
38 for node
in dependenciesgraph.nodes:
39 dependenciesgraph.stale(node)
41 dependenciesgraph.run()
43 iterator = dependenciesgraph.iter()
46 while len(iterator)>0:
47 todo = iterator.next(10000)
48 newinputs.append(todo)
51 iterator.remove(element)
57 subprocess.call([sys.executable,
58 './converttonotebook.py',
59 os.path.join(os.environ[
'DOXYGEN_SOURCE_DIRECTORY'],
'tutorials', inputFile),
62 num_cores = multiprocessing.cpu_count()
65 Parallel(n_jobs=num_cores,verbose=100)(delayed(processInput)(i)
for i
in input)
67 for input
in newinputs:
71 print(
'Parallel notebooks converter failed!!')