ubuntu22.04安装precice2.1.1出现的bug(涉及到openfoam7、dealii9.2.0)

安装爆轰案例:

1.openfoam7(成功) 验证:of7 、 blockMesh

2.blastfoam2.0.0成功 验证:of、 blastfoam

安装上面则运行Fluid案例成功

3.mpi 成功 验证:mpirun -np 2 hostname

4.openfoam-adapterv1.2.3 位置/home/jie/myapp/openfoam-adapter-v1.2.3-of7,看有log,应该是安装成功,但没有验证

5.准备安装precice2.1.1

(base) jie@dell:~/myapp$ whereis precice

precice: /usr/include/precice /usr/share/precice

说明安装过了,但不知道对不对,然后再运行: dpkg -l | grep precice

输出:ii libprecice2 2.1.1 amd64 Precise Code Interaction Coupling Environment

说明已经安装了precice2.1.1版本

  1. dealii9.2.0

发现~/.bashrc已经有了,说明已安装

export PATH=$PATH:/home/jie/myapp/dealii-9.2.0

验证成功:

(base) jie@dell:~/myapp/dealii-9.2.0/examples/step-1$ cmake .

(base) jie@dell:~/myapp/dealii-9.2.0/examples/step-1$ make run

输出[100%] Built target run

7.安装dealii-adapter (目前没安装运行elasticity成功)

注意:进行这一步的前提是你已经装好了precice!否则运行elasticity报错。

这里用preccie中的案例perpendicular-flap来验证:

cd ~/myapp/precice_tutorials/perpendicular-flap/solid-dealii

cp /home/jie/myapp/dealii-adapter/linear_elasticity/linear_elasticity .

mv linear_elasticity elasticity

./run.sh

然后报错(已解决):./elasticity: error while loading shared libraries: libboost_filesystem.so.1.71.0: cannot open shared object file: No such file or directory

注意:precice依赖包括boost,petsc,mpi,python,见连接:https://precice.org/installation-source-dependencies

然后通过dpkg -l | grep "boost*"命令找到了boost1.74版本的相关文件,但是也没有so文件。下面这几个库只要是运行固体elasticity这个可执行文件都要用到的

precice官方对boost、petsc、python的so库的依赖

https://precice.org/installation-source-dependencies这个连接中,明确指出****boost1.74.0不兼容precice2.1.1**** .所以编译dealii-adater后运行linear-elasticity报错。(因为把boost1.74.0文件名改为1.71.0不兼容)

precice2.1.1不支持Ubuntu 22.04 (jammy) :,支持20.04focal

所以这里只能用官网中国提供的precice2.1.1_focal版本,这个最接近jammy版本(目前不确定能不能用)

precice的依赖和调试

precice也分为调试版本,下面是precice的依赖,是源代码安装的第二步的链接

https://precice.org/installation-source-dependencies

Dependencies

Overview

Required dependencies

Required optional dependencies

C++ compiler

CMake

Download CMake binaries

Eigen

Download the Eigen headers

Boost

Build boost from source

libxml2

Install libxml2 from source

PETSc

Build PETSc from source

Python

MPI

Ginkgo

源代码手动安装boost1.71.0

然后我的ubuntu22.04系统通过apt install只能安装boost1.74.0,通过源代码手动安装boost1.71.0报错

https://sourceforge.net/projects/boost/

复制代码
tar -zxvf 压缩包

sudo ./bootstrap.sh --with-libraries=all

./b2   

./b2 install 

然后报错

复制代码
...failed gcc.compile.c++ bin.v2/libs/log/build/gcc-11/release/threadapi-pthread/threading-multi/visibility-hidden/setup/init_from_settings.o...
...skipped <pbin.v2/libs/log/build/gcc-11/release/threadapi-pthread/threading-multi/visibility-hidden>libboost_log_setup.so.1.71.0 for lack of <pbin.v2/libs/log/build/gcc-11/release/threadapi-pthread/threading-multi/visibility-hidden>setup/init_from_settings.o...
...skipped <p/usr/local/lib>libboost_log_setup.so.1.71.0 for lack of <pbin.v2/libs/log/build/gcc-11/release/threadapi-pthread/threading-multi/visibility-hidden>libboost_log_setup.so.1.71.0...
...skipped <p/usr/local/lib>libboost_log_setup.so for lack of <p/usr/local/lib>libboost_log_setup.so.1.71.0...
...skipped <p/usr/local/lib>libboost_log_setup.so.1 for lack of <p/usr/local/lib>libboost_log_setup.so.1.71.0...
...skipped <p/usr/local/lib>libboost_log_setup.so.1.71 for lack of <p/usr/local/lib>libboost_log_setup.so.1.71.0...
...skipped <p/usr/local/lib/cmake/boost_log_setup-1.71.0>libboost_log_setup-variant-shared.cmake for lack of <pbin.v2/libs/log/build/gcc-11/release/threadapi-pthread/threading-multi/visibility-hidden>libboost_log_setup.so.1.71.0...
...failed updating 30 targets...
...skipped 82 targets...

总结:

目前确定是ubuntu22.04与precice2.1.1不兼容(体现在precice的依赖项boost:只能安装不兼容precice2.1.1的boost1.74.0,但是不能安装兼容precice2.1.1的boost1.71.0)

剩下可行的解决方法:

1.再装一个20.04系统重新安装

2.看看能不能别的方法安装boost1.71.0,是不是自己没找到更好的方法。

3.看能不能用precice2.x版本(注意与precice3.x不兼容)且支持ubuntu22.04jammy版本的(比如2.4.0和2.5.0就支持ubuntu22.04)

4.源代码安装precice试一试(中间会安装boost、petsc、python的so库)

相关推荐
麦哲思科技任甲林1 小时前
需求还是bug?
bug·需求·需求变更
万粉变现经纪人1 天前
如何解决 pip install tensorflow-gpu 报错 未检测到 CUDA 驱动 问题
人工智能·python·深度学习·aigc·tensorflow·bug·pip
初圣魔门首席弟子2 天前
boost配置遇到的bug
bug
万粉变现经纪人2 天前
如何解决 pip install ta-lib 报错 本地 TA-Lib 库未安装 问题
数据库·python·scrapy·oracle·bug·pandas·pip
Cc_Debugger3 天前
【饿了么plus-table】开启多选时,点击下面的单选按钮,页面显示是全选的样子,bug
bug
龙卷风卷云3 天前
【BUG】Nginx使用upstream后端接口报 400
运维·nginx·bug
jiayi_19994 天前
[bug] unsupported GNU version! gcc versions later than 12 are not supported!
服务器·bug·gnu
管二狗赶快去工作!5 天前
体系结构论文(九十三):LLM-Aided Compilation for Tensor Accelerators
人工智能·语言模型·自然语言处理·bug·体系结构
查古穆5 天前
LLM的“小bug”:聊聊幻觉是什么,以及如何有效规避免
人工智能·bug
程序员 沐阳5 天前
Git 二分法精准定位 Bug:从原理到实战,让调试效率起飞
git·elasticsearch·bug