Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] Beginner Problem with OpenMPI (MPI_Waitall)
From: Joao Marcelo (jmarcelo.alencar_at_[hidden])
Date: 2008-06-27 11:51:27


Thanks Rainer and Matt, your suggestions solved my problem.

On Fri, Jun 27, 2008 at 11:44 AM, Matt Hughes
<matt.c.hughes+ompi_at_[hidden]> wrote:
> 2008/6/27 Joao Marcelo <jmarcelo.alencar_at_[hidden]>:
>> Hi,
>>
>> I'm starting to code with MPI and decided to use openmpi. I'm using
>> Ubuntu Linux with GCC version 4.2.3 and OpenMPI 1.2.5 (distribution
>> package). The output of "ompi_info -- all" is attached. I'm also
>> sending a copy of the source code I'm trying to run.
>
> One problem I see is that you are incorrectly indexing the reqs array:
>
> for ( i = 1; i < numtasks; ++i){
> rc = MPI_Isend(&a , 1 , MPI_INT , i , 0 , MPI_COMM_WORLD , &reqs[i]);
> }
>
> MPI_Waitall(numtasks - 1 , reqs , stats);
>
> If size = 3, you allocate enough space for two items in reqs but you
> index starting at one, so you access memory past the end of the array.
> Additional, MPI_Waitall will be looking at uninitialized memory in
> the first element of reqs. This is not immediately causing the crash,
> but it may be messing with MPI enough that Finalize crashes. Try:
>
> for ( i = 0; i < numtasks-1; ++i)
>
> Fixing that *might* fix your crash.
>
> mch
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>

-- 
__________________________________
João Marcelo Uchôa de Alencar
Computer Science BSc.
jmarcelo.alencar(at)gmail.com
Linux User 398939
__________________________________