Why is my MPI program not compiling?

Asked By 60 points N/A Posted on -
qa-featured

Why is my MPI program not compiling? Please I am trying to run a Message Passing Interface (MPI) program with C language. I have installed GNU Compiler Collection compiler and the openmpi libraries. I am running Ubuntu and Netbeans interactive development environment (IDE). My challenge is that after including “mpi.h” in my header file and compiling the application, the complian i get is: “fatal error : cannot find file mpi.c”.

SHARE
Answered By 0 points N/A #193143

Why is my MPI program not compiling?

qa-featured

The problem is certainly that you are not using the MPI compiler wrappers. Whenever you're compiling an MPI program, you should use the MPI wrappers depending on the language used:
• For C – mpicc
• For C++ – mpiCC, mpicxx, mpic++
• For FORTRAN – mpifort, mpif77, mpif90
These wrappers do all work for you. These wrappers make sure that all the appropriate compiler flags, libraries, include directories, library directories, etc. are included whenever you compile your program.

Login/Register to Answer

Related Questions