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 have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.

IMSL quadrature and modules

rschaa
Beginner
559 Views
Hi there,

I like to integrate a function from within a module. The module consists of a subroutine and a function.
See also IMSL documentation page 604 (QDAG).

The example from the IMSL doc runs just fine, but when I integrate this example in a module it fails with a unhandled exception;
The subroutine in my module is the main program from the IMSL example and there is the function.

The error should be due to false initializiations I guess...
Some code of mine:

MODULE ABEL

CONTAINS

SUBROUTINE S_ABEL
USE IMSL
REAL :: F
EXTERNAL :: QDAG
.
.
.
CALL QDAG(F,...)
END SUBROUTINE S_ABEL

REAl FUNCTION F(X)
REAL :: X,EXP
INTRINSIC :: EXP
F= X*EXP(X)
RETURN
END FUNCTION F

END MODULE ABEL

I tried also EXTERNAL :: QDAG, F like in the IMSL example, but this fails also ...

Anybody has a hint?

Thanks!
-Ralf



Complete error message is:
----------------------------------------------------------
Loaded 'C:WINNTsystem32 tdll.dll', no matching symbolic information found.
Loaded 'C:WINNTsystem32KERNEL32.DLL', no matching symbolic information found.
Loaded 'C:WINNTsystem32IMAGEHLP.DLL', no matching symbolic information found.
First-chance exception in abelV0.exe: 0xC0000005: Access Violation.
Loaded 'C:WINNTsystem32msvcrt.dll', no matching symbolic information found.
Loaded 'C:WINNTsystem32dbghelp.dll', no matching symbolic information found.
-------------------------------------------------------------
0 Kudos
1 Reply
rschaa
Beginner
559 Views
okay, I found a solution on another website:
http://dbforums.com/t890214.html

actually the function should be moved outside of the module and it then should be declared as an external.

Cheers
-Ralf
0 Kudos
Reply