FDS 6 mit niedrigerer Compiler-Optimierung

Randy McDermott hat vergangenen Freitag den Grad der Compiler-Optimierung von -O3 auf -O2 herunter gesetzt, offensichtlich aufgrund von aufgetretenen Compiler-Fehlern.

Compiler-Optimierung kann einen großen Einfluss auf die Geschwindigkeit des durch den Compiler generierten Programm-Codes haben. Die bisher angewandte Option -O3 stellt grundsätzlich die höchste Stufe der (standardisierten) Optimierung dar, kann aber auch mit einer höheren Wahrscheinlichkeit die Ursache für Compiler-Abbrüche, Fehlermeldungen oder (schlechtesten falls) falsche Ergebnisse sein. Die neu voreingestellte Option -O2 compiliert weniger aggressiv optimierend. Grundsätzlich gibt es noch die (potentiell gewinnträchtige) Möglichkeit Programm-Code auf eine individuelle CPU zu optimieren, was aber einen sehr hohen Aufwand darstellt.

In wie fern sich die niedrige Optimierungsstufe tatsächlich auf die Laufgeschwindigkeit auswirkt, ist noch offen.

2 Kommentare

  1. Randy,

    thanks for yor comment. It is pretty good to know that you, the developers, care about such things in detail. I think most people would just have checked ‚does it run?‘.
    Concerning O3 and O2: I did some tests with gfortran month ago (never used ifort) and found the same performance characteristica of O2 and O3. While having found this for gfortran does not mean being true for ifort, I was curious about AVX, but head no actual CPU supporting this. Perhaps I will give it a try with FDS 6 released.

    Best regards
    Boris

  2. Boris,

    This change was not made lightly. We found instances where the code was giving completely different (incorrect) results with -O3. This was true of both ifort 13 and 14. We compared a 1 million cell case (100^3 box) with both optimizations and found virtually no difference in speed. It is even possible that -02 is faster in some cases, so users should not get too worried about this change. If the added speed of compiler optimization is essential, then the user should be compiling their own code on their specific architecture with -xhost.

    Thanks for staying current and helping to inform the FDS user community!

    Best,
    Randy

Kommentare sind geschlossen.

WordPress Cookie Hinweis von Real Cookie Banner