续上篇
cd /home/share/
wget
tar -zxf ucx-1.9.0.tar.gz
cd ucx-1.9.0/
yum -y install numactl-devel
./contrib/configure-release --prefix=/home/software/ucx
make -j2 install
编译下面文件需要改很多库的绝对路径,可以忽略。
ln -s /home/software/ucx/lib/libucp.so /lib64/libucp.so
ln -s /home/software/ucx/lib/libucs.so /lib64/libucs.so
gcc examples/ucp_client_server.c -lucp -lucs -o ucp_client_server -Iinstall/include -Linstall/lib
export LD_LIBRARY_PATH=
/home/software/ucx/lib
./ucp_client_server &
./ucp_client_server -n
cd /home/share/cd /home/share/
tar -jxf openmpi-4.0.5.tar.bz2
cd openmpi-4.0.5/
./configure --prefix=/home/software/openmpi --with-ucx=/home/software/ucx
需要使用Intel编译器,可以改用下面两条命令:
#source /home/software/intel/bin/compilervars.sh intel64
#./configure --prefix=/home/software/openmpi --with-ucx=/home/software/ucx CC=icc CXX=icpc FC=ifort
make -j2 && make install
vi /home/software/modules/openmpi
-
#%Module1.0
-
-
set OPENMPI /home/software/openmpi
-
prepend-path PATH ${OPENMPI}/bin
-
prepend-path LD_LIBRARY_PATH ${OPENMPI}/lib
-
prepend-path INCLUDE ${OPENMPI}/include
module add openmpi
测试:
which mpicc
cd /home/share/openmpi-3.1.6/examples/
mpicc -o hello_c hello_c.c
mpirun -n 4 ./hello_c
mpirun --allow-run-as-root -n 4 ./hello_c
module purge
阅读(2034) | 评论(0) | 转发(0) |