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

external subroutines

jjtt
Beginner
1,590 Views

Fortran experts,

I used the Compaq visual Fortran before. Now trying to use Intel visual studio for old fortran projects. The problem is that some subroutines built in Compaq visual Fortran cannot be recognised (for example, BS2IN - computing a two-dimensional tensor-product spline interpolant). If this kind of special functions had been changed to another names, where can I find them or any help source?

Thanks,

Jjtt

0 Kudos
10 Replies
Steven_L_Intel1
Employee
1,590 Views

That's an IMSL routine. Did you have the Professional Edition of CVF and do you now have the Professional Edition of Intel Visual Fortran? That's what would provide IMSL.

You need to make some changes in Visual Studio and add one line of source to use the IMSL routines. For information, see the section on using IMSL in the Building Applications..Using Libraries section of the on-disk documentation.

0 Kudos
jjtt
Beginner
1,590 Views

Steve,

I found IMSL.lib and from the imsl.pdf found that need one line for using it. After I add them in, I got new problem. It is either said 'error in opening the library module file (imsl_libraries)', or 'this scalar name is invalid in this context (IVPAG)'.Reason? and also I could not find 'Building Applications' file. Where tofind it?

Thanks,

Jjtt

0 Kudos
jjtt
Beginner
1,590 Views

Steve,

I think I found how to set the IMSL link. However, there are other errors. After compiling the program, I try to build the solution, then it appears that:

imsls_err.lib(e1init.obj) : error LNK2019: unresolved external symbol __OtsMove referenced in function _E1INIT

IMSL.lib(LSLRT.obj) : error LNK2001: unresolved external symbol __OtsMove

IMSL.lib(STBSV.obj) : error LNK2001: unresolved external symbol __OtsMove

IMSL.lib(ACHAR.obj) : error LNK2001: unresolved external symbol __OtsMove

imsls_err.lib(e1psh.obj) : error LNK2001: unresolved external symbol __OtsMove

Could you help me with that?

Thanks,

Jjtt

0 Kudos
Steven_L_Intel1
Employee
1,590 Views

It sounds to me as if you're using the IMSL library from CVF with Intel Fortran. You can't do that. Do you have the Standard Edition or Professional Edition of Intel Visual Fortran? Only the Professional Edition includes IMSL.

In Visual Studio, select Help and then Intel Fortran Docuimentation. When the page comes up in the browser, click on Intel Visual Fortran Compiler Documentation. On the Contents tab, click on the + by Building Applications, then Using Libraries, then Using the IMSL* Mathematical and Statistical Libraries

0 Kudos
jjtt
Beginner
1,590 Views

I think I have the professional edition.

1. I add 'use numerical_libraries ; use ifport; include 'link_f90_static.h' in the main program. But I am using F77 interface, is the 'link_f90_static.h' right?

2. In other subroutines, I didn't add 'use Numerical_libraries' even I use IMSL routines, then I got error 'unsovled external symbol. But if I add that in, it told me that 'use statement is not positioned correctly with the scoping unit. Why?

3. I can find 'bs2vl_int.mod' but not 'dbs2vl_int.mod'. In the IMSL guide manual, it is said the dbs2vl is double precision. But in the program, the 'dbs2vl' is not reconginised. Could you tell me the reason?

Thanks,

Jjtt

0 Kudos
Steven_L_Intel1
Employee
1,590 Views

1. Yes, link_f90_static.h is correct.

2. The USE statement must come before any other declarations including IMPLICIT.

3. If you are using the F77 interfaces, do not use the xxx_int modules.

0 Kudos
jjtt
Beginner
1,590 Views

The compiling seems working now. when running, got an error:

forrt1: sever (157): program exception - access violation. Routine, source and line are unknown. I checked the help mannual. Tried suggestions, but didn't find the problem causing this error. Where is wrong?

Thanks,

Jjtt

0 Kudos
Steven_L_Intel1
Employee
1,590 Views
It is impossible to tell what is wrong without seeing the whole application. You might want to look at my article on access violations and see if you can figure it out. Running the program under the debugger and seeing where it fails can be a big help.
0 Kudos
jjtt
Beginner
1,590 Views

I did debugging before. But it never told me which line is wrong. Every subroutine works fine. However, after compiled them together, cause problem. I wonder, if it is possible for me to send you the application?

Thanks,

JJtt

0 Kudos
Steven_L_Intel1
Employee
1,590 Views
Certainly - do it through Intel Premier Support.
0 Kudos
Reply