GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Stt external library glpk
Stt external library glpk [message #10098] Thu, 04 February 2010 11:40 Go to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *cb.uni-bonn.de
Hi,

Running on my Mac I noticed in pandaroot/stt/CMakeLists.txt:72 that libglpk.so is loaded. However the Mac compiles this external package into libglpk.dylib causing stt to not compile.
Is there an approach in cmake to load either library type?

Regards, Ralf.
Re: Stt external library glpk [message #10099 is a reply to message #10098] Thu, 04 February 2010 11:41 Go to previous messageGo to next message
Radoslaw Karabowicz is currently offline  Radoslaw Karabowicz
Messages: 108
Registered: June 2004
Location: GSI
continuous participant
From: *gsi.de
I had the same problem.
Make symbolic link to .dylib with a name of .so.
I also had later to add the glpk dir name to $DYLD_LIBRARY_PATH.

Hope this helps.

yours,
radek
Re: Stt external library glpk [message #10125 is a reply to message #10098] Sun, 07 February 2010 21:25 Go to previous messageGo to next message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: *xs4all.nl
Hi,

Mohammad has modified the installation scripts of the external packages now, which makes the link to an .so file to keep the MAC compatibility. You can fetch the new SVN revision 7719 with the update.

Another addition related to the glpk libraries: the corresponding (.so and .a) files in the external packages are now copied to the directory ${SIMPATH}/basics/glpk/lib/. On my machine, this was needed, otherwise running the macros didnt succeed since it couldnt find the libs. However, in the CMakelist in the "stt" directory, the GLPK_LIB_DIR is still set to ${SIMPATH}/basics/glpk/src/.libs. I would like to change this asap to ${SIMPATH}/basics/glpk/lib in stead to be uniform with the rest of the links to external libraries. This would require that everyone updates his external package and rerun the installation of the "glpk" stuff: svn up, remove the glpk directories in basics, and rerun "configure.sh". Let me know if anyone has major objection against this "small" change.

Johan.
Re: Stt external library glpk [message #10126 is a reply to message #10125] Mon, 08 February 2010 11:13 Go to previous messageGo to next message
Gianluigi Boca is currently offline  Gianluigi Boca
Messages: 177
Registered: March 2004
first-grade participant
From: *gsi.de
Johan Messchendorp wrote on Sun, 07 February 2010 21:25

Hi,
Another addition related to the glpk libraries: the corresponding (.so and .a) files in the external packages are now copied to the directory ${SIMPATH}/basics/glpk/lib/. On my machine, this was needed, otherwise running the macros didnt succeed since it couldnt find the libs. However, in the CMakelist in the "stt" directory, the GLPK_LIB_DIR is still set to ${SIMPATH}/basics/glpk/src/.libs. I would like to change this asap to ${SIMPATH}/basics/glpk/lib in stead to be uniform with the rest of the links to external libraries. This would require that everyone updates his external package and rerun the installation of the "glpk" stuff: svn up, remove the glpk directories in basics, and rerun "configure.sh". Let me know if anyone has major objection against this "small" change.

Johan.



I agree with this change.
The reason for having the .libs directory was only 'historical' (that is the way the directories are arranged in the original web site from where I downloaded the libraries).
Gianluigi
Re: Stt external library glpk [message #10142 is a reply to message #10125] Mon, 08 February 2010 18:32 Go to previous messageGo to next message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: *xs4all.nl
Dear all,

The change in the CMakeList has been made in rev 7740. So if you encounter problems, update the external packages, remove the directory glpk (in basics), and rerun the configure.sh....

Johan
Re: Stt external library glpk [message #10146 is a reply to message #10142] Tue, 09 February 2010 09:40 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Hi,
I have updated the external packages and so on, but now, when loading all the pandaroot libraries, I have the following error:

- RTDB container factory FairBaseContFact
- RTDB container factory PndFieldContFact
- RTDB container factory PndPassiveContFact

PSaid instance created...  access via gSaid->f()

- RTDB container factory PndEmcContFact
- RTDB container factory PndTpcContFact
dlopen error: libglpk.so.0: cannot open shared object file: No such file or directory
Load Error: Failed to load Dynamic link library /home/spataro/jan10/cbuild/lib/libStt.so
(int)(-1)


library which of course is inside basics/glpk-4.39/lib

What should I do now?


And another question: do we really need to use glpk inside our code? I suppose root classes are doing the same job, or maybe there is another reason?
Re: Stt external library glpk [message #10147 is a reply to message #10146] Tue, 09 February 2010 10:01 Go to previous messageGo to next message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: *xs4all.nl
Hi,

Looks like there is still a link missing in the external packages, I have noticed this on the Dashboard as well. Mohammad, could you add the appropriate links. Probably, it makes sense just to copy all the libs in "src/.libs" to "/lib", not to miss anything for whatever system. For the moment, I changed the stt CMakeList to the old version again, to avoid the problems.

Concerning your second question, about whether to use glpk at all.... I agree with you that if the same functionalities can be found in root or other previously existing external packages, one should take that to minimize the dependencies. Maybe, Gianluigi can comment on this.

Greetings,

Johan

[Updated on: Tue, 09 February 2010 12:37]

Report message to a moderator

Re: Stt external library glpk [message #10151 is a reply to message #10147] Tue, 09 February 2010 10:55 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
It seems the problem stays in the missing file libglpk.so.0.
It is not clear to me why the code is searching exactly for libglpk.so.0, while libglpk.so and libglpk.a are existing and at the proper place.

However,
in my pc I have fixed it in the following way:

cd jan10/basics/glpk/lib
ln -s libglpk.so libglpk.so.0


I suppose another should be the official fix.
Re: Stt external library glpk [message #10155 is a reply to message #10146] Tue, 09 February 2010 13:33 Go to previous messageGo to next message
Gianluigi Boca is currently offline  Gianluigi Boca
Messages: 177
Registered: March 2004
first-grade participant
From: *gsi.de
Stefano Spataro wrote on Tue, 09 February 2010 09:40


And another question: do we really need to use glpk inside our code? I suppose root classes are doing the same job, or maybe there is another reason?


Hi,
yes there are a couple of essential reason.

As far as I know there is no equivalent to GLPK in root.

GLPK is a pakage for performing minimizations of some function that is linear in the parameters to fit AND ALSO in the case when some of the parameters are INTEGER variables.

This branch of the minimization programming is called Mixed Integer Linear Programming (MILP) as I explained in many presentations on the STT pattern recognition.

So GLPK is a package for doing MILP.

The main reason why I chose it is that it is superfast compared to Minuit, so I can use it in the pattern recognition.

Also MILP has the nice feature that, thanks to the use of some integer variable, enables to :
a) resolve the left-right ambiguity typical of the straw tubes;
b) eliminate those hits which are clearly noise, authomatically already in the fit.

Without GLPK the STT real pattern recognition doesn't work.

Cheers Gianluigi
Re: Stt external library glpk [message #10157 is a reply to message #10098] Tue, 09 February 2010 14:46 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: *gsi.de
Hi,

So, finally the glpk is done properly! it is in SVN please remove glpk and glpk-4.39 in your $SIMPATH/basic dirctory, make an svn update (release jan10) and run the configue.sh script again, it will only install glpk.

regards

Mohammad
Re: Stt external library glpk [message #10158 is a reply to message #10157] Tue, 09 February 2010 16:51 Go to previous message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Done,
but now the src folder has disappeared:

Scanning dependencies of target Stt
[ 23%] Building CXX object stt/CMakeFiles/Stt.dir/PndSttTrackFinderReal.o
[ 23%] Building CXX object stt/CMakeFiles/Stt.dir/PndSttDict.o
make[2]: *** No rule to make target `/home/spataro/jan10/basics/glpk/src/.libs/libglpk.so', needed by `lib/libStt.so.0.0.0'.  Stop.
make[1]: *** [stt/CMakeFiles/Stt.dir/all] Error 2
make: *** [all] Error 2


There was the CMakeList wrong. I have fixed it.

[Updated on: Tue, 09 February 2010 16:58]

Report message to a moderator

Previous Topic: to use the real STT Pattern Recognition
Next Topic: pandaroot feb10 release
Goto Forum:
  


Current Time: Sun Nov 24 09:08:45 CET 2024

Total time taken to generate the page: 0.00624 seconds