OpenMPI - 更新替代方案

OpenMPI - 更新替代方案

我遇到了 openmpi 崩溃的问题。安装/存储库版本是“mpirun (Open MPI) 3.1.3”。

因此,我在本地构建了一个不会崩溃的“mpirun (Open MPI) 4.1.0”。我现在想将新安装的版本(位于 /opt/openmpi-4.1.0)作为执行和链接的系统标准。

我相信这样做是 update-alternatives 的工作。“update-alternatives --query”的输出为:

Name: mpi
Link: /usr/bin/mpicc
Slaves:
 mpiCC /usr/bin/mpiCC
 mpiCC.1.gz /usr/share/man/man1/mpiCC.1.gz
 mpic++ /usr/bin/mpic++
 mpic++.1.gz /usr/share/man/man1/mpic++.1.gz
 mpicc.1.gz /usr/share/man/man1/mpicc.1.gz
 mpicxx /usr/bin/mpicxx
 mpicxx.1.gz /usr/share/man/man1/mpicxx.1.gz
 mpif77 /usr/bin/mpif77
 mpif77.1.gz /usr/share/man/man1/mpif77.1.gz
 mpif90 /usr/bin/mpif90
 mpif90.1.gz /usr/share/man/man1/mpif90.1.gz
 mpifort /usr/bin/mpifort
 mpifort.1.gz /usr/share/man/man1/mpifort.1.gz
Status: auto
Best: /usr/bin/mpicc.openmpi
Value: /usr/bin/mpicc.openmpi

Alternative: /usr/bin/mpicc.openmpi
Priority: 50
Slaves:
 mpiCC /usr/bin/mpic++.openmpi
 mpiCC.1.gz /usr/share/man/man1/mpiCC.openmpi.1.gz
 mpic++ /usr/bin/mpic++.openmpi
 mpic++.1.gz /usr/share/man/man1/mpic++.openmpi.1.gz
 mpicc.1.gz /usr/share/man/man1/mpicc.openmpi.1.gz
 mpicxx /usr/bin/mpic++.openmpi
 mpicxx.1.gz /usr/share/man/man1/mpicxx.openmpi.1.gz
 mpif77 /usr/bin/mpif77.openmpi
 mpif77.1.gz /usr/share/man/man1/mpif77.openmpi.1.gz
 mpif90 /usr/bin/mpif90.openmpi
 mpif90.1.gz /usr/share/man/man1/mpif90.openmpi.1.gz
 mpifort /usr/bin/mpifort.openmpi
 mpifort.1.gz /usr/share/man/man1/mpifort.openmpi.1.gz
Name: mpirun
Link: /usr/bin/mpirun
Slaves:
 mpiexec /usr/bin/mpiexec
 mpiexec.1.gz /usr/share/man/man1/mpiexec.1.gz
 mpirun.1.gz /usr/share/man/man1/mpirun.1.gz
Status: auto
Best: /usr/bin/mpirun.openmpi
Value: /usr/bin/mpirun.openmpi

Alternative: /usr/bin/mpirun.openmpi
Priority: 50
Slaves:
 mpiexec /usr/bin/mpiexec.openmpi
 mpiexec.1.gz /usr/share/man/man1/mpiexec.openmpi.1.gz
 mpirun.1.gz /usr/share/man/man1/mpirun.openmpi.1.gz
Name: mpi-x86_64-linux-gnu
Link: /usr/include/x86_64-linux-gnu/mpi
Slaves:
 libmpi++.so-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libmpi++.so
 libmpi.so-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libmpi.so
 mpi-c.pc-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/pkgconfig/mpi-c.pc
 mpi-cxx.pc-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/pkgconfig/mpi-cxx.pc
 mpi-fort.pc-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/pkgconfig/mpi-fort.pc
 mpi.pc-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/pkgconfig/mpi.pc
Status: auto
Best: /usr/lib/x86_64-linux-gnu/openmpi/include
Value: /usr/lib/x86_64-linux-gnu/openmpi/include

Alternative: /usr/lib/x86_64-linux-gnu/openmpi/include
Priority: 50
Slaves:
 libmpi++.so-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so
 libmpi.so-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so
 mpi-c.pc-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/pkgconfig/ompi-c.pc
 mpi-cxx.pc-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/pkgconfig/ompi-cxx.pc
 mpi-fort.pc-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/pkgconfig/ompi-fort.pc
 mpi.pc-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/pkgconfig/ompi.pc

有没有一种正确且经济的方法可以将我的新 openmpi 正确地引入系统?我的一个问题是,虽然我理解软链接原理,但我不理解替代方案的“从属”原理。

谢谢任何建议...

相关内容