如果ifort这样做,Gfortran没有模块Funits

时间:2016-07-27 02:40:48

标签: fortran gfortran intel-fortran

一旦O尝试编译依赖于funits的Fortran代码。虽然它在gfortran 4.9.3中不可用。

  use FUNITS
      1
  Fatal Error: Can't open module file 'funits.mod' for reading at (1): No such file or directory

这里是gfortran信息

gfortran -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3/gfortran
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.3/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.9.3/work/gcc-4.9.3/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.9.3/python --enable-languages=c,c++,java,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.9.3 p1.5, pie-0.6.4' --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --enable-vtable-verify --enable-libvtv --enable-lto --without-cloog --enable-libsanitizer
Thread model: posix
gcc version 4.9.3 (Gentoo 4.9.3 p1.5, pie-0.6.4) 

而是ifort版本14.0.3已预安装。

我如何使用gfortran安装funits,因为我们需要依赖免费软件?

1 个答案:

答案 0 :(得分:3)

FUNITS是一个模块。标准Fortran中没有这样的模块。它必须是一些外部库,而不是内部模块。

虽然您声称它是英特尔Fortran,但它也不属于英特尔Fortran。它不是我的英特尔Fortran安装的一部分,在手册的任何地方都没有提到。

你必须找到它来自哪里,谁提供这个库并自己编译为gfortran。

或者找出它的作用并自己实现该功能。

简单的网络搜索在互联网上找到了2个名为FUNITS的模块。两者都只声明了一些文件单元号常量。我不知道您是否需要其中一个Cant make Changes in inherited/child Windows Form (Visual Basic) https://mfix.netl.doe.gov/develop/STI/source_profile_2015-2/mfix_und/MFIX_html/9899.html搜索您的硬盘可能会更好。