error #6633: The type of the actual argument differs from the type of the dummy argument.

本文介绍了如何在Intelfortran编译器中遇到形参不匹配错误#6631时,通过调整Visual Studio的'checkroutineinterfaces'选项来消除问题。重点在于理解错误原因并提供解决方案。
部署运行你感兴趣的模型镜像

Intel fortran编译器编译较早的fortran代码出现上述错误。这错误是说,函数调用时形参和实参不匹配。类似,形参声明了一个较大数组,实参确实一个较小的数组;或者反过来。这个错误是visual studio中的默认选项“check routine interfaces"。它在项目属性 > Fortran > DIagnostics中,设置为No即可消除上述错误。

error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface.   [TT]

您可能感兴趣的与本文相关的镜像

ACE-Step

ACE-Step

音乐合成
ACE-Step

ACE-Step是由中国团队阶跃星辰(StepFun)与ACE Studio联手打造的开源音乐生成模型。 它拥有3.5B参数量,支持快速高质量生成、强可控性和易于拓展的特点。 最厉害的是,它可以生成多种语言的歌曲,包括但不限于中文、英文、日文等19种语言

Error: Syntax error, found IDENTIFIER 'DP' when expecting one of: ( : % . = => import dp -----------------------^ C:\huhuhu\huhuhu.f90(50) : Error: This statement is invalid in an INTERFACE block. import dp ----------------^ C:\huhuhu\huhuhu.f90(51) : Error: A kind type parameter must be a compile-time constant. [DP] real(dp), intent(in) :: x ---------------------^ C:\huhuhu\huhuhu.f90(52) : Error: A kind type parameter must be a compile-time constant. [DP] real(dp), intent(out) :: fx ---------------------^ C:\huhuhu\huhuhu.f90(53) : Error: A kind type parameter must be a compile-time constant. [DP] real(dp), intent(out), optional :: dfx ---------------------^ C:\huhuhu\huhuhu.f90(73) : Error: The type of the actual argument differs from the type of the dummy argument. [X] call func(x, fx=fx, dfx=dfx) ----------------------^ C:\huhuhu\huhuhu.f90(73) : Error: The type of the actual argument differs from the type of the dummy argument. [FX] call func(x, fx=fx, dfx=dfx) ----------------------------^ C:\huhuhu\huhuhu.f90(73) : Error: The type of the actual argument differs from the type of the dummy argument. [DFX] call func(x, fx=fx, dfx=dfx) ------------------------------------^ C:\huhuhu\huhuhu.f90(91) : Error: The type of the actual argument differs from the type of the dummy argument. [NEW_X] call func(new_x, fx=fx) ----------------------^ C:\huhuhu\huhuhu.f90(91) : Error: The type of the actual argument differs from the type of the dummy argument. [FX] call func(new_x, fx=fx) --------------------------------^ C:\huhuhu\huhuhu.f90(92) : Error: The type of the actual argument differs from the type of the dummy argument. [X] call func(x, fx=gx) ----------------------^ C:\huhuhu\huhuhu.f90(92) : Error: The type of the actual argument differs from the type of the dummy argument. [GX] call func(x, fx=gx) ----------------------------^ C:\huhuhu\huhuhu.f90(97) : Error: The type of the actual argument differs from the type of the dummy argument. [NEW_X] call func(new_x, fx=fx) --------------------------^ C:\huhuhu\huhuhu.f90(97) : Error: The type of the actual argument differs from the type of the dummy argument. [FX] call func(new_x, fx=fx) ------------------------------------^ C:\huhuhu\huhuhu.f90(127) : Error: Error in opening the Library module file. [NEWTON_METHOD] use newton_method --------^ C:\huhuhu\huhuhu.f90(130) : Error: A kind type parameter must be a compile-time constant. [DP] real(dp) :: x ---------^ C:\huhuhu\huhuhu.f90(132) : Error: A kind type parameter must be a compile-time constant. [DP] real(dp) :: error ---------^ C:\huhuhu\huhuhu.f90(143) : Error: This name does not have a type, and must have an explicit type. [FUNC] call Newton(func, niter, x, error) ----------------^ Error executing df.exe. huhuhu.exe - 18 error(s), 0 warning(s)
09-20
e.f90 C:\practice\practice.f90(173) : Error: A kind type parameter must be a compile-time constant. [DP] real(dp), intent(in) :: xx(mm) ---------------------^ C:\practice\practice.f90(174) : Error: A kind type parameter must be a compile-time constant. [DP] real(dp), intent(out) :: ff ---------------------^ C:\practice\practice.f90(175) : Error: A kind type parameter must be a compile-time constant. [DP] real(dp), intent(out) :: gg(mm) ---------------------^ C:\practice\practice.f90(238) : Error: A kind type parameter must be a compile-time constant. [DP] real(dp), intent(in) :: xx(mm) ---------------------^ C:\practice\practice.f90(239) : Error: A kind type parameter must be a compile-time constant. [DP] real(dp), intent(out) :: ff ---------------------^ C:\practice\practice.f90(240) : Error: A kind type parameter must be a compile-time constant. [DP] real(dp), intent(out) :: gg(mm) ---------------------^ C:\practice\practice.f90(186) : Error: The type of the actual argument differs from the type of the dummy argument. [X] call func(m, x, f, g, charge_arr) ---------------------^ C:\practice\practice.f90(186) : Error: The type of the actual argument differs from the type of the dummy argument. [F] call func(m, x, f, g, charge_arr) ------------------------^ C:\practice\practice.f90(186) : Error: The type of the actual argument differs from the type of the dummy argument. [G] call func(m, x, f, g, charge_arr) ---------------------------^ C:\practice\practice.f90(187) : Error: This name does not have a type, and must have an explicit type. [NORM2] grad_tol = norm2(g) -------------------^ C:\practice\practice.f90(204) : Error: The type of the actual argument differs from the type of the dummy argument. [X] call func(m, x, f, g_new, charge_arr) -------------------------^ C:\practice\practice.f90(204) : Error: The type of the actual argument differs from the type of the dummy argument. [F] call func(m, x, f, g_new, charge_arr) ----------------------------^ C:\practice\practice.f90(204) : Error: The type of the actual argument differs from the type of the dummy argument. [G_NEW] call func(m, x, f, g_new, charge_arr) -------------------------------^ C:\practice\practice.f90(249) : Error: The type of the actual argument differs from the type of the dummy argument. [X_OUT] call func(m, x_out, f_out, g, charge_arr) -------------------------^ C:\practice\practice.f90(249) : Error: The type of the actual argument differs from the type of the dummy argument. [F_OUT] call func(m, x_out, f_out, g, charge_arr) --------------------------------^ C:\practice\practice.f90(249) : Error: The type of the actual argument differs from the type of the dummy argument. [G] call func(m, x_out, f_out, g, charge_arr) ---------------------------------------^ C:\practice\practice.f90(249) : Error: There is an assignment to a dummy symbol with the explicit INTENT(IN) attribute [G] call func(m, x_out, f_out, g, charge_arr) ---------------------------------------^ C:\practice\practice.f90(259) : Error: The type of the actual argument differs from the type of the dummy argument. [X_OUT] call func(m, x_out, f_out, g, charge_arr) ---------------------^ C:\practice\practice.f90(259) : Error: The type of the actual argument differs from the type of the dummy argument. [F_OUT] call func(m, x_out, f_out, g, charge_arr) ----------------------------^ C:\practice\practice.f90(259) : Error: The type of the actual argument differs from the type of the dummy argument. [G] call func(m, x_out, f_out, g, charge_arr) -----------------------------------^ C:\practice\practice.f90(259) : Error: There is an assignment to a dummy symbol with the explicit INTENT(IN) attribute [G] call func(m, x_out, f_out, g, charge_arr) -----------------------------------^ C:\practice\practice.f90(265) : Error: The shapes of the array expressions do not conform. [X] x = [1.0_dp, 1.0_dp, 0.5_dp, 0.0_dp, 0.0_dp, & --------^ C:\practice\practice.f90(297) : Error: Error in opening the Library module file. [POTENTIAL_MOD] use potential_mod --------^ C:\practice\practice.f90(301) : Error: A kind type parameter must be a compile-time constant. [DP] real(dp) :: x(ndim) ---------^ C:\practice\practice.f90(302) : Error: A kind type parameter must be a compile-time constant. [DP] real(dp) :: f, g(ndim) ---------^ C:\practice\practice.f90(307) : Error: Keyword arguments are invalid without an explicit interface. [TOL] call bfgs(ndim, x, f, g, tol=1.0e-6_dp, max_iter=1000, converged=converged, & -----------------------------^ C:\practice\practice.f90(307) : Error: This name does not have a type, and must have an explicit type. [DP] call bfgs(ndim, x, f, g, tol=1.0e-6_dp, max_iter=1000, converged=converged, & ---------------------------------------^ C:\practice\practice.f90(307) : Error: A kind-param must be a digit-string or a scalar-int-constant-name [DP] call bfgs(ndim, x, f, g, tol=1.0e-6_dp, max_iter=1000, converged=converged, & ---------------------------------------^ C:\practice\practice.f90(307) : Error: Keyword arguments are invalid without an explicit interface. [MAX_ITER] call bfgs(ndim, x, f, g, tol=1.0e-6_dp, max_iter=1000, converged=converged, & --------------------------------------------^ C:\practice\practice.f90(307) : Error: Keyword arguments are invalid without an explicit interface. [CONVERGED] call bfgs(ndim, x, f, g, tol=1.0e-6_dp, max_iter=1000, converged=converged, & -----------------------------------------------------------^ (319) : Severe: Too many errors, exiting Error executing df.exe. practice.exe - 30 error(s), 0 warning(s)
11-02
评论 8
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值