Skip to content

Instantly share code, notes, and snippets.

@iliiliiliili
Created March 9, 2019 13:09
Show Gist options
  • Save iliiliiliili/333d38714f5294b7d475c997721900f4 to your computer and use it in GitHub Desktop.
Save iliiliiliili/333d38714f5294b7d475c997721900f4 to your computer and use it in GitHub Desktop.
MS MPI Windows 10 g++
1. Install MSMPIv6, MSMPIv10 will throw error: '_Out_writes_' has not been declared.
Execute both msmpisdk.msi and msmpisetup.exe
2. copy "%windir%/system32/msmpi.dll" to your project root folder
3. run g++ -I "<PATH TO MPI_INC (%MPI_INC% or C:\Program Files (x86)\Microsoft SDKs\MPI\Include)>" -L . -lmsmpi -g <cpp file name> -o <exe filel name>
if you will not include MPI_INC, you will get
mpi.h: No such file or directory
if you will not include msmpi.dll, you will get
undefined reference to `MPI_Init'
@AleksandrNikolaev02
Copy link

Thank you very much! Helped out a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment