- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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?
Link kopiert
2 Antworten
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Will the preprocessor directives, like #ifdef, do what you want? See the Fortran Developer Guide and Reference. Although those are for compile time...
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
Themen-Optionen
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite