安装openFoam9后openFoam6无法并行
-
往
.bashrc
里添加类似于这些的东西alias of6='source $HOME/.local/share/OpenFOAM/OpenFOAM-6/etc/bashrc;' alias of7='source $HOME/.local/share/OpenFOAM/OpenFOAM-7/etc/bashrc;' alias of8='source $HOME/.local/share/OpenFOAM/OpenFOAM-8/etc/bashrc;' alias of9='source $HOME/.local/share/OpenFOAM/OpenFOAM-9/etc/bashrc; source $HOME/.local/share/OpenFOAM/blastfoam/etc/bashrc'
然后用
of6
、of7
之类的命令加载想要的版本的环境 -
@vbcwl 是的。那么问题就变成“of6可能因为openmpi无法并行了” 和无法切换版本无关了。
按说按照官方指导应该用的是源里的openmpi,不是不自己编译的。
如果确实用了自己编译的openmpi,那么也可以多版本openmpi共存。这是我的配置文件,可以参考修改成你的
#--------------------------------------- openfoam alias openmpi_1.10.2='export PATH="$HOME/.local/share/OpenFOAM/ThirdParty-4.x/openmpi_1.10.2/bin:$PATH" \ export LD_LIBRARY_PATH="$HOME/.local/share/OpenFOAM/ThirdParty-4.x/openmpi_1.10.2/lib:$LD_LIBRARY_PATH"' alias openmpi_1.6.5='export PATH="$HOME/.local/share/OpenFOAM/ThirdParty-2.3.x/openmpi_1.6.5/bin:$PATH" \ export LD_LIBRARY_PATH="$HOME/.local/share/OpenFOAM/ThirdParty-2.3.x/openmpi_1.6.5/lib:$LD_LIBRARY_PATH"' alias of23x='source $HOME/.local/share/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc; openmpi_1.6.5; export WM_CC='gcc-4.6' export WM_CXX='g++-4.6'' alias of4x='source $HOME/.local/share/OpenFOAM/OpenFOAM-4.x/etc/bashrc; openmpi_1.10.2;'
openmpi的多版本加载得在编译OpenFOAM之前。
openmpi编译安装的步骤