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

static link to IMSL

fred_ivf
Beginner
1,118 Views
Hi,

I have IVF Pro 10.0 with IMSL. I want static link to IMSL since IMSL_DLL.dll is too big. So in the .f90 file, I have:
USE imsl_libraries
INCLUDE 'link_fnl_static.h'
....

It compiled OK, but the linker gives the following errors, please help! Thx in advance.

imsls_err.lib(e1inpl.obj) : error LNK2019: unresolved external symbol ___kmpc_global_thread_num referenced in function _E1INPL
imsls_err.lib(e1lock.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
imsls_err.lib(e1init.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
imsls_err.lib(e1prt.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
imsls_err.lib(n1rgb.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
imsls_err.lib(e1ucs.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
imsls_err.lib(e1sti.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
imsls_err.lib(e1std.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
imsls_err.lib(umach.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
imsls_err.lib(e1stl.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
imsls_err.lib(e1psh.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
imsls_err.lib(n1rcd.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
imsls_err.lib(e1pop.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
imsls_err.lib(e1mes.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
imsls_err.lib(e1inpl.obj) : error LNK2019: unresolved external symbol ___kmpc_threadprivate_cached referenced in function _E1INPL
imsls_err.lib(e1init.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
imsls_err.lib(e1prt.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
imsls_err.lib(n1rgb.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
imsls_err.lib(e1ucs.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
imsls_err.lib(e1sti.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
imsls_err.lib(e1std.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
imsls_err.lib(umach.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
imsls_err.lib(e1stl.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
imsls_err.lib(e1psh.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
imsls_err.lib(n1rcd.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
imsls_err.lib(e1pop.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
imsls_err.lib(e1mes.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
imsls_err.lib(e1lock.obj) : error LNK2019: unresolved external symbol ___kmpc_critical referenced in function _E1LOCK
imsls_err.lib(e1lock.obj) : error LNK2019: unresolved external symbol ___kmpc_flush referenced in function _E1LOCK
imsls_err.lib(e1lock.obj) : error LNK2019: unresolved external symbol ___kmpc_end_critical referenced in function _E1LOCK
imsls_err.lib(e1lock.obj) : error LNK2019: unresolved external symbol ___ kmpc_set_nest_lock referenced in function _E1LOCK
imsls_err.lib(e1lock.obj) : error LNK2019: unresolved external symbol _omp_set_nest_lock referenced in function _E1LOCK
imsls_err.lib(e1lock.obj) : error LNK2019: unresolved external symbol ___kmpc_unset_nest_lock referenced in function _E1LOCK
imsls_err.lib(e1lock.obj) : error LNK2019: unresolved external symbol _omp_unset_nest_lock referenced in function _E1LOCK
imsls_err.lib(e1lock.obj) : error LNK2019: unresolved external symbol ___kmpc_init_nest_lock referenced in function _E1LOCK
imsls_err.lib(e1lock.obj) : error LNK2019: unresolved external symbol _omp_init_nest_lock referenced in function _E1LOCK

0 Kudos
6 Replies
Steven_L_Intel1
Employee
1,118 Views
Either add the option /Qopenmp or (and I would recomemnd) add this line after the INCLUDE in one source:

!DEC$ OBJCOMMENT lib:"libguide.lib"

The reason for this is that the IMSL library uses OpenMP, but for some reason they chose to recommend that users add /Qopenmp rather than adding the library to the include file.
0 Kudos
fred_ivf
Beginner
1,118 Views
Thanks, Steve! That did the trick.
0 Kudos
Samba_Ba1
Beginner
1,118 Views
Hi Steve and all,
I had the same problem using IMSL.
I did the trick of using /QopenMP on the project properties.
It did compile however, now I am having meaningless result. When I use a basic function without IMSL and without openMP the results are fine.
DO you have an idea of where this is coming from?
I saw one thread about "Roundoff error in OpenMP" but I do not know how to implement it since I do not have an idea of which variables need to be made private.
Also when I uses !DEC$ OBJCOMMENT lib:"libguide.lib" it says that it cannot find the lib.

Thanks in advance for your help,
Samba.
0 Kudos
Steven_L_Intel1
Employee
1,118 Views
Samba, your problem description is too generic for me to help with. As for libguide.lib, as of version 11.0 that should be libiomp5mt.lib (if you want to always link statically), or use /Qopenmp /Qopenmp-link:static
0 Kudos
Samba_Ba1
Beginner
1,118 Views
Hi Steve,

I indeed saw in one of the thread a replacement of libguide.lib by libiomp5mt.lib.
It did compile but I still have meaningless values.
I will try to reproduce the error with a shorter version of the code that I can post.

THanks in advance
0 Kudos
Samba_Ba1
Beginner
1,118 Views

Hi Steve,

I managed to reproduce the code in a simple example.
Note that I am using an intel dual core machine on windows XP.
The project was a visual studio 2010 project using intel composer 12.
When you run the code with /QopenMP (properties > Fortran> Language > Process OpenMP Directives)
and without it, you do not have the same answer on the local matrix.

THanks for your help,
Samba.

0 Kudos
Reply