[petsc-dev] dealing with MPIUNi

Barry Smith bsmith at mcs.anl.gov
Fri Feb 26 16:32:28 CST 2010

On Feb 26, 2010, at 4:24 PM, Lisandro Dalcin wrote:

> On 26 February 2010 18:40, Barry Smith <bsmith at mcs.anl.gov> wrote:
>> Meanwhile libb has nothing to do with PETSc and has no
>> explicit support for compiling without MPI.
> BTW, libb does not necesarily work with mpiuni, because of the
> send-to-self communication, right?
>> People want to build the entire
>> application without MPI. Say also libb is used in other  
>> applications that
>> have nothing to do with PETSc.
> So, but that's a sort of cross-fingers build, because mpiuni is not a
> proper serial-MPI... right?

    Yes, but the package does not do any send-to-self etc and we know  
that it works with MPIUNI.
Basically the user does not want to write their own MPIUNI but wants  
to piggyback on PETSc's when it is used with PETSc but also does not  
want ugly ifdef about PETSc in the source code.


>> 1) Your solution. Go into non-PETSc code and hardwire in petscmpi.h  
>> instead
>> of mpi.h, but since libb is used in other apps without PETSc they  
>> need to
>> ifdef when to use petscmpi.h instead of mpi.h
> That's not an option, of course.
>> 2) The previous PETSc mpiuni model. User does not change libb  
>> source code at
>> all, instead they just compile against -Iinclude/mpiuni when they  
>> want to
>> use it with PETSc and no MPI.
> Yes, or course... My point on using "petscmpi.h" was just a
> convenience for project with a strong dependency on PETSc; #include
> "petscmpi.h" would mean include just MPI, not the whole PETSc, but
> still use whatever MPI beast (true or uni) PETSc is using.
>>  Unfortunately MPIUNI seems to require a series of compromises for  
>> different
>> persons needs and hence is a bit of a hodge-podge, I don't see a  
>> way around
>> this to be completely clean and make everyone happy,
> Indeed. I did not know that people expected that the humble mpiuni
> could be used for building codes with NO explicit support for
> compiling without MPI... kinda too much to ask right? I'll try to
> build mpi4py using mpiuni :-) ... no kidding, it will likely compile &
> link, but I have no idea what could happen at runtime.
> -- 
> Lisandro Dalcin
> ---------------
> Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
> Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
> Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
> PTLC - Güemes 3450, (3000) Santa Fe, Argentina
> Tel/Fax: +54-(0)342-451.1594

More information about the petsc-dev mailing list