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
Neuer Beitragender I
1.333Aufrufe
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 Antworten
Barbara_P_Intel
Mitarbeiter
1.301Aufrufe

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

 

mohanmuthu
Neuer Beitragender I
1.280Aufrufe

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?

Antworten