Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] How to program with openmpi under MFC?
From: Shiqing Fan (fan_at_[hidden])
Date: 2010-08-12 04:05:14


  Hi,

I personally haven't try to program MPI with MFC, but in principle it
should work. What kind of error did you get, was there any error
message? Thanks.

Shiqing

On 2010-8-12 9:13 AM, lyb wrote:
> Hi,
>
> I have a MFC project, and need to add mpi functions in it, and
> choose openmpi.
> 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);
> MPI_Barrier(MPI_COMM_WORLD);
> MPI_Finalize();
>
> 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.
>
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>

-- 
--------------------------------------------------------------
Shiqing Fan                          http://www.hlrs.de/people/fan
High Performance Computing           Tel.: +49 711 685 87234
   Center Stuttgart (HLRS)            Fax.: +49 711 685 65832
Address:Allmandring 30               email: fan_at_[hidden]
70569 Stuttgart