- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to execute a "Hello World" Open-MPI project with IVF and this is my code :
PROGRAM test
INCLUDE 'mpif.h'
INTEGER ierr, myrank,size
CALL MPI_INIT(ierr)
CALL MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ierr)
CALL MPI_COMM_SIZE(MPI_COMM_WORLD,size,ierr)
PRINT *, "Processor", myrank, "of", size, ": Hello World!"
CALL MPI_FINALIZE(ierr)
END PROGRAM
I have linked all the open-mpi library files with the project and the project compiles without any issues. I am running this code on a INTEL CORE 2-DUO PROCESSOR (6600 @ 2.4 GHz)
I would expect the above code to run on both processors and print both of them; assuming that the open-MPI interfacing has correctly been established (as I have no compile or run-time errors) .
However, the output of this code is
Processor 0 of 1 : Hello World!
Press any key to continue . . .
Could someone please suggest as to what could be the problem here ? Am I missing any Project Settings for enabling the parallel programming in the Processors ? I am fairly new to parallel processing and any help would be greatly appreciated.
Thanks in Advance.
Regards,
Sangeetha Chandrasekaran
University of Illinois.
I am trying to execute a "Hello World" Open-MPI project with IVF and this is my code :
PROGRAM test
INCLUDE 'mpif.h'
INTEGER ierr, myrank,size
CALL MPI_INIT(ierr)
CALL MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ierr)
CALL MPI_COMM_SIZE(MPI_COMM_WORLD,size,ierr)
PRINT *, "Processor", myrank, "of", size, ": Hello World!"
CALL MPI_FINALIZE(ierr)
END PROGRAM
I have linked all the open-mpi library files with the project and the project compiles without any issues. I am running this code on a INTEL CORE 2-DUO PROCESSOR (6600 @ 2.4 GHz)
I would expect the above code to run on both processors and print both of them; assuming that the open-MPI interfacing has correctly been established (as I have no compile or run-time errors) .
However, the output of this code is
Processor 0 of 1 : Hello World!
Press any key to continue . . .
Could someone please suggest as to what could be the problem here ? Am I missing any Project Settings for enabling the parallel programming in the Processors ? I am fairly new to parallel processing and any help would be greatly appreciated.
Thanks in Advance.
Regards,
Sangeetha Chandrasekaran
University of Illinois.
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sangeetha,
Intel Fortran does not have any direct support for MPI - that is, there are no project settings that are relevant. As far as the compiler is concerned, OpenMPI is just a library of routines you call. Typically with MPI you must tell it where you want the program to run and then use an "mpirun" or something similar to start the program. If you don't do that then you just get one copy.
You will need to read the OpenMPI documentation to see what it wants here. If you are open to other parallel processing options, Intel Fortran supports OpenMP, coarrays, DO CONCURRENT and automatic parallelism.
Intel Fortran does not have any direct support for MPI - that is, there are no project settings that are relevant. As far as the compiler is concerned, OpenMPI is just a library of routines you call. Typically with MPI you must tell it where you want the program to run and then use an "mpirun" or something similar to start the program. If you don't do that then you just get one copy.
You will need to read the OpenMPI documentation to see what it wants here. If you are open to other parallel processing options, Intel Fortran supports OpenMP, coarrays, DO CONCURRENT and automatic parallelism.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve,
Regards,
Thank you very much for the suggestions. I will recheck my OpenMPI library inclusions to see what I am missing.
Thank you.
Thank you.
Regards,
Sangeetha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It would not be in "library inclusions" but rather in something you have to do outside Visual Studio to run an MPI program in parallel. The details of this vary among MPI implementations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How did you start the program?
With MPI it is usual to have a background process running that takes care of the finer
details of the communication and you ordinarily start a program with a command "mpirun".
This command is responsible for starting two or more copies of your program.
Regards,
Arjen
With MPI it is usual to have a background process running that takes care of the finer
details of the communication and you ordinarily start a program with a command "mpirun".
This command is responsible for starting two or more copies of your program.
Regards,
Arjen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the reply, Steve. I have understood that this is different from an OpenMP implementation where an execution from IDE takes care of the parallelization based on the directives.
I have used mpirun/mpiexec command to execute my code and it works fine.
Thank you for the help.
Regards,
Sangeetha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@arjenmarkus :
Originally, I had used the IDE to execute the program and I expected the mpi processes to automatically start the parallization (assuming a similar procedure as OpenMP) . But Now, I have understood that it has to be done separately in the command prompt by starting the parallelization engine using mpirun/mpiexec. Thank you for the reply.
Regards,
Sangeetha

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page