- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I want to compile my MPI/OpenMP hybrid code. But Intel Fortran compiler 10.0 can support it. I can only use "ifort a.f -openmp" to compile OpenMP's code, and use "mpif77 b.f" to compile MPI's code.
But how can I compile MPI/OpenMP hybrid code? thanks!
jason
I want to compile my MPI/OpenMP hybrid code. But Intel Fortran compiler 10.0 can support it. I can only use "ifort a.f -openmp" to compile OpenMP's code, and use "mpif77 b.f" to compile MPI's code.
But how can I compile MPI/OpenMP hybrid code? thanks!
jason
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you mean that your mpif77 refers to a compiler which doesn't support OpenMP? mpif77 usually is a script which invokes a compiler. If that compiler supports OpenMP, mpif77 then supports the same OpenMP options.
Intel MPI makes a somewhat unusual distinction, where mpif77 refers to gfortran, while mpiifort refers to ifort. You can still use mpif77 -fopenmp, if your gfortran is up to date, such as the gfortran 4.2.1 which came with my current linux. The libiomp which comes with ifort 10.1 is compatible with gcc OpenMP. You can mix 'mpicc -fopenmp' with 'mpiifort -openmp -openmp-lib compat', if you take care to link with the libiomp implied by this ifort option.
If you are using an open source MPI, reconfigure so that mpif77 does use an OpenMP compiler (preferably ifort). You would want to use the same Fortran throughout, to avoid run-time library conflicts.
Intel MPI makes a somewhat unusual distinction, where mpif77 refers to gfortran, while mpiifort refers to ifort. You can still use mpif77 -fopenmp, if your gfortran is up to date, such as the gfortran 4.2.1 which came with my current linux. The libiomp which comes with ifort 10.1 is compatible with gcc OpenMP. You can mix 'mpicc -fopenmp' with 'mpiifort -openmp -openmp-lib compat', if you take care to link with the libiomp implied by this ifort option.
If you are using an open source MPI, reconfigure so that mpif77 does use an OpenMP compiler (preferably ifort). You would want to use the same Fortran throughout, to avoid run-time library conflicts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I installed MPICH2 with ifort. Let me try.
thanks a lot. :D
thanks a lot. :D

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