[petsc-dev] [Facets-devel] dealing with MPIUNi

John Cary cary at txcorp.com
Fri Feb 26 22:32:00 CST 2010


UEDGE needs to be built three ways"

1. Real parallel, which is done with petsc
2. Serial with petsc, and then one has to use mpiuni.  The only place 
where I
see use of mpif.h is
       subroutine jacstnlout

       implicit none
c_mpi      include 'mpif.h'

in bbb/odesetup.m.  It is possible that this could be completely
commented out.  (c_mpi = "" if one is using petsc, i.e., whether
with MPI or pseudo MPI.)  If it can, then the problem may be solved.

(The .m files are LLNL-FES paleo-Fortran.)

3. Serial without petsc (the real legacy code).

While I am not sure of what is necessary, given the condition of
the code and the need for migration, we had to support
   Finding MPI (pseudo/uni or real) for any use of PETSc
   Not having any mpif.h if not using PETSc.

At one point it seemed that the PETSc-serial build still required
an include of mpif.h.  This might be fixable, not sure.

I am not sure where this leaves us, but we can probably make anything
work eventually.

John

PS - I recognize that many folks just "always build with MPI".  We do
not.  We like to support "pure serial" -- not to impose that any mpi
be installed if they want only a serial build of any of our code.



On 2/26/10 1:27 PM, Satish Balay wrote:
> On Fri, 26 Feb 2010, Barry Smith wrote:
>
>
>> On Feb 26, 2010, at 2:56 PM, Satish Balay wrote:
>>
>>
>>> On Fri, 26 Feb 2010, Barry Smith wrote:
>>>
>>>
>>>> On Feb 26, 2010, at 2:43 PM, Satish Balay wrote:
>>>>
>>>>
>>>>> Looks like uedge build tools look for mpiuni spearately and adds in
>>>>> -Impiuni.
>>>>>
>>>>> But I think its good to keep -Impiuni in petsc makefiles for
>>>>> regular users who have mpi.h [or mpif.h] in their non-petsc soures.
>>>>>
>>>>>
>>>> But doesn't this mean that the default PETSc build now with single PETSc
>>>> library is broken for Facets?
>>>>
>>> For some reason it needs mpif.h explicitly - so its looking for it.
>>> [and adding -Ipath].
>>>
>>   How come it cannot just use the output from getincludedirs to have the search
>> path to find mpif.h
>>
>
>
>>   That is, isn't the best approach one where it can use MPIUni, but
>> uses it automatically without needing any mention of MPIUNI in the
>> FACETS build system at all? Or does it already work that way and we
>> are all set?
>>
> facets has an autoconf macro to detect PETSc [multiple versions,
> different install types, with prefix - or not etc..] There might be
> scope to simplify this code.
>
> As of now - it appears to work [with petsc-dev except for the makefile
> change].
>
> Satish
> _______________________________________________
> Facets-devel mailing list
> Facets-devel at ice.txcorp.com
> https://ice.txcorp.com/mailman/listinfo/facets-devel
> Search this and related lists: https://ice.txcorp.com/cgi-bin/facets
>
>




More information about the petsc-dev mailing list