[petsc-dev] Install location for MPIUNI mpi.h
Jed Brown
jed at jedbrown.org
Wed Apr 25 16:04:43 CDT 2018
Bitbucket keeps saying "Something went wrong while creating your pull
request." but you can look at the branch
https://bitbucket.org/petsc/petsc/branch/jed/mpiuni-include/maint
@balay Can we simply remove the MPIUNI includes from MPI.py or should we
remove it later? What --download packages are supported when using
MPIUNI? I don't see any examples.
"Smith, Barry F." <bsmith at mcs.anl.gov> writes:
>> On Apr 25, 2018, at 2:47 PM, Balay, Satish <balay at mcs.anl.gov> wrote:
>>
>> On Wed, 25 Apr 2018, Smith, Barry F. wrote:
>>
>>>
>>>
>>>> On Apr 25, 2018, at 2:31 PM, Jed Brown <jed at jedbrown.org> wrote:
>>>>
>>>> "Smith, Barry F." <bsmith at mcs.anl.gov> writes:
>>>>
>>>>>> On Apr 25, 2018, at 1:36 PM, Jed Brown <jed at jedbrown.org> wrote:
>>>>>>
>>>>>> It is currently installed to include/petsc/mpiuni/mpi.h and petscsys.h
>>>>>> includes it as <mpi.h>, which means that users of MPIUNI need to put
>>>>>> -I/prefix/include/petsc/mpiuni in their command lines. Matt and I agree
>>>>>> that this is bad. We disagree on the solution.
>>>>>>
>>>>>> He wants to install it to /prefix/include/mpi.h as though the user had
>>>>>> written --download-mpich. This would conflict if a user later installs
>>>>>> a real MPI to that location.
>>>>>
>>>>> Jed,
>>>>>
>>>>> So you propose in petscsys.h ?
>>>>>
>>>>> #if defined(PETSC_HAVE_MPIUNI)
>>>>> #include <petsc/mpiuni/mpi.h>
>>>>> #else
>>>>> #include <mpi.h>
>>>>> #endif
>>>>>
>>>>> I don't have a problem with this.
>>>>
>>>> Yes, and same installation layout as today.
>>>
>>> Ok, this is far better than copying the mpiuni mpi.h file to a public place (Matt's suggestion) and is a bit better than requiring the extra -I flag (Satish's suggestion)
>>>
>>
>> All approaches have drawbacks. This approach breaks user code. I guess thats easy to work arround [and fix these
>> examples awell]
>>
>> $ git grep '<mpi\.h>' |grep examples
>> src/dm/examples/tests/ex42.c:#include <mpi.h>
>> src/tao/leastsquares/examples/tutorials/chwirut2.c:#include <mpi.h>
>
> Fix these examples at the same time.
>>
>>
>>>>
>>>>> I notice that the Fortran petscsys.h is scattered full of weird MPIUni specific stuff like
>>>>>
>>>>> #if defined (PETSC_HAVE_MPIUNI)
>>>>> #include "mpiunifdef.h"
>>>>> #endif
>>>>>
>>>>> #if defined(PETSC_HAVE_MPIUNI)
>>>>> #define MPI_Comm PetscFortranInt
>>>>> #define MPI_Group PetscFortranInt
>>>>> #define PetscMPIInt PetscFortranInt
>>>>> #else
>>>>> #define MPI_Comm integer
>>>>> #define MPI_Group integer
>>>>> #define PetscMPIInt integer
>>>>> #endif
>>
>> I might have diverged from mpi standard to prevent '-i8' affecting petsc+mpiuni code.
>
> Ah, yes
>
>>
>> Satish
>>
>>>>>
>>>>> It seems PETSc Fortran does not use the standard mpif.h file?
>>>>
>>>> Yuck.
>>>
>>> I don't remember the history of this construct. There must have been a reason years ago that may no longer exist, I don't know.
>>>
>>> Barry
More information about the petsc-dev
mailing list