compiler-errors - 在模块中找不到 (1) 中引用的非法预处理器指令和符号
问题描述
我正在尝试用其他一些包编译 Quantum ESPRESSO 代码。在使用 Makefile 并稍微编译标志之后,我“获得”了如下错误。有没有办法解决这个问题?我是否缺少任何标志以避免错误?还是来自代码本身?
$ mpif90 -fdollar-ok -ffree-line-length-none -O3 -fopenmp -fPIC -I ../../../qe/6.0-mpi/Modules -I ../src -I ../src ../../../qe/6.0-mpi/PW/src/libpw.a ../../../qe/6.0-mpi/Modules/libqemod.a ../../../qe/6.0-mpi/FFTXlib/libqefft.a ../../../qe/6.0-mpi/LAXlib/libqela.a -Wall -c qevars.f90
Warning: qevars.f90:30: Illegal preprocessor directive
Warning: qevars.f90:32: Illegal preprocessor directive
Warning: qevars.f90:34: Illegal preprocessor directive
Warning: qevars.f90:56: Illegal preprocessor directive
Warning: qevars.f90:58: Illegal preprocessor directive
Warning: qevars.f90:60: Illegal preprocessor directive
Warning: qevars.f90:68: Illegal preprocessor directive
Warning: qevars.f90:70: Illegal preprocessor directive
Warning: qevars.f90:72: Illegal preprocessor directive
Warning: qevars.f90:74: Illegal preprocessor directive
Warning: qevars.f90:75: Illegal preprocessor directive
Warning: qevars.f90:77: Illegal preprocessor directive
qevars.f90:33:43:
use io_files, ONLY : nd_nmbr, prefix, outdir, tmp_dir, nwordwfc, iunwfc
1
Error: Symbol ‘outdir’ referenced at (1) not found in module ‘io_files’
qevars.f90:73:43:
use wvfct, ONLY : npw, npwx, nbnd, igk, g2kin, wg, et, ecutwfc
1
Error: Symbol ‘igk’ referenced at (1) not found in module ‘wvfct’
qevars.f90:73:63:
use wvfct, ONLY : npw, npwx, nbnd, igk, g2kin, wg, et, ecutwfc
1
Error: Symbol ‘ecutwfc’ referenced at (1) not found in module ‘wvfct’
qevars.f90:71:43:
use wvfct, ONLY : npw, npwx, nbnd, igk, g2kin, wg, et
1
Error: Symbol ‘igk’ referenced at (1) not found in module ‘wvfct’
解决方案
错误消息和警告,例如
Warning: qevars.f90:30: Illegal preprocessor directive
通常由包含预处理器指令但不由预处理器预处理的 Fortran 代码处理。在 gfortran 中使用来启用预处理器或使用带有大写 F ( , )-cpp
的文件扩展名。.F
.F90
缺乏预处理可能会导致报告许多以下错误。
推荐阅读
- android - 更新到最新版本后,您需要在此活动中使用 Theme.AppCompat 主题(或后代)
- rcpp - 无法使用 Eigen 编译旋转 QR 分解(通过 RcppEigen)
- python - 如何在 Flask-Admin 中显示参考字段的实际字段?
- javascript - 带有 jQuery 的 PouchDB
- reactjs - 在反应本机导致错误的注销时清除 redux 存储
- node.js - How to integrate Mongoose and GridFS to NestJS?
- angular - 返回 Observable 的 Angular 服务的单元测试错误部分
- python - 嵌套列表中的最小值
- ionic-framework - Issue with geolocations import ionic
- python - Filter JSON with null POST query return in API