最近,当我尝试在 Linux 上使用 intel 编译器版本 11.1.073 编译 fortran 代码时,遇到以下错误:
>>> BUILDING: PaSR
make[1]: Entering directory `/autofs/na3_home1/xl/ISAT_V11/PaSR'
ftn -O2 -fPIC -I../isatab_ser -I../isat-ck -I../ice-pic -c pasr.f
ftn -O2 -fPIC -I../isatab_ser -I../isat-ck -I../ice-pic -c pasrsubs.f
ftn -O2 -fPIC -I../isatab_ser -I../isat-ck -I../ice-pic -c usrate.f
ftn -o PaSR pasr.o pasrsubs.o usrate.o -Bstatic -L/ccs/home/xl/ISAT_V11/lib
-lisat7_ser -lck_ext -llapack -Bstatic
/ccs/home/xl/ISAT_V11/lib/libisat7_ser.a(ci_ice_pic_bound.o): In
function `ci_ice_pic_bound_test_':
ci_ice_pic_bound.f90:(.text+0x34f): undefined reference to `for_simd_random_number'
/usr/bin/ld: link errors found, deleting executable `PaSR'
make[1]: *** [PaSR] Error 1
make[1]: Leaving directory `/autofs/na3_home1/xl/ISAT_V11/PaSR'
make: *** [build-programs] Error 1
在我看来,代码找不到它需要的特定库(在英特尔共享库中),从而导致错误。我已经成功使用intel/13.1.3.192编译它。但不适用于 intel/11.1.073。我在网上搜索了“for_simd_random_number”,但没有找到任何线索。
请献出你的智慧。我很感激!
最佳答案
符号 for_simd_random_number
是在 intel fortran 13 的库 ifcore
中定义的。但是,它不存在于您的 intel fortran 11 库中,因此您无法再次链接它。
关于linux - 未定义对 `for_simd_random_number' 的引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22904383/