分类: LINUX
2009-08-01 18:41:19
This guide was created for use with Open MPI version 1.2.5 using the PGI 7.1 Release. This information is for both processors running 64-bit Linux or processors running 32-bit Linux.
Open MPI is a freely available implementation of MPI. Information about MPICH can be found at the
Open MPI is freely available for download from the .
There are no known dependencies.
After you have downloaded and unpacked the Open MPI packages, the typical build process is followed. After setting up the environment and determining the final installation directory, you run configure followed by make and finally make install Please modify this example as needed. Be sure to change the prefix path. We assume the PGI compilers are installed in the default /opt/pgi directory.
cd opemmpi-1.2.5 !for 32-bit ./configure CC=pgcc CXX=pgCC FC=pgf77 F90=pgf90 --prefix=/opt/pgi/linux86/7.1/mpi/openmpi !for 64-bit ./configure CC=pgcc CXX=pgCC FC=pgf77 F90=pgf90 --prefix=/opt/pgi/linux86-64/7.1/mpi/openmpi或者提前声明变量export CC=pgcc CXX=pgcpp FC=pgf90 F77=pgf77 F90=pgf90
To build and install, simply run 'make' and 'make install'.
make make install
After you have successfully installed the Open MPI library you will need to create a 'hostfile' file with the list of your cluster's host names. For technical Information to run Open MPI programs See the
To test your Open MPI installation, the Open MPI package contains several example test programs. First make sure that the Open MPI install bin directory is in your PATH environment variable, and the Open MPI install bin is in your LD_LIBRARY_PATH environment variable. Then build and run the examples.
! for 32-bit export LD_LIBRARY_PATH=/opt/pgi/linux86/7.1/mpi/openmpi/lib:$LD_LIBRARY_PATH export PATH=/opt/pgi/linux86/7.1/mpi/openmpi/bin:/opt/pgi/linux86/7.1/bin:$PATH ! for 64-bit export LD_LIBRARY_PATH=/opt/pgi/linux86-64/7.1/mpi/openmpi/lib:$LD_LIBRARY_PATH export PATH=/opt/pgi/linux86-64/7.1/mpi/openmpi/bin:/opt/pgi/linux86-64/7.1/bin:$PATH cd examples make >& make.log ! run an example mpirun -np 4 --hostfile my-hostfile hello_cxx
Results of the example tests can be found in the make.log above. Review this file for any errors
The PGI graphical MPI-parallel debugger, PGDBG, has not been modified to work with Open MPI.
None.
=====================================================================
1: 编译openmpi
cd /home/msemsi/share/openmpi-1.3.2
./configure CC=icc CXX=icpc F77=ifort FC=ifort
这里编译器最好与你后面编译vasp的编译器一致,否则容易编译出错。
then
make & make install
openmpi的设置可以参考相关资料,注意把ifort, mkl, icc, openmpi的lib加到INCLUDE路径中,否则也可能出错。
比如我的系统上
echo $INCLUDE
/opt/intel/mkl/10.1.0.015/include:/opt/intel/cce/10.1.018/include:/opt/intel/Compiler/11.0/074/include:/usr/local/include:/usr/include:/include:/opt/intel/mkl/10.1.0.015/include
=====================================================================