[Rivet] issue with mkhtml complaining about ReadError

Andy Buckley andy.buckley at cern.ch
Wed Jun 29 19:58:54 BST 2016


I think it's failing on the first file it tries to load, which is 
mc.yoda. It never gets a chance to try the ref file because of the error 
being thrown during the first file-reading.

Could you send us a copy of that mc.yoda file, please? You can also try 
loading it directly from Python with a script like this:

---
#! /usr/bin/env python
import yoda
histdict = yoda.read("mc.yoda") #< or a full path if you like
---

to check that the parser issue can be reproduced outside the Rivet scripts.

Andy


On 29/06/16 17:16, Raghav Kunnawalkam Elayavalli wrote:
> hmm interesting, its only showing the one file that im loading
>
> [rkunnawa at lxplus0031 YpJet]$ pwd
> /afs/cern.ch/work/r/rkunnawa/JEWEL/PLOTS/YpJet
> <http://cern.ch/work/r/rkunnawa/JEWEL/PLOTS/YpJet>
> [rkunnawa at lxplus0031 YpJet]$ rivet-mkhtml --font=helvetica
> --outputdir=plots_Official_YpJet --mc-errs mc.yoda:'$JEWEL+PYTHIA$ PbPb'
>
> Output from rivet-cmphistos
> /afs/cern.ch/work/r/rkunnawa/JEWEL/PLOTS/YpJet/mc.yoda
> <http://cern.ch/work/r/rkunnawa/JEWEL/PLOTS/YpJet/mc.yoda>
>
> Errors from rivet-cmphistos
> Traceback (most recent call last):
>    File "/afs/cern.ch/work/r/rkunnawa/JEWEL/local/bin/rivet-cmphistos
> <http://cern.ch/work/r/rkunnawa/JEWEL/local/bin/rivet-cmphistos>", line
> 319, in <module>
>      refhistos2 = getRivetRefData()
>    File "/afs/cern.ch/work/r/rkunnawa/JEWEL/local/bin/rivet-cmphistos
> <http://cern.ch/work/r/rkunnawa/JEWEL/local/bin/rivet-cmphistos>", line
> 148, in getRivetRefData
>      analysisobjects = yoda.read(infile, patterns=opts.PATHPATTERNS,
> unpatterns=opts.PATHUNPATTERNS)
>    File "yoda/include/IO.pyx", line 109, in yoda.core.read
> (yoda/core.cpp:75237)
> yoda.ReadError: Unexpected line in YODA format parsing when BEGIN
> expected: '4.000000e+015.000000e+010.96767520.05649410.0564941' on line 9
>
> Crash in rivet-cmphistos code =  1  exiting
>
> i wonder why its not showing the reference data file sitting here:
> /afs/cern.ch/work/r/rkunnawa/JEWEL/ANALYSIS
> <http://cern.ch/work/r/rkunnawa/JEWEL/ANALYSIS>
>
> the aforementioned path is in my RIVET_DATA_PATH and also
> RIVET_ANALYSIS_PATH so im not sure what file its loading now.
> I even moved them to the same location and it still complained.
> then i added the export statements to point both to the same location in
> lxplus and still the same error.
>
> Cheers
> Raghav
>
>
>> On Jun 29, 2016, at 5:59 PM, Andy Buckley <a.g.buckley at gmail.com
>> <mailto:a.g.buckley at gmail.com>> wrote:
>>
>> Probably loading *something* with a matching name. The line being
>> complained about *does* look like part of a YODA file... or maybe a
>> .dat file that accidentally got named .yoda.
>>
>> I'd like to know the answer -- could you try adding a "print infile"
>> line to rivet-cmphistos just above the "analysisobjects =
>> yoda.read(infile, ..." line on line ~110, and run again without the
>> double-colon path forcing?
>>
>> Thanks (and glad we've got a workaround),
>> Andy
>>
>>
>> On 29/06/16 16:53, Raghav Kunnawalkam Elayavalli wrote:
>>> Ok instead of waiting for it to finish, i tested it locally (yoda
>>> v1.5.9) with adding the data and analysis path definitions you
>>> mentioned and it worked. Does this mean that its loading another yoda
>>> file or something somewhere with a matching name etc?
>>>
>>> Cheers
>>> Raghav
>>>
>>>> On Jun 29, 2016, at 5:32 PM, Andy Buckley <a.g.buckley at gmail.com
>>>> <mailto:a.g.buckley at gmail.com>> wrote:
>>>>
>>>> If using YODA 1.6.x you will need to build Rivet + analyses using
>>>> the C++11 compiler mode. Not *hard* but an extra technicality, and
>>>> YODA 1.5.9 should be fine so that's what I recommend until the Rivet
>>>> 2.5.x series.
>>>>
>>>> Do you actually know what file is producing this parser error? It's
>>>> very strange. And there are line breaks in the "line" written out in
>>>> the error message, which shouldn't be possible... is that just an
>>>> email formatting thing?
>>>>
>>>> I think that rivet-cmphistos will try to parse *all* the .yoda files
>>>> found in Rivet's ref data collection, in case any of them match your
>>>> MC histogram path. If both your MC and reference .yoda file are in
>>>> the current directory, try setting
>>>> export RIVET_DATA_PATH=$PWD::
>>>> and/or
>>>> export RIVET_ANALYSIS_PATH=$PWD::
>>>> and run rivet-cmphistos again.
>>>> (NB. the double-colon on the end matters, to stop fallback to the
>>>> default Rivet data search paths)
>>>>
>>>> Cheers,
>>>> Andy
>>>>
>>>>
>>>> On 29/06/16 16:15, Chris Pollard wrote:
>>>>> Hi Raghav,
>>>>>
>>>>> I don't have this problem with yoda v1.6.0. Do you mind
>>>>> reinstalling the
>>>>> latest version of yoda and seeing if it works? I'll let Andy chime in,
>>>>> but I don't think there are big differences between your version of
>>>>> yoda
>>>>> and mine, so performing a clean install of 1.5.9 may also do the trick.
>>>>>
>>>>> Chris
>>>>>
>>>>> On Wed, Jun 29, 2016 at 11:09 AM, Raghav Kunnawalkam Elayavalli
>>>>> <raghav.k.e at cern.ch <mailto:raghav.k.e at cern.ch>
>>>>> <mailto:raghav.k.e at cern.ch>> wrote:
>>>>>
>>>>>    Hi Chris,
>>>>>
>>>>>    I currently have v1.5.9 installed. Ive attached a file which has the
>>>>>    first histogram d01-x01-y01 in both the analysis.yoda (data) and
>>>>>    mc.yoda (what i get after running rivet -a analysis test.hepmc)
>>>>>    Please let me know if you need anything else to debug the issue.
>>>>>    Cheers
>>>>>    Raghav
>>>>>
>>>>>>    On Jun 29, 2016, at 4:51 PM, Chris Pollard
>>>>>> <chris.pollard at cern.ch <mailto:chris.pollard at cern.ch>
>>>>>>    <mailto:chris.pollard at cern.ch>> wrote:
>>>>>>
>>>>>>    Hi Raghav,
>>>>>>
>>>>>>    It looks like the .yoda file(s) you have don't conform to the file
>>>>>>    format. Can you tell us which version of yoda you are using and
>>>>>>    give us an example file?
>>>>>>
>>>>>>    Cheers,
>>>>>>
>>>>>>    Chris
>>>>>>
>>>>>>    On Wed, Jun 29, 2016 at 10:44 AM, Raghav Kunnawalkam Elayavalli
>>>>>>    <raghav.k.e at cern.ch <mailto:raghav.k.e at cern.ch>
>>>>>> <mailto:raghav.k.e at cern.ch>> wrote:
>>>>>>
>>>>>>        Hi Rivet Experts,
>>>>>>
>>>>>>        I have an analysis with its corresponding yoda file with the
>>>>>>        data points for reference
>>>>>>        say analysis.cc <http://analysis.cc> <http://analysis.cc/>
>>>>>> and analysis.yoda. Now i
>>>>>>        compile it and run it with my MC and when i do
>>>>>>        rivet-mkhtml mc.yoda  , I get a weird error
>>>>>>        [rkunnawa at lxplus008 YpJet]$ rivet-mkhtml mc.yoda
>>>>>>        Errors from rivet-cmphistos
>>>>>>        Traceback (most recent call last):
>>>>>>          File
>>>>>>        "/afs/cern.ch/work/r/rkunnawa/JEWEL/local/bin/rivet-cmphistos
>>>>>> <http://cern.ch/work/r/rkunnawa/JEWEL/local/bin/rivet-cmphistos>
>>>>>>        <http://cern.ch/work/r/rkunnawa/JEWEL/local/bin/rivet-cmphistos>",
>>>>>>        line 318, in <module>
>>>>>>            refhistos2 = getRivetRefData()
>>>>>>          File
>>>>>>        "/afs/cern.ch/work/r/rkunnawa/JEWEL/local/bin/rivet-cmphistos
>>>>>> <http://cern.ch/work/r/rkunnawa/JEWEL/local/bin/rivet-cmphistos>
>>>>>>        <http://cern.ch/work/r/rkunnawa/JEWEL/local/bin/rivet-cmphistos>",
>>>>>>        line 147, in getRivetRefData
>>>>>>            analysisobjects = yoda.read(infile,
>>>>>>        patterns=opts.PATHPATTERNS, unpatterns=opts.PATHUNPATTERNS)
>>>>>>          File "yoda/include/IO.pyx", line 109, in yoda.core.read
>>>>>>        (yoda/core.cpp:75237)
>>>>>>        yoda.ReadError: Unexpected line in YODA format parsing when
>>>>>>        BEGIN expected:
>>>>>>        '4.000000e+015.000000e+010.96767520.05649410.0564941' on line 9
>>>>>>
>>>>>>        I dont have this particular line it points to in both my
>>>>>>        mc.yoda and analysis.yoda!
>>>>>>        So i dont know what might cause this. any ideas?
>>>>>>
>>>>>>        thanks!
>>>>>>        Cheers
>>>>>>        Raghav
>>>>>>
>>>>>>        _______________________________________________
>>>>>>        Rivet mailing list
>>>>>> Rivet at projects.hepforge.org <mailto:Rivet at projects.hepforge.org>
>>>>>> <mailto:Rivet at projects.hepforge.org>
>>>>>> https://www.hepforge.org/lists/listinfo/rivet
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Rivet mailing list
>>>>> Rivet at projects.hepforge.org <mailto:Rivet at projects.hepforge.org>
>>>>> https://www.hepforge.org/lists/listinfo/rivet
>>>>>
>>>>
>>>>
>>>> --
>>>> Dr Andy Buckley, Lecturer / Royal Society University Research Fellow
>>>> Particle Physics Expt Group, University of Glasgow
>>>
>>
>>
>> --
>> Dr Andy Buckley, Lecturer / Royal Society University Research Fellow
>> Particle Physics Expt Group, University of Glasgow
>


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


More information about the Rivet mailing list