Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling Example(hpolytope-volume) c++ interface failed #192

Closed
YunMoZhang opened this issue Nov 29, 2021 · 2 comments
Closed

Compiling Example(hpolytope-volume) c++ interface failed #192

YunMoZhang opened this issue Nov 29, 2021 · 2 comments

Comments

@YunMoZhang
Copy link

I'm testing the c++ interface of hpolytope-volume.

Under the folder examples/hpolytope-volume, I have tried two types of cmake,
When I run:

cmake -DLP_SOLVE=/usr/lib/lp_solve/liblpsolve55.so

succeed, but after that, when I run

make

Error appeared:

hpolytopeVolume.cpp:10:10: fatal error: Eigen/Eigen: No such file or directory
   10 | #include "Eigen/Eigen"
      |          ^~~~~~~~~~~~~

So I have tried another cmake:

cmake .. -DEXAMPLES=hpolytope-volume

another error repoted:

-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Eigen library not found locally, downloading it.
-- Using downloaded Eigen library at:volesti/examples/hpolytope-volume/_deps/eigen-src
-- Boost Library found: /usr/include
-- lp_solve library not found locally, downloading it.
-- Using downloaded lp_solve at: volesti/examples/hpolytope-volume/_deps/lpsolve-src/src
-- Library lp_solve found: /usr/lib/lp_solve/liblpsolve55.so
-- Library lp_solve found: /usr/lib/lp_solve/liblpsolve55.so BLAS-NOTFOUND
-- Using downloaded Eigen library at:volesti/examples/hpolytope-volume/_deps/eigen-src
-- Boost Library found: /usr/include
-- Library lp_solve found: /usr/lib/lp_solve/liblpsolve55.so
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
BLAS
    linked by target "high_dimensional_hmc" in directory volesti/examples/logconcave
    linked by target "high_dimensional_hmc_rand_poly" in directory volesti/examples/logconcave
    linked by target "simple_sde" in directory volesti/examples/logconcave
    linked by target "simple_uld" in directory volesti/examples/logconcave
    linked by target "simple_ode" in directory volesti/examples/logconcave
    linked by target "simple_hmc" in directory volesti/examples/logconcave

-- Configuring incomplete, errors occurred!
See also "volesti/examples/hpolytope-volume/CMakeFiles/CMakeOutput.log".

Could anyone tell me how to solve this problem or compile and test the c++ interface under other folders in volesti?
Thank you.

@vaithak
Copy link
Collaborator

vaithak commented Nov 29, 2021

Hi @YunMoZhang, there is an open PR related to build of examples - #190, the discussion is still going on so
-DEXAMPLES=hpolytope-volume is not yet merged into the develop branch.
For now, I would suggest you can comment out the add_subdirectory commands for examples you don't want to run in the examples/CMakeLists.txt - https://github.com/GeomScale/volesti/blob/develop/examples/CMakeLists.txt#L114.

So, if you want to just run the hpolytopeVolume example, then the end of that file will look like:

  # add_subdirectory(logconcave)
  # add_subdirectory(spectrahedra)
  add_subdirectory(hpolytope-volume)
  # add_subdirectory(mmcs_method)
  # add_subdirectory(count-linear-extensions-using-hpolytope)
  # add_subdirectory(ellipsoid-sampling)
  # add_subdirectory(order-polytope-basics)

This is an easy hack for now, but hopefully this will be improved soon.
Then to build the hpolytopeVolume example,

  • cd into the examples/hpolytope-volume directory.
  • Run cmake .. -DLP_SOLVE=/usr/lib/lp_solve/liblpsolve55.so.
  • Run make.

@YunMoZhang
Copy link
Author

It works for me.
Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants