Wrong mpi number of processors

前端 未结 4 889
Happy的楠姐
Happy的楠姐 2021-02-11 04:55

Sorry, I\'m sure making a silly mistake, but did not work out.

I\'m compiling a simple mpi hello world:

#include 
#include 

         


        
4条回答
  •  一生所求
    2021-02-11 05:15

    In this case, you need mpiexec from the 'mpich2' package.

    Firstly, remove all mpi packages that installed on your computer. If your server is Ubuntu, you can use the command:

    sudo apt-get purge mpi mpich2 openmpi-common
    

    To make sure that you have removed all the packages, try this command

    which mpiexec
    

    If you got nothing in response, you already removed all the packages.

    Then reinstall the package of mpich2

    sudo apt-get install mpich2
    

    Try to compile and run your code again! Hope this help!

提交回复
热议问题