Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] How to program with openmpi under MFC?
From: lyb (linyb79_at_[hidden])
Date: 2010-08-12 03:13:14


I have a MFC project, and need to add mpi functions in it, and choose
but I searched all of mail list , not. find the answer.

And I try to call mpi functions under MFC, as follows,

int ompi_test(int *argc, char **argv)
     int rank, size;

     MPI_Init(argc, &argv);
     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
     MPI_Comm_size(MPI_COMM_WORLD, &size);
     printf("Hello, world, I am %d of %d\n", rank, size);

     return 0;
void CSchedulerDlg::OnBnClickedButton1()
     ompi_test(NULL, NULL);

but break at MPI_Init(argc, &argv);.

So what should I do?
Can anybody help me?

Thanks in advance.

Best Regards.