make : ifort : 找不到命令

make : ifort : command not found

提问人:Júlia Bonaldo 提问时间:9/28/2023 最后编辑:PierUJúlia Bonaldo 更新时间:9/28/2023 访问量:207

问:

我正在尝试在 Linux Ubuntu 机器上编译 Fortran 代码,但出现以下错误(粗体):

calcul@gpuserver:~/dp3D/src$ ./makedp3D
Do you want to use standard directory /home/calcul/bin/dp3D/ (y/n) ?y
Using  existing directory: /home/calcul/bin/dp3D/
objects will be in directory objects
objects for openmp option will be in directory objects_openMP
source directory: /home/calcul/dp3D/src/
main file for dp3D: /home/calcul/dp3D/src/main.f
Fortran compiler (ifort gfortran) ?: ifort
Will compile with ifort
Do you want to clean the object directory : (y/n) ?n
***********************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!  treating Make_dp3D
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!  treating Make_trs_tag_rm
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!  treating Make_trs_obj
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!  treating Make_dp3D_bc
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!  treating Make_dp3D_size
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!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!!!!!!!!!!!
!  treating Make_dp3D_raw
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!  treating Make_dp3D_conduct
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!  treating Make_dp3D_cubic
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Treating main.f90 to obtain 4 threads in dp3D_openMP
Treating trs_tag_rm.f90 to obtain 4 threads in dp3D_openMP
compiling a test version as /home/calcul/bin/dp3De
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!  treating Make_dp3De
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**make : ifort : commande introuvable
make: *** [Make_dp3De:16 : module_numeric_kind.o] Erreur 127
ifort -warn unused -static-intel -openmp  -gen-interfaces nosource -module modules -warn interfaces -c module_numeric_kind.f90 -o objects_openMP/module_numeric_kind.o
Treating main.f90 to obtain 4 threads in dp3D_openMP
Treating trs_tag_rm.f90 to obtain 4 threads in dp3D_openMP**
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

有人可以帮我解决这个问题吗?

我在互联网上寻找了很多解决方案,但没有一个真正帮助我。

makefile 模块 intel-fortran

评论

1赞 PierU 9/28/2023
消息很清楚,找不到。它是否安装在机器上?ifort
0赞 Vladimir F Героям слава 9/28/2023
欢迎,请参观并阅读如何提问。不要使用标记 fortran90,对所有 Fortran 问题使用标记 fortran。阅读要添加的标签的简短说明。在这里,当显示某些 Makefile 的输出时,您应该显示 Makefile 本身,并向我们提供有关 Fortran 编译器的一些详细信息。另请参阅最小可重现示例

答:

2赞 karel 9/28/2023 #1

您收到一条错误消息。该错误消息表明英特尔 Fortran 编译器可能未安装,或者您的 Ubuntu 用户无法使用它。make : ifort : Command not found

要在 Ubuntu 中安装英特尔 Fortran 编译器 ifort:

curl -Lo- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo gpg --dearmor -o /usr/share/keyrings/oneapi-archive-keyring.gpg
sudo tee /etc/apt/sources.list.d/oneAPI.list <<< "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main"
sudo apt update
sudo apt install intel-oneapi-compiler-fortran

在:~/.bashrc

source /opt/intel/oneapi/setvars.sh > /dev/null

评论

0赞 Ian Bush 9/28/2023
neelravi.com/post/intel-oneapi-install 也可能有用
0赞 PierU 9/28/2023
您假设机器上没有安装 ifort,并且 OP 在机器上具有管理员权限,但没有任何内容告诉我们这一点。ifort 可以安装,但不在 OP 帐户的补丁中和/或 OP 可能没有任何管理员权限。