Wie kann ich kompilieren openmpi-Programme mit xcode 4?

Ich bin mit lion und xcode 4.2. Ich installierte openmpi mit macports. Es sind alle erfolgreich installiert.

Doch ich kann nicht finden Sie eine Anleitung, um mir zu sagen, wie/welche Bibliotheken gehören zu kompilieren eines Beispiels (siehe unten)

#include <mpi.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
    int numprocs;
    int myid;
    MPI_Status stat; 

    /* all MPI programs start with MPI_Init */
    MPI_Init(&argc,&argv);     

    /* Comm_size tells us how many processes there are  */
    MPI_Comm_size(MPI_COMM_WORLD,&numprocs); 

    /* Comm_rank finds the rank of the process */
    MPI_Comm_rank(MPI_COMM_WORLD,&myid); 

    /* Print out a message */
    printf("Hello world, from process %d of %d\n", myid, numprocs);  

    /* MPI Programs end with MPI Finalize; this is a weak synchronization point */
    MPI_Finalize(); 

    return 0; 
} 

Xcode Berichte, mpi.h fehlt.

InformationsquelleAutor RNs_Ghost | 2012-02-22
Schreibe einen Kommentar