none
OpenMP does not work on release mode RRS feed

  • Question

  • I have coded a professional model using c++ dll, which uses OpenMP to parallel. When this dll was connected to another exe in Debug mode, the parallel parts speed up. But in Release model (the same config with Debug mode),  the time of one core is same as four cores. Can OpenMP be used in Release mode?
    Friday, July 10, 2015 4:51 PM

All replies

  • Yes, OpenMP can be used in release mode and it should be used to increase you program performance. I can see several reason to not getting a performance boost using OpenMP in release mode. The first one is that you have different settings in Debug and Release and the Release mode setting does not enable OpenMP.

    The second reason might be the fact the C++ code that is compiled in release mode gets performance boost of sometimes 10X or even 100X, which means that if the OpenMP parallel code segment is not long enough, you will not gain a performance boost and sometime your code will even run slower since the overhead of managing the fork/join of threads.

    Alon.

     


    אלון פליס http://codevalue.net

    Tuesday, August 18, 2015 11:32 PM