[petsc-dev] ugliness due to missing lapack routines

Barry Smith bsmith at mcs.anl.gov
Thu Feb 7 17:21:17 CST 2013


On Feb 7, 2013, at 5:18 PM, Matthew Knepley <knepley at gmail.com> wrote:

> 
> On Thu, Feb 7, 2013 at 6:10 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 
> On Feb 7, 2013, at 4:31 PM, Matthew Knepley <knepley at gmail.com> wrote:
> 
> >
> >
> > I think we have all the facts on the high level discussion. Concrete proposals to be voted on:
> >
> >   1) Get rid of all function-like CPP things
> 
>     Right now we can get rid of any CPP macro functions that can be trivially converted to C functions. The ones we cannot get rid of are ones that take "types" or block sizes as arguments. (these are used as code generation macros; generating a chunk of C code for each type).
> 
> We should work on eliminating those first. This is a good test of how usable the code generation would be.

  The problem is that we cannot do the code generation properly until we've removed all the CPP code first. So it seems to me that these should be eliminated last (since they are vital to working PETSc). But I could be wrong, Karl?

   Barry

>  
> >
> >   2) Get rid of (Matt says) innocuous CPP things, like CHKERRQ
> 
>    We don't need to get rid of them. These can all be swept out by one massive automated regular expression sed type operation when the time is right. In fact I should just write that now for experimentation purposes.
> 
> Yes.
>  
> >
> >   3) Generate full functions for missing LAPACK stuff, which will probably necessitate changing petscblaslapack.h
> 
>     I don't see that this should require any change to petscblaslapack.h (though we may want to change petscblaslapack.h at some point for other reasons)
> 
> Okay, I will try and do this in a week.
>  
> 4)
> #undef __FUNC__
> #define __FUNC__
> 
>    Can all be swept out automatically at the right time.
> 
> Yes.
>  
> 5)
> #define KSPGMRES "gmres"
> 
> ?
> 
> We had this argument. The typedef behaves in a weird was with 'const'.
>  
> 6)
> #if defined(PETSC_HAVE_SOMEINCLUDE)
> #include <someinclude.h>
> 
>    I was thinking we could auto generate empty someinclude.h for these (putting in $PETSC_ARCH/include) Cheesy but ?
> 
> Hmm, that seems fragile. I would rather generate the header lists.
> 
>     Matt
> 
> 7) Some other uses of CPP
> 
>   Barry
> 
> >
> >     Matt
> >
> > --
> > What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> > -- Norbert Wiener
> 
> 
> 
> 
> -- 
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener




More information about the petsc-dev mailing list