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

mpirun not recognizing all processors

Joao_Pascon
Beginner
554 Views

Hello everyone!

I am trying to run a simple fortran code with MPI. I am using Windows 11, Visual Studio 2022 and I have already installed the Intel oneAPI Base Toolkit and the Intel oneAPI HPC Toolkit.

The code is below:

 

program MPI_test_2

implicit none

include 'mpif.h'

INTEGER :: MY_RANK, NPR, LOCAL_N, SOURCE, DEST, TAG,
# STATUS(MPI_STATUS_SIZE), IERR
CALL MPI_INIT(IERR)
CALL MPI_COMM_RANK(MPI_COMM_WORLD, MY_RANK, IERR)
CALL MPI_COMM_SIZE(MPI_COMM_WORLD, NPR, IERR)

write (*,*) my_rank, NPR

CALL MPI_FINALIZE(IERR)

stop
end program MPI_test_2

 

The VS compiles correctly. However, when I try to run the program in the Command Prompt (mpirun -np 4 ./Test2, for example), the result is always the same, as if there was only one processor:

0 1

2 1

3 1

1 1

 

My PC has 8 cores and 16 processors. I have already checked the number of processors in Advanced Options of System Configuration, and also with CPU ID program.

 

Sincerely

João Paulo Pascon

University of São Paulo

0 Kudos
3 Replies
HemanthCH_Intel
Moderator
529 Views

Hi,

 

Thanks for posting in Intel Communities.

 

We can successfully run the sample fortran program(mentioned in the above post) on the windows command prompt and Visual Studio using Intel MPI 2021.6 as shown below screenshots.

Using Command prompt:

HemanthCH_Intel_0-1661520065727.png

Using Visual studio:

HemanthCH_Intel_2-1661520235035.png

 

 

Could you please try the below steps in the command prompt:

1) open Intel oneAPI command prompt.

2) compile the code using the below command:

mpiifort filename.f90

3) Run the binary using the below command:

mpiexec -n <no of processess> filename.exe

If your error still exists, Could you please provide the below information to investigate more on your issue:

1) Intel one API command prompt output when you run the sample code.

2) Expected output(VS output).

2) MPI Version.

3) Complete debug log in the command prompt using the below command.

I_MPI_DEBUG=10 mpiexec -n <no of processess> filename.exe

 

Thanks & Regards,

Hemanth

 

 

0 Kudos
HemanthCH_Intel
Moderator
508 Views

Hi,


We haven't heard back from you. Could you please provide an update on your issue?


Thanks & Regards,

Hemanth


0 Kudos
HemanthCH_Intel
Moderator
483 Views

Hi,


We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks & Regards

Hemanth


0 Kudos
Reply