explain use of MPI_DUMMY_COUNT in petsclog.h

Barry Smith bsmith at mcs.anl.gov
Wed Mar 25 15:46:24 CDT 2009


   I have removed the use of this global variable and MPI_DUMMY_SIZE  
from petsc-3.0.0 and petsc-dev

   Barry


On Mar 25, 2009, at 2:48 PM, Satish Balay wrote:

> Perhaps thats an oversight from many years ago.. Looking at the
> previous change for the relavent lines - I see:
>
>>>>>>
>   bk-changeset-1.2580.1.3
>    balay at asterix.mcs.anl.gov|ChangeSet|20041001220942|44629
>    ChangeSet
>      1.2580.1.3 04/10/01 17:09:42 balay at asterix.mcs.anl.gov +2 -0
>      clean up MPI_() macros & remove PETSC_DUMMY
> <<<<<<<<
>
>
>
> -#define MPI_Isend(buf,count, datatype,dest,tag,comm,request) \
> -(\
> -  PETSC_DUMMY_COUNT = count,PETSC_DUMMY =  
> MPI_Isend(buf,PETSC_DUMMY_COUNT, datatype,dest,tag,comm,request),\
> -  isend_ct++,   
> TypeSize(isend_len,PETSC_DUMMY_COUNT,datatype),PETSC_DUMMY\
> -)
> +#define MPI_Isend(buf,count,datatype,dest,tag,comm,request) \
> + ((PETSC_DUMMY_COUNT = count,isend_ct++,0) ||  
> TypeSize(isend_len,PETSC_DUMMY_COUNT,datatype) ||  
> MPI_Isend(buf,PETSC_DUMMY_COUNT,datatype,dest,tag,comm,request))
>
>
> Perhaps PETSC_DUMMY_COUNT could have also been removed along with  
> PETSC_DUMMY...
>
> Satish
>
> On Wed, 25 Mar 2009, Barry Smith wrote:
>
>>
>>  Could someone explain to me why PETSC_DUMMY_COUNT is needed in the  
>> macros in
>> petsclog.h?
>>
>>  It seems to me that in each macro it is assigned and then used,  
>> but why does
>> it exist at all? Why not use use the count macro argument directly?
>>
>>  Thanks
>>
>>  Barry
>>
>




More information about the petsc-dev mailing list