Having Open MPI related issues while making CUDA 5.0 samples (Mac OS X ML)

后端 未结 3 1460
轮回少年
轮回少年 2020-12-20 12:55

When I\'m trying to make CUDA 5.0 samples an error appears:

Makefile:79: * MPI not found, not building simpleMPI.. Stop.

相关标签:
3条回答
  • 2020-12-20 12:56

    Or just install using Homebrew. The command is

    brew install mpich2
    

    I could compile all the CUDA samples after installing mpich through homebrew.

    0 讨论(0)
  • Or just install using MacPorts. The command is

    sudo port install mpich
    

    This will also make it easier to update in future since they host the latest version.

    0 讨论(0)
  • 2020-12-20 13:19

    As mentioned in the comments, the simpleMPI example can be effectively bypassed by using make -k, or else deleting the simpleMPI subdirectory altogether, or renaming the Makefile that is in that directory. However if it is desired to actually install a version of MPI on the mac so as to be able to build the simpleMPI example, these instructions should help:

    The issue here is that you don't have the MPI compiler installed. You will need to install the MPICC compiler for Mac OSX. These instructions will use the MPICH2 version of MPI, which is generally available here

    Direct link to MPICH2 1.4 download

    You can follow these instructions to build and configure MPICH2 for Mac OSX. In the configure step, also add --disable-f77 and --disable-fc:

    ./configure --enable-shared --enable-sharedlibs=osx-gcc --enable-fast=all --prefix=/usr/local/mpich2-optimized --disable-f77 --disable-fc
    

    Then follow the guide instructions to make and then make install

    Now create symbolic links to MPICC so you can build CUDA MPI easily

    sudo ln -s /usr/local/mpich2-optimized/mpicxx /usr/bin/mpicxx 
    sudo ln -s /usr/local/mpich2-optimized/mpic++ /usr/bin/mpic++
    

    Alternatively, another option is to add

    /usr/local/mpich2-optimized/bin 
    

    to your path.

    Now when making simpleMPI, it will properly build.

    0 讨论(0)
提交回复
热议问题