[Rivet] Small Issue - YODA 1.0.5 mktemplate

Frank Siegert frank.siegert at cern.ch
Fri Feb 14 20:07:59 GMT 2014


Hi Andy, all,

Is it possible that this can lead to a race condition in the case of
make -jN with N>=2, in the way it's implemented now?

make[2]: Entering directory `/tmp/fsiegert/rivet/yoda/pyext/yoda'
./mktemplates
./mktemplates
cython core.pyx --cplus
Traceback (most recent call last):
  File "./mktemplates", line 77, in <module>
    make_templates('Bin1D_DBN', DBN=('Dbn1D', 'Dbn2D'))
  File "./mktemplates", line 52, in make_templates
    os.mkdir("generated")
OSError: [Errno 17] File exists: 'generated'

I guess one needs to use exception handling to make it thread safe? I
have committed this now.
(cf. http://stackoverflow.com/questions/600268/mkdir-p-functionality-in-python)

Cheers,
Frank


On 9 February 2014 21:31, Andy Buckley <andy.buckley at cern.ch> wrote:
> Hi Christian,
>
> Thanks. Strange that this issue didn't show up in our tests on various
> systems. I don't think it is specifically related to the --enable-root
> option, but maybe you know otherwise?
>
> I've added explicit creation of the include/generated dir to the
> mktemplates script, so hopefully this shouldn't recur for you once 1.0.6
> is released: but if you have any more details or comments then please
> let us know. Thanks for the report!
>
> Andy
>
>
> On 07/02/14 21:46, Christian Johnson wrote:
>> Hello Rivet team,
>>
>> I attempted to install YODA-1.0.5 on Mac OS X 10.9. I configured with the --enable-root option. The compilation ran into an error when compiling the contents of /pyext/yoda/include. It gave to the error:
>>
>> ./mktemplates
>> Traceback (most recent call last):
>>   File "./mktemplates", line 74, in <module>
>>     make_templates('Bin1D_DBN', DBN=('Dbn1D', 'Dbn2D'))
>>   File "./mktemplates", line 58, in make_templates
>>     f = open(join("include", out_filename), 'w')
>> IOError: [Errno 2] No such file or directory: 'include/generated/Bin1D_Dbn1D.pyx'
>>
>> I was able to solve the problem by just creating the "generated" directory in /pyext/yoda/include and then running make again.
>>
>> Afterwards, I was able to install Rivet-2.1.0 without a hassle.
>>
>> Cheers,
>> Christian
>>
>>
>>
>> _______________________________________________
>> Rivet mailing list
>> Rivet at projects.hepforge.org
>> http://www.hepforge.org/lists/listinfo/rivet
>>
>
>
> --
> Dr Andy Buckley, Royal Society University Research Fellow
> Particle Physics Expt Group, University of Glasgow / PH Dept, CERN
> _______________________________________________
> Rivet mailing list
> Rivet at projects.hepforge.org
> http://www.hepforge.org/lists/listinfo/rivet


More information about the Rivet mailing list