Intel® oneAPI HPC Toolkit
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
2022 Discussions

Intel MPI gives wrong number of physical cores on core i7 Q820?

Anders_S_1
New Contributor II
414 Views

Hi,

I have begun learning MPI on my Dell 4500 with a Core i7 Q820 processor (4 physical and 8 logical cores).

When I run a simple program in Fortran to get the rank and size, i get 0 and 1 instead of 0 and 3 (see attached code).

What is wrong?

Best regards

Anders S

0 Kudos
5 Replies
Artem_R_Intel1
Employee
414 Views

Hi Anders,
As far as I understand you run the MPI program without MPI launcher (like mpirun), correct?
$ ./mpitest
rank,size=   0   1
It's similar to:
$ mpirun -n 1 ./mpitest
rank,size=   0   1

Why do you expect '0 and 3'?

You can try to vary the number of MPI processes with '-n <procs>' option:
$ mpirun -n 4 ./mpitest
rank,size=   1   4
rank,size=   2   4
rank,size=   3   4
rank,size=   0   4

I'd recommend to look at the Getting Started with Intel® MPI Library document.

Artem_R_Intel1
Employee
414 Views

Hi Anders,
As far as I understand you run the MPI program without MPI launcher (like mpirun), correct?
$ ./mpitest
rank,size=   0   1
It's similar to:
$ mpirun -n 1 ./mpitest
rank,size=   0   1

Why do you expect '0 and 3'?

You can try to vary the number of MPI processes with '-n <procs>' option:
$ mpirun -n 4 ./mpitest
rank,size=   1   4
rank,size=   2   4
rank,size=   3   4
rank,size=   0   4

I'd recommend to look at the Getting Started with Intel® MPI Library document.

Anders_S_1
New Contributor II
414 Views

Artem R. (Intel) wrote:

Hi Anders,
As far as I understand you run the MPI program without MPI launcher (like mpirun), correct?
$ ./mpitest
rank,size=   0   1
It's similar to:
$ mpirun -n 1 ./mpitest
rank,size=   0   1

Why do you expect '0 and 3'?

You can try to vary the number of MPI processes with '-n <procs>' option:
$ mpirun -n 4 ./mpitest
rank,size=   1   4
rank,size=   2   4
rank,size=   3   4
rank,size=   0   4

I'd recommend to look at the Getting Started with Intel® MPI Library document.

Hi Artem,

Thank you for your answer!

My Dell M4500 broke down and I have continued with a Dell M4800 with a Core i7 4910MQ processor.

Furthermore, I have installed the Parallell Studio Cluster software.

When I run the simple test code (attached) with no use of MPI compile, link and run was OK.

When I added just the line

INCLUDE 'mpif.h'

compile was OK but link gave a number of warnings and errors (attached link message printout)

What have I missed?

Best regards

Anders S

James_T_Intel
Moderator
414 Views

Did you add impi.lib to your library input?

Anders_S_1
New Contributor II
414 Views

Hi James,

Thanks for your answers. As I just after your first reply installed the Cluster studio I found it better to start a new, hopefully better defined case called "Trying to make MPI work in a QuickWin application". I think your last comment may be relevant in the new case.

Best regards

Anders S

Reply