- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
I'd like to know is it possible to make parallel processing programs in IVF. Due to the fact that I'm pretty knew to that technology, I barely grasp the idea of how the paralel processing is performed.Probably thefirstof all, the compiler should be compatible enough to do the data marshalling among the processors and the code should also be in paralel-able form, but actually when that OpenMPI (there are other platforms as well) comes into play and is it mandatory evenif the compiler supports parallel processing.
For example if I try to run, a program which has paralelism I got the following errors on linker :
Any simple program just to demonstrate the paralel programing will be appreciated.
Regards,
I'd like to know is it possible to make parallel processing programs in IVF. Due to the fact that I'm pretty knew to that technology, I barely grasp the idea of how the paralel processing is performed.Probably thefirstof all, the compiler should be compatible enough to do the data marshalling among the processors and the code should also be in paralel-able form, but actually when that OpenMPI (there are other platforms as well) comes into play and is it mandatory evenif the compiler supports parallel processing.
For example if I try to run, a program which has paralelism I got the following errors on linker :
error LNK2019: unresolved external symbol _MPI_NULL_COPY_FN referenced in function _mp_CALC_NPES_PP gather_scatter6.obj
error LNK2019: unresolved external symbol _MPI_NULL_DELETE_FN referenced in function _GATHER_SCATTER6_mp_GATHER gather_scatter6.obj
Error 12 error LNK2019: unresolved external symbol _MPI_DUP_FN referenced in function _GATHER_SCATTER6_mp_GATHER gather_scatter6.obj
Any simple program just to demonstrate the paralel programing will be appreciated.
Regards,
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let's clear up the issue you had linking first. You have chosen to use a third-party library called OpenMPI. That's fine, but not only must you ensure that the OpenMPI libraries are provided to the linker but you must also ensure that you are calling the routines by their correct external name. It is likely that the OpenMPI routines have mixed-case names and therefore will require you to provide declarations of the OpenMPI routines that specify these mixed-case names. I know that for MPICH2 and Intel MPI there are modules or include files you can use for this purpose, but I have not looked at OpenMPI itself.
Now to your basic question - yes, Intel Fortran supports parallel processing in several ways. The first and easiest is "auto-parallel". Here, all you do is add the /Qparallel switch (in Visual Studio this is project property Fortran > Optimization > Parallel Processing > Yes.) The compiler will automatically look at loops and array operations and parallelize them, if it can, for shared memory parallelization (multicore or multiprocessor). A related feature, Guided Auto Parallelism provides you advice on changes you can make to the code to improve parallelism (and vectorization.)
Another feature, used in conjunction with auto-parallel, is the Fortran 2008 DO CONCURRENT construct. If this is used, the compiler will try to parallelize it.
A third method is the Fortran 2008 feature coarrays. This uses MPI underneath to provide parallelism, but you don't need to be concerned with the MPI aspect.
A fourth method is OpenMP - this is a time-honored and industry-standard method of adding parallelism to Fortran (and C) applications and requires that you add directives to your source. It takes some effort on your part to make sure you have described things correctly to the compiler, but the results can be very good.
A fifth method is MPI - you evidently seized on this and there's nothing wrong with it, but MPI is not built-in to the compiler so you have to supply an MPI library. You're looking at OpenMPI, other choices are MPICH2 and Intel MPI. While MPI does work on a shared-memory system, it is really intended for clusters of computers.
A sixth method is to use operating system primitives to create and manipulate threads. On Windows, using trhe Windows threading API is commonly done, but this requires more work on your part.
The Intel documentation includes an extensive chapter on parallel programming - I suggest you read it for a start.
Now to your basic question - yes, Intel Fortran supports parallel processing in several ways. The first and easiest is "auto-parallel". Here, all you do is add the /Qparallel switch (in Visual Studio this is project property Fortran > Optimization > Parallel Processing > Yes.) The compiler will automatically look at loops and array operations and parallelize them, if it can, for shared memory parallelization (multicore or multiprocessor). A related feature, Guided Auto Parallelism provides you advice on changes you can make to the code to improve parallelism (and vectorization.)
Another feature, used in conjunction with auto-parallel, is the Fortran 2008 DO CONCURRENT construct. If this is used, the compiler will try to parallelize it.
A third method is the Fortran 2008 feature coarrays. This uses MPI underneath to provide parallelism, but you don't need to be concerned with the MPI aspect.
A fourth method is OpenMP - this is a time-honored and industry-standard method of adding parallelism to Fortran (and C) applications and requires that you add directives to your source. It takes some effort on your part to make sure you have described things correctly to the compiler, but the results can be very good.
A fifth method is MPI - you evidently seized on this and there's nothing wrong with it, but MPI is not built-in to the compiler so you have to supply an MPI library. You're looking at OpenMPI, other choices are MPICH2 and Intel MPI. While MPI does work on a shared-memory system, it is really intended for clusters of computers.
A sixth method is to use operating system primitives to create and manipulate threads. On Windows, using trhe Windows threading API is commonly done, but this requires more work on your part.
The Intel documentation includes an extensive chapter on parallel programming - I suggest you read it for a start.

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