Re: [ROOT] running root in batch

From: Edward Moyse (edward.moyse@cern.ch)
Date: Thu Jul 03 2003 - 13:16:44 MEST


Hi Rene,

Just thought I'd point out that I was following the ROOT instructions when I 
set LD_LIBRARY_PATH and PATH wrong. For example,
/afs/cern.ch/sw/root/v3.05.05/rh73_gcc296/root/README/README
says:

Add ROOTSYS/bin to your PATH:
   export PATH=$PATH:$ROOTSYS/bin        (in bash or ksh)

....

On Solaris, Linux, SGI, Alpha/OSF do:
   export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib


They should be added to the front of the path I guess - at least that now 
works for me.

Ed

> > It looks like a LD_LIBRARY_PATH problem. In particular, the way
> > you define LD_LIBRARY_PATH is very dangerous. If your current path
> > includes a different ROOT version/compiler, you may end-up in this kind
> > of problems. Please check your environment.
> >
> > Rene Brun
> >
> > On
> > Mon,
> > 30
> >
> > Jun 2003, Edward Moyse wrote:
> > > Hi,
> > >
> > > I'm trying to run ROOT in batch, but I get the following error:
> > > /afs/cern.ch/sw/root/v3.05.05/rh73_gcc296/root/bin/root.exe: relocation
> > > error: /
> > > afs/cern.ch/sw/root/v3.05.05/rh73_gcc296/root/lib/libCore.so: undefined
> > > symbol:
> > > __dynamic_cast_2
> > >
> > > Does anyone know why?
> > >
> > > I've enclosed the script below, and it was submitted using
> > >
> > > bsub -q8nm batchElectrons.sh
> > >
> > > Needless to say it works fine when run locally (or I wouldn't be so
> > > confused).
> > >
> > > Cheers,
> > >
> > > Ed
> > > -------------------------- batchElectrons.sh
> > >
> > > #!/bin/zsh
> > >
> > > cat /etc/redhat-release
> > >
> > > export ROOTSYS=/afs/cern.ch/sw/root/v3.05.05/rh73_gcc296/root
> > > export PATH=$PATH:$ROOTSYS/bin
> > > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
> > >
> > >
> > > echo "Copying files"
> > > cp
> > > /afs/cern.ch/user/e/emoyse/public/analysis/Trigger/TrigAnalysis/TrigNtE
> > >ga mma/ TrigNtEgamma-00-00-10/Root/Analysis* ./
> > > cp
> > > /afs/cern.ch/user/e/emoyse/public/analysis/Trigger/TrigAnalysis/TrigNtE
> > >ga mma/ TrigNtEgamma-00-00-10/Root/*.C ./
> > >
> > >
> > >
> > > echo directory
> > > pwd
> > > ls
> > >
> > > echo "starting ROOT"
> > > root -b batchElectrons.C
> > >
> > > ls
> > >
> > > echo "copying outputted file"
> > > cp *.root /afs/cern.ch/user/e/emoyse/scratch0
> > >
> > >
> > > --------------- batchElectrons.C
> > > {
> > > gROOT->LoadMacro("Analysis.C");
> > > Analysis* s = new Analysis;
> > > s->Loop();
> > > }



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET