gpt4 book ai didi

linux - SCIP make 安装错误 - scipoptsuite-6.0.2

转载 作者:行者123 更新时间:2023-12-03 10:01:31 34 4
gpt4 key购买 nike

我想将 SCIP 优化套件 6.0.2 与 Python 接口(interface) PySCIPOpt 一起使用,并启用调试。我在 Linux - Ubuntu 18.04LTS 上工作,没有 sudo 权限(我避免使用 sudo,因为我想在没有 sudo 选项的集群上做同样的事情)。我按照 SCIP 中的安装说明进行操作和 PySCIPOpt ,并尝试在我的 HOME 目录中安装 SCIP,指定 cmake 命令的自定义路径。

我做了以下事情:
在我的 .bashrcexport SCIPOPTDIR=$HOME/scipoptsuite-6.0.2/build

然后在 ~/scipoptsuite-6.0.2 中:

cmake -Bbuild -H. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$SCIPOPTDIR

输出:

-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.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
-- Could NOT find BISON (missing: BISON_EXECUTABLE)
-- Could NOT find FLEX (missing: FLEX_EXECUTABLE)
-- Could NOT find GMP (missing: GMP_INCLUDE_DIRS GMP_LIBRARIES)
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find GMP (missing: GMP_INCLUDE_DIRS GMP_LIBRARIES)
-- Build shared libraries: ON
-- Build type: Debug
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find Readline (missing: Readline_INCLUDE_DIR Readline_LIBRARY)
-- Could NOT find GMP (missing: GMP_INCLUDE_DIRS GMP_LIBRARIES)
-- Could NOT find BLISS (missing: BLISS_INCLUDE_DIR BLISS_INCLUDE_DIRS BLISS_LIBRARIES BLISS_DEFINITIONS)
-- Could NOT find ZIMPL (missing: ZIMPL_DIR)
-- Could NOT find IPOPT (missing: IPOPT_LIBRARIES) (Required is at least version "3.12.0")
-- Looking for FE_DOWNWARD
-- Looking for FE_DOWNWARD - found
-- Could NOT find CRITERION (missing: CRITERION_LIBRARY CRITERION_INCLUDE_DIR)
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
CMake Warning at scip/doc/CMakeLists.txt:19 (message):
Could not find all of doxygen, python, php, and bash in system path, which
are required for generation of documentation


-- Could NOT find CRITERION (missing: CRITERION_LIBRARY CRITERION_INCLUDE_DIR)
-- Build shared libraries: ON
-- Build type: Debug
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Could NOT find GSL: Found unsuitable version "", but required is at least "2.0" (found GSL_INCLUDE_DIR-NOTFOUND)
-- Could NOT find GMP (missing: GMP_INCLUDE_DIRS GMP_LIBRARIES)
-- Could NOT find CLIQUER (missing: CLIQUER_INCLUDE_DIRS CLIQUER_LIBRARIES)
-- Could NOT find BLISS (missing: BLISS_INCLUDE_DIR BLISS_INCLUDE_DIRS BLISS_LIBRARIES BLISS_DEFINITIONS)
-- The following OPTIONAL packages have been found:

* PkgConfig

-- The following REQUIRED packages have been found:

* SOPLEX
* SCIP

-- The following OPTIONAL packages have not been found:

* BISON
* FLEX
* ZLIB
* Readline
* ZIMPL
* IPOPT (required version >= 3.12.0)
* Criterion
* GSL (required version >= 2.0)
* GMP
* CLIQUER
* HMETIS
* BLISS

-- Configuring done
-- Generating done
-- Build files have been written to: /home/avrech/scipoptsuite-6.0.2/build

然后:
cmake --build 构建

输出:

Scanning dependencies of target soplex_update_githash
-- Git hash: b8833cd3
[ 0%] Built target soplex_update_githash
Scanning dependencies of target libsoplex-pic
[ 0%] Building CXX object soplex/src/CMakeFiles/libsoplex-pic.dir/soplex/changesoplex.cpp.o
...
[100%] Building C object gcg/src/CMakeFiles/gcg.dir/solver_mip.c.o
[100%] Building C object gcg/src/CMakeFiles/gcg.dir/stat.c.o
[100%] Linking CXX executable ../../bin/gcg
[100%] Built target gcg

此时 scip 和 soplex 二进制文件存在于 build/bin/ 中,SCIP 可以通过执行 build/bin/scip 作为独立求解器启动。但是,build/ 目录不包含 PySCIPOpt 所需的 include/ 目录。

所以根据this ,我尝试通过运行来安装 SCIP:

cd build  
make install

然后出现错误:

-- Git hash: b8833cd3
[ 0%] Built target soplex_update_githash
[ 5%] Built target libsoplex-pic
[ 11%] Built target libsoplex
[ 11%] Built target soplex
-- Git hash: e639a0059d
[ 11%] Built target scip_update_githash
[ 44%] Built target scip
[ 76%] Built target libscip
-- Git hash: 6a662daa
[ 76%] Built target gcg_update_githash
[ 88%] Built target libgcg
[100%] Built target gcg
Install the project...
-- Install configuration: "Debug"
-- Installing: /home/avrech/scipoptsuite-6.0.2/build/include/soplex/array.h
...
-- Installing: /home/avrech/scipoptsuite-6.0.2/build/include/soplex/wallclocktimer.h
-- Installing: /home/avrech/scipoptsuite-6.0.2/build/include/soplex.h
CMake Error at soplex/src/cmake_install.cmake:149 (file):
file INSTALL cannot find
"/home/avrech/scipoptsuite-6.0.2/build/bin/soplex".
Call Stack (most recent call first):
soplex/cmake_install.cmake:42 (include)
cmake_install.cmake:42 (include)


Makefile:73: recipe for target 'install' failed
make: *** [install] Error 1

我看到(可能是部分的)include/ 目录已创建,但由于未知原因,soplex 可执行文件消失了:

$ ls
bin include ...
$ ls bin
applications examples gcg interfaces scip

我做错了什么?

使用调试选项安装 SCIP 和 PySCIPOpt 的完整方法将是最好的。(如果需要,可以使用 sudo 权限)

谢谢。

最佳答案

您只需为安装目标指定一个不同的目录。将 SCIPOPTDIR 设置为某个 install/ 目录而不是 build/,它应该可以工作。您不能使用相同的目录进行安装和构建。

PySCIPOpt 正在搜索安装目录,因此您始终需要在构建项目后运行安装。

只要您不想安装到某个系统目录,就不需要 sudo。

关于linux - SCIP make 安装错误 - scipoptsuite-6.0.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59488449/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com