- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have written a simple program to call an IMSL routine (below), which does not execute.
program Test_IMSL_Interface
INCLUDE 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'
Implicit none
Real(8), dimension (2,2) :: A
Real(8), dimension (2):: B,X
A(1,1)=3
A(1,2)=2
A(2,1)=4
A(2,2)=7
B(1)=7
B(2)=2
CALL D_LSARG (A,B,X)
Write(*,11) X(1)
Write(*,11) X(2)
11 Format (ES12.4)
End program Test_IMSL_Interface
The program compiles and links successfully but gives an error of access violation at the line CALL D_LSARG (A,B,X). Specific error: Access violation reading location 0xffffffffffffffff.
I have followed the instructions at
program Test_IMSL_Interface
INCLUDE 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'
Implicit none
Real(8), dimension (2,2) :: A
Real(8), dimension (2):: B,X
A(1,1)=3
A(1,2)=2
A(2,1)=4
A(2,2)=7
B(1)=7
B(2)=2
CALL D_LSARG (A,B,X)
Write(*,11) X(1)
Write(*,11) X(2)
11 Format (ES12.4)
End program Test_IMSL_Interface
The program compiles and links successfully but gives an error of access violation at the line CALL D_LSARG (A,B,X). Specific error: Access violation reading location 0xffffffffffffffff.
I have followed the instructions at
http://software.intel.com/en-us/articles/installing-and-using-the-imsl-libraries/
for adding the library and include paths to IMSL for Intel64. I am running MS Visual Studio/Intel 64, Version 11.1 on Win7 64 bit.
I would appreciate some help.
Thanks in advance.
Brad
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error is that you are calling D_LSARG which is the "Fortran 90" interface specific, but you have not added:
USE LSARG_INT
to make that interface available. So the compiler doesn't know that D_LSARG wants the arrays passed by descriptor.
Add the USE LSARG_INT following the PROGRAM statement and change D_LSARG to LSARG. You should not use the specific names unless you are doing something that requires them, such as passing as an actual argument. Generics are your friend.
USE LSARG_INT
to make that interface available. So the compiler doesn't know that D_LSARG wants the arrays passed by descriptor.
Add the USE LSARG_INT following the PROGRAM statement and change D_LSARG to LSARG. You should not use the specific names unless you are doing something that requires them, such as passing as an actual argument. Generics are your friend.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your correction worked fine.
Thank you very much Steve.
Brad
Thank you very much Steve.
Brad
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