GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Fairroot » General Discussion » My updated fairtools library not loading
My updated fairtools library not loading [message #13651] Sat, 23 June 2012 02:13 Go to next message
Raghav Kunnawalkam is currently offline  Raghav Kunnawalkam
Messages: 63
Registered: February 2012
Location: Stony Brook, New York
continuous participant
From: *dyn.optonline.net
Hi All

I successfully added to my fairtools directory all the classes that are needed for me to do reconstruction on the data produced by fairroot.

I built cmake and created that library. Now i followed the example given in panda for doing reconstruction and my created library libFairTools.so has some problems.

this is the output:

Processing eic_reco.C...
dlopen error: dlopen(/Users/raghav/fairroot/build/lib/libFairTools.so, 9): Symbol not found: __ZN10FairParSet4initEv
Referenced from: /Users/raghav/fairroot/build/lib/libFairTools.so
Expected in: flat namespace
in /Users/raghav/fairroot/build/lib/libFairTools.so
Load Error: Failed to load Dynamic link library /Users/raghav/fairroot/build/lib/libFairTools.so
(int)(-1)


I have attached the cmake file that used to create that particular library.

I remember sometime back that when i had a similar problem with libraries, i tried rearranging the order of loading them into my program and it worked, but i would like to know what does that error actually means?

I bascially took all the classes from pndtools and a few others like rho (which i am not sure what it means) and modified them to my liking and pasted them into the fairtools folder.

As always, i would really appreciate any help.

Cheers
Raghav

[Updated on: Sat, 23 June 2012 02:20]

Report message to a moderator

Re: My updated fairtools library not loading [message #13652 is a reply to message #13651] Sat, 23 June 2012 09:03 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *11-79-r.retail.telecomitalia.it
Probably in your rootlogon the order of libraries is not correct. Try to put fairtools as last line, I suppose now if stays before parbase.
Re: My updated fairtools library not loading [message #13654 is a reply to message #13652] Sat, 23 June 2012 16:54 Go to previous messageGo to next message
Raghav Kunnawalkam is currently offline  Raghav Kunnawalkam
Messages: 63
Registered: February 2012
Location: Stony Brook, New York
continuous participant
From: *dyn.optonline.net
Hi Stefano

Thanks for your quick reply. I have given here different orders of loading libraries and their corresponding error messages.
1)
gSystem->Load("libFairDB");
gSystem->Load("libGeoBase");
gSystem->Load("libProof");
gSystem->Load("libProofPlayer");
gSystem->Load("libParBase");
gSystem->Load("libBase");
gSystem->Load("libGen");
gSystem->Load("libfield");
gSystem->Load("libMCStack");
gSystem->Load("libFairTools");

Processing eic_reco.C...
dyld: lazy symbol binding failed: Symbol not found: __ZN10FairLogger9GetLoggerEv
Referenced from: /Users/raghav/fairroot/build/lib/libParBase.so
Expected in: flat namespace

dyld: Symbol not found: __ZN10FairLogger9GetLoggerEv
Referenced from: /Users/raghav/fairroot/build/lib/libParBase.so
Expected in: flat namespace

2)
gSystem->Load("libFairDB");
gSystem->Load("libGeoBase");
gSystem->Load("libProof");
gSystem->Load("libProofPlayer");
gSystem->Load("libParBase");
gSystem->Load("libFairTools");
gSystem->Load("libBase");
gSystem->Load("libGen");
gSystem->Load("libfield");
gSystem->Load("libMCStack");

Processing eic_reco.C...
dlopen error: dlopen(/Users/raghav/fairroot/build/lib/libFairTools.so, 9): Symbol not found: __ZN10VAbsFitter6FitAllEv
Referenced from: /Users/raghav/fairroot/build/lib/libFairTools.so
Expected in: flat namespace
in /Users/raghav/fairroot/build/lib/libFairTools.so
Load Error: Failed to load Dynamic link library /Users/raghav/fairroot/build/lib/libFairTools.so
(int)(-1)
root [1]

3) gSystem->Load("libFairDB");
gSystem->Load("libGeoBase");
gSystem->Load("libProof");
gSystem->Load("libProofPlayer");
gSystem->Load("libBase");
gSystem->Load("libMCStack");
gSystem->Load("libGen");
gSystem->Load("libfield");
gSystem->Load("libParBase");
gSystem->Load("libFairTools");

Processing eic_reco.C...
dlopen error: dlopen(/Users/raghav/fairroot/build/lib/libBase.so, 9): Symbol not found: __ZN10FairParSet4initEv
Referenced from: /Users/raghav/fairroot/build/lib/libBase.so
Expected in: flat namespace
in /Users/raghav/fairroot/build/lib/libBase.so
Load Error: Failed to load Dynamic link library /Users/raghav/fairroot/build/lib/libBase.so
(int)(-1)
root [1]

4) gSystem->Load("libFairDB");
gSystem->Load("libGeoBase");
gSystem->Load("libProof");
gSystem->Load("libProofPlayer");
gSystem->Load("libParBase");
gSystem->Load("libfield");
gSystem->Load("libGen");
gSystem->Load("libBase");
gSystem->Load("libMCStack");
gSystem->Load("libFairTools");

Processing eic_reco.C...
dlopen error: dlopen(/Users/raghav/fairroot/build/lib/libfield.so, 9): Symbol not found: __ZN9FairField13GetFieldValueEPKdPd
Referenced from: /Users/raghav/fairroot/build/lib/libfield.so
Expected in: flat namespace
in /Users/raghav/fairroot/build/lib/libfield.so
Load Error: Failed to load Dynamic link library /Users/raghav/fairroot/build/lib/libfield.so
(int)(-1)
root [1]

I am still trying possible combinations and not getting anything to work, so i am attaching that particular library (i dont know how helpful that is), and my macro.

Can you please tell me if there is anything else that i should try and what is causing these types of problems. Is there dependency of these libraries in the order that i create them or there is something to do with the list of directories that are included in the cmake file.

Once again thanks a lot

Cheers
Raghav
Re: My updated fairtools library not loading [message #13655 is a reply to message #13654] Sat, 23 June 2012 18:36 Go to previous messageGo to next message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *dip.t-dialin.net
Hi Raghav,

could it be possible that you miss-used the existing FairTool library for your analysis stuff? if this is the case this will never work! you have simply a cyclic dependency. FairTools contains only the FairLogger at the moment and it is used by all other base packages.

regards

Mohammad

[Updated on: Sat, 23 June 2012 21:18]

Report message to a moderator

Re: My updated fairtools library not loading [message #13656 is a reply to message #13651] Sun, 24 June 2012 00:36 Go to previous messageGo to next message
Raghav Kunnawalkam is currently offline  Raghav Kunnawalkam
Messages: 63
Registered: February 2012
Location: Stony Brook, New York
continuous participant
From: *dyn.optonline.net
No Message Body

[Updated on: Sun, 24 June 2012 00:37]

Report message to a moderator

Re: My updated fairtools library not loading [message #13657 is a reply to message #13655] Sun, 24 June 2012 00:37 Go to previous messageGo to next message
Raghav Kunnawalkam is currently offline  Raghav Kunnawalkam
Messages: 63
Registered: February 2012
Location: Stony Brook, New York
continuous participant
From: *dyn.optonline.net
Hi Mohammad

I tried deleting that particular library and created it again and tried to run my program with the same result.

I also completely cleared my built directory and built fairroot all over again all the libraries and i still have a similar problem. This time for loading libraries in this order

gSystem->Load("libFairDB");
gSystem->Load("libGeoBase");
gSystem->Load("libProof");
gSystem->Load("libProofPlayer");
gSystem->Load("libParBase");
gSystem->Load("libBase");
gSystem->Load("libfield");
gSystem->Load("libGen");
gSystem->Load("libMCStack");
gSystem->Load("libFairTools");

Processing eic_reco.C...
dyld: lazy symbol binding failed: Symbol not found: __ZN10FairLogger9GetLoggerEv
Referenced from: /Users/raghav/fairroot/build/lib/libParBase.so
Expected in: flat namespace

dyld: Symbol not found: __ZN10FairLogger9GetLoggerEv
Referenced from: /Users/raghav/fairroot/build/lib/libParBase.so
Expected in: flat namespace

Initially fairtools had only fairlogger and that is in the error message that i am getting.
now fairtools has a lot more as you can see in the cmake file that i attached in my previous post. I still dont know the exact reason thats causing these kinds of problems.

as always, i deeply appreciate all your help

Cheers
Raghav
Re: My updated fairtools library not loading [message #13658 is a reply to message #13657] Sun, 24 June 2012 07:32 Go to previous messageGo to next message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *dip.t-dialin.net
HI Raghav,

you cannot use FairTools library to add your stuff! even if it has originally only one file, this was done because this file is used everywhere, and the library holding this file has to be loaded before anything else. Adding anything here which depends on any other package of Fairroot will not work!

So why not to create your own library, EICTools or whatever you like? copy the whole stuff you put in fairtools to a "eictools" directory, modify the CMakelist.txt by replacing FairTools with EicTools (also remove the FairLogger from your EicTools directory). In the FairTools directory, either you get it again from the SVN or call "svn revert" there to go back to the original status.

regards,

Mohammad

Re: My updated fairtools library not loading [message #13659 is a reply to message #13657] Sun, 24 June 2012 09:25 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *pools.arcor-ip.net
Hi Rhagav,

since many libraries depend on libFairTools this library has to be loaded first. Please change the loading order of the library.

Ciao

Florian
Re: My updated fairtools library not loading [message #13660 is a reply to message #13658] Mon, 25 June 2012 19:59 Go to previous messageGo to next message
Raghav Kunnawalkam is currently offline  Raghav Kunnawalkam
Messages: 63
Registered: February 2012
Location: Stony Brook, New York
continuous participant
From: *dyn.optonline.net
Hi Mohammad and Florian

Thanks guys for pointing out the necessary changes.

I did create a new library called libEicTools and put in it all the necessary things which i thought were needed to run reconstruction from pandaroot/PndTools/generaltools and analysistools.

Now i am having no problems regarding fairtools or other of my old libraries (i had to change a few things in fairmcstack regarding my new detectors).

So now when i try to run my sample reconstruction program including libEicTools, it tells me

Processing eic_reco.C...
dlopen error: dlopen(/Users/raghav/fairroot/build/lib/libEicTools.so, 9): Symbol not found: __ZN10VAbsFitter6FitAllEv
Referenced from: /Users/raghav/fairroot/build/lib/libEicTools.so
Expected in: flat namespace
in /Users/raghav/fairroot/build/lib/libEicTools.so
Load Error: Failed to load Dynamic link library /Users/raghav/fairroot/build/lib/libEicTools.so
(int)(-1)
root [1]

I thought that this had something to do with the things in fitter directory which is present in EicTools/Fitter, (in panda it is in PndTools/AnalysisTools/Fitter), so i removed them and tried to create the library but i found out that i needed them.

So now i am pretty much stuck regarding this issue. but as far as i see doing a reconstruction is pretty simple right? I just followed the example from panda

FairFileNameCreator creator(MCFile.Data());
TString DigiFile = creator.GetDigiFileName(false).c_str();
TString outFile = creator.GetRecoFileName(false).c_str();

std::cout << "MCFile : " << MCFile.Data()<< std::endl;
std::cout << "DigiFile: " << DigiFile.Data()<< std::endl;
std::cout << "RecoFile: " << outFile.Data()<< std::endl;

// ----- Timer ------------------------------------------------------
TStopwatch timer;
timer.Start();
// ------------------------------------------------------------------------
// ----- Reconstruction run -------------------------------------------
FairRunAna *fRun= new FairRunAna();
fRun->SetInputFile(MCFile);
fRun->AddFriend(DigiFile);
fRun->SetOutputFile(outFile);
// ------------------------------------------------------------------------
// ----- Parameter database --------------------------------------------
FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
FairParRootFileIo* parInput1 = new FairParRootFileIo(kTRUE);
parInput1->open(parFile.Data(),"UPDATE");
rtdb->setFirstInput(parInput1);

rtdb->setOutput(parInput1);
rtdb->print();

fRun->Init();

fRun->Run(0,nEvents);

This is basically what i have in my reco file. Please tell me if i need to add or remove anything from it. (i did specify all the required things like file name etc..)

As always, your help is much appreciated.
Cheers
Raghav
Re: My updated fairtools library not loading [message #13661 is a reply to message #13660] Tue, 26 June 2012 17:52 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: 8.28.178*
I think you have to add the rho package before your tool library call.
Re: My updated fairtools library not loading [message #13662 is a reply to message #13661] Tue, 26 June 2012 18:16 Go to previous messageGo to next message
Raghav Kunnawalkam is currently offline  Raghav Kunnawalkam
Messages: 63
Registered: February 2012
Location: Stony Brook, New York
continuous participant
From: *physics.sunysb.edu
Hi Stefano

Thanks for that, i was creating it but not actually calling it. After that it still gave me some problems regarding another fairtrack symbol but that went away after i loaded my fairtrkbase library. I think that i am getting the hang of this library loading business now.

So now the programs runs past the libraries stage and it is getting stuck when it tries to create a digi file.

Processing eic_reco.C...
MCFile : data/eic_tau_p_without_selection.mc.root
DigiFile: data/eic_tau_p_without_selection_mc_digi.root
RecoFile: data/eic_tau_p_without_selection_mc_reco.root
FairRootManager::OpenOutFile("data/eic_tau_p_without_selection_mc_reco.root ")
------------------------------------------------------------------------ --------
-------------- actual containers in runtime database -------------------------
-------------- runs, versions ------------------------------------------------
run id
container 1st-inp 2nd-inp output
-------------- input/output --------------------------------------------------
first Input:
OBJ: FairParRootFile data/params_tau_p_without_selection.mc.root : 0 at: 0x7f847973ca60
Root file I/O data/params_tau_p_without_selection.mc.root is open
detector I/Os: FairGenericParIo
second input: none
output:
OBJ: FairParRootFile data/params_tau_p_without_selection.mc.root : 0 at: 0x7f847973ca60
Root file I/O data/params_tau_p_without_selection.mc.root is open
detector I/Os: FairGenericParIo
Error in <TFile::TFile>: file data/eic_tau_p_without_selection_mc_digi.root does not exist
[FATAL ] [26.06.2012 12:11:01] [FairRootManager.cxx::AddFriendsToChain:1754] Error opening the file InputChain which should be added to the input chain or as friend chain
[FATAL ] We stop the execution of the process at this point.
[FATAL ] For later analysis we write a core dump to core_dump_91051

this is what is happening right now and i will keep working on it and update you guys if i find something. I also attached the reco macro (which is basically the one in pandaroot)

Cheers
Raghav
  • Attachment: eic_reco.C
    (Size: 4.25KB, Downloaded 241 times)

[Updated on: Tue, 26 June 2012 18:16]

Report message to a moderator

Re: My updated fairtools library not loading [message #13663 is a reply to message #13662] Tue, 26 June 2012 18:29 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: 8.28.178*
Is the digi file existing in your folder? Are you able to open it?
Re: My updated fairtools library not loading [message #13664 is a reply to message #13663] Tue, 26 June 2012 18:56 Go to previous messageGo to next message
Raghav Kunnawalkam is currently offline  Raghav Kunnawalkam
Messages: 63
Registered: February 2012
Location: Stony Brook, New York
continuous participant
From: *physics.sunysb.edu
Hi Stefano

the digi file is not created. that is the actual problem. Even though it says that
Processing eic_reco.C...
MCFile : data/eic_tau_p_without_selection.mc.root
DigiFile: data/eic_tau_p_without_selection_mc_digi.root
RecoFile: data/eic_tau_p_without_selection_mc_reco.root
FairRootManager::OpenOutFile("data/eic_tau_p_without_selection_mc_reco.root ")

I cannot see the digifile in my data directory. But i do see the reco file.
This is what i dont understand since i dont see any difference between the way i create both the files

Cheers
Raghav


UPDATE: I played around with the reco file in panda (pandaroot/macros/run/reco_complete_stt.C) and it is also giving me the same error.
It also says that it is not able to see the digifile even though it says that it creates it.

[Updated on: Tue, 26 June 2012 19:19]

Report message to a moderator

Re: My updated fairtools library not loading [message #13665 is a reply to message #13663] Wed, 27 June 2012 03:05 Go to previous messageGo to next message
Raghav Kunnawalkam is currently offline  Raghav Kunnawalkam
Messages: 63
Registered: February 2012
Location: Stony Brook, New York
continuous participant
From: *dyn.optonline.net
Hi Stefano and Mohammad

I think that i finally understand what the problem here is. So i need to create a digifile first using a macro and some parameter file and then call the reconstruction run that i am doing now.

Can you guys tell me if there is a prescription or a template on how to create the .par file. I see that it is very important for the digi and reco runs because it contains detector and individual specific cuts which vary from person to person.

Right now when i look at the all.par file (pandaroot/macro/params/all.par) i see a lot of things which make sense right of the bat but a lot more which i really have no idea how to make for my detector.

As always my thanks for this great forum

Cheers
Raghav
Re: My updated fairtools library not loading [message #13666 is a reply to message #13665] Wed, 27 June 2012 09:12 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *gsi.de
Hi Raghav,


Quote:


I think that i finally understand what the problem here is. So i need to create a digifile first using a macro and some parameter file and then call the reconstruction run that i am doing now.



This is correct. The normal sequence

1. Simulation which creates perfect MC Data.
2. Digitization which creates out of the MC data a data format which would be
produced by the real detector. For example out of the position of a MCPoint the
fired detector channel is calculated and written to output.
3. Reconstruction means that you come from your detector data to something like
particles (tracks with particle ID)
4. In the Analysis step you do your physics analysis, whatever this means for you.

Quote:


Can you guys tell me if there is a prescription or a template on how to create the .par file. I see that it is very important for the digi and reco runs because it contains detector and individual specific cuts which vary from person to person.



There is no such prescription because the parameters very much depend on the procedure how you come from MC data to detector data. This you can do in a first step with a simple smearing of the MCPoint, where you probably don't need
parameters from a parameter file. You can simply hard code them. If you then have a
running chain you can identify the parameters in the task and the create a parameter file which contain the needed information. In my opinion you can't copy everything from Panda. You have to think what you need and implement only this stuff. This also helps to understand how the framework works

Quote:


Right now when i look at the all.par file (pandaroot/macro/params/all.par) i see a lot of things which make sense right of the bat but a lot more which i really have no idea how to make for my detector.



As I said. You can't do copy and paste from Panda. You have to define what you need and then you can look how such a thing is implemented in Panda and try to learn from the example. Even if the frameworks makes many things very easy and also reusable this is not true for everything. Best is to start with simple tasks as all the experiments did and then go step by step to a more realistic chain of tasks when this is needed. If you want to go one step further then it is a good idea to look if someone else had a similar problem and how he solved it.

Ciao

Florian




[Updated on: Wed, 27 June 2012 09:12]

Report message to a moderator

Re: My updated fairtools library not loading [message #13668 is a reply to message #13666] Wed, 27 June 2012 14:20 Go to previous message
Raghav Kunnawalkam is currently offline  Raghav Kunnawalkam
Messages: 63
Registered: February 2012
Location: Stony Brook, New York
continuous participant
From: *dyn.optonline.net
Hi Florian

Ahh i see.

So i actually need a set of classes for every detector that i have that does digitization like what panda has. I will try to implement those by today.

Quote:


This you can do in a first step with a simple smearing of the MCPoint, where you probably don't need parameters from a parameter file. You can simply hard code them. If you then have a running chain you can identify the parameters in the task and the create a parameter file which contain the needed information.



I am doubtful on this part where you say that i can hard code some parameter for a simple smear. Is it done somewhere before because i am pretty new to this and i am not sure how to go about doing it.

So right now i will focus on getting the digi file to work and then i will concentrate on getting the right parameters to work with.

Thanks again
Cheers
Raghav
Previous Topic: [SOLVED] about version "1.6.17"-- FairRoot Revision - 15449 Branch
Next Topic: Geant4 not working with mc generation
Goto Forum:
  


Current Time: Tue Nov 26 21:57:26 CET 2024

Total time taken to generate the page: 0.00681 seconds