If you want to run a program writen in C++, and you want to have this clause at the beginning of the program:
#include «MPI h»
Program using the Message Passing Interface should be compiled by using something like mpicc main.c -o main or mpiCC main.cpp -o main. Is it your case ? Regarding the second message : you may have two implementations of the MPI standards on your computer. You may try to know more by typing which mpicc, which mpirun, mpirun –version or module avail. The implementation (openmpi or mpich2 or…) of compiler command must be the same as the command to execute the program mpirun -np 2 main.
PS: Sorry for the «»instead of < >, but AMP won’t validate otherwise.