[mpich-discuss] MPI Conditional Compile
chan at mcs.anl.gov
chan at mcs.anl.gov
Wed Dec 2 11:50:24 CST 2009
You can check the MPE logging example code, fpilog_pack.F, in
<install_dir>/share/examples_logging. The build instruction
for the file is in the Makefile in the directory. The implicit
rule for .F.o in the Makefile shows how cpp is used with
mpi fortran wrapper. This is more complicated than it is
necessary for intel compiler because MPE assumes fortran
compiler does not accept -Dmacro=value for portability reason.
For Intel compiler, you don't need to use cpp.
A.Chan
----- "Gulshan Singh" <sgulshan at gmail.com> wrote:
> A question related to my previous e-mail.
>
> I am trying to use conditional compile for develop the code. No
> success so
> far. Do you have any example codes in FORTRAN or any other language
> that
> shows how to do it for MPI.
>
> Gulshan
>
> On Tue, Dec 1, 2009 at 10:21 AM, Anthony Chan <chan at mcs.anl.gov>
> wrote:
>
> >
> > There are couple ways of doing what you want. You could add macros
> > to your fortran MPI program around all MPI calls, and enable those
> > calls conditionally through preprocessor (I think intel compiler
> supports
> > this, if not, you can always use GNU's cpp). The 2nd way is that
> you can
> > gather all MPI calls used in your code and implement a null MPI
> library
> > when MPI isn't available.
> >
> > A.Chan
> > ----- "Gulshan Singh" <sgulshan at gmail.com> wrote:
> >
> > > I am an MPI user. I am using Intel fortran on unix to develop and
> run
> > > my
> > > codes.
> > > This e-mail is to ask if it is possible to write a code with
> > > conditional
> > > compile. In this if the MPI flag is on then the executable is MPI
> > > based and
> > > can run on multiple processors. But if the flag is not on (off)
> then
> > > the
> > > executable has nothing to do with MPI. The executable should run
> on a
> > > computer when MPI is not even installed.
> > >
> > > Therefore, is it possible? If so then where can I find
> information
> > > about it.
> > >
> > > Gulshan
> > >
> > > _______________________________________________
> > > mpich-discuss mailing list
> > > mpich-discuss at mcs.anl.gov
> > > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> > _______________________________________________
> > mpich-discuss mailing list
> > mpich-discuss at mcs.anl.gov
> > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> >
More information about the mpich-discuss
mailing list