Hello everyone,
I am having trouble getting lp_solve working with ALPS 2.0.0b3. I have downloaded the alps-2.0.0b3-r4750-src-with-boost.tar.gz as well as the lp_solve_5.1_source.tar.gz files from the ALPS wiki.
Digging through lp_solve_5.1/ I found lpsolve51/ which contains instructions to build the library using $ sh ccc. I get the following output:
$ sh ccc ../commonlib.c: In function blockWriteINT: ../commonlib.c:459: warning: format not a string literal and no format arguments ../commonlib.c: In function blockWriteBOOL: ../commonlib.c:478: warning: format not a string literal and no format arguments ../commonlib.c: In function blockWriteREAL: ../commonlib.c:500: warning: format not a string literal and no format arguments ../lp_report.c: In function blockWriteLREAL: ../lp_report.c:161: warning: format not a string literal and no format arguments ../lp_report.c: In function blockWriteAMAT: ../lp_report.c:190: warning: format not a string literal and no format arguments ../lp_report.c: In function blockWriteBMAT: ../lp_report.c:242: warning: format not a string literal and no format arguments ar: creating liblpsolve51.a a - lp_MDO.o a - commonlib.o a - myblas.o a - fortify.o a - colamd.o a - lp_rlp.o a - lp_crash.o a - lp_etaPFI.o a - lp_Hash.o a - lp_lib.o a - lp_wlp.o a - lp_matrix.o a - lp_mipbb.o a - lp_MPS.o a - lp_presolve.o a - lp_price.o a - lp_pricePSE.o a - lp_report.o a - lp_scale.o a - lp_simplex.o a - lp_SOS.o a - lp_utils.o a - yacc_read.o ../commonlib.c: In function blockWriteINT: ../commonlib.c:459: warning: format not a string literal and no format arguments ../commonlib.c: In function blockWriteBOOL: ../commonlib.c:478: warning: format not a string literal and no format arguments ../commonlib.c: In function blockWriteREAL: ../commonlib.c:500: warning: format not a string literal and no format arguments ../lp_report.c: In function blockWriteLREAL: ../lp_report.c:161: warning: format not a string literal and no format arguments ../lp_report.c: In function blockWriteAMAT: ../lp_report.c:190: warning: format not a string literal and no format arguments ../lp_report.c: In function blockWriteBMAT: ../lp_report.c:242: warning: format not a string literal and no format arguments
I included that output because I don't have a lot of compiling experience and I don't know what those warnings really mean. But it appears the library has compiled to me.
~/lp_solve_5.1/lpsolve51$ ls ccc ccc.osx dll.sln liblpsolve51.so lpsolve.rc ccc.hp-ux cgcc.bat dll.vcproj lib.sln readme.txt cccLUSOL.osx cvc6.bat liblpsolve51.a lib.vcproj resource.h
Now where should this library be put? I've tried many variations of /usr/lib/ and /lib/ but everytime I run cmake I get this output:
$ cmake /home/magnet/alps-2.0.0b3-r4750-src-with-boost/alps/ -- Build type: Release -- Python interpreter /usr/bin/python -- Python interpreter ok : version 2.6.5 -- PYTHON_INCLUDE_DIRS = /usr/include/python2.6 -- PYTHON_NUMPY_INCLUDE_DIR = /usr/lib/python2.6/dist-packages/numpy/core/include -- PYTHON_SITE_PKG = /usr/lib/python2.6/dist-packages -- PYTHON_LIBRARY = /usr/lib/python2.6/config/libpython2.6.so -- PYTHON_EXTRA_LIBS =-lssl -lcrypto -lssl -lcrypto -L/usr/lib -lz -lpthread -ldl -lutil -- PYTHON_LINK_FOR_SHARED = -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -- ALPS version: 2.0.0b3 -- Looking for Boost Source -- Found Boost Source: /home/magnet/alps-2.0.0b3-r4750-src-with-boost/boost -- Boost Version: 1_43_0 -- Could NOT find MPI (missing: MPI_LIBRARY MPI_INCLUDE_PATH) Falling back to CMake provied LAPACK/BLAS detection. -- A library with BLAS API found. -- A library with BLAS API found. -- A library with LAPACK API found. -- SQLite Library: not found -- LPSolve Library: not found -- Could NOT find SZIP (missing: SZIP_LIBRARIES SZIP_INCLUDE_DIRS) -- HDF5 version found is 1.8.4 in /usr/include -- Python interpreter /usr/bin/python -- Python interpreter ok : version 2.6.5 -- PYTHON_INCLUDE_DIRS = /usr/include/python2.6 -- PYTHON_NUMPY_INCLUDE_DIR = /usr/lib/python2.6/dist-packages/numpy/core/include -- PYTHON_SITE_PKG = /usr/lib/python2.6/dist-packages -- PYTHON_LIBRARY = /usr/lib/python2.6/config/libpython2.6.so -- PYTHON_EXTRA_LIBS =-lssl -lcrypto -lssl -lcrypto -L/usr/lib -lz -lpthread -ldl -lutil -- PYTHON_LINK_FOR_SHARED = -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -- Numpy include in /usr/lib/python2.6/dist-packages/numpy/core/include -- Adding Boost dir: /home/magnet/alps-2.0.0b3-r4750-src-with-boost/boost -- HDF5 version found is 1.8.4 in /usr/include -- dirloop_sse will not be built since the lp_solve library has not found -- Configuring done -- Generating done -- Build files have been written to: /home/magnet/alps-2.0.0b3-r4750-src-with-boost/alps
The line that got my attention at first was "-- dirloop_sse will not be built since the lp_solve library has not found," since I need dirloop_sse built. I then noticed, "-- LPSolve Library: not found".
Am I putting the library in the right place? I know if I use sudo-apt get install lp-solve it installs liblpsolve55.so to /usr/lib/lp_solve/liblpsolve55.so, and I've tried putting liblpsolve51.so there after removing 5.5 of course, but it doesn't work.
Any thoughts on where I am going wrong would help, I have to be missing something here.
Thanks in advance, -Brian Koopman
PS - I forgot to mention, this is on an old Dell OptiPlex with a Pentium III running Ubuntu 10.04.
Hi Brian
The easiest is to use the "ccmake" command in your build directory, tap the "t" key to switch to advanced view, and then scroll down until you find the following variables and set them:
LPSolve_FOUND ON LPSolve_INCLUDE_DIR /home/magnet/... (path to the header files) LPSolve_LIBRARIES /home/magnet/lp_solve_5.1/lpsolve5/liblpsolve51.a
Then tap the "c" and "g" keys to configure and generate the makefiles. Don't forget to set LPSolve_FOUND to ON.
Matthias
On 20 Jul 2010, at 10:36, Brian Koopman wrote:
Hello everyone,
I am having trouble getting lp_solve working with ALPS 2.0.0b3. I have downloaded the alps-2.0.0b3-r4750-src-with-boost.tar.gz as well as the lp_solve_5.1_source.tar.gz files from the ALPS wiki.
Digging through lp_solve_5.1/ I found lpsolve51/ which contains instructions to build the library using $ sh ccc. I get the following output:
$ sh ccc ../commonlib.c: In function ‘blockWriteINT’: ../commonlib.c:459: warning: format not a string literal and no format arguments ../commonlib.c: In function ‘blockWriteBOOL’: ../commonlib.c:478: warning: format not a string literal and no format arguments ../commonlib.c: In function ‘blockWriteREAL’: ../commonlib.c:500: warning: format not a string literal and no format arguments ../lp_report.c: In function ‘blockWriteLREAL’: ../lp_report.c:161: warning: format not a string literal and no format arguments ../lp_report.c: In function ‘blockWriteAMAT’: ../lp_report.c:190: warning: format not a string literal and no format arguments ../lp_report.c: In function ‘blockWriteBMAT’: ../lp_report.c:242: warning: format not a string literal and no format arguments ar: creating liblpsolve51.a a - lp_MDO.o a - commonlib.o a - myblas.o a - fortify.o a - colamd.o a - lp_rlp.o a - lp_crash.o a - lp_etaPFI.o a - lp_Hash.o a - lp_lib.o a - lp_wlp.o a - lp_matrix.o a - lp_mipbb.o a - lp_MPS.o a - lp_presolve.o a - lp_price.o a - lp_pricePSE.o a - lp_report.o a - lp_scale.o a - lp_simplex.o a - lp_SOS.o a - lp_utils.o a - yacc_read.o ../commonlib.c: In function ‘blockWriteINT’: ../commonlib.c:459: warning: format not a string literal and no format arguments ../commonlib.c: In function ‘blockWriteBOOL’: ../commonlib.c:478: warning: format not a string literal and no format arguments ../commonlib.c: In function ‘blockWriteREAL’: ../commonlib.c:500: warning: format not a string literal and no format arguments ../lp_report.c: In function ‘blockWriteLREAL’: ../lp_report.c:161: warning: format not a string literal and no format arguments ../lp_report.c: In function ‘blockWriteAMAT’: ../lp_report.c:190: warning: format not a string literal and no format arguments ../lp_report.c: In function ‘blockWriteBMAT’: ../lp_report.c:242: warning: format not a string literal and no format arguments
I included that output because I don't have a lot of compiling experience and I don't know what those warnings really mean. But it appears the library has compiled to me.
~/lp_solve_5.1/lpsolve51$ ls ccc ccc.osx dll.sln liblpsolve51.so lpsolve.rc ccc.hp-ux cgcc.bat dll.vcproj lib.sln readme.txt cccLUSOL.osx cvc6.bat liblpsolve51.a lib.vcproj resource.h
Now where should this library be put? I've tried many variations of /usr/lib/ and /lib/ but everytime I run cmake I get this output:
$ cmake /home/magnet/alps-2.0.0b3-r4750-src-with-boost/alps/ -- Build type: Release -- Python interpreter /usr/bin/python -- Python interpreter ok : version 2.6.5 -- PYTHON_INCLUDE_DIRS = /usr/include/python2.6 -- PYTHON_NUMPY_INCLUDE_DIR = /usr/lib/python2.6/dist-packages/numpy/core/include -- PYTHON_SITE_PKG = /usr/lib/python2.6/dist-packages -- PYTHON_LIBRARY = /usr/lib/python2.6/config/libpython2.6.so -- PYTHON_EXTRA_LIBS =-lssl -lcrypto -lssl -lcrypto -L/usr/lib -lz -lpthread -ldl -lutil -- PYTHON_LINK_FOR_SHARED = -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -- ALPS version: 2.0.0b3 -- Looking for Boost Source -- Found Boost Source: /home/magnet/alps-2.0.0b3-r4750-src-with-boost/boost -- Boost Version: 1_43_0 -- Could NOT find MPI (missing: MPI_LIBRARY MPI_INCLUDE_PATH) Falling back to CMake provied LAPACK/BLAS detection. -- A library with BLAS API found. -- A library with BLAS API found. -- A library with LAPACK API found. -- SQLite Library: not found -- LPSolve Library: not found -- Could NOT find SZIP (missing: SZIP_LIBRARIES SZIP_INCLUDE_DIRS) -- HDF5 version found is 1.8.4 in /usr/include -- Python interpreter /usr/bin/python -- Python interpreter ok : version 2.6.5 -- PYTHON_INCLUDE_DIRS = /usr/include/python2.6 -- PYTHON_NUMPY_INCLUDE_DIR = /usr/lib/python2.6/dist-packages/numpy/core/include -- PYTHON_SITE_PKG = /usr/lib/python2.6/dist-packages -- PYTHON_LIBRARY = /usr/lib/python2.6/config/libpython2.6.so -- PYTHON_EXTRA_LIBS =-lssl -lcrypto -lssl -lcrypto -L/usr/lib -lz -lpthread -ldl -lutil -- PYTHON_LINK_FOR_SHARED = -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -- Numpy include in /usr/lib/python2.6/dist-packages/numpy/core/include -- Adding Boost dir: /home/magnet/alps-2.0.0b3-r4750-src-with-boost/boost -- HDF5 version found is 1.8.4 in /usr/include -- dirloop_sse will not be built since the lp_solve library has not found -- Configuring done -- Generating done -- Build files have been written to: /home/magnet/alps-2.0.0b3-r4750-src-with-boost/alps
The line that got my attention at first was "-- dirloop_sse will not be built since the lp_solve library has not found," since I need dirloop_sse built. I then noticed, "-- LPSolve Library: not found".
Am I putting the library in the right place? I know if I use sudo-apt get install lp-solve it installs liblpsolve55.so to /usr/lib/lp_solve/liblpsolve55.so, and I've tried putting liblpsolve51.so there after removing 5.5 of course, but it doesn't work.
Any thoughts on where I am going wrong would help, I have to be missing something here.
Thanks in advance, -Brian Koopman
PS - I forgot to mention, this is on an old Dell OptiPlex with a Pentium III running Ubuntu 10.04.
comp-phys-alps-users@lists.phys.ethz.ch