Re: [Fwd: Re: [Fwd: ROOT& CASTOR2]]

From: ganis <gerardo.ganis_at_cern.ch>
Date: Thu, 21 Jan 2010 11:14:39 +0100

    Dear Francesca,

    The compilation problem that you posted in your first mail is probably due the version of castor under /usr/lib

    being too old.
    You can you give a try using exactly what was used to build the ROOT plug-in by replacing

          /usr/local/include/shift --> /afs/cern.ch/sw/lcg/external/castor/2.1.1-9/slc4_ia32_gcc34/usr/include/shift

    and

         /usr/local/lib -->
/afs/cern.ch/sw/lcg/external/castor/2.1.1-9/slc4_ia32_gcc34/usr/lib

   in your original makefile.
   Please try this and let us know.

   Gerri Ganis

francesca.belloni_at_ts.infn.it wrote:
> Dear Ganis,
> thank you for your answer.
>
> I was given one routine by one guy 2 years ago, which worked remotely
> (bsub) calling other routines. He had given me also a Makefile to link
> everything together.
>
> All these routines opend some files stored on CASTOR, filled histograms
> and saved them in ROOT files again in CASTOR.
>
> Everything worked up to May 2009. I didn't use that from May up to now.
> The original Makefile was:
>
>
> ---------------
> CC=g++
> CFLAGS=-Wall -m32 -O2
> INCLUDE=-I/usr/local/include/shift
> ROOTFLAGS=-lRFIO -O -fPIC -lSpectrum -lRCastor
> VARIAFLAGS=-L/usr/local/lib -lshift -lnsl -lcrypt -ldl -lm
> -L/afs/cern.ch/user/n/ntofuser/public/last_soft -lCASTOR2LIB
> all: analisi.bckg.Am.exe
>
> analisi.bckg.Am.exe: analisi.bckg.Am.c
> $(CC) $(CFLAGS) analisi.bckg.Am.c $(INCLUDE) $(VARIAFLAGS)
> `root-config --cflags --glibs` $(ROOTFLAGS) -o analisi.bckg.Am.exe
> @echo '**********************************'
> @echo '*** analisi.bckg.Am.exe produced ***'
> @echo '**********************************'
>
>
> clean:
>
> rm analisi.bckg.Am.exe
>
>
> -------------------------
>
> Where lCASTOR2LIB are libraries specifically made by a man for reading
> some data in our group.
> But now in /usr/local/include/shift on lxplus there's nothing. Therefore I
> changed /usr/loical/include/shift with /usr/lib
>
> I tried as you suggested
>
>
>> $ source
>> /afs/cern.ch/sw/lcg/external/root/5.17.04/slc4_ia32_gcc34/root/bin/thisroot.sh
>> $ export
>> LD_LIBRARY_PATH=/afs/cern.ch/sw/lcg/external/castor/2.1.1-9/slc4_ia32_gcc34/usr/lib:$LD_LIBRARY_PATH
>>
>
> and cutting -lRCastor in the line
> ROOTFLAGS=-lRFIO -O -fPIC -lSpectrum -lRCastor
>
> In this case after digiting make I obtain no error anymore, but when
> launching the routines another error shows up
> Opening CASTOR file
> /castor/cern.ch/ntof/2004/fission/stream0/run8203_0.idx.finished in
> directory 2004/fission. Wait for S TAGER_GET of file.
> System command is stager_get -S default -M
> /castor/cern.ch/ntof/2004/fission/stream0/run8203_0.idx.finished -U
> run8203_0.i dx.finished
> **** : trace level set to 3
> stager: stage_prepareToGet Usertag=run8203_0.idx.finished
> stager: Looking up RH host - Using castorpublic
> stager: Looking up RH port - Using 9002
> stager: Looking up service class - Using default
> stager: stage_prepareToGet
> file=/castor/cern.ch/ntof/2004/fission/stream0/run8203_0.idx.finished
> proto=rfio
> stager: Setting euid: 31180
> stager: Setting egid: 2348
> stager: Localhost is: lxplus221.cern.ch
> stager: Creating socket for castor callback - Using port 35702
> stager: Jan 21 09:39:50 (1264063190) Sending request
> stager: 4b5812d6-0000-1000-a4b4-fd2ecac88a7b SND 0.02 s to send the
> request
> stager: Waiting for callback from castor
> stager: 4b5812d6-0000-1000-a4b4-fd2ecac88a7b CBK 0.08 s before
> callback from 137.138.137.78 was received
> Received 1 responses
> /castor/cern.ch/ntof/2004/fission/stream0/run8203_0.idx.finished
> SUBREQUEST_READY
> **** : trace level set to 3
> rfio:
> rfio_open_ext(/castor/cern.ch/ntof/2004/fission/stream0/run8203_0.idx.finished,
> 0, -1613296, 0, 0, 0, , )
> rfio: rfioTURLFromString does not recognize TURL
> rfio: rfio_parseln() check
> /castor/cern.ch/ntof/2004/fission/stream0/run8203_0.idx.finished
> against castor root /casto r
> rfio: rfio_parseln() call
> Cns_selectsrvr(/castor/cern.ch/ntof/2004/fission/stream0/run8203_0.idx.finished,0x91196b0,0x
> 911a128,0xffe7520c)
> rfio: rfio_parseln() Cns_selectsrvr() returns host=cnsntof.cern.ch,
> path=/castor/cern.ch/ntof/2004/fission/stream0/run 8203_0.idx.finished
> rfio: rfio_open:
> /castor/cern.ch/ntof/2004/fission/stream0/run8203_0.idx.finished is an
> HSM path
> rfio: Calling stage_open with:
> /castor/cern.ch/ntof/2004/fission/stream0/run8203_0.idx.finished 0
> ffe76210
> **** : trace level set to 3
> stager: stage_get Usertag=NULL Protocol=rfio
> File=/castor/cern.ch/ntof/2004/fission/stream0/run8203_0.idx.finished
> stager: Opt SVCCLASS=default
> stager: Setting euid: 31180
> stager: Setting egid: 2348
> stager: Creating socket for stager callback
> stager: Will wait for stager callback on port 35159
> stager: Jan 21 09:39:50 (1264063190) Sending request
> stager: Waiting for acknowledgement
> rfio: rfio_stglog: stage_get: Server Error 22 :
> Unable to read Request object from socket.
> No factory found for object type 3 and representation type 1
> Error opening input file
> /castor/cern.ch/ntof/2004/fission/stream0/run8203_0.idx.finished
> RFIO ERROR is BAD ERROR NUMBER: 0
> rfio: rfio_serror: errno=0, serrno=22, rfio_errno=0
>
>
> If I want to link with the shift libraries, what should I write, please?
>
> Thank you,
> best regards,
> Francesca Belloni
>
>
>
>
>> Dear Francesca,
>>
>> Could you explain exactly how you want to use CASTOR into a ROOT
>> application?
>> If you want to open files via TFile::Open("castor:/castor/...") or
>> TFile::Open("rfio:/castor/..."),
>> which is the advised way, you do not need to link with the shift
>> libraries but just to
>> make sure that those libraries are in the LD_LIBRARY_PATH when you
>> run:
>>
>> $ source
>> /afs/cern.ch/sw/lcg/external/root/5.17.04/slc4_ia32_gcc34/root/bin/thisroot.sh
>> $ export
>> LD_LIBRARY_PATH=/afs/cern.ch/sw/lcg/external/castor/2.1.1-9/slc4_ia32_gcc34/usr/lib:$LD_LIBRARY_PATH
>>
>>
>> Gerri Ganis
>>
>>
>> francesca.belloni_at_ts.infn.it wrote:
>>
>>> Hi.
>>> I'm trying to use ROOT with CASTOR2, but when I when compiling one
>>> routine, the following error message appears:
>>>
>>>
>>> -------
>>> /afs/cern.ch/sw/lcg/external/root/5.17.04/slc4_ia32_gcc34/root/lib/libRCastor.so:
>>> undefined reference to `rfio_HsmIf_reqtoput'
>>> collect2: ld returned 1 exit status
>>> -------
>>>
>>>
>>> The Makefile starts with
>>>
>>> CC=g++
>>> CFLAGS=-Wall -m32 -O2
>>> INCLUDE=-I/usr/lib
>>> ROOTFLAGS=-lRFIO -O -fPIC -lRCastor
>>> VARIAFLAGS=-L/usr/lib -lshift -lnsl -lcrypt -ldl -lm
>>>
>>>
>>> The gcc version is gcc (GCC) 3.4.6
>>>
>>> What is wrong, please?
>>>
>>> Thanks,
>>> best regards,
>>> Francesca Belloni
>>>
>>>
>>>
>>>
>> --
>> +--------------------------------------------------------------------------+
>> Gerardo GANIS CERN, PH Dept, SFT group, CH 1211 Geneve 23
>> room: 32-RC-017, tel: +41 22 7676439
>> email: gerardo.ganis_at_cern.ch, fax: +41 22 7669133
>> +--------------------------------------------------------------------------+
>>
>>
>>
>>
>
>
>
>

-- 
+--------------------------------------------------------------------------+
  Gerardo GANIS    CERN, PH Dept, SFT group, CH 1211 Geneve 23  
                   room: 32-RC-017, tel: +41 22 7676439
                   email: gerardo.ganis_at_cern.ch, fax: +41 22 7669133
+--------------------------------------------------------------------------+
Received on Thu Jan 21 2010 - 11:31:02 CET

This archive was generated by hypermail 2.2.0 : Thu Jan 21 2010 - 17:50:01 CET