部分错误和警告信息:
SEEK_SET is #defined but must not be for the C++ binding of MPI\..\..\..\Program Files\MPICH2\include\mpicxx.h|327|warning: statement has no effect|
..\..\..\..\Program Files\MPICH2\include\mpicxx.h|327|warning: statement has no effect|
..\..\..\..\Program Files\MPICH2\include\mpicxx.h|327|warning: statement has no effect|
..\..\..\..\Program Files\MPICH2\include\mpicxx.h|327|warning: statement has no effect|
..\..\..\..\Program Files\MPICH2\include\mpicxx.h|328|warning: statement has no effect|
原因:
MPICH与C++的io库(stdio.h)有冲突,所以在C++中使用MPICH需要一些特别的修改。
解决办法:
只要在#include "mpi.h"之前加入#define MPICH_SKIP_MPICXX即可。