Answered by:
mpiexec switch to use no port?

Question
-
Is it possible to invoke mpiexec somehow without opening a port which triggers the Windows Firewall popup?
If MPI is only used on the local machine (with multiple processes, but only the local machine as a host), do I still need to open a port? Why? Can it be disabled?
Thanks!
Thursday, May 4, 2017 7:40 AM
Answers
-
Typically most MPI programs have multiple instances running and in order to have them launched with the right settings so that they can communicate with each other you will need to launch them under mpiexec. Launching the program by itself is not common, but can be useful if you want to quickly test some functionality. We will look into disabling firewall popup when the program is launched by itself.
Thanks
Anh
- Marked as answer by plucid Wednesday, May 10, 2017 1:05 PM
Wednesday, May 10, 2017 12:05 PM
All replies
-
Hi,
A couple questions:
1) Which version of MS-MPI are you using?
2) You mentioned MPI being used on local machine, is the command line in the form of mpiexec -n X app.exe or do you use -host/-hosts/-machinefile...
3) Did you install MS-MPI using MSMPISetup.exe (the setup should have added firewall exclusions for mpiexec.exe/smpd.exe)
Anh
Thursday, May 4, 2017 2:52 PM -
Hi,
1) MS-MPI 7.1 and 8.0
2) I use "mpiexec -n X app.exe". I have not used host/hosts/machinefile so far.
3) Yes, I installed the MSMPISetup.exe
Maybe the firewall "sees" app.exe instead of mpiexec.exe, so the existing firewall exclusion doesn't apply?
Monday, May 8, 2017 3:31 PM -
It is possible the firewall popup is for the application (e.g., app.exe). Can you try launching the application this way:
mpiexec -env MSMPI_DISABLE_SOCK 1 -n X app.exe
Let us know if the firewall popup still occurs
Tuesday, May 9, 2017 11:51 AM -
I now tried it again from scratch.
This is mpi_hello_world.c:
#include <mpi.h> #include <stdio.h> int main(int argc, char** argv) { MPI_Init(NULL, NULL); int world_size; MPI_Comm_size(MPI_COMM_WORLD, &world_size); int world_rank; MPI_Comm_rank(MPI_COMM_WORLD, &world_rank); char processor_name[MPI_MAX_PROCESSOR_NAME]; int name_len; MPI_Get_processor_name(processor_name, &name_len); printf("Hello world from processor %s, rank %d out of %d processors\n", processor_name, world_rank, world_size); MPI_Finalize(); }
I build with this command line:
cl -I "%MSMPI_INC%." msmpi.lib mpi_hello_world.c /link /LIBPATH:"%MSMPI_LIB64%."I run this and do NOT get a firewall popup dialog:
mpiexec -n 1 mpi_hello_world.exe
mpiexec -env MSMPI_DISABLE_SOCK 1 -n 1 mpi_hello_world.exeBut if I run just mpi_hello_world.exe directly (without mpiexec) I DO get a firewall popup dialog.
So I guess the answer is: Always use mpi_exec?
Sorry for the confusion and thanks for the help.
- Edited by plucid Wednesday, May 10, 2017 9:19 AM
Wednesday, May 10, 2017 9:14 AM -
Typically most MPI programs have multiple instances running and in order to have them launched with the right settings so that they can communicate with each other you will need to launch them under mpiexec. Launching the program by itself is not common, but can be useful if you want to quickly test some functionality. We will look into disabling firewall popup when the program is launched by itself.
Thanks
Anh
- Marked as answer by plucid Wednesday, May 10, 2017 1:05 PM
Wednesday, May 10, 2017 12:05 PM