LoginSignup
0
0

More than 5 years have passed since last update.

Mac OS下Open MPI的安装及使用方法

Posted at
  1. http://www.open-mpi.org/上下载最新版Open MPI源代码。

  2. 配置编译选项 (编译为32位代码)

    cd openmpi-1.4.2

    ./configure CFLAGS=-m32 CXXFLAGS=-m32 FFLAGS=-m32 FCFLAGS=-m32

  3. 编译

    make

  4. 安装

    sudo make install

    Open MPI将缺省安装在/usr/local/include, /usr/local/bin, /usr/local/lib中。

  5. 编译并行程序

    mpif90/mpif77/mpicc/mpicxx 源文件

  6. 运行并行程序

    mpirun -n 4 执行程序

    其中选项 -n 指定计算使用的进程总数。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0