Re: [petsc-users] Unequal sparse matrix row distribution for MPI MatMult

2015-03-31 Thread Matthew Knepley
On Tue, Mar 31, 2015 at 6:51 PM, Steena M stm8...@yahoo.com wrote: Thanks Barry. I'm still getting the malloc error with NULL. Is there a way to distribute the matrix without explicit preallocation? Different matrices will be loaded during runtime and assigning preallocation parameters would

[petsc-users] Preconditioning Matrix-free SNES, preconditioner update, PCView

2015-03-31 Thread Juris Vencels
Hello PETSc Users, I am using Matrix-Free SNES solver with the following options PETSC_OPTIONS=ksp_type gmres -snes_monitor_short -snes_mf -user_precond and shell-ILU preconditioner that I create as following: ! === call PCSetType(pc,PCSHELL,ierr)

Re: [petsc-users] TimeStepper norm problems. EMIL Please read this

2015-03-31 Thread Andrew Spott
awesome, great to hear. Thanks! -Andrew On Tue, Mar 31, 2015 at 7:16 PM, Emil Constantinescu emcon...@mcs.anl.gov wrote: Hi Andrew - we found a bug in TSComputeRHSFunctionLinear. In your code you need to provide the context to TSSetRHSFunction: TSSetRHSFunction( tss, NULL,

Re: [petsc-users] TimeStepper norm problems. EMIL Please read this

2015-03-31 Thread Emil Constantinescu
Hi Andrew - we found a bug in TSComputeRHSFunctionLinear. In your code you need to provide the context to TSSetRHSFunction: TSSetRHSFunction( tss, NULL, TSComputeRHSFunctionLinear, c ); For now you can check out a branch that has implemented the fix by running git checkout

Re: [petsc-users] Unequal sparse matrix row distribution for MPI MatMult

2015-03-31 Thread Barry Smith
You should not need to call any preallocation routines when using MatLoad() How did you generate the file? Are you sure it has the correct information for the matrix? Barry On Mar 31, 2015, at 11:05 PM, Steena M stm8...@yahoo.com wrote: Thanks Matt. I'm still getting the malloc

Re: [petsc-users] Preconditioning Matrix-free SNES, preconditioner update, PCView

2015-03-31 Thread Barry Smith
On Mar 31, 2015, at 9:03 PM, Juris Vencels juris.venc...@gmail.com wrote: Hello PETSc Users, I am using Matrix-Free SNES solver with the following options PETSC_OPTIONS=ksp_type gmres -snes_monitor_short -snes_mf -user_precond and shell-ILU preconditioner that I create as following:

Re: [petsc-users] Preconditioning Matrix-free SNES, preconditioner update, PCView

2015-03-31 Thread Matthew Knepley
On Tue, Mar 31, 2015 at 9:03 PM, Juris Vencels juris.venc...@gmail.com wrote: Hello PETSc Users, I am using Matrix-Free SNES solver with the following options PETSC_OPTIONS=ksp_type gmres -snes_monitor_short -snes_mf -user_precond and shell-ILU preconditioner that I create as

Re: [petsc-users] Unequal sparse matrix row distribution for MPI MatMult

2015-03-31 Thread Steena M
Thanks Matt. I'm still getting the malloc errorĀ  [0]PETSC ERROR: Argument out of range![0]PETSC ERROR: New nonzero at (2,18) caused a malloc! andĀ  a new incorrect matrix file error: [0]PETSC ERROR: Unexpected data in file![0]PETSC ERROR: not matrix object! Maybe the order of calls is mixed up.

[petsc-users] DMDA halo exchange

2015-03-31 Thread Dominic Meiser
Hi, I have a DMDA for a structured grid in a 3D FDTD calculation. What is the most efficient way to update the ghost regions after each time step? Currently I update a global vector and then I scatter to a local vector using DMGlobalToLocalBegin/End for the next time step. I also tried

Re: [petsc-users] DMDA halo exchange

2015-03-31 Thread Dominic Meiser
Great, thanks very much. Cheers, Dominic On 03/31/2015 10:24 AM, Barry Smith wrote: Dominic, DMLocalToLocal is the intended usage. There is code inside the VecScatter to detect unneeded copies, which would result in only touching the ghost cells, but for some reason that is not

Re: [petsc-users] DMDA halo exchange

2015-03-31 Thread Barry Smith
Dominic, DMLocalToLocal is the intended usage. There is code inside the VecScatter to detect unneeded copies, which would result in only touching the ghost cells, but for some reason that is not currently turned on, I'll take a look at fixing it in master. Barry On Mar 31, 2015,

[petsc-users] Two questions on PETSc installation

2015-03-31 Thread Zou (Non-US), Ling
Hi All, Following the instructions, I installed PETSc 3.5.2 on my Mac and everything works great. Two questions: 1, I suppose the name, PETSC_ARCH=arch-darwin-c-debug, suggests the installation is a debug version? 2, How can I install a faster (optimized?) version of PETSc ? Best, Ling

Re: [petsc-users] Two questions on PETSc installation

2015-03-31 Thread Jed Brown
Zou (Non-US), Ling ling@inl.gov writes: Hi All, Following the instructions, I installed PETSc 3.5.2 on my Mac and everything works great. Two questions: 1, I suppose the name, PETSC_ARCH=arch-darwin-c-debug, suggests the installation is a debug version? 2, How can I install a faster

Re: [petsc-users] FEM 101

2015-03-31 Thread Justin Pogacnik
Yep, thanks for that Matt. I'll start playing around with the PetscFEIntegrate routines in C++. Is there any plan to make those accessible in F90? Also, I'm not seeing DMPlexIntegrateResidual. Thanks for the help, Justin From: Matthew Knepley

Re: [petsc-users] Two questions on PETSc installation

2015-03-31 Thread Zou (Non-US), Ling
Thank you Jed. Ling On Tue, Mar 31, 2015 at 12:59 PM, Jed Brown j...@jedbrown.org wrote: Zou (Non-US), Ling ling@inl.gov writes: Hi All, Following the instructions, I installed PETSc 3.5.2 on my Mac and everything works great. Two questions: 1, I suppose the name,

Re: [petsc-users] Two questions on PETSc installation

2015-03-31 Thread bichinhoverde
--with-debugging=0 is the configure option to disable debug mode. I use this configure line, which provides good optimization: ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-fblaslapack --download-mpich --with-debugging=0 COPTFLAGS='-Ofast -march=native -mtune=native'

[petsc-users] Problems trying to use -log_summary

2015-03-31 Thread Carol.Brickley
Hi, I am having problems trying to use -log_summary. I have added PetscLogBegin,PetscLogInitSummary and compiled with PETSC_USE_LOG. I then run with -log_summary but the code will not accept this flag, Any ideas? Carol Dr Carol Brickley BSc,PhD,ARCS,DIC,MBCS Senior Software Engineer

Re: [petsc-users] Problems trying to use -log_summary

2015-03-31 Thread Matthew Knepley
On Tue, Mar 31, 2015 at 12:10 PM, carol.brick...@awe.co.uk wrote: Hi, I am having problems trying to use -log_summary. I have added PetscLogBegin,PetscLogInitSummary and compiled with PETSC_USE_LOG. I then run with -log_summary but the code will not accept this flag, Use the debugger and

Re: [petsc-users] Problems trying to use -log_summary

2015-03-31 Thread Satish Balay
Also check if petsc examples work [with -log_summary]. This will isolate the issue [petsc build vs application code] Satish On Tue, 31 Mar 2015, Matthew Knepley wrote: On Tue, Mar 31, 2015 at 12:10 PM, carol.brick...@awe.co.uk wrote: Hi, I am having problems trying to use

Re: [petsc-users] FEM 101

2015-03-31 Thread Matthew Knepley
On Tue, Mar 31, 2015 at 2:33 PM, Justin Pogacnik j.pogac...@auckland.ac.nz wrote: Yep, thanks for that Matt. I'll start playing around with the PetscFEIntegrate routines in C++. Is there any plan to make those accessible in F90? I will write any wrappers you need for F90. However, I wait

Re: [petsc-users] Propagating a constant marker with AMG

2015-03-31 Thread John Mousel
If I recall correctly, GAMG has a somewhat high setup cost and this is a solver I'll only be using for one single solve. It's not a physical field, it's just a marker; 1 inside, 0 outside a surface described by a CAD file. This marker is being propagated into the volume of an octree volumetric

Re: [petsc-users] Propagating a constant marker with AMG

2015-03-31 Thread Jed Brown
John Mousel john.mou...@gmail.com writes: If I recall correctly, GAMG has a somewhat high setup cost and this is a solver I'll only be using for one single solve. It's not a physical field, it's just a marker; 1 inside, 0 outside a surface described by a CAD file. This marker is being

Re: [petsc-users] Unequal sparse matrix row distribution for MPI MatMult

2015-03-31 Thread Steena M
Thanks Barry. I'm still getting the malloc error with NULL. Is there a way to distribute the matrix without explicit preallocation? Different matrices will be loaded during runtime and assigning preallocation parameters would mean an additional preprocessing step.

[petsc-users] Obtaining constraint values in DM vector solution

2015-03-31 Thread Justin Chang
Hi all, So in my DMPlex FEM (serial) simulations, I want to output the solution U to a binary file. I have the following: ierr = PetscViewerBinaryOpen(PETSC_COMM_WORLD,sol.dat,FILE_MODE_WRITE,viewer);CHKERRQ(ierr); ierr = VecView(U,viewer);CHKERRQ(ierr); ierr =

Re: [petsc-users] Obtaining constraint values in DM vector solution

2015-03-31 Thread Matthew Knepley
On Tue, Mar 31, 2015 at 5:06 PM, Justin Chang jchan...@uh.edu wrote: Hi all, So in my DMPlex FEM (serial) simulations, I want to output the solution U to a binary file. I have the following: ierr = PetscViewerBinaryOpen(PETSC_COMM_WORLD,sol.dat,FILE_MODE_WRITE,viewer);CHKERRQ(ierr); ierr

Re: [petsc-users] Propagating a constant marker with AMG

2015-03-31 Thread Jed Brown
John Mousel john.mou...@gmail.com writes: I'm trying to mark two distinct regions of a domain by solving the Laplace equation with constant Dirichlet BC's. Because I'm just rounding to the nearest integer, I just need cheap AMG like behavior to move the constant across the domain quickly.

[petsc-users] Propagating a constant marker with AMG

2015-03-31 Thread John Mousel
I'm trying to mark two distinct regions of a domain by solving the Laplace equation with constant Dirichlet BC's. Because I'm just rounding to the nearest integer, I just need cheap AMG like behavior to move the constant across the domain quickly. Are there any recommended solver options to do

Re: [petsc-users] Propagating a constant marker with AMG

2015-03-31 Thread John Mousel
Thanks Jed, That'll most likely do what I'm looking for. John On Tue, Mar 31, 2015 at 3:47 PM, Jed Brown j...@jedbrown.org wrote: John Mousel john.mou...@gmail.com writes: If I recall correctly, GAMG has a somewhat high setup cost and this is a solver I'll only be using for one single

Re: [petsc-users] Obtaining constraint values in DM vector solution

2015-03-31 Thread Matthew Knepley
On Tue, Mar 31, 2015 at 5:29 PM, Justin Chang jchan...@uh.edu wrote: How do I invoke this command into my program? When I add -vec_view hdf5:sol.h5 my program says this has been left out. You can call VecView() directly with an HDF5 Viewer, or I think its easier to call

Re: [petsc-users] Obtaining constraint values in DM vector solution

2015-03-31 Thread Justin Chang
Matt thanks for the responses. I plan on loading the solution sol.h5 obtained from one program into another (as the auxiliary). So in my other program, I am solving a different problem but on the same mesh. I have the following lines in my other code: ierr =

Re: [petsc-users] Obtaining constraint values in DM vector solution

2015-03-31 Thread Matthew Knepley
On Tue, Mar 31, 2015 at 5:54 PM, Justin Chang jchan...@uh.edu wrote: Matt thanks for the responses. I plan on loading the solution sol.h5 obtained from one program into another (as the auxiliary). So in my other program, I am solving a different problem but on the same mesh. I have the

Re: [petsc-users] Obtaining constraint values in DM vector solution

2015-03-31 Thread Justin Chang
In my first program I have already set the name for the solution. Vec U has the name pressure. In my second program, how do I obtain and use/load pressure? Would I have to use PetscObjectQuery somehow? On Tue, Mar 31, 2015 at 6:00 PM, Matthew Knepley knep...@gmail.com wrote: On Tue, Mar 31,

Re: [petsc-users] Two questions on PETSc installation

2015-03-31 Thread Barry Smith
On Mar 31, 2015, at 1:59 PM, Jed Brown j...@jedbrown.org wrote: Zou (Non-US), Ling ling@inl.gov writes: Hi All, Following the instructions, I installed PETSc 3.5.2 on my Mac and everything works great. Two questions: 1, I suppose the name, PETSC_ARCH=arch-darwin-c-debug, suggests