[Rivet-svn] rivet: Reinstate multi-process make-plots and add a flag to disa...

Rivet Mercurial rivet at projects.hepforge.org
Wed Jul 6 23:45:01 BST 2016


details:   https://rivet.hepforge.org/hg/rivet/rev/cd1f9786db68
branches:  
changeset: 5304:cd1f9786db68
user:      Andy Buckley <andy at insectnation.org>
date:      Wed Jul 06 23:39:10 2016 +0100
description:
Reinstate multi-process make-plots and add a flag to disable it for debugging in future. Plus clean-up of old commented-out rendering code

diffs (truncated from 102 to 50 lines):

--- a/bin/make-plots	Wed Jul 06 21:30:48 2016 +0100
+++ b/bin/make-plots	Wed Jul 06 23:39:10 2016 +0100
@@ -2586,36 +2586,6 @@
             logging.debug(" ".join(pngcmd))
             pngproc = subprocess.Popen(pngcmd, stdin=dvproc.stdout, stdout=subprocess.PIPE, cwd=tempdir)
             pngproc.wait()
-        # if opts.OUTPUT_FORMAT == "PSPNG":
-        #     dvcmd += ["-o", "%s.ps" % filename]
-        #     logging.debug(" ".join(dvcmd))
-        #     dvproc = subprocess.Popen(dvcmd, stdout=subprocess.PIPE, cwd=tempdir)
-        #     dvproc.wait()
-        #     assert os.path.exists("%s.ps" % filename)
-        #     mkpng("%s.ps" % filename, "%s.png" % filename)
-        # if opts.OUTPUT_FORMAT == "PDFPNG":
-        #     dvcmd.append("-f")
-        #     logging.debug(" ".join(dvcmd))
-        #     dvproc = subprocess.Popen(dvcmd, stdout=subprocess.PIPE, cwd=tempdir)
-        #     cnvproc = subprocess.Popen(["ps2pdf", "-"], stdin=dvproc.stdout, stdout=subprocess.PIPE, cwd=tempdir)
-        #     f = open(os.path.join(tempdir, "%s.pdf" % filename), "w")
-        #     f.write(cnvproc.communicate()[0])
-        #     f.close()
-        #     logging.debug(os.listdir(tempdir))
-        #     assert os.path.exists("%s.pdf" % filename)
-        #     mkpng("%s.pdf" % filename, "%s.png" % filename)
-        # if opts.OUTPUT_FORMAT == "EPSPNG":
-        #     dvcmd.append("-f")
-        #     logging.debug(" ".join(dvcmd))
-        #     dvproc = subprocess.Popen(dvcmd, stdout=subprocess.PIPE, cwd=tempdir)
-        #     cnvproc = subprocess.Popen(["ps2eps"], stdin=dvproc.stdout, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=tempdir)
-        #     f = open(os.path.join(tempdir, "%s.eps" % filename), "w")
-        #     f.write(cnvproc.communicate()[0])
-        #     f.close()
-        #     mkpng("%s.eps" % filename, "%s.png" % filename)
-        # else:
-        #     logging.error("Unknown format: %s" % opts.OUTPUT_FORMAT)
-        #     sys.exit(1)
         logging.debug(os.listdir(tempdir))
 
     ## Copy results back to main dir
@@ -2698,6 +2668,8 @@
                       help="Create TeX/LaTeX output.")
     parser.add_option("--no-cleanup", dest="NO_CLEANUP", action="store_true", default=False,
                       help="Keep temporary directory and print its filename.")
+    parser.add_option("--no-subproc", dest="NO_SUBPROC", action="store_true", default=False,
+                      help="Don't use subprocesses to render the plots in parallel -- useful for debugging.")
     parser.add_option("--full-range", dest="FULL_RANGE", action="store_true", default=False,
                       help="Plot full y range in LogY plots.")
     parser.add_option("-c", "--config", dest="CONFIGFILES", action="append", default=None,
@@ -2782,22 +2754,6 @@
         except Exception, e:


More information about the Rivet-svn mailing list