explain use of MPI_DUMMY_COUNT in petsclog.h

Satish Balay balay at mcs.anl.gov
Wed Mar 25 14:48:25 CDT 2009


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