[Rivet] auxiliary scripts in several generators.

Dmitri Konstantinov Dmitri.Konstantinov at cern.ch
Mon Apr 8 13:14:17 BST 2013


Hi Pere,

But in fact it means that a generator has to have fixed structure.

Cheers,
    Dima

On 4/8/13 2:10 PM, Pere Mato Vila wrote:
> Hi Andry,
>
>    There are several packages that provide a relocatable xxx-config (e.g. ROOT, CLHEP). If possible writing a relocatable script is better than having to apply some post relocation code, which can be easily be forgotten and will need to be adapted version to version.  An example code  can be found at http://svnweb.cern.ch/world/wsvn/clhep/trunk/clhep-config.in
>    Cheers,
>
> 				Pere
>
>   
> On Apr 8, 2013, at 1:56 PM, Andy Buckley <andy.buckley at ed.ac.uk>
>   wrote:
>
>> Hi Dima,
>>
>> (CCing Rivet developer list, which also covers a good fraction of the
>> Sherpa, LHAPDF, AGILe developers)
>>
>> I don't have an immediate good answer to this other than "don't use
>> those scripts if the release has been relocated". Perhaps it would be
>> possible to use sed or similar to change the base directory when
>> relocating: this probably just involves changing the three variables at
>> the top, which you've pointed out.
>>
>> I believe that FastJet also installs a script like this. There's a good
>> chance that HepMC might develop one as well. So it would be good to have
>> a plan of how to deal with them as part of a Grid kit / CVMFS installation.
>>
>> Andy
>>
>>
>> On 08/04/13 13:32, Dmitri Konstantinov wrote:
>>> Dear All,
>>>
>>> I have studied this possibility to make this Sherpa-config script
>>> relocatable and found that there is some problem.
>>> Sherpa has possibility to install share, libs, includes into different
>>> directories therefore there are absolute hard-coded paths in Sherpa-config.
>>> A priori one don't know these paths. It looks like we have same
>>> situation for rivet, lhapdf, agile.
>>>
>>> rivet Makefile.in
>>> ## These variables need to exist
>>> prefix=@prefix@
>>> exec_prefix=@exec_prefix@
>>> datarootdir=@datarootdir@
>>>
>>> If there is no fixed generator structure then we can not make these
>>> scripts relocatbale.(No fixed relative position to script directory).
>>>
>>>
>>> I am cc'ing Andy to see if Andy has rational suggestions.
>>> Andy, we would like to have relocatable installations but there is a
>>> problem with mentioned below configuration scripts.. Any ideas?
>>>
>>> Cheers,
>>>        Dima
>>>
>>>
>>>
>>> On 4/3/13 10:29 AM, Dmitri Konstantinov wrote:
>>>> Dear all,
>>>>
>>>> Yesterday following problem has been observed.
>>>> Some generators (lhapdf, rivet, agile  (*) ) with autotool-based
>>>> system create specific auxiliary scripts.
>>>> Using these scripts one can get more or less same objects:
>>>>
>>>>    echo "  Sherpa-config --version : returns Sherpa version";
>>>>     echo "  Sherpa-config --prefix  : returns the installation path";
>>>>     echo "  Sherpa-config --incdir  : returns the path of Sherpa
>>>> headers";
>>>>     echo "  Sherpa-config --libs    : returns the linker line to link
>>>> with Sherpa";
>>>>     echo "  Sherpa-config --datadir : returns the path of Sherpa data
>>>> (like Decaydata, PDFs)";
>>>>     echo "  Sherpa-config --ldflags : returns the LDFLAGS used for
>>>> Sherpa";
>>>>     echo "  Sherpa-config --cppflags : returns the preprocessor FLAGS
>>>> needed for Sherpa headers";;
>>>>
>>>> Unfortunately they contain a hard-coded path to initial installation:
>>>>
>>>> --prefix)
>>>>     echo
>>>> /afs/cern.ch/sw/lcg/external/MCGenerators/sherpa/1.4.1/x86_64-slc5-gcc43-opt;;
>>>>
>>>>   --libs)
>>>>     hepmc2libs=$(echo "  -lHepMC" | cut -d " " -f 1,3);
>>>>     echo  -lSherpaMain  -L${PDFBUILDDIR}/LHAPDF -lLHAPDFSherpa
>>>> /afs/cern.ch/sw/lcg/external/MCGenerators/lhapdf/5.8.8/x86_64-slc5-gcc43-opt/lib/libLHAPDF.a
>>>> $hepmc2libs;;
>>>>   --incdir)
>>>>     echo
>>>> /afs/cern.ch/sw/lcg/external/MCGenerators/sherpa/1.4.1/x86_64-slc5-gcc43-opt/include/SHERPA-MC;;
>>>>
>>>>   --libdir)
>>>>     echo
>>>> /afs/cern.ch/sw/lcg/external/MCGenerators/sherpa/1.4.1/x86_64-slc5-gcc43-opt/lib/SHERPA-MC;;
>>>>
>>>>
>>>> Using CMake we trigger authors build system and install libraries to
>>>> some temporary working place and then again using cmake move installed
>>>> libraries
>>>> to their final destination (MCGenerators_*) . And as result we have
>>>> these auxiliary scripts with hard-coded paths pointing to temporary
>>>> installation path.
>>>>
>>>> lhapdf example -
>>>> /afs/cern.ch/sw/lcg/external/MCGenerators/lhapdf/5.8.9/x86_64-slc6-gcc46-opt/bin/lhapdf-config
>>>> :
>>>>
>>>> #! /usr/bin/env bash
>>>>
>>>> # These variables need to exist
>>>> prefix=/afs/.cern.ch/sw/lcg/external/MCGenerators/.work/mkirsano/GENSER5_test1/lcgcmake-build/LocalInstallArea/MCGenerators/lhapdf/5.8.9/x86_64-slc6-gcc46-opt
>>>>
>>>> exec_prefix=${prefix}
>>>> datarootdir=${prefix}/share
>>>>
>>>>
>>>>
>>>> As far as I remember these scripts are used by some users(as we were
>>>> requested to fix them several times) and at least by powheg-box
>>>> generator.
>>>>
>>>> Of course we can substitute the hard-coded paths by some cmake script
>>>> but I am not sure that it is elegant solution.
>>>>
>>>> It would be nice to hear your opinion.
>>>>
>>>> Thank you,
>>>>         Dmitri
>>>>
>>>>
>>>>
>>>>
>>>> (*)
>>>> lhapdf:
>>>> /afs/cern.ch/sw/lcg/external/MCGenerators/lhapdf/5.8.9/x86_64-slc6-gcc46-opt/bin/lhapdf-config
>>>>
>>>> agile:
>>>> /afs/cern.ch/sw/lcg/external/MCGenerators/agile/1.4.0/x86_64-slc5-gcc43-opt/bin/agile-config
>>>>
>>>> rivet:
>>>> /afs/cern.ch/sw/lcg/external/MCGenerators/rivet/1.8.1/x86_64-slc5-gcc43-opt/bin/rivet-config
>>>>
>>>> /afs/cern.ch/sw/lcg/external/MCGenerators/rivet/1.8.1/x86_64-slc5-gcc43-opt/rivetenv.sh
>>>>
>>>> sherpa:
>>>> /afs/.cern.ch/sw/lcg/external/MCGenerators/sherpa/1.4.1/x86_64-slc5-gcc43-opt/bin
>>>>
>>>
>>
>> -- 
>> Dr Andy Buckley, Royal Society University Research Fellow
>> Particle Physics Expt Group, University of Edinburgh
>>
>> The University of Edinburgh is a charitable body, registered in
>> Scotland, with registration number SC005336.
>>
>
>
> -------------------------------------------------------------
> Pere Mato  CERN, PH Department, CH 1211 Geneva 23, Switzerland
>            e-mail: pere.mato at cern.ch      tel: +41 22 76 78696
>            fax:  +41 22 76 68792            gsm: +41 76 48 70855
>
>



More information about the Rivet mailing list