Re: MPI beginner
- From: Damian <damian@xxxxxxxxxx>
- Date: Mon, 29 Sep 2008 03:42:55 -0700 (PDT)
On Sep 29, 2:20 am, Arjen Markus <arjen.mar...@xxxxxxxxxx> wrote:
On 29 sep, 10:57, Rick <fernan...@xxxxxxxxx> wrote:
This is probably a silly question, but: is there a standard way to
compile the same code with ifort using MPI or not using it? For
instance, I could provide line of codes that would apply in each of
the two cases.
My code is used by other people, most of the time without
parallelization. That would save them the burden of installing mpi
With ifort, compiling MPI code does not work:
fortcom: Error: hello_f90.f90, line 12: Error in opening the compiled
module file. Check INCLUDE paths. [MPI]
fortcom: Error: hello_f90.f90, line 17: This name does not have a
type, and must have an explicit type. [MPI_COMM_WORLD]
call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr)
You can supply a dummy module with dummy routines and parameters.
The MPI manual may show what is needed in that case, otherwise you
will have to make one yourself.
Depending on how extensive your use of MPI is throughout your code,
you can also use C preprocessor directives to remove the MPI
references when not needed. In one code I work on, MPI is only used
when selecting one of several FFT libraries (the libraries are either
serial or use OpenMP). When we're selecting that library, we use the
preprocessor to remove all references to MPI. Presumably Fortran's
own conditional compilation facility could do the same thing, but
implementations of that facility seem rare.
- Prev by Date: Re: Alternative to the STOP statement?
- Next by Date: Re: MPI beginner
- Previous by thread: Re: MPI beginner
- Next by thread: Re: MPI beginner