要設(shè)置Ubuntu中OpenMPI的環(huán)境變量,可以按照以下步驟操作:
nano ~/.bashrc
export PATH=/usr/lib/openmpi/bin:$PATH
export LD_LIBRARY_PATH=/usr/lib/openmpi/lib:$LD_LIBRARY_PATH
export MANPATH=/usr/lib/openmpi/share/man:$MANPATH
source ~/.bashrc
mpirun --version
這樣就可以在Ubuntu中成功設(shè)置OpenMPI的環(huán)境變量。