编译mpi时出现 MPI has not been declared 错误,经过一系列的摸索发现安装openmpi-1.6.5就可以顺利编译,降低版本就可以最新版本软件不一定就是最好的。可能跟系统环境有关。