[Rivet] Rivet issue: YODA not seeing latex?

Andy Buckley andy.buckley at cern.ch
Fri Jul 11 13:13:00 BST 2014


On 11/07/14 09:26, Cameron Embree wrote:
> Hello Andy,
> 
> I have added the print statements:
>     print "cwd: "+cwd
>     print "datpath: "+datpath
>     print "tempdir: "+tempdir
> 
> after each respective variable is created and also
> 
> 'print tempdir' before 'pngproc = subprocess.Popen(pngcmd,
> stdout=subprocess.PIPE, cwd=tempdir)'
> 
> 
> Attached is a script  'rivet-mkhtml_error.log' of the error as before.
> 
> I see from this output that 'tmpdir' is in my '/tmp/cembree' directory
> but all the files here have full rwx privileges for the owner (but none
> for group or others). The 'cembree' directory in '/tmp' also has full
> rwx privilages for the owner but none else.

Hi Cameron,

This is really strange -- sorry, but I don't know what's going on here.
Is there a possibility that at some point you ran some of the Rivet
scripts as root?

I'm wondering if the
tempdir = tempfile.mkdtemp('.make-plots')
line is somehow not propagating your user's write permissions to the
temporary directory. Hard to track since the dir gets deleted
automatically... you could try replacing it with a manual making of a
temporary directory with os.mkdir? Sorry, I'm out of ideas; this is the
point where I would start hacking, but I can't reproduce the problem :-/

Andy


> On Thu, Jul 10, 2014 at 7:00 PM, Andy Buckley <andy.buckley at cern.ch
> <mailto:andy.buckley at cern.ch>> wrote:
> 
>     Hi Cameron,
> 
>     Thanks for that. The permission problem isn't with subprocess.py itself
>     (that's a library source file, not an executable script), but with how
>     it is trying to call a subprocess:
> 
>       File "/afs/cern.ch/user/c/cembree/public/progs/bin/make-plots
>     <http://cern.ch/user/c/cembree/public/progs/bin/make-plots>", line
>     2212, in mkpng
>         pngproc = subprocess.Popen(pngcmd, stdout=subprocess.PIPE,
>     cwd=tempdir)
> 
>     Can you try to add "print tempdir" on the line before this, i.e. insert
>     it on line 2212 (coincidentally equal to the proton PDG code!) of your
>     make-plots? That way you can see what working directory the mkpng
>     function is trying to use... I suspect it is not in a helpful place, for
>     some reason.
> 
>     Thanks again,
>     Andy
> 
> 
> 
>     On 10/07/14 13:48, Cameron Embree wrote:
>     > Hello Andy,
>     >
>     >> please make sure to reply-all to keep the whole Rivet
>     >> developer list involved.
>     >
>     > Sorry, I will do that.
>     >
>     >> Very hard to tell from that amount of information: can you send a
>     more
>     >> complete log message? For example, make sure that the patched
>     make-plots
>     >> file is executable, that you are writing to a directory that you have
>     >> write-permissions on, etc.
>     >
>     > I have attached a log file of the following events to show:
>     >  - the ‘make-plots’ is updated and executable
>     >  - my writing output directory has write-permission
>     >  - the regular error output from ‘rivet-mkhtml'
>     >  - the verbose output from ‘rivet-mkhtml'
>     >
>     > The verbose output of ‘rivet-mkhtml’ is quite long, sorry! From this
>     > verbose
>     > output I see:
>     >
>     >     OSError: [Errno 13] Permission denied
>     >
>     > generated from a local Python file
>     '/usr/lib64/python2.6/subprocess.py'
>     > on my
>     > machine. Again, I am running a relatively fresh install of SLC6.
>     >
>     > I ensured that ‘subprocess.py’ is executable by everyone (it was not
>     > before)
>     > but the same errors are still generated.
>     >
>     >
>     > Regards,
>     > Cameron Embree
>     >
>     >
>     >
>     >
>     > On Jul 9, 2014, at 6:23 PM, Andy Buckley <andy.buckley at cern.ch
>     <mailto:andy.buckley at cern.ch>
>     > <mailto:andy.buckley at cern.ch <mailto:andy.buckley at cern.ch>>> wrote:
>     >
>     >> On 09/07/14 16:04, Cameron Embree wrote:
>     >>> Hello Andy,
>     >>
>     >> Hi Cameron -- please make sure to reply-all to keep the whole Rivet
>     >> developer list involved.
>     >>
>     >>> The change you suggested worked for finding my latex, thank you!
>     >>
>     >> Good!
>     >>
>     >>> I now, however, get an error:
>     >>>
>     >>>    Error: [Errno 13] Permission denied
>     >>>
>     >>> after each attempt to plot something. Do you think this is
>     coming from my
>     >>> Python? I ensured that each file to be plotted had rwx
>     privileges for
>     >>> all
>     >>> user groups, but this did not seem to help.
>     >>
>     >> Very hard to tell from that amount of information: can you send a
>     more
>     >> complete log message? For example, make sure that the patched
>     make-plots
>     >> file is executable, that you are writing to a directory that you have
>     >> write-permissions on, etc.
>     >>
>     >> Cheers,
>     >> Andy
>     >>
>     >>
>     >>
>     >>> On Jul 8, 2014, at 8:39 PM, Andy Buckley <andy.buckley at cern.ch
>     <mailto:andy.buckley at cern.ch>
>     >>> <mailto:andy.buckley at cern.ch <mailto:andy.buckley at cern.ch>>
>     >>> <mailto:andy.buckley at cern.ch <mailto:andy.buckley at cern.ch>>> wrote:
>     >>>
>     >>>> On 25/06/14 13:25, Cameron Embree wrote:
>     >>>>> Hello,
>     >>>>>
>     >>>>> I am trying to perform a ‘rivet-mkhtml’ on a YODA file and I
>     get the
>     >>>>> following error:
>     >>>>>
>     >>>>> ERROR: required program ‘latex’ could not be found. Exiting…
>     >>>>>
>     >>>>> However, latex is in my $PATH under ‘/usr/bin’ and is found when I
>     >>>>> perform a ‘which latex’, providing the following:
>     >>>>>
>     >>>>> /user/bin/latex
>     >>>>>
>     >>>>> I am running on a computer at CERN running SLC6 and am not sure if
>     >>>>> there is an explicit way to point Rivet/YODA at my latex (perhaps
>     >>>>> during the YODA installation process?). Should I perhaps
>     install some
>     >>>>> local version of latex instead of the one built into SLC6?
>     >>>>
>     >>>> Hi Cameron,
>     >>>>
>     >>>> Sorry for the delayed response. That is strange -- the script
>     should be
>     >>>> finding your LaTeX installation.
>     >>>>
>     >>>> I wonder if this is actually related to another bug report that
>     we had
>     >>>> in the last week, about make-plots (the script in Rivet that
>     actually
>     >>>> does the plotting) using constructs that require Python 2.7. If
>     your
>     >>>> environment is using an earlier Python, e.g. 2.6, then maybe try
>     >>>> applying this small patch to bin/make-plots:
>     >>>>
>     >>>> https://rivet.hepforge.org/hg/rivet/rev/a8c29394d2ba
>     >>>>
>     >>>> Let us know how that goes, and we'll try to get it solved.
>     >>>>
>     >>>> Cheers,
>     >>>> Andy
>     >>>>
>     >>>> --
>     >>>> Dr Andy Buckley, Royal Society University Research Fellow
>     >>>> Particle Physics Expt Group, University of Glasgow / PH Dept, CERN
>     >>>
>     >>
>     >>
>     >> --
>     >> Dr Andy Buckley, Royal Society University Research Fellow
>     >> Particle Physics Expt Group, University of Glasgow / PH Dept, CERN
>     >
> 
> 
>     --
>     Dr Andy Buckley, Royal Society University Research Fellow
>     Particle Physics Expt Group, University of Glasgow / PH Dept, CERN
> 
> 


-- 
Dr Andy Buckley, Royal Society University Research Fellow
Particle Physics Expt Group, University of Glasgow / PH Dept, CERN


More information about the Rivet mailing list