Loading...
You are not logged-in Login/Register





  • Posts   Search Threads
  • Igor LevickiNovember 11, 2008 10:52 PM PST   
    11.0.061 OpenMP issue -- libiomp5md.dll required to run apps compiled with /MT

    As the title says, libiomp5md.dll seems to be required to run applications compiled with /MT switch which I believe to be an error. If I select static linking I mean it!

     



    --
    Regards,
    Igor Levicki

    If you find my post helpfull, please rate it and/or select it as a best answer where applies. Thank you.

    TimP (Intel)November 12, 2008 6:51 AM PST
    Rate
     
    Re: 11.0.061 OpenMP issue -- libiomp5md.dll required to run apps compiled with /MT

    Quoting - Igor Levicki

    As the title says, libiomp5md.dll seems to be required to run applications compiled with /MT switch which I believe to be an error. If I select static linking I mean it!

     

    I was looking in my 32-bit installation yesterday, and couldn't find static versions of this library.  Maybe the linker has the same issue.



    Igor LevickiNovember 12, 2008 2:03 PM PST
    Rate
     
    Re: 11.0.061 OpenMP issue -- libiomp5md.dll required to run apps compiled with /MT

    Nope, the file (libiomp5mt.lib) is there, your install is either corrupted or you looked in the wrong folder -- folder hierarchy has changed with 11.0.
    There is a workaround with specifying /nodefaultlib:libiomp5md.lib, and adding libiomp5mt.lib to the dependency list for each OpenMP project, architecture, and configuration but that is ugly, tedious and error-prone so I am not going to accept that.


    --
    Regards,
    Igor Levicki

    If you find my post helpfull, please rate it and/or select it as a best answer where applies. Thank you.

    pbkennedNovember 17, 2008 9:36 AM PST
    Rate
     
    Re: 11.0.061 OpenMP issue -- libiomp5md.dll required to run apps compiled with /MT

    The 11.0 Windows compilers (both C++ and Fortran) have decoupled /MT from having any effect on which OpenMP runtime (static or dynamic) gets linked.  In fact, all of /MT[d], /MD[d], and /ML[d] (latter VS2003 only) now only effect which MS C runtime is linked. 
    We made this change because we want dynamic to be the default when linking the OpenMP RTL.  The use of static OpenMP libraries is not recommended, because they might cause multiple libraries to be linked in an application. The condition is not supported and could lead to unpredictable results.  It can also cause Thread Checker false positives and other problems with the Intel Threading tools.
    If you want to link against the static OpenMP RTL, you must add /Qopenmp-link:static, which is a new switch for 11.0.  So to produce a purely static executable, compile/link with /MT /Qopenmp-link:static
    Patrick Kennedy
    Intel Compiler Lab


    Igor LevickiNovember 17, 2008 4:35 PM PST
    Rate
     
    Re: 11.0.061 OpenMP issue -- libiomp5md.dll required to run apps compiled with /MT

    Quoting - pbkenned
    The 11.0 Windows compilers (both C++ and Fortran) have decoupled /MT from having any effect on which OpenMP runtime (static or dynamic) gets linked.  In fact, all of /MT[d], /MD[d], and /ML[d] (latter VS2003 only) now only effect which MS C runtime is linked. 
    We made this change because we want dynamic to be the default when linking the OpenMP RTL.  The use of static OpenMP libraries is not recommended, because they might cause multiple libraries to be linked in an application. The condition is not supported and could lead to unpredictable results.  It can also cause Thread Checker false positives and other problems with the Intel Threading tools.
    If you want to link against the static OpenMP RTL, you must add /Qopenmp-link:static, which is a new switch for 11.0.  So to produce a purely static executable, compile/link with /MT /Qopenmp-link:static
    Patrick Kennedy
    Intel Compiler Lab

    Patrick,

    I see now that in Visual Studio 2008 Microsoft did the same stupid thing. Sigh.

    In my opinion, since the OpenMP is also part of the runtime (in the sense that it contains functionality needed at program run-time), it should exhibit the same behavior as the C and C++ runtime libraries with regards to linking. In other words, specifying /MT for a project with no external dependencies should produce a standalone executable.

    I understand the motivation behind the change, and I am fully aware of the problem caused by multiple statically linked OpenMP libraries (I faced it myself), but this is one of those cases where I believe the opt-in strategy would be a much better solution. I would leave /MT switch alone and add /Qopenmp-link:dynamic. That way the default for simple projects (single .EXE or .DLL) would be to link statically, and you could always override it for more complex projects.



    --
    Regards,
    Igor Levicki

    If you find my post helpfull, please rate it and/or select it as a best answer where applies. Thank you.

    darkskyDecember 7, 2008 3:19 AM PST
    Rate
     
    Re: 11.0.061 OpenMP issue -- libiomp5md.dll required to run apps compiled with /MT

    Guys - Slightly off topic, but related.  The latest linpack (10.1) for windows asks for that same file to run (libiomp5md.dll).  I have been googling in an attempt to locate it so I can run linpack, but to no end.  Where can one obtain libiomp5md.dll?

     

     



    Igor LevickiDecember 8, 2008 9:01 AM PST
    Rate
     
    Re: 11.0.061 OpenMP issue -- libiomp5md.dll required to run apps compiled with /MT

    Quoting - darksky

    Guys - Slightly off topic, but related.  The latest linpack (10.1) for windows asks for that same file to run (libiomp5md.dll).  I have been googling in an attempt to locate it so I can run linpack, but to no end.  Where can one obtain libiomp5md.dll?

     

     

    You see, that is exactly what I have been expecting to hear. Since /MT no longer means "produce standalone executable" and the setup build process for linpack is most likely automated and doesn't check binary dependencies (which can't be checked without installing on a clean computer and attempting to run the program with human supervision after each build) it failed to include newly required OpenMP DLL.

    That mishap is precisely the reason why such behavior changes should be opt-in.

    With that said, I am expecting to see more customer reports like this one as people start using 11.0 instead of 10.1 compiler in their projects because the change wasn't properly documented in the compiler Release Notes.

    In this case Intel followed suit after Microsoft introduced identical change in their compiler, but in my opinion they didn't have to copy the bad part of Microsoft's decision -- they could have done it smarter.

     



    --
    Regards,
    Igor Levicki

    If you find my post helpfull, please rate it and/or select it as a best answer where applies. Thank you.

    darkskyDecember 8, 2008 12:03 PM PST
    Rate
     
    Re: 11.0.061 OpenMP issue -- libiomp5md.dll required to run apps compiled with /MT

    Igor - I got the jist of your opinion although I am no programmer :)  I'm still wondering what I need to do on my end to run Linpack.  Is it as simple as downloading the aforementioned dll and if so, where can I obtain it?  I have followed many different google links, but haven't located it anywhere.

    Thank you in advance.

    Quoting - Igor Levicki

    You see, that is exactly what I have been expecting to hear. Since /MT no longer means "produce standalone executable" and the setup build process for linpack is most likely automated and doesn't check binary dependencies (which can't be checked without installing on a clean computer and attempting to run the program with human supervision after each build) it failed to include newly required OpenMP DLL.

    That mishap is precisely the reason why such behavior changes should be opt-in.

    With that said, I am expecting to see more customer reports like this one as people start using 11.0 instead of 10.1 compiler in their projects because the change wasn't properly documented in the compiler Release Notes.

    In this case Intel followed suit after Microsoft introduced identical change in their compiler, but in my opinion they didn't have to copy the bad part of Microsoft's decision -- they could have done it smarter.

     

     



    Igor LevickiDecember 8, 2008 2:32 PM PST
    Rate
     
    Re: 11.0.061 OpenMP issue -- libiomp5md.dll required to run apps compiled with /MT

    I presume you are asking about Windows version?

    You could do one of the following depending on how involved you want to become:

    1. Submit a problem report on Premier Support (https://premier.intel.com/). If you are not already registered, you can register for free (package ID to report is: w_lpk_p_10.1.0.002)

    2. Post the report about missing DLL along with a link to the download page in the Intel Math Kernel Library forum and wait for someone from Intel to read it, address the issue and publish new download.

    3. Download and install the trial version of Intel Math Kernel Library which should contain the required DLL.

    The option #3 would be the easy way out. Personally I would go for the option #1 because I am pedantic -- if Linpack is a standalone download (and it is) it shouldn't have unresolved dependencies.

    If you find my answer helpfull please rate my post. Thank you.



    --
    Regards,
    Igor Levicki

    If you find my post helpfull, please rate it and/or select it as a best answer where applies. Thank you.

    StanDecember 10, 2008 4:48 AM PST
    Rate
     
    Re: 11.0.061 OpenMP issue -- libiomp5md.dll required to run apps compiled with /MT

    Quoting - pbkenned
    The 11.0 Windows compilers (both C++ and Fortran) have decoupled /MT from having any effect on which OpenMP runtime (static or dynamic) gets linked.  In fact, all of /MT[d], /MD[d], and /ML[d] (latter VS2003 only) now only effect which MS C runtime is linked. 
    We made this change because we want dynamic to be the default when linking the OpenMP RTL.  The use of static OpenMP libraries is not recommended, because they might cause multiple libraries to be linked in an application. The condition is not supported and could lead to unpredictable results.  It can also cause Thread Checker false positives and other problems with the Intel Threading tools.
    If you want to link against the static OpenMP RTL, you must add /Qopenmp-link:static, which is a new switch for 11.0.  So to produce a purely static executable, compile/link with /MT /Qopenmp-link:static
    Patrick Kennedy
    Intel Compiler Lab

     

    Slightly off-topic - but still related to the thread subject - 

    I did probably fall into problem related to this 'new' /MT behaviour - first of all - I am NOT using OpenMP (however I'm using parallerisation) - therefore I do not expect that my executable is dependant of any OpenMP library.

    What a surprise - when I do start the program - on one of my PC I can see quite annoying message: 

    Cannot find import; DLL may be missing, corrupt, or wrong version

    File "libguide40.dll", error 998

     

    Well - using /MT - I was sure that all the libs are statically linked (I'm wrong - ok) - but why the hell libguide40 is requested by my executable? In your help it is written that it is used only for OpenMP support - there is no information that it is used for paraller option. Or OpenMP library is required also due to other compiler settings / other libraries?

    With previous version of Intel Compiler I had no such issues btw.

     

    Thanks,

    Stan

     



    cGPSmapper

    Igor LevickiDecember 10, 2008 5:38 AM PST
    Rate
     
    Re: 11.0.061 OpenMP issue -- libiomp5md.dll required to run apps compiled with /MT

     

    Slightly off-topic - but still related to the thread subject -

    I did probably fall into problem related to this 'new' /MT behaviour - first of all - I am NOT using OpenMP (however I'm using parallerisation) - therefore I do not expect that my executable is dependant of any OpenMP library.

    What a surprise - when I do start the program - on one of my PC I can see quite annoying message:

    Cannot find import; DLL may be missing, corrupt, or wrong version

    File "libguide40.dll", error 998

     

    Well - using /MT - I was sure that all the libs are statically linked (I'm wrong - ok) - but why the hell libguide40 is requested by my executable? In your help it is written that it is used only for OpenMP support - there is no information that it is used for paraller option. Or OpenMP library is required also due to other compiler settings / other libraries?

    With previous version of Intel Compiler I had no such issues btw.

     

    Thanks,

    Stan

     

     

    Stan,

    Auto-parallelization (using -Qparallel) uses OpenMP. Therefore you fell into the trap of a poorly documented breaking change of /MT switch behavior which I described above.

    As I said this is Microsoft's screwup to begin with -- they were the first to decouple OpenMP linkage from CRT linkage and in my opinion they did it in a completely wrong way.

    I understand the neccessity of the change, but /MT switch always implied standalone executable, and OpenMP itself (however decoupled it may seem because of being in a separate library) is still part of the language, and thus should be treated in the same manner as the language runtime.

    What I would really like to know is why OpenMP was put into the separate library to begin with?

    Why it wasn't handled in the same manner as the CRT when it comes to multiple inclusions?

    If I remember correctly you can safely link several library and object files which are all referencing CRT functions as long as they use the same linkage type (all static or all dynamic). Why OpenMP wasn't made a part of CRT is really beyond me. It would be nice if someone knowledgeable from Intel could answer that.

     



    --
    Regards,
    Igor Levicki

    If you find my post helpfull, please rate it and/or select it as a best answer where applies. Thank you.

Forum jump:  

Intel Software Network Forums Statistics

16,371 users have contributed to 46,345 threads and 163,979 posts to date.

In the past 24 hours, we have 17 new thread(s) 90 new posts(s), and 65 new user(s).

In the past 3 days, the most popular thread for everyone has been Formula for the intersection of straight lines The most posts were made to Take a look at John Burkhard&# The post with the most views is \"-check none\" generates error

Please welcome our newest member theoriginalgunn


For more complete information about compiler optimizations, see our Optimization Notice.