Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

MPI

maciej
Beginner
2,196 Views
Hello,

I just look around and cannot find any source of download the MPI 3.0 libraries. I think I should install them as I do not have the folder MPI in the Intelinstallation directory ( C:\Program Files(x86)\Intel\MPI\3.2)

I have newest Visual Fortran proffesional and Parallel Studio.

regards,
Maciej
0 Kudos
1 Solution
Steven_L_Intel1
Employee
2,196 Views

Maciej,

You are confusing MPI with OpenMP. These are two very different methods for parallelizing applications. OpenMP, which is included in the Intel Fortran compiler, is used for parallelizing on a single shared-memory system. You add directives to the source to indicate which loops to run in parallel and which variables are to be shared (or not).

MPI is a library for which you insert calls into your program. It passes messages (and data) - MPI means Message Passing Interface - to other copies of the program which may be running on other nodes of a cluster. While we do sell an MPI library as Intel MPI, you can also download the free MPICH2 and use that.

The Intel compiler also supports automatic parallelism with the /parallel option, though in many cases you'll do better with OpenMP.

You do not need to buy anything extra, but you do need to learn about parallel programming. You can start with the large chapter on parallel programming in the Optimizing Applications section of the compiler documentation, but there are lots of reference sources on the web for both OpenMP and MPI.

View solution in original post

0 Kudos
9 Replies
TimP
Honored Contributor III
2,196 Views
Quoting - Maciej

I just look around and cannot find any source of download the MPI 3.0 libraries. I think I should install them as I do not have the folder MPI in the Intelinstallation directory ( C:Program Files(x86)IntelMPI3.2)

Intel MPI is another separately licensed product http://software.intel.com/en-us/intel-mpi-library/ The evaluation and beta test versions are free for a limited time. It is supposed to support some interoperability with MPICH2 http://www.mcs.anl.gov/research/projects/mpich2/
0 Kudos
maciej
Beginner
2,196 Views
So to make things clear. With my product - Intel Visual Fortran and Parallel Studio I cannot do anything in parallel? I mean Fortran program.

I made tests with following simple program, it takes a few seconds to complete:

program test
REAL*8 A, B, C, D
INTEGER*4 I, J
B = 1d-3
C = 1d-3
A = 2d+1
D = 3d+1
DO J=1,10
print *,J
DO I=1,10000000
A = SQRT(A)
A = A*A
END DO
end do

DO J=1,10
print *,J
DO I=1,10000000
D = SQRT(D)
D = D*D
END DO
END DO
end program

When I use switch /Qparallel the program gets even a little bit worse speed parameters than without this switch.
Serial - 4.842 s
Parallel - 4.866 s

regards,
Maciej
0 Kudos
maciej
Beginner
2,196 Views
Now I see my mistake.

When I made decision what to buy I read the "Product In Depth" about the "Intel Visual Fortran Compiler Professional Edition for Windows" and saw among the many fine features support for OpenMP 3.0

http://software.intel.com/sites/products/collateral/hpc/compilers/fwin_indepth.pdf

I didn't even think it must be bought separately, but maybe all those nice features must be separately bought. I don't know. If only I knew it I'd have it bought already. Now I have to wait a few months for next financial year at my Uni to give my project parallel power...

Maciej
0 Kudos
Steven_L_Intel1
Employee
2,197 Views

Maciej,

You are confusing MPI with OpenMP. These are two very different methods for parallelizing applications. OpenMP, which is included in the Intel Fortran compiler, is used for parallelizing on a single shared-memory system. You add directives to the source to indicate which loops to run in parallel and which variables are to be shared (or not).

MPI is a library for which you insert calls into your program. It passes messages (and data) - MPI means Message Passing Interface - to other copies of the program which may be running on other nodes of a cluster. While we do sell an MPI library as Intel MPI, you can also download the free MPICH2 and use that.

The Intel compiler also supports automatic parallelism with the /parallel option, though in many cases you'll do better with OpenMP.

You do not need to buy anything extra, but you do need to learn about parallel programming. You can start with the large chapter on parallel programming in the Optimizing Applications section of the compiler documentation, but there are lots of reference sources on the web for both OpenMP and MPI.
0 Kudos
maciej
Beginner
2,196 Views
Thank you for this info Steve. I will proceed with MPICH2 then and learn computing in parallel in details.
I recall at the time I was reading the "Product In Depth" I understood OpenMP as OpenMPI but adjusted to the specifics of Intel compilers. I mixed it totally. My mistake.

regards,
Maciej
0 Kudos
TimP
Honored Contributor III
2,196 Views
Quoting - Maciej
Thank you for this info Steve. I will proceed with MPICH2 then and learn computing in parallel in details.
I recall at the time I was reading the "Product In Depth" I understood OpenMP as OpenMPI but adjusted to the specifics of Intel compilers. I mixed it totally. My mistake.

regards,
Maciej
Openmpi (successor to lam mpi) is an excellent implementation of MPI. It doesn't support Windows, but is widely used with Intel compilers. Their confusing choice of name is inexplicable, but in no way justifies ignoring OpenMP as an important aspect of parallel computing.
0 Kudos
maciej
Beginner
2,196 Views
Thanks Tim. Also this "Open" suggest that this is something opened. ;)

Anyhow now I work serial, next year I will make use of several cores at once using these libraries.
I can now try to do it myself by "manually" threading the code - as I can see IVF gives me access to all Windows API.

regards,
Maciej
0 Kudos
TimP
Honored Contributor III
2,196 Views
Quoting - Maciej
Thanks Tim. Also this "Open" suggest that this is something opened. ;)

Anyhow now I work serial, next year I will make use of several cores at once using these libraries.
I can now try to do it myself by "manually" threading the code - as I can see IVF gives me access to all Windows API.

The Open in openmpi refers to open source. So, you must compile it yourself when using with ifort. As Steve already mentioned, you would likely use MPI for cluster computing, as OpenMP is often sufficient for the popular multi-core shared memory computers.
I don't find references on why OpenMP was named as it is, but it consists of a series of standards reconciling the various proprietary keywords of predecessor compilers. The only widely used open source implementation is libgomp, which is tied to gnu compilers (and doesn't work well on Windows). All widely used Fortran (and most C) compilers for OS other than Windows support at least OpenMP 2.0. Popular commercial compilers support it on Windows as well; ifort supports OpenMP 2.0 and most of 3.0, skipping much of 2.5.
Intel libiomp5 on linux supports libgomp calls; on Windows it supports Microsoft vcomp calls; thus Intel OpenMP goes beyond other implementations in supporting a useful degree of interoperability.
0 Kudos
Steven_L_Intel1
Employee
2,196 Views
Back in the mid-1990s, it was a popular thing to tack the word "Open" onto something to indicate that it had some sort of non-proprietary interface. It didn't always mean "open source". I remember when DEC renamed VMS to OpenVMS largely because it met the POSIX standard. As we used to joke, "The 'Open' is silent". In the case of OpenMP, it's a multi-vendor standard, though not an official standard in the sense that it is formally recognized by an international standards body.
0 Kudos
Reply