
我遵循了這個安裝指南在我的機器上安裝 MPICH。我收到以下錯誤configure
:
configure: error: Unable to configure with Fortran support because configure could not determine the size of a Fortran INTEGER. Consider setting CROSS_F77_SIZEOF_INTEGER to the length in bytes of a Fortran INTEGER
這裡是完整輸出和 config.log 文件 感謝您的任何指導或評論。
答案1
我也遇到了同樣的問題,我需要 Fortran。使用幾個不同的 MPI 函式庫進行編譯最終找到了線索(感謝 openmpi):我將 gcc/gfortran 安裝在 /usr/local 中,但 /usr/local/lib64 和 /usr/local/lib 不在 LD_LIBRARY_PATH 中。 mpich 和 mvapich2 的錯誤訊息沒有意義,但在設定 LD_LIBRARY_PATH 後它就消失了。
答案2
由於您不會將 MPICH 與 Fortran 一起使用,因此您不妨停用 Fortran 支援:
$ ./configure --disable-fortran
或者
$ ./configure --enable-fortran=none
不要忘記添加您最初使用的任何其他選項,例如,
$ ./configure --disable-fortran --prefix=some/directory
答案3
在bashrc中設定以下內容
$ 匯出 F77=/to/my/latest/gcc/installation/bin/gfortran
$ 匯出 F90=/to/my/latest/gcc/installation/bin/gfortran
然後在configure中停用fortran解決了安裝最新mpich的問題!
$ ./configure --disable-fortran