[petsc-users] MATBDIAG in > 3.1

Parker, Andrew (UK Filton) Andrew.Parker2 at baesystems.com
Wed Dec 7 03:55:40 CST 2011


Just my thoughts....I'm sure you've thought about this already....

 

1)

It would need to be compiled by a c++ compiler, but could be used as can
other c++ functions by other languages given the export of the function
and suitable wrapping....

2)

I agree on seeing the code, need to think about that.  Although
technically of course you could actually write a programme and compile
it with the purpose of writing out a header file with a function in it,
in that case you would use pre-processor boost magic. The idea would be
to compile that code before petsc is compiled, run that code before
petsc is compiled and that would produce a file with the function in it,
say for block size 20 , then include that file and use that generated
function when petsc is compiled.  That way you would see the automated
code.....

 

3)

Using the pre-processor boost method probably produces close to the most
optimal in-lined code you can get in my (personal) opinion....

 

Something like python to do the code-gen...

 

Cheers,

Andy

 

From: petsc-users-bounces at mcs.anl.gov
[mailto:petsc-users-bounces at mcs.anl.gov] On Behalf Of Matthew Knepley
Sent: 07 December 2011 09:37
To: PETSc users list
Subject: Re: [petsc-users] MATBDIAG in > 3.1

 

                    *** WARNING ***

  This message has originated outside your organisation,
  either from an external partner or the Global Internet. 
      Keep this in mind if you answer this message.
On Wed, Dec 7, 2011 at 2:54 AM, Parker, Andrew (UK Filton)
<Andrew.Parker2 at baesystems.com> wrote:

	Legends, nice one!
	
	Got to that point in the souce code yesterday, saw that 7 was
missing
	from the switch statement, and got worried.
	
	Is there any symmetry between the code in block size 5->6->7->8?
I've
	asked that without looking, so could be stupid question.  The
reason I
	ask is that if there is this is a classic use of something like
	boost-preprocessor macros or a bit of templating, as in the
compiler
	would expand it all out given a pattern at compile time?  Just
	interest....

 

This is the kind of thing you could do with templates. However, that
would mean

 

  1) It only works in C++, and the logic is convoluted

 

  2) You can't see the generated code

 

  3) Its impossible to debug (and usually optimize)

 

We are looking at other approaches.

 

  Thanks,

 

    Matt

 

	Cheers again,
	Andy
	
	-----Original Message-----
	From: petsc-users-bounces at mcs.anl.gov
	[mailto:petsc-users-bounces at mcs.anl.gov] On Behalf Of Satish
Balay
	Sent: 06 December 2011 19:31
	To: PETSc users list
	Subject: Re: [petsc-users] MATBDIAG in > 3.1
	
	                   *** WARNING ***
	
	 This message has originated outside your organisation,
	 either from an external partner or the Global Internet.
	     Keep this in mind if you answer this message.
	
	
	On Tue, 6 Dec 2011, Matthew Knepley wrote:
	
	> On Tue, Dec 6, 2011 at 7:43 AM, Parker, Andrew (UK Filton) <
	> Andrew.Parker2 at baesystems.com> wrote:
	>
	> > So having got petsc 3.2 install and all its deps, I now get
	> > this....****
	> >
	> > ** **
	> >
	> > [0]PETSC ERROR: PCSetUp_PBJacobi() line 207 in
	> > src/ksp/pc/impls/pbjacobi/pbjacobi.c not supported for block
size
	> > 7****
	> >
	> > ** **
	> >
	> > ** **
	> >
	> > Any thoughts?
	> >
	>
	> Sorry about that. There was confusion on our end. I have added
the
	> code you need to 3.2. It will go out with the next patch
release.
	> Alternatively, you can retrieve the source tarball from the
repository
	
	> site or use the repository directly.
	
	
	I'm attaching this change as a patchfile - which can be applied
to the
	current
	petsc-3.2 sources you have.
	
	cd petsc-3.2
	patch -Np1 < bpjacobi.patch
	
	Satish
	
	
********************************************************************
	This email and any attachments are confidential to the intended
	recipient and may also be privileged. If you are not the
intended
	recipient please delete it from your system and notify the
sender.
	You should not copy it or use it for any purpose nor disclose or
	distribute its contents to any other person.
	
********************************************************************





 

-- 
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111207/cd155bcd/attachment-0001.htm>


More information about the petsc-users mailing list