Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

Using DLPRS (solver for linear programming problems via simplex) IMSL Library

Matthaios_Antoninis
2,093 Views
I create a new thread as it is about another subroutine, If I am wrong please inform me.
I tried to use this Subroutine ( DLPRS) in a simple program, and instead of right compilation I received 2 errors building this project. here is the report
1>imslhpc_l.lib(dl2trg.obj) : error LNK2019: unresolved external symbol DGETRF referenced in function DL2TRG
1>imslhpc_l.lib(dlslrt.obj) : error LNK2019: unresolved external symbol DTRTRS referenced in function DLSLRT
1>x64\\Debug\\Console3.exe : fatal error LNK1120: 2 unresolved externals
I suppose that I have to set some options that are not working now, please inform me about.
Please find also attached the file with the code.
Matthaios
0 Kudos
1 Solution
Steven_L_Intel1
Employee
2,093 Views
Add this line after your PROGRAM statement:

include 'link_fnl_static_hpc.h'

Remove any IMSL or MKL libraries from the linker properties. You can also use:

include 'link_fnl_shared_hpc.h'

View solution in original post

0 Kudos
5 Replies
Steven_L_Intel1
Employee
2,094 Views
Add this line after your PROGRAM statement:

include 'link_fnl_static_hpc.h'

Remove any IMSL or MKL libraries from the linker properties. You can also use:

include 'link_fnl_shared_hpc.h'
0 Kudos
mecej4
Honored Contributor III
2,093 Views
You have not reached a correct understanding of how to build a program that uses IMSL routines.

Your statement "instead of right compilation I received 2 errors" is a misinterpretation of what happened. There were no compilation errors, but there were linker errors ("unresolved external symbol") because you did not follow the protocol(s) for building IMSL-dependent applications. Steve Lionel indicated one of the protocols. Another is to specify the IMSL libraries as additional libraries to be searched in the link step. How to do this? You should consult the IMSL documentation.
0 Kudos
Steven_L_Intel1
Employee
2,093 Views
To add a bit, there are six combinations of IMSL libraries one can use. There's a set that is just IMSL and OpenMP, a set that uses Intel MKL for some functions, and a set that uses Intel MPI to distribute work (instead of OpenMP. Each of these is available in both static and DLL forms. IMSL provides the include files that have OBJCOMMENT directives that name the appropriate libraries to link against. If you are building from the command line, there are LINK_FNL_xx environment variables you can use, or you can name the libraries directly. If you choose the last, you need to make sure you get them all.
0 Kudos
Matthaios_Antoninis
2,093 Views
Thank you for your recommendation, I will take a deeper look.
I used DDLPRS (double precision) subroutine and it gives different result for the same problem comparing with an analysis that I did in CVF. In addition I received for a bigger problem FATAL ERROR 4 from DDLPRS , numerical difficulty occured; double precision may help ... but I am using double precision call (DDLPRS instead of DLPRS).
I will appreciate any suggestion.
thank you in advance
Matthaios
0 Kudos
mecej4
Honored Contributor III
2,093 Views
DDLPRS gives different result for the same problem comparing with an analysis that I did in CVF.

If you show the specific problem with source code, and explain how the two results differ, someone may take a look. Without such details, little can be done.
0 Kudos
Reply