再纯净的Ubuntu中编译安装petsc
作者:
马鹏飞_47c5 | 来源:发表于
2020-09-11 14:36 被阅读0次
- docker pull ubuntu
- docker run -ti ubuntu bash
- 在新容器里执行命令
apt-get update
apt-get install vim
- 更换阿里云的源
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
- 安装openmpi
sudo apt-get install openmpi-bin liblapack-dev
- 下载最新的petsc-3.13.5.zip并解压
unzip petsc-3.13.5.zip
- 在configure的过程中,我额外安装了make,wget和python3-pip才不会报错
apt-get install make wget python3-pip
python3 configure
- 最后将容器打包就好啦
docker commit 261314c94305 mypetsc
本文标题:再纯净的Ubuntu中编译安装petsc
本文链接:https://www.haomeiwen.com/subject/oktbektx.html
网友评论