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

Problem related to double precision when using BCONF

yuezhanwei
Beginner
736 Views
Problem related to double precision when using BCONF
I set the data kind to 8 under the project proterties ->Fortran -> Data.

I got the following error message when I use BCONF, which is the generic form.

CALL BCONF(FirmValue, 0, XLB, XUB, X, XGUESS=XGUESS,XSCALE=XSCALE, IPARAM=iparam, & RPARAM=rparam, FVALUE=F)
error #6285: There is no matching specific subroutine for this generic subroutine call. [BCONF]

When I use the specific form for double precision D_BCONF, I still got an error if I include IPARAM in the program
CALL D_BCONF(FirmValue, 0, XLB, XUB, X, XGUESS=XGUESS,XSCALE=XSCALE, IPARAM=iparam, & RPARAM=rparam, FVALUE=F)
error #6633: The type of the actual argument differs from the type of the dummy argument. [IPARAM]

What exactly I should use? Can someone help me with this problem? Thank you.

Best,
Vivian
0 Kudos
1 Solution
Steven_L_Intel1
Employee
736 Views
Do not use D_BCONF - use the generic and fix the problem in calling the generic.

I would guess that "iparam" is not an integer array. What is its declaration?

View solution in original post

0 Kudos
4 Replies
Steven_L_Intel1
Employee
737 Views
Do not use D_BCONF - use the generic and fix the problem in calling the generic.

I would guess that "iparam" is not an integer array. What is its declaration?
0 Kudos
yuezhanwei
Beginner
736 Views
Steve,

Thanks for your response. When I use the generic BCONF, I got the following error message.
error #6285: There is no matching specific subroutine for this generic subroutine call. [BCONF]

I declare iparam as an integer. The complete code is the following. Can you tell me what the problem is? Thank you.

USE BCONF_INT
USE UMACH_INT
INCLUDE 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'
IMPLICIT NONE


INTEGER:: IPARAM(7), ITP, L, NOUT
REAL F, FSCALE, RPARAM(7), X(N), XGUESS(N), XLB(N), XSCALE(N), XUB(N), KLB, KUB
EXTERNAL:: FirmValue

XGUESS = (/b_p, 2.E0/)
XSCALE = (/1.E0,0.01E0/)
XLB = (/B_min, S_min/)
XUB = (/B_max, S_max/)
FSCALE = 1.E0
ITP = 0;
CALL DU4INF (IPARAM, RPARAM)
IPARAM(1) = 1;
RPARAM(1) = 1.0E-16
RPARAM(2) = 1.0E-16
RPARAM(6) = 1.0E8
CALL BCONF(FirmValue, 0, XLB, XUB, X, XGUESS=XGUESS,XSCALE=XSCALE, FVALUE=F, & IPARAM=iparam, RPARAM=rparam)

CALL ERSET (0, 1, 0)
0 Kudos
Steven_L_Intel1
Employee
736 Views
Did you happen to also set the default integer kind to 8? If so, that's your problem.
0 Kudos
yuezhanwei
Beginner
736 Views
You are exactly right! Thank you for your help.
0 Kudos
Reply