结论:Ubuntu 完全兼容 Fortran,而且支持得很好。
Ubuntu 上常见的 Fortran 编译器有:
gfortran(GNU Fortran,最常用,免费开源)
sudo apt update
sudo apt install gfortran
验证:
gfortran --version
Intel Fortran(ifort / ifx)
Flang(LLVM Fortran)
program hello
print *, "Hello Fortran on Ubuntu"
end program hello
编译运行:
gfortran hello.f90 -o hello
./hello
如果你有具体 Fortran 版本或老代码迁移问题,可以告诉我,我可以针对性说明兼容性。