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

libiomp5md.dll not found and static libraries

baldas10
Beginner
4,745 Views

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 Replies
Steven_L_Intel1
Employee
4,702 Views
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.
0 Kudos
baldas10
Beginner
4,702 Views

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?

0 Kudos
Steven_L_Intel1
Employee
4,702 Views
/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?
0 Kudos
baldas10
Beginner
4,702 Views

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?

0 Kudos
Steven_L_Intel1
Employee
4,702 Views

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?

0 Kudos
baldas10
Beginner
4,702 Views

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

0 Kudos
Steven_L_Intel1
Employee
4,702 Views

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'.

0 Kudos
baldas10
Beginner
4,702 Views

This is my code to specify the IMSL libraries:

INCLUDE 'link_fnl_static.h'
use ifport

Where is the problem?

Thank you for cooperation

0 Kudos
Steven_L_Intel1
Employee
4,702 Views
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.
0 Kudos
baldas10
Beginner
4,702 Views
I attach the request files.
0 Kudos
Steven_L_Intel1
Employee
4,702 Views
Oh, I see. You didn't add /Qopenmp-link:static to the Fortran command line property.
0 Kudos
baldas10
Beginner
4,702 Views

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

0 Kudos
Steven_L_Intel1
Employee
4,702 Views
The buildlog you uploaded is incomplete. Please do a Rebuild of the project and attach the new buildlog. I don't need the map.
0 Kudos
baldas10
Beginner
4,702 Views
I attach the buildlog
0 Kudos
Steven_L_Intel1
Employee
4,702 Views

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.

0 Kudos
baldas10
Beginner
4,703 Views

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

Thank you!!!

Baldas

0 Kudos
Steven_L_Intel1
Employee
4,703 Views
I am sure that works, but would very much like to know where the reference was coming from....
0 Kudos
baldas10
Beginner
4,703 Views

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?

0 Kudos
Steven_L_Intel1
Employee
4,703 Views

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.

0 Kudos
baldas10
Beginner
4,281 Views

Ok.

The use of libiomp5mt.lib resolve the problem.

Thank you very much for cooperation.

0 Kudos
Reply