Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Runtime Identification for MPI

mohanmuthu
New Contributor I
233 Views
I want to maintain same source code for normal execution and with MPI. Is there any compile or runtime variable that I can use it to identify whether its MPI or not?
0 Kudos
2 Replies
Barbara_P_Intel
Moderator
201 Views

Will the preprocessor directives, like #ifdef, do what you want? See the Fortran Developer Guide and Reference.  Although those are for compile time...

 

mohanmuthu
New Contributor I
180 Views

Though I primarily look for runtime identification, compile time identification with preprocessor directive could work as well.

 

From the above reference, I don't see any option which can identify whether MPI is invoked or not during the compilation. Could you please be specific in how you think it can be done for MPI vs non-MPI compilation?

Reply