我正在尝试使用其他软件包编译Quantum ESPRESSO代码。在玩了Makefile并稍微编译了标志之后,我获得了#34;如下错误。有没有办法解决这个问题?我错过任何标志以避免错误吗?或者它来自代码本身?
$ 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’
答案 0 :(得分:1)
错误消息和警告,例如
Warning: qevars.f90:30: Illegal preprocessor directive
通常由包含预处理程序指令但未由预处理程序预处理的Fortran代码提供。在gfortran中使用-cpp
启用预处理器或使用大写字母F(.F
,.F90
)的文件扩展名。
缺乏预处理会导致报告许多错误。