[mpich-discuss] MPI Conditional Compile

Anthony Chan chan at mcs.anl.gov
Tue Dec 1 10:21:28 CST 2009


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


More information about the mpich-discuss mailing list