- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is this the right place to seek help on linking in IMSL functions, if not can someone point me in the right direction?
Thanks!
Thanks!
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok. You have (perhaps understandably) missed the section of our documentation on using IMSL - this is under Building Applications > Using Libraries > Using the IMSL libraries.
Instead of naming individual libraries in the link line, the recommended method is to add a line as follows to one of your sources:
INCLUDE 'link_fnl_static.h'
If you have not also enabled OpenMP (which the IMSL documentation recommends), then add the following line as well:
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'
It is this latter that will resolve the __kmpc symbols.
Since you are using LINEAR_OPERATORS, I will also comment that if you decide to build a 64-bit application, please read this article to get replacement modules. 32-bit doesn't need this.
Instead of naming individual libraries in the link line, the recommended method is to add a line as follows to one of your sources:
INCLUDE 'link_fnl_static.h'
If you have not also enabled OpenMP (which the IMSL documentation recommends), then add the following line as well:
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'
It is this latter that will resolve the __kmpc symbols.
Since you are using LINEAR_OPERATORS, I will also comment that if you decide to build a 64-bit application, please read this article to get replacement modules. 32-bit doesn't need this.
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it is, if you are using the IMSL from Intel Visual Fortran. I suggest you read this first to see if it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, thanks, I did indeed the article suggested and have (I hope) followed its instructions.
In case it's relevant, we are dealing here with a recently-converted CVF project pair in which a FORTRAN computational engine using IMSL is linked as a static library and used by a thin C++ wrapper linked as a dll.
It turns out that in this project the only use of IMSL is in a couple of FORTRAN lines of the form
ABCD=QA.ix.F
Which could easily be rewritten, but we want to use IMSL in a different project so we persevered...
Based on an article we found we replaced the old USE IMSL with USE LINEAR_OPERATORS
We then got through compilation but the dll link failed with
error LNK2019: unresolved external symbol _OPERATION_IX_mp_DIMDVP
We eventually discovered the libs in Program Files\VNI\imsl\fnl600\IA32\lib and by trial and error chucked imsl.lib and imsl_dll.lib in as additional dependencies to the Linker input. This moved us on and now we get
In case it's relevant, we are dealing here with a recently-converted CVF project pair in which a FORTRAN computational engine using IMSL is linked as a static library and used by a thin C++ wrapper linked as a dll.
It turns out that in this project the only use of IMSL is in a couple of FORTRAN lines of the form
ABCD=QA.ix.F
Which could easily be rewritten, but we want to use IMSL in a different project so we persevered...
Based on an article we found we replaced the old USE IMSL with USE LINEAR_OPERATORS
We then got through compilation but the dll link failed with
error LNK2019: unresolved external symbol _OPERATION_IX_mp_DIMDVP
We eventually discovered the libs in Program Files\VNI\imsl\fnl600\IA32\lib and by trial and error chucked imsl.lib and imsl_dll.lib in as additional dependencies to the Linker input. This moved us on and now we get
1>imsl.lib(operation_ix.obj) : error LNK2019: unresolved external symbol ___kmpc_global_thread_num referenced in function _OPERATION_IX_mp_ZIBZBP
1>imsl.lib(operation_ix.obj) : error LNK2019: unresolved external symbol ___kmpc_threadprivate_cached referenced in function _OPERATION_IX_mp_ZIBZBP
At this point I start to run out ofideas, plus I get a growing feeling that it shouldn't be this hard and I am going about it the wrong way... :-(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok. You have (perhaps understandably) missed the section of our documentation on using IMSL - this is under Building Applications > Using Libraries > Using the IMSL libraries.
Instead of naming individual libraries in the link line, the recommended method is to add a line as follows to one of your sources:
INCLUDE 'link_fnl_static.h'
If you have not also enabled OpenMP (which the IMSL documentation recommends), then add the following line as well:
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'
It is this latter that will resolve the __kmpc symbols.
Since you are using LINEAR_OPERATORS, I will also comment that if you decide to build a 64-bit application, please read this article to get replacement modules. 32-bit doesn't need this.
Instead of naming individual libraries in the link line, the recommended method is to add a line as follows to one of your sources:
INCLUDE 'link_fnl_static.h'
If you have not also enabled OpenMP (which the IMSL documentation recommends), then add the following line as well:
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'
It is this latter that will resolve the __kmpc symbols.
Since you are using LINEAR_OPERATORS, I will also comment that if you decide to build a 64-bit application, please read this article to get replacement modules. 32-bit doesn't need this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks again Steve - that has sorted it.
I meant to add, I am also getting these warning messages :
where INGPLC.OBJ is the compiled version of the fortran file which calls IMSL.
Do you recognise these - I don't have any matches for MPIPRIV in my source code. Don't know yet if it is going to cause trouble...
I meant to add, I am also getting these warning messages :
2>tm_calc_lib.lib(INGPLC.obj) : warning LNK4049: locally defined symbol _MPIPRIV1 imported
2>tm_calc_lib.lib(INGPLC.obj) : warning LNK4049: locally defined symbol _MPIPRIV2 imported
2>tm_calc_lib.lib(INGPLC.obj) : warning LNK4049: locally defined symbol _MPIPRIVC imported
where INGPLC.OBJ is the compiled version of the fortran file which calls IMSL.
Do you recognise these - I don't have any matches for MPIPRIV in my source code. Don't know yet if it is going to cause trouble...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can ignore those warnings - they won't cause any problems. The symbols come from IMSL.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page