[mpich-discuss] gather, send

Rajeev Thakur thakur at mcs.anl.gov
Wed May 1 19:06:25 CDT 2013


Just before the call to gather, check the value of send_count and check that send_buffer is not all zeros.

send_count has to be the same on all ranks. Otherwise you have to use Gatherv.

On May 1, 2013, at 7:03 PM, Ryan Crocker wrote:

> that's where i checked it with and it's min and max are still zero.  I just amended it so that each send buffer from the different cores are the same size and when i check it on the root gsend_buffer is still incorrect.
> 
> On May 1, 2013, at 5:00 PM, Rajeev Thakur wrote:
> 
>> gsend_buffer will be valid only on the root.
>> 
>> On May 1, 2013, at 6:55 PM, Ryan Crocker wrote:
>> 
>>> I just looked at the gsend_buffer, that's actually all zeros as well, and each send_buffer is not.  So i think my problem is there.
>>> 
>>> On May 1, 2013, at 4:47 PM, Rajeev Thakur wrote:
>>> 
>>>> The count passed to MPI_Scatter should be the local size, i.e., the amount that gets sent to each process. Looks like what is being passed is the global size.
>>>> 
>>>> On May 1, 2013, at 6:21 PM, Ryan Crocker wrote:
>>>> 
>>>>> Hi all, 
>>>>> 
>>>>> So i don't know what the issue with this code snippet is but i cannot get the scatter call to work.  When i print out the recieve_buffer it comes out as all zeros.   The counters without the underscore are the core domains, with the o, the global domains.
>>>>> 
>>>>> rec_count  = (imaxo-imino+1)*(jmaxo-jmino+1)*(kmaxo-kmino+1) 
>>>>> send_count = (imax_-imin_+1)*(jmax_-jmin_+1)*(kmax_-kmin_+1) 
>>>>> 
>>>>> call MPI_GATHER  (send_buffer, send_count, MPI_REAL, gsend_buffer, send_count, MPI_REAL, iroot, comm, ierr)
>>>>> 
>>>>> rec_count  = (imaxo-imino+1)*(jmaxo-jmino+1)*(kmaxo-kmino+1) 
>>>>> send_count = (imaxo-imino+1)*(jmaxo-jmino+1)*(kmaxo-kmino+1) 
>>>>> 
>>>>> call MPI_SCATTER (gsend_buffer, send_count, MPI_REAL, recieve_buffer, rec_count, MPI_REAL, iroot, comm, ierr)
>>>>> 
>>>>> thanks for the help.
>>>>> 
>>>>> Ryan Crocker
>>>>> University of Vermont, School of Engineering
>>>>> Mechanical Engineering Department
>>>>> rcrocker at uvm.edu
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> discuss mailing list     discuss at mpich.org
>>>>> To manage subscription options or unsubscribe:
>>>>> https://lists.mpich.org/mailman/listinfo/discuss
>>>> 
>>>> _______________________________________________
>>>> discuss mailing list     discuss at mpich.org
>>>> To manage subscription options or unsubscribe:
>>>> https://lists.mpich.org/mailman/listinfo/discuss
>>> 
>>> Ryan Crocker
>>> University of Vermont, School of Engineering
>>> Mechanical Engineering Department
>>> rcrocker at uvm.edu
>>> 315-212-7331
>>> 
>>> _______________________________________________
>>> discuss mailing list     discuss at mpich.org
>>> To manage subscription options or unsubscribe:
>>> https://lists.mpich.org/mailman/listinfo/discuss
>> 
>> _______________________________________________
>> discuss mailing list     discuss at mpich.org
>> To manage subscription options or unsubscribe:
>> https://lists.mpich.org/mailman/listinfo/discuss
> 
> Ryan Crocker
> University of Vermont, School of Engineering
> Mechanical Engineering Department
> rcrocker at uvm.edu
> 315-212-7331
> 
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss




More information about the discuss mailing list