volesti
volesti copied to clipboard
some logconcave examples are not working with MKL
Describe the bug exponential_exact_hmc.cpp. and gassian_exact_hmc and high_dimentional_hmc.cpp are not working well. The first two files produce core dumped error and the last file produce segmentation fault.
**Desktop **
- OS: Ubuntu 20.04.4 LTS
To Reproduce Steps to reproduce the behavior:
- Change to develop branch, go to logconcave directory
cd ./volesti/examples/logconcave
- Build executable files
cmake . && make
3 Run the relevant executable files
./high_dimensional_hmc
4 See error
intel mkl error: parameter 6 was incorrect on entry to dgemv.
intel mkl error: parameter 13 was incorrect on entry to dgemv.
Segmentation fault
I cannot reproduce it in same system with gcc-9 on x86_64. What is your compiler / architecture?
Also what version of MKL are you using? If you are using the new oneMKL the after following the installation instructions you should change
set(MKLROOT /opt/intel/mkl)
to
set(MKLROOT /opt/intel/oneapi/mkl/2022.1.0)
in your CMakeList.txt where 2022.1.0 should be the mkl version installed in your system.
i am using gcc-9 on x86_64,linux gnu. I have already set set(MKLROOT /opt/intel/oneapi/mkl/2022.0.2).However, a new error comes out. "error while loading shared libraries: libmkl_intel_ilp64.so.2: cannot open shared object file: No such file or directory". I solved this error by running:
export LD_LIBRARY_PATH=/opt/intel/oneapi/mkl/2022.0.2/lib/intel64
This error can be solved by the following command as well:
source /opt/intel/oneapi/setvars.sh
Thanks @zhanggiene ! I am closing the issue as fixed.
While there is no errror during compilation, the issue(some logconcave examples are not working with MKL) is not solved.
This is the exact Library i used. https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-download.html?operatingsystem=linux&distributions=webdownload&options=offline
I have updated the mkl system,here is the updated cmake result.
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:15 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
MKLROOT/opt/intel/oneapi/mkl/2022.1.0
-- Eigen Library found: /home/administrator/volesti/external/_deps/eigen-src
-- Boost Library found: /home/administrator/volesti/external/_deps/boost-src
-- lp_solve library found: /home/administrator/volesti/external/_deps/lpsolve-src
Found MKL: /opt/intel/oneapi/mkl/2022.1.0
-- Library lp_solve found: /usr/lib/lp_solve/liblpsolve55.so /usr/lib/x86_64-linux-gnu/libblas.so
THIS IS mkl
-- Configuring done
-- Generating done
-- Build files have been written to: /home/administrator/volesti/examples/logconcave
I have deleted the old mkl version and installed the new version, but the same issue remains and all three files have the same issues.
(base) administrator:/opt/intel/oneapi/mkl$ ls
2022.1.0 latest
(base) administrator:/opt/intel/oneapi/mkl$
I think the issue is with the random point generator from volesti/include/sampling/random_point_generators.hpp During the random sampling phase, all the points are zero. This is linked to the issue #223
I have narrowed down the issues, In volesti/include/random_walks/exponential_hamiltonian_monte_carlo_exact_walk.hpp, line 113,T <= pbpair.first , this condition is being satisfied in the first iteration of the while loop.
Thanks! But where is your fix? Please open a PR and link this issue.
BTW you can refer to lines of code like this: https://github.com/GeomScale/volesti/blob/develop/include/random_walks/exponential_hamiltonian_monte_carlo_exact_walk.hpp#L113