首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装IPOPT和pyOptSparse

安装IPOPT和pyOptSparse
EN

Stack Overflow用户
提问于 2022-09-29 17:52:09
回答 1查看 102关注 0票数 0

我打开这个线程是希望找到一些关于如何安装IPOPT和pyOptSparse的帮助。我已经尝试过使用OpenMDAO脚本来完成这项工作,但是它似乎不起作用(我还发布了一个关于这个的问题,但目前OpenMDAO: pyOptSparse building script没有任何成功)。

因此,这一次,我试图遵循pyOptSparse网站https://mdolab-pyoptsparse.readthedocs-hosted.com/en/latest/optimizers/IPOPT.html的指示,但我仍然收到一个错误,使我无法完成安装过程。

问题发生在第三步,这是关于腮腺炎的安装。当我试图运行这个命令时:

./configure --with-metis --with-metis-lflags="-L${IPOPT_DIR}/lib -lcoinmetis" \ --with-metis-cflags="-I${IPOPT_DIR}/include -I${IPOPT_DIR}/include/coin-or -I${IPOPT_DIR}/include/coin-or/metis" \ --prefix=$IPOPT_DIR CFLAGS="-I${IPOPT_DIR}/include -I${IPOPT_DIR}/include/coin-or -I${IPOPT_DIR}/include/coin-or/metis" \ FCFLAGS="-I${IPOPT_DIR}/include -I${IPOPT_DIR}/include/coin-or -I${IPOPT_DIR}/include/coin-or/metis"

启动过程似乎崩溃了,并返回给我以下错误消息:

checking for library Metis with combined link and compile check... no (link with header) configure: Compiler flags were "-I/usr/src/Ipopt/include -I/usr/src/Ipopt/include/coin-or -I/usr/src/Ipopt/include/coin-or/metis". Use --with-metis-cflags to overwrite. Check config.log for details of failed compile attempt. configure: Linker flags are "-L/usr/src/Ipopt/lib -lcoinmetis". Use --with-metis-lflags to overwrite. Check config.log for details of failed link attempt. configure: error: user-specified flags for Metis do not work.

我已经能够提取错误消息中提到的config.log文件内容,但是我不确定它在这个过程中出了什么问题。这是内容,非常感谢您的任何帮助。

链接到config.log文件:https://drive.google.com/file/d/1Lp3xkM0RkBqDqPt-x33Hx_8u9FR1_kJL/view?usp=sharing

EN

回答 1

Stack Overflow用户

发布于 2022-10-10 09:22:08

config.log文件显示

代码语言:javascript
复制
/usr/bin/ld: /usr/src/Ipopt/lib/libcoinmetis.so: undefined reference to `sqrtf'
/usr/bin/ld: /usr/src/Ipopt/lib/libcoinmetis.so: undefined reference to `log'
/usr/bin/ld: /usr/src/Ipopt/lib/libcoinmetis.so: undefined reference to `pow'

这表明链接器标志中缺少libm。尝试将-lm添加到--with-metis-lflags中。

如果您在您的系统中安装了Metis库,那么为腮腺炎进行配置可能会收集到这些库,因此您将不必通过ThirdParty-Metis (不再维护)。第三方-腮腺炎安装说明在https://github.com/coin-or-tools/ThirdParty-Mumps/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73899788

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档