Re: [petsc-dev] PetscSFCount is not compatible with MPI_Count

2022-03-30 Thread Satish Balay via petsc-dev
On Tue, 29 Mar 2022, Junchao Zhang wrote: > Also, it looks we need a 64-bit CI job on Mac. pushed a CI update to https://gitlab.com/petsc/petsc/-/merge_requests/5050 Satish

Re: [petsc-dev] PetscSFCount is not compatible with MPI_Count

2022-03-29 Thread Junchao Zhang
Yes, the problem is from " Mac + 64-bit indices + --with-clanguage=C++" In Fande's case, PetscInt (int64_t) is "long long int" but MPI_Count is "long int". Though both are 64-bit, they are different in C++ function resolution. $ cat test.c extern int foo(long long *); void bar() {long a = 0;

Re: [petsc-dev] PetscSFCount is not compatible with MPI_Count

2022-03-29 Thread Satish Balay via petsc-dev
On Tue, 29 Mar 2022, Junchao Zhang wrote: > On Tue, Mar 29, 2022 at 4:59 PM Satish Balay via petsc-dev < > petsc-dev@mcs.anl.gov> wrote: > > > We do have such builds in CI - don't know why CI didn't catch it. > > > > $ grep with-64-bit-indices=1 *.py > > arch-ci-freebsd-cxx-cmplx-64idx-dbg.py:

Re: [petsc-dev] PetscSFCount is not compatible with MPI_Count

2022-03-29 Thread Junchao Zhang
On Tue, Mar 29, 2022 at 5:25 PM Satish Balay via petsc-dev < petsc-dev@mcs.anl.gov> wrote: > I'm not sure why we have PetscSFCount - and not always use MPI_Count. > > Maybe this would work? > > Perhaps Junchao can clarify > I used MPIU_Ineighbor_alltoallv() to wrap MPI_Ineighbor_alltoallv() or

Re: [petsc-dev] PetscSFCount is not compatible with MPI_Count

2022-03-29 Thread Junchao Zhang
On Tue, Mar 29, 2022 at 4:59 PM Satish Balay via petsc-dev < petsc-dev@mcs.anl.gov> wrote: > We do have such builds in CI - don't know why CI didn't catch it. > > $ grep with-64-bit-indices=1 *.py > arch-ci-freebsd-cxx-cmplx-64idx-dbg.py: '--with-64-bit-indices=1', >

Re: [petsc-dev] PetscSFCount is not compatible with MPI_Count

2022-03-29 Thread Satish Balay via petsc-dev
I'm not sure why we have PetscSFCount - and not always use MPI_Count. Maybe this would work? Perhaps Junchao can clarify Satish --- diff --git a/src/vec/is/sf/impls/basic/neighbor/sfneighbor.c b/src/vec/is/sf/impls/basic/neighbor/sfneighbor.c index 5dc2e8c0b2..10f42fc302 100644 ---

Re: [petsc-dev] PetscSFCount is not compatible with MPI_Count

2022-03-29 Thread Satish Balay via petsc-dev
We do have such builds in CI - don't know why CI didn't catch it. $ grep with-64-bit-indices=1 *.py arch-ci-freebsd-cxx-cmplx-64idx-dbg.py: '--with-64-bit-indices=1', arch-ci-linux-cuda-double-64idx.py:'--with-64-bit-indices=1', arch-ci-linux-cxx-cmplx-pkgs-64idx.py:

Re: [petsc-dev] PetscSFCount is not compatible with MPI_Count

2022-03-29 Thread Fande Kong
OK, this works for me. (moose) kongf@FN428781 petsc1 % git diff *diff --git a/src/vec/is/sf/impls/basic/neighbor/sfneighbor.c b/src/vec/is/sf/impls/basic/neighbor/sfneighbor.c* *index 5dc2e8c0b2..c2cc72dfa9 100644* *--- a/src/vec/is/sf/impls/basic/neighbor/sfneighbor.c* *+++

Re: [petsc-dev] PetscSFCount is not compatible with MPI_Count

2022-03-29 Thread Satish Balay via petsc-dev
What MPI is this? How to reproduce? Perhaps its best if you can send the relevant logs. The likely trigger code in sfneighbor.c: /* A convenience temporary type */ #if defined(PETSC_HAVE_MPI_LARGE_COUNT) && defined(PETSC_USE_64BIT_INDICES) typedef PetscInt PetscSFCount; #else

Re: [petsc-dev] PetscSFCount is not compatible with MPI_Count

2022-03-29 Thread Fande Kong
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 wrote: > Hi All, > > When building PETSc with 64 bit indices, it seems that PetscSFCount is >

[petsc-dev] PetscSFCount is not compatible with MPI_Count

2022-03-29 Thread Fande Kong
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