软件编译时,如果出现fatal error: mpi.h: No such file or directory的问题时,很大可能是你的环境变量路径没有设置好,解决思路如下:
export CPATH=/opt/intel/impi/2019.0.117/intel64/include:$CPATH
export LD_LIBRARY_PATH=/opt/intel/impi/2019.0.117/intel64/lib:$LD_LIBRARY_PATH
如果是使用oneapi intel编译的话,路径则为
export CPATH=/opt/intel/oneapi/mpi/2021.9.0/include:$CPATH
export LD_LIBRARY_PATH=/opt/intel/oneapi/mpi/2021.9.0/lib/release:$LD_LIBRARY_PATH