Re: [petsc-users] petsc4py bool type

2017-04-25 Thread Barry Smith
> On Apr 25, 2017, at 8:27 PM, Jed Brown wrote: > > Barry Smith writes: > >>> On Apr 25, 2017, at 1:36 PM, Zhang, Hong wrote: >>> >>> PetscBool is indeed an int. So there is nothing wrong. PETSc does not use >>> bool in order to

Re: [petsc-users] petsc4py bool type

2017-04-25 Thread Jed Brown
Barry Smith writes: >> On Apr 25, 2017, at 1:36 PM, Zhang, Hong wrote: >> >> PetscBool is indeed an int. So there is nothing wrong. PETSc does not use >> bool in order to support C89. > > Yes, but in Python using a bool is more natural. For example in

Re: [petsc-users] misleading "mpich" messages

2017-04-25 Thread Satish Balay
I've updated balay/add-mvapich-version-check to also check IMPI version. Satish On Tue, 25 Apr 2017, Kong, Fande wrote: > Thanks, Barry and Satish, > > It makes sense. > > Fande, > > On Tue, Apr 25, 2017 at 4:33 PM, Barry Smith wrote: > > > > > > On Apr 25, 2017, at

Re: [petsc-users] misleading "mpich" messages

2017-04-25 Thread Kong, Fande
Thanks, Barry and Satish, It makes sense. Fande, On Tue, Apr 25, 2017 at 4:33 PM, Barry Smith wrote: > > > On Apr 25, 2017, at 5:08 PM, Kong, Fande wrote: > > > > Thanks, Satish, > > > > One more question: will petsc complain different versions of

Re: [petsc-users] misleading "mpich" messages

2017-04-25 Thread Barry Smith
> On Apr 25, 2017, at 5:08 PM, Kong, Fande wrote: > > Thanks, Satish, > > One more question: will petsc complain different versions of other > implementations such as intel MPI and IBM MPI? For example, configure with a > version of intel MPI, and compile with another

Re: [petsc-users] misleading "mpich" messages

2017-04-25 Thread Satish Balay
Nope - this error check is not complete - i.e does not cover all MPI impls. Is that possible - or desirable? I don't know. Currently it does it for MPICH and openMPI. [and the MPICH check should cover all all derivatives that are likely to use MPICH_NUMVERSION - eventhough they will be tagged as

Re: [petsc-users] misleading "mpich" messages

2017-04-25 Thread Kong, Fande
Thanks, Satish, One more question: will petsc complain different versions of other implementations such as intel MPI and IBM MPI? For example, configure with a version of intel MPI, and compile with another version of intel MPI. Do we have error messages on this? Fande, On Tue, Apr 25, 2017 at

Re: [petsc-users] misleading "mpich" messages

2017-04-25 Thread Satish Balay
Added this patch to balay/add-mvapich-version-check Satish On Tue, 25 Apr 2017, Satish Balay wrote: > You can try the attached [untested] patch. It replicates the > MPICH_NUMVERSION code and replaces it with MVAPICH2_NUMVERSION > > Satish > > On Tue, 25 Apr 2017, Kong, Fande wrote: > > > On

Re: [petsc-users] misleading "mpich" messages

2017-04-25 Thread Satish Balay
You can try the attached [untested] patch. It replicates the MPICH_NUMVERSION code and replaces it with MVAPICH2_NUMVERSION Satish On Tue, 25 Apr 2017, Kong, Fande wrote: > On Tue, Apr 25, 2017 at 3:42 PM, Barry Smith wrote: > > > > >The error message is generated

Re: [petsc-users] misleading "mpich" messages

2017-04-25 Thread Kong, Fande
On Tue, Apr 25, 2017 at 3:42 PM, Barry Smith wrote: > >The error message is generated based on the macro MPICH_NUMVERSION > contained in the mpi.h file. > > Apparently MVAPICH also provides this macro, hence PETSc has no way to > know that it is not MPICH. > > If you can

Re: [petsc-users] misleading "mpich" messages

2017-04-25 Thread Barry Smith
The error message is generated based on the macro MPICH_NUMVERSION contained in the mpi.h file. Apparently MVAPICH also provides this macro, hence PETSc has no way to know that it is not MPICH. If you can locate in the MVAPICH mpi.h include files macros related explicitly to MVAPICH then

[petsc-users] misleading "mpich" messages

2017-04-25 Thread Kong, Fande
Hi, We configured PETSc with a version of MVAPICH, and complied with another version of MVAPICH. Got the error messages: *error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version"* Why we could not say something about

Re: [petsc-users] petsc4py bool type

2017-04-25 Thread Zhang, Hong
PetscBool is indeed an int. So there is nothing wrong. PETSc does not use bool in order to support C89. Hong (Mr.) > On Apr 25, 2017, at 11:48 AM, Garth N. Wells wrote: > > I'm seeing some behaviour with bool types in petsc4py that I didn't > expect. In the Python interface,

[petsc-users] petsc4py bool type

2017-04-25 Thread Garth N. Wells
I'm seeing some behaviour with bool types in petsc4py that I didn't expect. In the Python interface, returned Booleans have type '', where I expected them to have type ' '. Below program illustrates issue. Seems to be related to bint in cython. Am I doing something wrong? Garth from petsc4py