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(
"math/testUnfold5d.C",[
"math/testUnfold5c.C"])
18 dependenciesgraph.add(
"math/testUnfold5c.C",[
"math/testUnfold5b.C"])
19 dependenciesgraph.add(
"math/testUnfold5b.C",[
"math/testUnfold5a.C"])
20 dependenciesgraph.add(
"xml/xmlreadfile.C",[
"xml/xmlnewfile.C"])
21 dependenciesgraph.add(
"roofit/rf503_wspaceread.C",[
"roofit/rf502_wspacewrite.C"])
22 dependenciesgraph.add(
"io/readCode.C",[
"io/importCode.C"])
23 dependenciesgraph.add(
"fit/fit1.C",[
"hist/fillrandom.C"])
24 dependenciesgraph.add(
"fit/myfit.C",[
"fit/fitslicesy.C"])
25 dependenciesgraph.add(
"foam/foam_demopers.C",[
"foam/foam_demo.C"])
26 dependenciesgraph.add(
"tree/staff.C",[
"tree/cernbuild.C"])
27 dependenciesgraph.add(
"tree/cernstaff.C",[
"tree/cernbuild.C"])
28 dependenciesgraph.add(
"hist/hbars.C",[
"tree/cernbuild.C"])
29 dependenciesgraph.add(
"pyroot/ntuple1.py",[
"pyroot/hsimple.py"])
30 dependenciesgraph.add(
"pyroot/h1draw.py",[
"pyroot/hsimple.py"])
31 dependenciesgraph.add(
"pyroot/fit1.py",[
"pyroot/fillrandom.py"])
32 dependenciesgraph.add(
"tmva/TMVAClassificationApplication.C",[
"tmva/TMVAClassification.C"])
33 dependenciesgraph.add(
"tmva/TMVAClassificationCategory.C",[
"tmva/TMVAClassification.C"])
34 dependenciesgraph.add(
"tmva/TMVAClassificationCategoryApplication.C",[
"tmva/TMVAClassificationCategory.C"])
35 dependenciesgraph.add(
"tmva/TMVAMulticlass.C",[
"tmva/TMVAMultipleBackgroundExample.C"])
36 dependenciesgraph.add(
"tmva/TMVAMulticlassApplication.C",[
"tmva/TMVAMulticlass.C"])
37 dependenciesgraph.add(
"tmva/TMVARegressionApplication.C",[
"tmva/TMVARegression.C"])
39 for node
in dependenciesgraph.nodes:
40 dependenciesgraph.stale(node)
42 dependenciesgraph.run()
44 iterator = dependenciesgraph.iter()
47 while len(iterator)>0:
48 todo = iterator.next(10000)
49 newinputs.append(todo)
52 iterator.remove(element)
58 subprocess.call([
'python',
59 './converttonotebook.py',
60 os.path.join(os.environ[
'DOXYGEN_SOURCE_DIRECTORY'],
'tutorials', inputFile),
63 num_cores = multiprocessing.cpu_count()
66 Parallel(n_jobs=num_cores,verbose=100)(delayed(processInput)(i)
for i
in input)
68 for input
in newinputs:
72 print 'Parallel notebooks converter failed!!'
def processInput(inputFile)