Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26729 Discussions

error #6404 emerges when call a IMSL function

lu_z_
Beginner
138 Views

 Hi, I was using a second handed code which needs to call IMSL library. In the original code, it was written like 

use msimsl

 Within my current ivf + vs2013 combination, I change this into INCLUDE 'link_fnl_static.h' 

And there are two IMSL functions are used in my code, DNORDF and RNUNF respectively. When I built the project in VS, the compiler threw the error message

1>C:\Users\zhanglu\Desktop\computational macroeconomics\endogenous grid method\Barillas&JVF's EGM code\sub_tauchen.f90(38): error #6404: This name does not have a type, and must have an explicit type.   [DNORDF]
1>compilation aborted for C:\Users\zhanglu\Desktop\computational macroeconomics\endogenous grid method\Barillas&JVF's EGM code\sub_tauchen.f90 (code 1)

and same error for RNUNF.

But I have defined the variable. So the problem is very likely stem from how I call the IMSL library. So do I miss something? Thank you for your advice.

 

0 Kudos
4 Replies
Arjen_Markus
Valued Contributor III
138 Views

Could you show us the code? What is the contents of that include file?

The module defines all the interfaces for the various public routines, I would guess that the file that you include simply is incomplete wrt these two functions.

It also raises the question: why replace the use statement?

mecej4
Black Belt
138 Views

You are caught between the use of old names such as DNORDF and new names such as D_ANORDF.  The INCLUDE 'link_fnl_static.h'  statement pertains only to making sure that the linker searches the relevant IMSL libraries, whereas you need USE statements for the compiler to get the correct types and interfaces.

You could add a USE ANORDF_INT statement, and change DNORDF to D_ANORDF in your sources. Or, you could add a USE NUMERICAL_LIBRARIES statement, but that may slow down compilations a bit.

Alternatively, if you want to call the old names, simply declare the function DNORDF to be of type double precision.

Arjen: Why change the USE statement? There is no MSIMSL.mod in the Intel IMSL package. Vendors such as MS and Intel who repackage IMSL with their compilers usually make minor modifications to make it easier to use IMSL with their specific compiler. An undesirable side-effect is that such modifications may make it more difficult or impossible to use the library with a compiler from a different vendor.

lu_z_
Beginner
138 Views

 Thanks, @mecej4, adding USE ANORDF_INT  statement help me solve the type problem. However, during the linking process, another "unresolved external symbol " emerged. I  open another thread https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/720854, can you take a look? Really appreciate it.

Steve_Lionel
Black Belt Retired Employee
138 Views

I answered in that thread.

Reply