Open 543877815 opened 5 years ago
From this blog https://unordered.org/timelines/5a23942358800000, it seem that the problem is some necessary files were included in vs software while were not included in msmpi. So I think one of the solution is to use openmpi instead of msmpi.
I have tried everything on windows to have smooth sailing with MPI program but nothing works so i came up with this 100% working solution.... But you need to install : 1.Virtual box or VMWare workstation 2. Ubuntu OS Image(In my case i have only used Ubuntu without gui). After booting os next step is you just need to type commad to install MPI -> sudo apt install openmpi-bin libopenmpi-dev
Now you can write program in c or c++
to Compile C-MPI Program : mpicc program.c -o outputbinaryfile
to run file use : mpirun -n
I config my vscode following this blog , and I changed the “code run - setting.json” like
Is that wrong? I tried to include mpi.h but something wrong happened, like
and the code
#include <mpi.h>
inmain.cpp
also showed the erroremm... maybe this package can only run in Visial Studio 2017?? I tried to include it in clion(cmake) firstly but I failed, either. I just don't want to install VS due to its huge size.