Re: [petsc-users] Extremely slow DMNetwork Jacobian assembly

2019-05-08 Thread Justin Chang via petsc-users
Barry > > > > On May 8, 2019, at 7:44 AM, Matthew Knepley via petsc-users < > petsc-users@mcs.anl.gov> wrote: > > > > On Wed, May 8, 2019 at 4:45 AM Justin Chang via petsc-users < > petsc-users@mcs.anl.gov> wrote: > > Hi guys, > > > >

Re: [petsc-users] Confusing Schur preconditioner behaviour

2019-03-18 Thread Justin Chang via petsc-users
Colin, 1) What equations are you solving? 2) In your second case, you set the outer ksp to preonly, thus we are unable to see the ksp_monitor for the (firedrake_0_) solver. Set it to gmres and see if you have a similar output to your first case: 0 KSP preconditioned resid norm

Re: [petsc-users] BJACOBI with FIELDSPLIT

2019-03-18 Thread Justin Chang via petsc-users
Use -ksp_type fgmres if your inner ksp solvers are gmres. Maybe that will help? On Mon, Mar 18, 2019 at 1:33 PM Rossi, Simone via petsc-users < petsc-users@mcs.anl.gov> wrote: > Thanks Barry. > > Let me know if you can spot anything out of the ksp_view > > > KSP Object: 1 MPI processes > >

Re: [petsc-users] Meaning of PETSc error code 77

2019-02-08 Thread Justin Chang via petsc-users
Hi Aditya, I wouldn't trust FEniCS' wrappers around PETSc. It might also depend on the version of DOLFIN you're working with. Shameless plug: Try using pfibs https://github.com/NREL/pfibs We wrote a slightly better PETSc interface to FEniCS. It does require FEniCS 2018.1.0 or higher. This

Re: [petsc-users] Preconditioning systems of equations with complex numbers

2019-02-04 Thread Justin Chang via petsc-users
Knepley wrote: > The coarse grid is getting set to SOR rather than LU. > >Matt > > On Fri, Feb 1, 2019 at 3:54 PM Justin Chang wrote: > >> I tried these options: >> >> -ksp_view >> -ksp_monitor_true_residual >> -ksp_type gmres >> -ks

Re: [petsc-users] Preconditioning systems of equations with complex numbers

2019-02-01 Thread Justin Chang via petsc-users
: found 5464 nodes, limit used is 5 Am I doing this right? Did I miss anything? On Fri, Feb 1, 2019 at 1:22 PM Matthew Knepley wrote: > On Fri, Feb 1, 2019 at 3:05 PM Justin Chang wrote: > >> Hi Mark, >> >> 1) So with these options: >> >>

Re: [petsc-users] Preconditioning systems of equations with complex numbers

2019-01-31 Thread Justin Chang via petsc-users
in the next section. On Thu, Jan 31, 2019 at 1:47 PM Matthew Knepley wrote: > On Thu, Jan 31, 2019 at 3:20 PM Justin Chang via petsc-users < > petsc-users@mcs.anl.gov> wrote: > >> Hi all, >> >> I'm working with some folks to extract a linear system of equat

Re: [petsc-users] Create a DM given sets of IS's

2019-01-02 Thread Justin Chang via petsc-users
-fieldsplit_1_fieldsplit_0_pc_type fieldsplit -fieldsplit_2_fieldsplit_0_pc_type fieldsplit On Wed, Jan 2, 2019 at 2:54 PM Justin Chang wrote: > Okay that's fine. > > Now consider one more case: > > Suppose I create a PetscSection with 9 fields: > > section = PETSc.Section().create() >

[petsc-users] Create a DM given sets of IS's

2018-12-30 Thread Justin Chang via petsc-users
Hi all, I am solving a six field battery problem (concentration and potential for each of the two solid and one electrolyte domains) and I want to experiment with nested/recursice fieldsplitting. I have the IS's and am able to use these to define my PCFieldSplitsSetIS(). However, I can imagine

Re: [petsc-users] Setting SNESVI

2018-08-17 Thread Justin Chang
Have you tried SNESVINEWTONRSLS? In my experience, I seem to have slightly better luck with that one instead of SNESVINEWTONSSLS On Sat, Aug 18, 2018 at 12:56 AM Amir wrote: > Hi > I need to apply constraint to primitive variables. I am troubling to set > up SNESVI. After running the code, I

Re: [petsc-users] Good performance For small problem on GALILEO

2017-10-20 Thread Justin Chang
600 unknowns is way too small to parallelize. Need at least 10,000 unknowns per MPI process: https://www.mcs.anl.gov/petsc/documentation/faq.html#slowerparallel What problem are you solving? Sounds like you either compiled PETSc with debugging mode on or you just have a really terrible solver.

Re: [petsc-users] ex12 poisson solver

2017-10-09 Thread Justin Chang
You need this additional command line argument: -petscspace_order 1 On Mon, Oct 9, 2017 at 9:02 AM, David Fuentes wrote: > > Hi, > > I'm trying to use petsc 3.8.0 with ex12.c example to setup a poisson > solver: http://www.mcs.anl.gov/petsc/petsc-current/src/snes/ >

Re: [petsc-users] PETSC profiling on 1536 cores

2017-06-15 Thread Justin Chang
Using no preconditioner is a bad bad idea and anyone with the gall to do this deserves to be spanked. For the Poisson equation, why not use PETSc's native algebraic multigrid solver? -pc_type gamg On Thu, Jun 15, 2017 at 3:09 PM Pietro Incardona wrote: > Dear All > > >

Re: [petsc-users] examples of DMPlex*FVM methods

2017-04-06 Thread Justin Chang
There are many flavors of FEM and FVM. If by FEM you mean the Continuous Galerkin FEM, then yes it is a far from ideal method for solving advection-diffusion equations, especially when advection is the dominating effect. The Discontinuous Galerkin (DG) FEM on the other hand is much better for

Re: [petsc-users] Correlation between da_refine and pg_mg_levels

2017-04-05 Thread Justin Chang
BTW what are the relevant papers that describe this problem? Is this one http://epubs.siam.org/doi/abs/10.1137/110834512 On Mon, Apr 3, 2017 at 1:04 PM Justin Chang <jychan...@gmail.com> wrote: > So my makefile/script is slightly different from the tutorial directory. > Basi

Re: [petsc-users] Configuring PETSc for KNL

2017-04-05 Thread Justin Chang
;> > >> > "Zhang, Hong" <hongzh...@anl.gov> writes: >> > >> >> On Apr 4, 2017, at 10:45 PM, Justin Chang <jychan...@gmail.com> jychan...@gmail.com>> wrote: >> >> >> >> So I tried the following options: >> >

Re: [petsc-users] Configuring PETSc for KNL

2017-04-04 Thread Justin Chang
Knepley <knep...@gmail.com> wrote: > On Tue, Apr 4, 2017 at 10:57 AM, Justin Chang <jychan...@gmail.com> wrote: > >> Thanks everyone for the helpful advice. So I tried all the suggestions >> including using libsci. The performance did not improve for my particular

Re: [petsc-users] Configuring PETSc for KNL

2017-04-04 Thread Justin Chang
017 at 2:45 PM, Richard Mills <richardtmi...@gmail.com> > wrote: > > On Mon, Apr 3, 2017 at 12:24 PM, Zhang, Hong <hongzh...@anl.gov> wrote: > > > On Apr 3, 2017, at 1:44 PM, Justin Chang <jychan...@gmail.com> wrote: > > Richard, > > This is what my

Re: [petsc-users] Configuring PETSc for KNL

2017-04-03 Thread Justin Chang
ep in > mind that individual KNL cores are much less powerful than an individual > Haswell node. You are also using roughly twice the power footprint (dual > socket Haswell node should be roughly equivalent to a KNL node, I > believe). How do things look on when you compa

[petsc-users] Configuring PETSc for KNL

2017-04-03 Thread Justin Chang
Hi all, On NERSC's Cori I have the following configure options for PETSc: ./configure --download-fblaslapack --with-cc=cc --with-clib-autodetect=0 --with-cxx=CC --with-cxxlib-autodetect=0 --with-debugging=0 --with-fc=ftn --with-fortranlib-autodetect=0 --with-mpiexec=srun --with-64-bit-indices=1

Re: [petsc-users] Correlation between da_refine and pg_mg_levels

2017-04-03 Thread Justin Chang
So my makefile/script is slightly different from the tutorial directory. Basically I have a shell for loop that runs the 'make runex48' four times where -da_refine is increased each time. It showed Levels 1 0 then 2 1 0 because the job was in the middle of the loop, and I cancelled it halfway when

Re: [petsc-users] Correlation between da_refine and pg_mg_levels

2017-04-03 Thread Justin Chang
I fixed the KNL issue - apparently "larger" jobs need to have the executable copied into the /tmp directory to speedup loading/startup time so I did that instead of executing the program via makefile. On Mon, Apr 3, 2017 at 12:45 AM, Justin Chang <jychan...@gmail.com> wrote:

Re: [petsc-users] Correlation between da_refine and pg_mg_levels

2017-04-02 Thread Justin Chang
mith <bsm...@mcs.anl.gov> wrote: > >> >> > On Apr 2, 2017, at 9:25 AM, Justin Chang <jychan...@gmail.com> wrote: >> > >> > Thanks guys, >> > >> > So I want to run SNES ex48 across 1032 processes on Edison, but I keep >> getting segmentat

Re: [petsc-users] Correlation between da_refine and pg_mg_levels

2017-04-02 Thread Justin Chang
ideal parameters to use if > I > > want to use 1k+ cores? > > > > Thanks, > > Justin > > > > On Fri, Mar 31, 2017 at 12:47 PM, Barry Smith <bsm...@mcs.anl.gov> > wrote: > > > >> > >> > On Mar 31, 2017, at 10:00 AM, Jed Brow

Re: [petsc-users] Correlation between da_refine and pg_mg_levels

2017-04-02 Thread Justin Chang
gt; > On Mar 31, 2017, at 10:00 AM, Jed Brown <j...@jedbrown.org> wrote: > > > > Justin Chang <jychan...@gmail.com> writes: > > > >> Yeah based on my experiments it seems setting pc_mg_levels to $DAREFINE > + 1 > >> has decent perform

Re: [petsc-users] Correlation between da_refine and pg_mg_levels

2017-03-30 Thread Justin Chang
-dm_refine didn't work either On Thu, Mar 30, 2017 at 4:21 PM, Matthew Knepley <knep...@gmail.com> wrote: > I think its now -dm_refine > >Matt > > On Thu, Mar 30, 2017 at 4:17 PM, Justin Chang <jychan...@gmail.com> wrote: > >> Also, this was the output bef

Re: [petsc-users] Correlation between da_refine and pg_mg_levels

2017-03-30 Thread Justin Chang
domain size (m)1e+04 x1e+04 x1e+03, num elements 1 x 1 x 1 (1), size (m) 1. x 1. x inf. Which tells me '-da_refine 4' is not registering On Thu, Mar 30, 2017 at 4:15 PM, Justin Chang <jychan...@gmail.com> wrote: > Okay I'll give it a shot. > > Somewhat unrelat

Re: [petsc-users] Correlation between da_refine and pg_mg_levels

2017-03-30 Thread Justin Chang
atthew Knepley <knep...@gmail.com> wrote: > On Thu, Mar 30, 2017 at 3:38 PM, Justin Chang <jychan...@gmail.com> wrote: > >> Okay, got it. What are the options for setting GAMG as the coarse solver? >> > > -mg_coarse_pc_type gamg I think > > >> On T

Re: [petsc-users] Correlation between da_refine and pg_mg_levels

2017-03-30 Thread Justin Chang
Okay, got it. What are the options for setting GAMG as the coarse solver? On Thu, Mar 30, 2017 at 3:37 PM, Matthew Knepley <knep...@gmail.com> wrote: > On Thu, Mar 30, 2017 at 3:04 PM, Justin Chang <jychan...@gmail.com> wrote: > >> Yeah based on my experiments it se

Re: [petsc-users] Correlation between da_refine and pg_mg_levels

2017-03-30 Thread Justin Chang
use; for example -da_refine 1 would result > in 2 levels of multigrid. > > > > On Mar 30, 2017, at 2:17 PM, Justin Chang <jychan...@gmail.com> wrote: > > > > Hi all, > > > > Just a general conceptual question: say I am tinkering around with SNES > e

[petsc-users] Correlation between da_refine and pg_mg_levels

2017-03-30 Thread Justin Chang
Hi all, Just a general conceptual question: say I am tinkering around with SNES ex48.c and am running the program with these options: mpirun -n $NPROCS -pc_type mg -M $XSEED -N $YSEED -P $ZSEED -thi_mat_type baij -da_refine $DAREFINE -pc_mg_levels $MGLEVELS I am not too familiar with mg, but it

Re: [petsc-users] GAMG huge hash being requested

2017-02-20 Thread Justin Chang
Okay thanks On Sun, Feb 19, 2017 at 2:32 PM, Lawrence Mitchell < lawrence.mitch...@imperial.ac.uk> wrote: > > > > On 19 Feb 2017, at 18:55, Justin Chang <jychan...@gmail.com> wrote: > > > > Okay, it doesn't seem like the Firedrake fork (which is what I am us

Re: [petsc-users] GAMG huge hash being requested

2017-02-19 Thread Justin Chang
e the fix is now in master. > > Thanks, > > Matt > > On Sun, Feb 19, 2017 at 3:05 AM, Justin Chang <jychan...@gmail.com> wrote: > >> Hi all, >> >> So I am attempting to employ the DG1 finite element method on the poisson >> equation

[petsc-users] GAMG huge hash being requested

2017-02-19 Thread Justin Chang
Hi all, So I am attempting to employ the DG1 finite element method on the poisson equation using GAMG. When I attempt to solve a problem with roughly 4 million DOFs across 20 cores, i get this error: Traceback (most recent call last): File "pFiredrake.py", line 109, in

Re: [petsc-users] Use previous solution when encountering "DIVERGED_LINE_SEARCH"

2016-11-30 Thread Justin Chang
Also, -snes_stol does not seem to work for vinewtonrsls? On Wed, Nov 30, 2016 at 8:54 PM, Justin Chang <jychan...@gmail.com> wrote: > Generally speaking, yes. But this is VIRS where I am enforcing maximum > principles. From what I have seen, the residual typically exhibit thi

Re: [petsc-users] Use previous solution when encountering "DIVERGED_LINE_SEARCH"

2016-11-30 Thread Justin Chang
ew Knepley <knep...@gmail.com> wrote: > On Wed, Nov 30, 2016 at 8:38 PM, Justin Chang <jychan...@gmail.com> wrote: > >> By manually terminating I meant setting -snes_max_it to 5 if I know >> DIVERGED_LINE_SEARCH >> occurs after 6 iterations. In a transient simulati

Re: [petsc-users] Use previous solution when encountering "DIVERGED_LINE_SEARCH"

2016-11-30 Thread Justin Chang
By manually terminating I meant setting -snes_max_it to 5 if I know DIVERGED_LINE_SEARCH occurs after 6 iterations. In a transient simulation I cannot do this On Wed, Nov 30, 2016 at 8:35 PM, Matthew Knepley <knep...@gmail.com> wrote: > On Wed, Nov 30, 2016 at 8:27 PM, Justin Chan

[petsc-users] Use previous solution when encountering "DIVERGED_LINE_SEARCH"

2016-11-30 Thread Justin Chang
Hi all, I am running some transient simulations using SNESVINEWTONRSLS. At certain timesteps, I get a "DIVERGED_LINE_SEARCH" which essentially "resets" my solution to zero and messes everything up. I notice that this happens when the SNES Function norm no longer decreases, and if I were to

Re: [petsc-users] pcfieldsplitting not working for VI

2016-11-28 Thread Justin Chang
rc/mat/impls/nest/matnest.c [0] Arguments are incompatible [0] Could not find index set I must be doing something wrong here. Justin On Tue, Nov 29, 2016 at 1:24 AM, Justin Chang <jychan...@gmail.com> wrote: > Lawrence, > > I added the following line: > > rs_solver.setDM(a._d

Re: [petsc-users] pcfieldsplitting not working for VI

2016-11-28 Thread Justin Chang
, Lawrence Mitchell < lawrence.mitch...@imperial.ac.uk> wrote: > > > > On 29 Nov 2016, at 02:02, Justin Chang <jychan...@gmail.com> wrote: > > > > Why is this happening? It seems to me VINEWTONRSLS is not understanding > that I have a two-field formulation.

Re: [petsc-users] question

2016-10-24 Thread Justin Chang
Sorry forgot to hit reply all On Monday, October 24, 2016, Justin Chang <jychan...@gmail.com> wrote: > It depends on your SNES solver. A SNES iteration could involve more than > one function evaluation (e.g., line searching). Also, -snes_monitor may say > 3 iterations whereas -

Re: [petsc-users] Looking for a quick example of a symmetric KKT system

2016-10-21 Thread Justin Chang
Something like this? http://www.mcs.anl.gov/petsc/petsc-current/src/tao/constrained/examples/tutorials/toy.c.html On Friday, October 21, 2016, Patrick Sanan wrote: > Are there any examples already in PETSc or TAO that assemble such a > system (which could thus be

Re: [petsc-users] DG within DMPlex

2016-10-03 Thread Justin Chang
Advection-diffusion equations. Perhaps SNES ex12 could be modified to include an advection term? On Mon, Oct 3, 2016 at 9:52 PM, Barry Smith <bsm...@mcs.anl.gov> wrote: > > > On Oct 3, 2016, at 9:45 PM, Justin Chang <jychan...@gmail.com> wrote: > > > > I am

Re: [petsc-users] DG within DMPlex

2016-10-03 Thread Justin Chang
I am just saying the poission problem as an example since that is one of the simpler PDEs out there and already exists. On Mon, Oct 3, 2016 at 9:28 PM, Matthew Knepley <knep...@gmail.com> wrote: > On Mon, Oct 3, 2016 at 6:36 PM, Justin Chang <jychan...@gmail.com> wro

[petsc-users] DG within DMPlex

2016-10-03 Thread Justin Chang
Hi all, Is there, or will there be, support for implementing Discontinuous Galerkin formulations within the DMPlex framework? I think it would be nice to have something such as the SIPG formulation for the poisson problem in SNES ex12.c Thanks, Justin

Re: [petsc-users] PETSc parallel scalability

2016-09-07 Thread Justin Chang
Lots of topics to discuss here... - 315,342 unknowns is a very small problem. The PETSc gurus require at minimum 10,000 unknowns per process for the computation time to outweigh communication time (although 20,000 unknowns or

[petsc-users] Coloring of -mat_view draw

2016-09-05 Thread Justin Chang
Hi all, So i used the following command-line options to view the non-zero structure of my assembled matrix: -mat_view draw -draw_pause -1 And I got an image filled with cyan squares and dots. However, if I right-click on the image a couple times, I now get cyan, blue, and red squares. What do

Re: [petsc-users] strong-scaling vs weak-scaling

2016-08-31 Thread Justin Chang
n Wed, Aug 31, 2016 at 2:01 AM, Justin Chang <jychan...@gmail.com> wrote: > >> Attached is the -log_view output (from firedrake). Event Stage 1: >> Linear_solver is where I assemble and solve the linear system of equations. >> >> I am using the HYPRE BoomerAMG preco

Re: [petsc-users] strong-scaling vs weak-scaling

2016-08-31 Thread Justin Chang
Attached is the -log_view output (from firedrake). Event Stage 1: Linear_solver is where I assemble and solve the linear system of equations. I am using the HYPRE BoomerAMG preconditioner so log_view cannot "see into" the exact steps, but based on what it can see, how do I distinguish between

Re: [petsc-users] strong-scaling vs weak-scaling

2016-08-30 Thread Justin Chang
Thanks everyone. I still think there is a even better phrase for this, like, static scaling? Because unlike strong/weak scaling, concurrency is fixed (hence "static") and we only scale the problem, so this is a mix between strong and weak scaling. ¯\_(ツ)_/¯ Anyway, what I really wanted to say

[petsc-users] GMRES restart guidelines

2016-08-26 Thread Justin Chang
Hi all, When exactly would one need to modify the default restart value of 30 for GMRES? I have seen papers like this which suggest playing around with values between 1 and 30, but are

Re: [petsc-users] strong-scaling vs weak-scaling

2016-08-23 Thread Justin Chang
rom weak-scaling. Also, the N/time rate seems very similar to the floating-point rate, although I can see why it's more informative. Any thoughts on anything I said or did thus far? Just wanting to make sure I understand these correctly :) On Mon, Aug 22, 2016 at 9:03 PM, Justin Chang <jych

Re: [petsc-users] strong-scaling vs weak-scaling

2016-08-22 Thread Justin Chang
Thanks all. So this issue was one of our ATPESC2015 exam questions, and turned some friends into foes. Most eventually fell into the strong-scale is harder camp, but some of these "friends" also believed PETSc is *not* capable of handling dense matrices and is not portable. Just wanted to hear

[petsc-users] strong-scaling vs weak-scaling

2016-08-21 Thread Justin Chang
Hi all, This may or may not be a PETSc specific question but... I have seen some people claim that strong-scaling is harder to achieve than weak scaling (e.g., https://www.sharcnet.ca/help/index.php/Measuring_Parallel_Scaling_Performance) and generally speaking it makes sense - communication

Re: [petsc-users] What exactly goes into DMPlexSetRefinementLimit

2016-08-17 Thread Justin Chang
wrote: > On Wed, Aug 17, 2016 at 2:35 PM, Justin Chang <jychan...@gmail.com> wrote: > >> Because the base mesh starts off with 6 elements and 8 vertices. This is >> enough data for one cell per MPI process. Refinement is done after >> DMPlexDistribute(...). If I use anymore

Re: [petsc-users] What exactly goes into DMPlexSetRefinementLimit

2016-08-17 Thread Justin Chang
t; On Wed, Aug 17, 2016 at 2:04 PM, Justin Chang <jychan...@gmail.com> wrote: > >> When I enter values like 1/16, 1/12, 1/24, and so on, I was expecting to >> get roughly the same dm object as if I simply did -dm_refine <0/1/2/3>. >> Instead it seems I get

Re: [petsc-users] What exactly goes into DMPlexSetRefinementLimit

2016-08-17 Thread Justin Chang
o make the refinement limit uniform? On Wed, Aug 17, 2016 at 9:38 AM, Matthew Knepley <knep...@gmail.com> wrote: > On Wed, Aug 17, 2016 at 5:23 AM, Justin Chang <jychan...@gmail.com> wrote: > >> Hi all, >> >> Playing around with SNES ex12.c and I am attempting to tin

[petsc-users] What exactly goes into DMPlexSetRefinementLimit

2016-08-17 Thread Justin Chang
Hi all, Playing around with SNES ex12.c and I am attempting to tinker around with 3D options. I am trying to understand what kind of values go into -refinement_limit for 3D simplices. Thanks, Justin

Re: [petsc-users] KSPSetOperators(ksp, A, A, SAME_NONZERO_PATTERN) does not work any more

2016-08-07 Thread Justin Chang
PETSc 3.6.3 and on automatically determines that last field, so you just need "KSPSetOperators(ksp,A,A)" On Sun, Aug 7, 2016 at 2:59 AM, 丁老师 wrote: > Dear friends: > I just update to 3.6.3, but the command " > KSPSetOperators(ksp,A,A,SAME_NONZERO_PATTERN)" does not

[petsc-users] Reference for multi-grid tuning

2016-08-03 Thread Justin Chang
Hi all, I want to play around with algebraic multi-grid parameters to optimize performance for my 3D problems but I don't have a good idea of where to start. Don't really see a detailed reference or tutorial for tuning these parameters in the PETSc manual. Can someone point me to a good

Re: [petsc-users] Transient poisson example in petsc

2016-07-06 Thread Justin Chang
Julian, I hand wrote my own time stepping scheme (backward Euler) for SNES ex12.c because I had to enforce TAO's convex optimization solvers at every time level. I am sure Matt or one of the other PETSc developers can tell you how to make today's SNES ex12.c transient. Thanks, Justin On

Re: [petsc-users] View wall-clock time of a PETSc function via command-line

2016-07-05 Thread Justin Chang
Okay, thanks! On Tue, Jul 5, 2016 at 11:50 AM, Barry Smith <bsm...@mcs.anl.gov> wrote: > > ./ex1 -log_view | grep KSPSolve > > or > >./ex1 -log_view | egrep "(KSPSolve|SNESSolve)" > > > > On Jul 5, 2016, at 11:46 AM, Justin Cha

[petsc-users] View wall-clock time of a PETSc function via command-line

2016-07-05 Thread Justin Chang
Hi all, Is there a quick way (e.g., through command-line options) to output the wall-clock time of a PETSc function (e.g., SNESSolve(), KSPSolve(), etc) without outputting the entire -log_view? Thanks, Justin

Re: [petsc-users] Dose Petsc has DMPlex example

2016-07-03 Thread Justin Chang
Hoang, if you run this example shown from the config/builder.py ./ex62 -run_type full -refinement_limit 0.00625 -bc_type dirichlet -interpolate 1 -vel_petscspace_order 2 -pres_petscspace_order 1 -ksp_type fgmres -ksp_gmres_restart 100 -ksp_rtol 1.0e-9 -pc_type fieldsplit -pc_fieldsplit_type schur

Re: [petsc-users] SetVariableBounds vs ComputeVariableBounds

2016-06-27 Thread Justin Chang
onal > > perturbation to a scale version of the Jacobian you input. > > If we cheat and modify the matrix, then it needs to be > > filled back in during a Jacobian evaluation. > > > > At some point, the plan was to move all the VI methods into PETSc proper, > >

Re: [petsc-users] SetVariableBounds vs ComputeVariableBounds

2016-06-27 Thread Justin Chang
hms. Hopefully > Todd has a good understanding of their application and strengths and > weaknesses. > > Barry > > > On Jun 25, 2016, at 3:31 PM, Justin Chang <jychan...@gmail.com> wrote: > > > > Hi all, > > > > So I modified SNES ex9.c so that o

[petsc-users] SetVariableBounds vs ComputeVariableBounds

2016-06-22 Thread Justin Chang
Hi all, I am looking at the SNES tutorials ex9.c and ex58.c and am wondering why SNESVISetComputeVariableBounds() is called instead of just SNESVISetVariableBounds(). When would it be appropriate to use only using the latter? Thanks, Justin

Re: [petsc-users] Does PETSc have these solvers bounded-constrained optimization problems?

2016-06-15 Thread Justin Chang
Attached is my petsc4py/firedrake code which has the implementation I described. As of right now, my current implementation with ASILS/ASFLS solvers work (although they are much slower compared to TRON) but the SSILS/SSFLS solvers don't even converge. For example, if I run the code as: > python

Re: [petsc-users] Does PETSc have these solvers bounded-constrained optimization problems?

2016-06-13 Thread Justin Chang
re general constraints, there is: > > IPM -- interior-point method > > I have not used it or tested it though. > > For PDE constrained problems, there is: > > LCL -- linearly constrained augmented Lagrangian. > > > ROL has imitations either directly copied from our

[petsc-users] Does PETSc have these solvers bounded-constrained optimization problems?

2016-06-10 Thread Justin Chang
Hi all, Does PETSc currently have any of these solvers for bounded constraint problems: 1) Semismooth Newton methods (aka primal-dual active-set methods) 2) Projected Newton methods Trilinos' Rapid Optimization Library (ROL ) has them, and I

Re: [petsc-users] DIVERGED_NANORINF for CG/Bjacobi for transient diffusion

2016-03-30 Thread Justin Chang
Matt, So do I use: "-pc_type bjacobi -sub_pc_type lu" or this: "-sub_pc_type lu" Thanks, Justin On Wed, Mar 30, 2016 at 4:23 PM, Matthew Knepley <knep...@gmail.com> wrote: > On Wed, Mar 30, 2016 at 4:18 PM, Justin Chang <jychan...@gmail.com> wrote: > &g

[petsc-users] DIVERGED_NANORINF for CG/Bjacobi for transient diffusion

2016-03-30 Thread Justin Chang
Hi all, I am getting this error: Linear solve did not converge due to DIVERGED_NANORINF when solving an FEM for transient diffusion using hexahedron elements. The problem is highly heterogeneous (i.e., dispersion tensor with varying cell-centered velocity) and normally CG/Bjacobi has done well

Re: [petsc-users] Status on parallel mesh reader in DMPlex

2016-03-22 Thread Justin Chang
ot much left to do. > > Thanks, > > Matt > > On Fri, Dec 18, 2015 at 8:21 AM, Justin Chang <jychan...@gmail.com> wrote: > >> Hi all, >> >> What's the status on the implementation of the parallel >> mesh reader/generator for DMPlex meshes?

Re: [petsc-users] Tao TRON solver tolerances

2016-03-15 Thread Justin Chang
m...@mcs.anl.gov> wrote: > > > On Mar 10, 2016, at 12:03 PM, Justin Chang <jychan...@gmail.com> wrote: > > > > Hi again, > > > > I was reading through the TAO manual and the impression I am getting is > that the KSP solver computes the gradient/projection, not ne

Re: [petsc-users] CPU vs GPU for PETSc applications

2016-03-10 Thread Justin Chang
2016 at 2:50 PM, Matthew Knepley <knep...@gmail.com> wrote: > On Thu, Mar 10, 2016 at 12:29 PM, Justin Chang <jychan...@gmail.com> > wrote: > >> Hi all, >> >> When would I ever use GPU computing for a finite element simulation where >> the limiting fac

[petsc-users] CPU vs GPU for PETSc applications

2016-03-10 Thread Justin Chang
Hi all, When would I ever use GPU computing for a finite element simulation where the limiting factor of performance is the memory bandwidth bound? Say I want to run problems similar to SNES ex12 and 62. I understand that there is an additional bandwidth associated with offloading data from the

[petsc-users] Tao TRON solver tolerances

2016-03-10 Thread Justin Chang
assessment of why one can get away with a less stringent KSP tolerance and still attain an accurate solution? Thanks, Justin On Tuesday, March 8, 2016, Justin Chang <jychan...@gmail.com <javascript:_e(%7B%7D,'cvml','jychan...@gmail.com');>> wrote: > Hi all, > > So

Re: [petsc-users] Strange GAMG performance for mixed FE formulation

2016-03-04 Thread Justin Chang
< lawrence.mitch...@imperial.ac.uk> wrote: > > > On 4 Mar 2016, at 15:24, Justin Chang <jychan...@gmail.com> wrote: > > > > So with -pc_gamg_square_graph 10 I get the following: > > Because you're using gamg inside the fieldsplit, I think you need: > > -fiel

Re: [petsc-users] Strange GAMG performance for mixed FE formulation

2016-03-04 Thread Justin Chang
Time to solution went from 100 seconds to 30 seconds once i used 10 graphs. Using 20 graphs started to increase in time slightly On Fri, Mar 4, 2016 at 8:35 AM, Justin Chang <jychan...@gmail.com> wrote: > You're right. This is what I have: > > [0] PCSetUp_*GAMG*(): level 0) N=480

Re: [petsc-users] Strange GAMG performance for mixed FE formulation

2016-03-03 Thread Justin Chang
numerics should be about > the same. I tested this on a 3D elasticity problem a few years ago. That > said, I think your ML solve is pretty good. > > Mark > > > > > On Thu, Mar 3, 2016 at 4:36 AM, Lawrence Mitchell < > lawrence.mitch...@imperia

[petsc-users] Strange GAMG performance for mixed FE formulation

2016-03-02 Thread Justin Chang
Dear all, Using the firedrake project, I am solving this simple mixed poisson problem: mesh = UnitCubeMesh(40,40,40) V = FunctionSpace(mesh,"RT",1) Q = FunctionSpace(mesh,"DG",0) W = V*Q v, p = TrialFunctions(W) w, q = TestFunctions(W) f = Function(Q)

[petsc-users] Do more solver iterations = more communication?

2016-02-18 Thread Justin Chang
Hi all, For a poisson problem with roughly 1 million dofs (using second-order elements), I solved the problem using two different solver/preconditioner combinations: CG/ILU and CG/GAMG. ILU takes roughly 82 solver iterations whereas with GAMG it takes 14 iterations (wall clock time is roughly 15

[petsc-users] Optimization methods in PETSc/TAO

2016-01-22 Thread Justin Chang
Hi all, Consider the following problem: minimize 1/2 - subject to c >= 0 (P1) To solve (P1) using TAO, I recall that there were two recommended solvers to use: TRON and BLMVM I recently got reviews for this paper of mine that uses BLMVM and got hammered for

Re: [petsc-users] Optimization methods in PETSc/TAO

2016-01-22 Thread Justin Chang
n Fri, Jan 22, 2016 at 3:42 PM, Matthew Knepley <knep...@gmail.com> wrote: > On Fri, Jan 22, 2016 at 4:27 PM, Justin Chang <jychan...@gmail.com> wrote: > >> Hi all, >> >> Consider the following problem: >> >> minimize 1/2<c,Kc> - <c,f> &g

Re: [petsc-users] HPCToolKit/HPCViewer on OS X

2016-01-13 Thread Justin Chang
HPCToolkit for MacOSX doesn't require any installation. Just go to: http://hpctoolkit.org/download/hpcviewer/ and download this file: hpctraceviewer-5.4.2-r20160111-macosx.cocoa.x86_64.zip Important note: be sure to unzip the file via the terminal, not with Finder. It may screw up the GUI. On

Re: [petsc-users] Why use MATMPIBAIJ?

2016-01-13 Thread Justin Chang
Okay that makes sense, thanks On Wed, Jan 13, 2016 at 10:12 PM, Barry Smith <bsm...@mcs.anl.gov> wrote: > > > On Jan 13, 2016, at 10:24 PM, Justin Chang <jychan...@gmail.com> wrote: > > > > Thanks Barry, > > > > 1) So for block matrices, the ja

Re: [petsc-users] Why use MATMPIBAIJ?

2016-01-13 Thread Justin Chang
am solving Stokes equation, then each "submatrix" is of AIJ format? Can these sub matrices also be BAIJ? Thanks, Justin On Wed, Jan 13, 2016 at 9:12 PM, Barry Smith <bsm...@mcs.anl.gov> wrote: > > > On Jan 13, 2016, at 9:57 PM, Justin Chang <jychan...@gmail.com> wrote:

[petsc-users] Difference between Block Jacobi and ILU?

2016-01-13 Thread Justin Chang
Hi all, What exactly is the difference between these two preconditioners? When I use them to solve a Galerkin finite element poisson problem, I get the exact same performance (iterations, wall-clock time, etc). Only thing is I can't seem to use ILU in parallel though. Thanks, Justin

Re: [petsc-users] Difference between Block Jacobi and ILU?

2016-01-13 Thread Justin Chang
Thanks Satish, And yes I meant sequentially. On Wed, Jan 13, 2016 at 8:26 PM, Satish Balay <ba...@mcs.anl.gov> wrote: > On Wed, 13 Jan 2016, Justin Chang wrote: > > > Hi all, > > > > What exactly is the difference between these two preconditioners? When I > >

[petsc-users] Why use MATMPIBAIJ?

2016-01-13 Thread Justin Chang
Hi all, 1) I am guessing MATMPIBAIJ could theoretically have better performance than simply using MATMPIAIJ. Why is that? Is it similar to the reasoning that block (dense) matrix-vector multiply is "faster" than simple matrix-vector? 2) I am looking through the manual and online documentation

Re: [petsc-users] Array of SNES's

2016-01-05 Thread Justin Chang
at a time as you loop over your grid points? > On Tue, Jan 05, 2016 at 09:24:11PM -0700, Justin Chang wrote: > > Timothee, > > > > No i haven't tried, mainly because I don't know how. Btw I am not doing > > this in C or FORTRAN, I want to do this in python (via

[petsc-users] Array of SNES's

2016-01-05 Thread Justin Chang
Hi all, Is it possible to create an array of SNES's? If I have a problem size N degrees of freedom, I want each dof to have its own SNES solver (basically a pointer to N SNES's). Reason for this is because I am performing a "post-processing" step where after my global solve, each entry of my

Re: [petsc-users] Array of SNES's

2016-01-05 Thread Justin Chang
e Petsc Objects (like SNES, > KSP, matrices, vectors, whatever), and create arrays of this derived types. > This works perfectly fine in my case (I use FORTRAN btw). > > Best wishes > > Timothee > > > 2016-01-06 11:53 GMT+09:00 Justin Chang <jychan...@gmail.com>

[petsc-users] Status on parallel mesh reader in DMPlex

2015-12-18 Thread Justin Chang
Hi all, What's the status on the implementation of the parallel mesh reader/generator for DMPlex meshes? Is anyone actively working on this? If so is there a branch that I can peek into? Thanks, Justin

Re: [petsc-users] Distributing data along with DMPlex

2015-12-17 Thread Justin Chang
gt; DMPlexDistribute and get the vector components renumbered and redistributed > accordingly in a global vector. And then, get the local vector. > > Hope it could be more clear now. > Regards, > > Alejandro > > > > On Wed, Dec 16, 2015 at 7:01 PM, Justin Chang <jycha

Re: [petsc-users] Distributing data along with DMPlex

2015-12-16 Thread Justin Chang
I think you would follow this order: 1*) create a DMPlex (depth, chart, etc) on rank 0. Other ranks have an empty DM 2) DMPlexDistribute() 3*) Create the PetscSection 4) DMCreateGlobalVector() 5) DMCreateLocalVector() Now you have a global vector and a local vector for your distributed

Re: [petsc-users] Solving/creating SPD systems

2015-12-11 Thread Justin Chang
Pardon me for my apparent lack of understanding over what may be simple concepts, but why is div[u]*div[v] singular in the context of LSFEM? On Fri, Dec 11, 2015 at 12:15 PM, Jed Brown <j...@jedbrown.org> wrote: > Justin Chang <jychan...@gmail.com> writes: > > > Jed,

Re: [petsc-users] Solving/creating SPD systems

2015-12-11 Thread Justin Chang
nice SPD system which could simply be solved with CG/HYPRE. Do you know of any good preconditioning strategies for this type of problem? Thanks, Justin On Thu, Dec 10, 2015 at 9:13 PM, Jed Brown <j...@jedbrown.org> wrote: > Justin Chang <jychan...@gmail.com> writes: > > > So

[petsc-users] Fwd: Issues with the Variational Inequality solver

2015-12-03 Thread Justin Chang
Sorry forgot to hit reply all -- Forwarded message -- From: Justin Chang <jychan...@gmail.com> Date: Thu, Dec 3, 2015 at 2:40 PM Subject: Re: [petsc-users] Issues with the Variational Inequality solver To: Matthew Knepley <knep...@gmail.com> Matt, for these pr

Re: [petsc-users] Issues with the Variational Inequality solver

2015-12-03 Thread Justin Chang
> wrote: > > > On Dec 2, 2015, at 1:56 PM, Justin Chang <jychan...@gmail.com> wrote: > > > > Barry, > > > > So I do not believe there is any problem with the ISEqual() per se, > because what I am doing is I am solving 5151 different VI problem using t

  1   2   3   >