[petsc-users] Time integrated adjoints

2015-04-14 Thread Dave Makhija
Hello, I'm evaluating my options for computing time dependent adjoints. I did not think PETSc supported this, but I see TSAdjointSolve in the development branch. That would be fantastic news if you plan to support time integrated adjoints! What features are envisioned and when is the targeted

[petsc-users] Distribution of columns on mutliple ranks

2015-04-14 Thread Florian Lindner
Hello, given I have this piece of python code: rank = MPI.COMM_WORLD.Get_rank() sizes = [ 4, 5] n = sizes[rank] A = PETSc.Mat() A.create() A.setSizes( ((n, PETSc.DETERMINE), (n, PETSc.DETERMINE)) ) # sets the local size, let petsc determine global size A.setFromOptions(); A.setUp()

Re: [petsc-users] DMPlexUniformRefine

2015-04-14 Thread Matthew Knepley
On Tue, Apr 14, 2015 at 11:13 AM, Fande Kong fande.k...@colorado.edu wrote: Hi all, I have several lines of code to read a mesh and uniformly refine it. DMPlex can not uniformly refine it. I am using PETSc-3.5.3. The code is very simple like follows: #undef __FUNCT__ #define __FUNCT__

[petsc-users] DMPlexUniformRefine

2015-04-14 Thread Fande Kong
Hi all, I have several lines of code to read a mesh and uniformly refine it. DMPlex can not uniformly refine it. I am using PETSc-3.5.3. The code is very simple like follows: #undef __FUNCT__ #define __FUNCT__ main int main(int argc, char **argv) { DM dm,pdm, refinedMesh;

[petsc-users] Apple Customer Team

2015-04-14 Thread store@apple
This e-mail was sent to your mailbox and contains information directly related to your account with us Update Security notifications. Thanks, Apple Customer Team

Re: [petsc-users] DMPlexUniformRefine

2015-04-14 Thread Fande Kong
Thanks. It does work now. On Tue, Apr 14, 2015 at 10:27 AM, Matthew Knepley knep...@gmail.com wrote: On Tue, Apr 14, 2015 at 11:13 AM, Fande Kong fande.k...@colorado.edu wrote: Hi all, I have several lines of code to read a mesh and uniformly refine it. DMPlex can not uniformly refine it.

Re: [petsc-users] Tao iterations

2015-04-14 Thread Jason Sarich
Hi Justin, I have pushed these changes to the next branch, your code snippet should work fine there. Note that there is also available (since version 3.5.0) the routine TaoGetSolutionStatus(tao,its,NULL,NULL,NULL,NULL,NULL) which will provide the same information Jason On Fri, Apr 10, 2015 at

Re: [petsc-users] ghost values

2015-04-14 Thread Gideon Simpson
So in your example of the form function, is something happening where, when I leave the scope of FormFunction, the invocation of DMGetLocalVector on the DM keeps a note that it had been called previously and has that memory already allocated? Does the design distinguish between different calls

Re: [petsc-users] ghost values

2015-04-14 Thread Barry Smith
On Apr 14, 2015, at 7:43 PM, Gideon Simpson gideon.simp...@gmail.com wrote: So in your example of the form function, is something happening where, when I leave the scope of FormFunction, the invocation of DMGetLocalVector on the DM keeps a note that it had been called previously and has

[petsc-users] Caught signal number 10 BUS: Bus Error

2015-04-14 Thread Justin Chang
Hello everyone, My program runs fine, with debug mode, on my Ubuntu laptop, but when I run the same code on my iMac (Yosemite) with no debug, I get this error: [0]PETSC ERROR: [0]PETSC ERROR: Caught signal number 10 BUS:

Re: [petsc-users] ghost values

2015-04-14 Thread Barry Smith
On Apr 14, 2015, at 6:25 PM, Gideon Simpson gideon.simp...@gmail.com wrote: So other than the minor point of it zeroing out the data, is there any conceivable reason to use Create/Destroy over Get/Restore? The design intends that Create/Destroy are for long lived objects. For example in

Re: [petsc-users] Caught signal number 10 BUS: Bus Error

2015-04-14 Thread Matthew Knepley
On Tue, Apr 14, 2015 at 9:20 PM, Justin Chang jchan...@uh.edu wrote: Hello everyone, My program runs fine, with debug mode, on my Ubuntu laptop, but when I run the same code on my iMac (Yosemite) with no debug, I get this error: So it appears that this SEGV happens in your code, which

Re: [petsc-users] Caught signal number 10 BUS: Bus Error

2015-04-14 Thread Satish Balay
Also run with valgrind [perhaps on linux] to make sure valgrind doesn't flag any memory corruption. http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind Satish On Tue, 14 Apr 2015, Matthew Knepley wrote: On Tue, Apr 14, 2015 at 9:20 PM, Justin Chang jchan...@uh.edu wrote: Hello

Re: [petsc-users] Distribution of columns on mutliple ranks

2015-04-14 Thread Matthew Knepley
On Tue, Apr 14, 2015 at 4:11 AM, Florian Lindner mailingli...@xgm.de wrote: Hello, given I have this piece of python code: rank = MPI.COMM_WORLD.Get_rank() sizes = [ 4, 5] n = sizes[rank] A = PETSc.Mat() A.create() A.setSizes( ((n, PETSc.DETERMINE), (n, PETSc.DETERMINE)) ) # sets the

[petsc-users] ghost values

2015-04-14 Thread Gideon Simpson
If i use the DM_BOUNDARY_GHOSTED flag in the creation of a DMDA array, are the ghosted values automatically set to zero, or should they be manually set to zero if that’s the desired ghost value? -gideon

Re: [petsc-users] Time integrated adjoints

2015-04-14 Thread Barry Smith
On Apr 14, 2015, at 1:06 AM, Dave Makhija makhi...@colorado.edu wrote: Hello, I'm evaluating my options for computing time dependent adjoints. I did not think PETSc supported this, but I see TSAdjointSolve in the development branch. That would be fantastic news if you plan to support

Re: [petsc-users] ghost values

2015-04-14 Thread Barry Smith
When PETSc vectors are created initially they always have 0 everywhere. So if you use DMCreateLocalVector() it will have zero in all those ghost places (as well as everywhere else). But if you use DMGetLocalVector() it returns vectors that maybe dirty so you need to fill in any

Re: [petsc-users] ghost values

2015-04-14 Thread Gideon Simpson
Other than zeroing things out, is there any substantive difference between DMCreateLocalVector and DMGetLocalVector? -gideon On Apr 14, 2015, at 7:02 PM, Barry Smith bsm...@mcs.anl.gov wrote: When PETSc vectors are created initially they always have 0 everywhere. So if you use

Re: [petsc-users] ghost values

2015-04-14 Thread Matthew Knepley
On Tue, Apr 14, 2015 at 6:15 PM, Gideon Simpson gideon.simp...@gmail.com wrote: Other than zeroing things out, is there any substantive difference between DMCreateLocalVector and DMGetLocalVector? The Get version caches vectors, so you are not continually creating/destroying Matt

Re: [petsc-users] ghost values

2015-04-14 Thread Matthew Knepley
On Tue, Apr 14, 2015 at 6:25 PM, Gideon Simpson gideon.simp...@gmail.com wrote: So other than the minor point of it zeroing out the data, is there any conceivable reason to use Create/Destroy over Get/Restore? Nope, and calling VecSet(v, 0.0) is really cheap. Matt -gideon On Apr 14,

Re: [petsc-users] ghost values

2015-04-14 Thread Gideon Simpson
So other than the minor point of it zeroing out the data, is there any conceivable reason to use Create/Destroy over Get/Restore? -gideon On Apr 14, 2015, at 7:16 PM, Matthew Knepley knep...@gmail.com wrote: On Tue, Apr 14, 2015 at 6:15 PM, Gideon Simpson gideon.simp...@gmail.com