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

NEQNF

nak52
Beginner
1,000 Views
Hello
I am using nonlinear system optimization. I write the code starting with

program blah
INCLUDE 'link_fnl_shared.h'
USE linear_operators
! USE IMSL_LIBRARIES , ONLY: NEQNF
USE NEQNF_INT
...
CALL NEQNF(feval,gamopt,startval)
end program blah

and get the following error:
Error 1 error #6285: There is no matching specific subroutine for this generic subroutine call. [NEQNF]

All other imsl routines that I use are compiled ok, the problem is in only this one. Maybe "shared" library is not suitable here?
Thanks
Natalia
0 Kudos
4 Replies
Steven_L_Intel1
Employee
1,000 Views

You need to show us the declarations of feval, gamopt and startval. You are not matching a defined "signature" for NEQNF. feval needs to be a subroutine taking two real array arguments and an integer scalar argument. gamopt needs to be a real array, and startval a real scalar. The real "kinds" must all be either 4 (single) or 8 (double).

The use of the shared library is not important.
0 Kudos
nak52
Beginner
1,000 Views

You need to show us the declarations of feval, gamopt and startval. You are not matching a defined "signature" for NEQNF. feval needs to be a subroutine taking two real array arguments and an integer scalar argument. gamopt needs to be a real array, and startval a real scalar. The real "kinds" must all be either 4 (single) or 8 (double).

The use of the shared library is not important.

OK here is more of my program. feval is a subroutine, that takes two arrays and an integer.gamopt and startval are real arrays of the same size.


PROGRAM nonlin
INCLUDE 'link_fnl_shared.h'
USE neo
USE linear_operators
! USE IMSL_LIBRARIES !, ONLY: NEQNF
USE NEQNF_INT
IMPLICIT NONE
REAL(8),ALLOCATABLE :: gamopt(:),startval(:)
...
ALLOCATE(startval(ngams),gamopt(ngams))
...
CALL NEQNF(feval,gamopt,startval)
END PROGRAM nonlin
_________________________________________
MODULE neo
IMPLICIT NONE

CONTAINS
SUBROUTINE feval(gam,fcn,ngam)
! functional equation used to construct optimal gamma vector
USE chebyshev
USE IMSL_LIBRARIES, ONLY: GQRUL
IMPLICIT none
INTEGER :: ngam
REAL(8) :: gam(ngam),fcn(size(gam))

fcn=0.0d0
....
END SUBROUTINE feval
END MODULE neo

0 Kudos
Steven_L_Intel1
Employee
1,000 Views

You have startval as an array. This corresponds to the ERRREL argument in the documentation. If you mean this to correspond to XGUESS, use:

CALL NEQNF(feval,gamopt,XGUESS=startval)
0 Kudos
nak52
Beginner
1,000 Views

You have startval as an array. This corresponds to the ERRREL argument in the documentation. If you mean this to correspond to XGUESS, use:

CALL NEQNF(feval,gamopt,XGUESS=startval)

Thanks so much Steve!
0 Kudos
Reply