<div dir="ltr">It seems correct according to <br><br>





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#define PETSC_SIZEOF_LONG 8</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#define PETSC_SIZEOF_LONG_LONG 8<br><br><br>Can not convert from "non-constant" to "constant"?<br><br>Fande</span></p></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 29, 2022 at 2:22 PM Fande Kong <<a href="mailto:fdkong.jd@gmail.com">fdkong.jd@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi All,<br><br>When building PETSc with 64 bit indices, it seems that PetscSFCount is 64-bit integer while MPI_Count is still 32 bit. <br><br>typedef long MPI_Count;<br><br><div>typedef PetscInt   PetscSFCount;<br><div><br></div><div><br></div><div> I had the following errors. Do I have a bad MPI?<br><br>Thanks,<br><br>Fande<br><br><br>Users/kongf/projects/moose6/petsc1/src/vec/is/sf/impls/basic/neighbor/sfneighbor.c:171:18: error: no matching function for call to 'MPI_Ineighbor_alltoallv_c'<br>    PetscCallMPI(MPIU_Ineighbor_alltoallv(rootbuf,dat->rootcounts,dat->rootdispls,unit,leafbuf,dat->leafcounts,dat->leafdispls,unit,distcomm,req));<br>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>/Users/kongf/projects/moose6/petsc1/include/petsc/private/mpiutils.h:97:79: note: expanded from macro 'MPIU_Ineighbor_alltoallv'<br>  #define MPIU_Ineighbor_alltoallv(a,b,c,d,e,f,g,h,i,j)                       MPI_Ineighbor_alltoallv_c(a,b,c,d,e,f,g,h,i,j)<br>                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~<br>/Users/kongf/projects/moose6/petsc1/include/petscerror.h:407:32: note: expanded from macro 'PetscCallMPI'<br>    PetscMPIInt _7_errorcode = __VA_ARGS__;                                                    \<br>                               ^~~~~~~~~~~<br>/Users/kongf/mambaforge3/envs/moose/include/mpi_proto.h:945:5: note: candidate function not viable: no known conversion from 'PetscSFCount *' (aka 'long long *') to 'const MPI_Count *' (aka 'const long *') for 2nd argument<br>int MPI_Ineighbor_alltoallv_c(const void *sendbuf, const MPI_Count sendcounts[],<br>    ^<br>/Users/kongf/projects/moose6/petsc1/src/vec/is/sf/impls/basic/neighbor/sfneighbor.c:195:18: error: no matching function for call to 'MPI_Ineighbor_alltoallv_c'<br>    PetscCallMPI(MPIU_Ineighbor_alltoallv(leafbuf,dat->leafcounts,dat->leafdispls,unit,rootbuf,dat->rootcounts,dat->rootdispls,unit,distcomm,req));<br>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>/Users/kongf/projects/moose6/petsc1/include/petsc/private/mpiutils.h:97:79: note: expanded from macro 'MPIU_Ineighbor_alltoallv'<br>  #define MPIU_Ineighbor_alltoallv(a,b,c,d,e,f,g,h,i,j)                       MPI_Ineighbor_alltoallv_c(a,b,c,d,e,f,g,h,i,j)<br>                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~<br>/Users/kongf/projects/moose6/petsc1/include/petscerror.h:407:32: note: expanded from macro 'PetscCallMPI'<br>    PetscMPIInt _7_errorcode = __VA_ARGS__;                                                    \<br>                               ^~~~~~~~~~~<br>/Users/kongf/mambaforge3/envs/moose/include/mpi_proto.h:945:5: note: candidate function not viable: no known conversion from 'PetscSFCount *' (aka 'long long *') to 'const MPI_Count *' (aka 'const long *') for 2nd argument<br>int MPI_Ineighbor_alltoallv_c(const void *sendbuf, const MPI_Count sendcounts[],<br>    ^<br>/Users/kongf/projects/moose6/petsc1/src/vec/is/sf/impls/basic/neighbor/sfneighbor.c:240:18: error: no matching function for call to 'MPI_Neighbor_alltoallv_c'<br>    PetscCallMPI(MPIU_Neighbor_alltoallv(rootbuf,dat->rootcounts,dat->rootdispls,unit,leafbuf,dat->leafcounts,dat->leafdispls,unit,comm));<br>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>/Users/kongf/projects/moose6/petsc1/include/petsc/private/mpiutils.h:96:79: note: expanded from macro 'MPIU_Neighbor_alltoallv'<br>  #define MPIU_Neighbor_alltoallv(a,b,c,d,e,f,g,h,i)                          MPI_Neighbor_alltoallv_c(a,b,c,d,e,f,g,h,i)<br>                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~<br>/Users/kongf/projects/moose6/petsc1/include/petscerror.h:407:32: note: expanded from macro 'PetscCallMPI'<br>    PetscMPIInt _7_errorcode = __VA_ARGS__;                                                    \<br>                               ^~~~~~~~~~~<br>/Users/kongf/mambaforge3/envs/moose/include/mpi_proto.h:1001:5: note: candidate function not viable: no known conversion from 'PetscSFCount *' (aka 'long long *') to 'const MPI_Count *' (aka 'const long *') for 2nd argument<br>int MPI_Neighbor_alltoallv_c(const void *sendbuf, const MPI_Count sendcounts[],<br>    ^<br><br><br></div></div></div>
</blockquote></div>