【发布时间】:2021-11-01 11:46:19
【问题描述】:
快速运行:
-
我是 fortran 新手
-
我在 Windows 机器上
-
使用 sublime 编辑赋值 fortran 代码
-
分配包含一个 main.f90 文件(请参见下图该文件的代码)
-
这个 main.f90 代码调用了 3 个不同的模块:“types”和“analytic_functions”,以及 '欧拉公式'
-
每当我尝试在 Windows 命令提示符中运行命令
gfortran main.f90时,都会出现以下错误:Fatal Error: Can't open module file 'types.mod' for reading at (1): No such file or directory compilation terminated.
我该如何解决这个问题?我们将不胜感激所有帮助。
这是 main.f90 代码:
module read_write
use types
use analytic_functions, only : second_derivative_f
use euler_formulas, only : euler_3points
implicit none
private
public read_input, write_derivatives
contains
我不知道这是否有帮助,但这里是“types.f90”代码:
module types
! The iso_fortran_env is an intrinsic module that should already be
! inside of your compiler
use iso_fortran_env
implicit none
integer, parameter :: sp = REAL32 !< single precision kind
integer, parameter :: dp = REAL64 !< double precision kind
integer, parameter :: qp = REAL128!< quadruple precision kind
real(dp), parameter :: pi=acos(-1.0_dp)!< π = 3.141592...
end module types
【问题讨论】:
标签: windows fortran command gfortran