[petsc-dev] PetscSFCount is not compatible with MPI_Count
Fande Kong
fdkong.jd at gmail.com
Tue Mar 29 15:24:03 CDT 2022
It seems correct according to
#define PETSC_SIZEOF_LONG 8
#define PETSC_SIZEOF_LONG_LONG 8
Can not convert from "non-constant" to "constant"?
Fande
On Tue, Mar 29, 2022 at 2:22 PM Fande Kong <fdkong.jd at gmail.com> wrote:
> Hi All,
>
> When building PETSc with 64 bit indices, it seems that PetscSFCount is
> 64-bit integer while MPI_Count is still 32 bit.
>
> typedef long MPI_Count;
>
> typedef PetscInt PetscSFCount;
>
>
> I had the following errors. Do I have a bad MPI?
>
> Thanks,
>
> Fande
>
>
> 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'
>
> PetscCallMPI(MPIU_Ineighbor_alltoallv(rootbuf,dat->rootcounts,dat->rootdispls,unit,leafbuf,dat->leafcounts,dat->leafdispls,unit,distcomm,req));
>
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Users/kongf/projects/moose6/petsc1/include/petsc/private/mpiutils.h:97:79:
> note: expanded from macro 'MPIU_Ineighbor_alltoallv'
> #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)
>
> ^~~~~~~~~~~~~~~~~~~~~~~~~
> /Users/kongf/projects/moose6/petsc1/include/petscerror.h:407:32: note:
> expanded from macro 'PetscCallMPI'
> PetscMPIInt _7_errorcode = __VA_ARGS__;
> \
> ^~~~~~~~~~~
> /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
> int MPI_Ineighbor_alltoallv_c(const void *sendbuf, const MPI_Count
> sendcounts[],
> ^
> /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'
>
> PetscCallMPI(MPIU_Ineighbor_alltoallv(leafbuf,dat->leafcounts,dat->leafdispls,unit,rootbuf,dat->rootcounts,dat->rootdispls,unit,distcomm,req));
>
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Users/kongf/projects/moose6/petsc1/include/petsc/private/mpiutils.h:97:79:
> note: expanded from macro 'MPIU_Ineighbor_alltoallv'
> #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)
>
> ^~~~~~~~~~~~~~~~~~~~~~~~~
> /Users/kongf/projects/moose6/petsc1/include/petscerror.h:407:32: note:
> expanded from macro 'PetscCallMPI'
> PetscMPIInt _7_errorcode = __VA_ARGS__;
> \
> ^~~~~~~~~~~
> /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
> int MPI_Ineighbor_alltoallv_c(const void *sendbuf, const MPI_Count
> sendcounts[],
> ^
> /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'
>
> PetscCallMPI(MPIU_Neighbor_alltoallv(rootbuf,dat->rootcounts,dat->rootdispls,unit,leafbuf,dat->leafcounts,dat->leafdispls,unit,comm));
>
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Users/kongf/projects/moose6/petsc1/include/petsc/private/mpiutils.h:96:79:
> note: expanded from macro 'MPIU_Neighbor_alltoallv'
> #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)
>
> ^~~~~~~~~~~~~~~~~~~~~~~~
> /Users/kongf/projects/moose6/petsc1/include/petscerror.h:407:32: note:
> expanded from macro 'PetscCallMPI'
> PetscMPIInt _7_errorcode = __VA_ARGS__;
> \
> ^~~~~~~~~~~
> /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
> int MPI_Neighbor_alltoallv_c(const void *sendbuf, const MPI_Count
> sendcounts[],
> ^
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20220329/037dea87/attachment.html>
More information about the petsc-dev
mailing list