Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29274 Diskussionen

libiomp5md.dll not found and static libraries

baldas10
Einsteiger
4.740Aufrufe

I have Microsoft Visual Studio 2008 with Intel Visual Fortran Compiler 11.1 in my machine.

I have a problem with a DLL libraries in Intel Visual Fortran Project.

In particular, when I try to use a *.exe in other machines (without VS), is not possibile to run the executable, because the file libiomp5md.dll is not found.

How is possible to set a static libraries in intel visual project and add to project a static library (*.lib)?

Thanks in advance for support,

Best regards

0 Kudos
20 Antworten
Steven_L_Intel1
Mitarbeiter
4.697Aufrufe
The default is to use static libraries except for that one. You can add the option /Qopenmp-link:static under Command Line > Additional Options to force that one to be static as well. Or, you can install the Redistributables package that can be downloaded from the Intel Registration Center.
baldas10
Einsteiger
4.697Aufrufe

I try to add the option /Qopenmp-link:static under in

Properties > Configuration Properties > Fortran > Command Line > Additional Options

and / or

Properties > Configuration Properties > Linker > Command Line > Additional Options

Moreover, I try to add libiomp5mt.lib to my project.

However, I have the same problem: the executable in other machine request libiomp5md.dll.

How can I resolve my problem?

Steven_L_Intel1
Mitarbeiter
4.697Aufrufe
/Qopenmp-link:static is a Fortran property, not a linker property. What other libraries are you linking with? Are you sure you are running the newly built executable?
baldas10
Einsteiger
4.697Aufrufe

I'm sure that i have run the new executable.

In the properties project (that is a project for QuickWin Application), with a reference to libraries, i have the settings:

  • Fortran > Libraries > Runtime Library: Quickwin (other options are setting to 'No')
  • Linker > Input > Additional dependencies: kernel32.lib
  • Linker > Input > Ignore specific library: dfconsol.lib

It is correct add the libiomp5mt.lib file to my project?

Steven_L_Intel1
Mitarbeiter
4.697Aufrufe

Um, why do you find it necessary to ignore dfconsol.lib? Are you linking in CVF objects?

Show me the command options as listed under "Command Line". You should not need to reference libiomp5mt.lib. Are you using IMSL?

baldas10
Einsteiger
4.697Aufrufe

I try to ignore dfconsol.lib, but i have the same problem.

I use IMSL.

Command options:

/nologo /debug:full /Od /Qparallel /warn:declarations /warn:unused /warn:truncated_source /names:uppercase /module:"Debug/" /object:"Debug/" /traceback /check:bounds /check:format /check:output_conversion /libs:qwin /winapp /4Yportlib /c

Thank you

Steven_L_Intel1
Mitarbeiter
4.697Aufrufe

Ok, you use IMSL - that is probably the key. Which INCLUDE line do you use to specify the IMSL libraries? If it is 'LINK_FNL_SHARED.H', then you will get this problem. Instead, use 'LINK_FNL_STATIC.H'.

baldas10
Einsteiger
4.697Aufrufe

This is my code to specify the IMSL libraries:

INCLUDE 'link_fnl_static.h'
use ifport

Where is the problem?

Thank you for cooperation

Steven_L_Intel1
Mitarbeiter
4.697Aufrufe
Please do this. In the linker properties, General page, set Show Progress to "Show all progress messages", and on the Debug page, set Generate Map File to "Yes". Rebuild the project. Attach to a reply here the buildlog.htm and the .map file that were produced.
baldas10
Einsteiger
4.697Aufrufe
I attach the request files.
Steven_L_Intel1
Mitarbeiter
4.697Aufrufe
Oh, I see. You didn't add /Qopenmp-link:static to the Fortran command line property.
baldas10
Einsteiger
4.697Aufrufe

I attach the files obtained with the /Qopenmp-link:static command.

In the previous files, I don't add /Qopenmp-link:static in order to obtain my original configuration.

Sorry

Steven_L_Intel1
Mitarbeiter
4.697Aufrufe
The buildlog you uploaded is incomplete. Please do a Rebuild of the project and attach the new buildlog. I don't need the map.
baldas10
Einsteiger
4.697Aufrufe
I attach the buildlog
Steven_L_Intel1
Mitarbeiter
4.697Aufrufe

Very interesting. I am fairly confident that the reference to libiomp5md.lib is coming from IMSL, but I can't figure out why, as on my system, the IMSL link_fnl_static.h file does not name libiomp5md.lib. What are the contents of C:\Program Files\VNI\imsl\fnl600\IA32\include\dll\link_fnl_static.h ?

You can probably solve the problem by adding libiomp5md.lib to the "Ignore library" list in the linker property pages.

baldas10
Einsteiger
4.698Aufrufe

I resolve my problem by adding libiomp5md.lib to the "Ignore library" list in the linker property pages!!!

Thank you!!!

Baldas

Steven_L_Intel1
Mitarbeiter
4.698Aufrufe
I am sure that works, but would very much like to know where the reference was coming from....
baldas10
Einsteiger
4.698Aufrufe

This are the contents of link_fnl_static.h:

dec$objcomment lib:'imsl.lib'
dec$objcomment lib:'imslsuperlu.lib'
dec$objcomment lib:'imslscalar.lib'
dec$objcomment lib:'imslblas.lib'
dec$objcomment lib:'imsls_err.lib'
dec$objcomment lib:'imslmpistub.lib'

In the specification of link_fnl_static.h, I have this istructions:

1- INCLUDE 'link_fnl_static.h'
2 - !DEC$ OBJCOMMENT LIB:'libiomp5md.lib'
3 - use ifport

Is the line 2 the problem? It is mandatory?

Steven_L_Intel1
Mitarbeiter
4.698Aufrufe

Yes, line 2 is the problem. You want instead:

!DEC$ OBJCOMMENT lib:'libiomp5mt.lib'

or to build your application with OpenMP enabled (and add /Qopenmp-link:static).

Normally, we recommend using the DLL form of the OpenMP library, but understand that some customers want an all-static build.

baldas10
Einsteiger
4.276Aufrufe

Ok.

The use of libiomp5mt.lib resolve the problem.

Thank you very much for cooperation.

Antworten