繁体   English   中英

gfortran 中的错误使 function:无效选项 — I

[英]Error in gfortran make function: invalid option — I

我使用链接到 gcc 和 openmpi 的 brew 运行以下简单代码:

 mpif90 test.f90 ./test 

返回以下错误:

 /opt/local/bin/gfortran: invalid option -- I
 Usage: gcov [OPTION]... SOURCE|OBJ...

 Print code coverage information.

   -h, --help                      Print this help, then exit
   -a, --all-blocks                Show information for every basic block
   -b, --branch-probabilities      Include branch probabilities in output
   -c, --branch-counts             Output counts of branches taken
                                rather than percentages
   -d, --display-progress          Display progress information
   -f, --function-summaries        Output summaries for each function
    -i, --intermediate-format       Output .gcov file in intermediate text format
     -l, --long-file-names           Use long output file names for included
                                source files
     -m, --demangled-names           Output demangled function names
     -n, --no-output                 Do not create an output file
     -o, --object-directory DIR|FILE Search for object files in DIR or called FILE
     -p, --preserve-paths            Preserve all pathname components
     -r, --relative-only             Only show data for relative sources
     -s, --source-prefix DIR         Source prefix to elide
     -u, --unconditional-branches    Show unconditional branch counts too
     -v, --version                   Print version number, then exit

   For bug reporting instructions, please see:
   <https://trac.macports.org/newticket>.

我不确定问题是什么。 有什么想法吗? 谢谢你。

问题是其他/bin/目录有旧版本的 gcc 和 openmpi。 更新时,需要将/lib/目录中的新文件传输到/Cellar/目录。 当首先卸载所有带有不正确文件和/或路径的旧 macport 和编译器时,问题已得到解决,如sudo port -fp uninstall installedbrew uninstall openmpibrew uninstall gcc 然后重新安装新的自制编译器brew install gccbrew install openmpi 这在提交 make 文件时提供了配置文件的正确路径。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM