[petsc-dev] ugliness due to missing lapack routines

Karl Rupp rupp at mcs.anl.gov
Sat Feb 9 10:22:35 CST 2013


Hi,

I'm super-late in jumping in (again) into the discussion. Before we can 
even think about doing anything C-AST-related, we need to reduce the CPP 
usage to a much smaller amount. I'll try to come up with a 
categorization of CPP usage in PETSc during next week.

Some of the CPP macros are fairly simple to be integrated into a C-AST. 
Conditional objects including operations on them are a lot harder, e.g.

void my_func()
{
   PetscInt   ierr;
#if defined(PETSC_HAVE_SOMETHING)
   PetscInt   headache;
#endif

   PetscFunctionBegin;
   ...
#if defined(PETSC_HAVE_SOMETHING)
   some_func(headache);
#else
   other_func();
#endif
   ...
}

I think the most frequent use is due to the TX-GPU-Package, but there 
are a couple of other cases where the presence of some optional package 
leads to such code.

Best regards,
Karli



On 02/08/2013 12:20 AM, Jed Brown wrote:
>
> On Fri, Feb 8, 2013 at 12:10 AM, Barry Smith <bsmith at mcs.anl.gov
> <mailto:bsmith at mcs.anl.gov>> wrote:
>
>      > How would they specify what they want to use? Hopefully using the
>     options database.
>
>        Of course.
>      >
>      > Inlining could then be thought of as an extreme case of
>     profile-guided optimization, in the sense that you run an
>     instrumented instance of the code to determine which decisions have
>     been made, then recompile (mostly just fusing the right things) and
>
>        Yup.
>
>
> Did we just converge?
>
> I was just getting in the groove. ;-)




More information about the petsc-dev mailing list