Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.

mpi shared memory problem

Dmitrii_rus
Beginner
1,198 Views

I have some problems with Intel mpi , so  I wrote the dumbest program:

#include "mpi.h"
#include <iostream>
int main(int argc, char** argv)
{
std::cout << "prog_start \n";
MPI_Init(&argc, &argv);
std::cout << "prog_body \n";
MPI_Finalize();
std::cout << "prog_end \n";
return 0;
}

and configured with VS2019.

 

If I run it through VS2019, then everything is in order and works as it should. But if i run through the console

(c:\ ...\mpiexec.exe -n 2 -print-all-exicodes c:\<path_to_file>\file.exe ) 

then i get this:

Dmitrii_rus_0-1637604929051.png

 

Labels (1)
0 Kudos
4 Replies
VarshaS_Intel
Moderator
1,171 Views

Hi,

 

Thanks for reaching out to us.

 

We tried to reproduce your issue, but we were able to get the expected results. Below are the configurations and screenshots of the results.

Operating System: Windows 10

OneAPI version - 2021.4

Microsoft Visual Studio - 16.10.3

intelVScmd.pngintelcmdMPI.pngvsOutput.png

 

Could you please let us know the OS details, Intel MPI version, and Microsoft Visual Studio version you are using?

 

Thanks & Regards

Varsha

 

0 Kudos
Dmitrii_rus
Beginner
1,167 Views

I figured out that VS automatically launches the file "C: \ Program Files (x86) \ Intel \ oneAPI \ setvars.bat". If in one cmd session (with admin privileges !!!) you first run this file, then the program, then everything works. however, if you do this in cmd without admin privileges, then nothing is displayed.

 

Operating System: Windows 10

OneAPI  Version 2021.4 Build 20210831

Microsoft Visual Studio - Version 16.11.5

 

 

0 Kudos
VarshaS_Intel
Moderator
1,132 Views

Hi,


Yes we need to initialize the Intel oneAPI environment using the script file(setvars.sh). Glad to know that your issue is resolved. Could please let us know if we can close this thread?


Thanks & Regards

Varsha


0 Kudos
VarshaS_Intel
Moderator
1,077 Views

Hi,


We have not heard back from you. From the screenshot provided by you, we can see you are able to get the expected results. So, we are going ahead and closing this thread. If you need further assistance, please post a new question.


Thanks & Regards

Varsha


0 Kudos
Reply