[petsc-users] use superlu and hypre's gpu features through PETSc

2020-01-16 Thread Xiangdong
Dear Developers, >From the online documentation, both superlu and hypre have some gpu functionalities. Can we use these gpu features through PETSc's interface? Thank you. Best, Xiangdong

Re: [petsc-users] chowiluviennacl

2020-01-15 Thread Xiangdong
ctionality through PETSc? Thank you. Xiangdong On Wed, Jan 15, 2020 at 2:22 PM Matthew Knepley wrote: > On Wed, Jan 15, 2020 at 1:48 PM Xiangdong wrote: > >> In the ViennaCL manual >> http://viennacl.sourceforge.net/doc/manual-algorithms.html >> >> It did expose t

Re: [petsc-users] chowiluviennacl

2020-01-15 Thread Xiangdong
LAIJMatrix *mat = (ViennaCLAIJMatrix*)gpustruct->mat; ilu->CHOWILUVIENNACL = new viennacl::linalg::chow_patel_ilu_precond >(*mat, ilu_tag); The default is used. Is it possible to expose these two parameters so that user can change it through option keys? Thank you. Xiangdong On Wed, Jan 15,

Re: [petsc-users] chowiluviennacl

2020-01-15 Thread Xiangdong
chowiluviennacl, but found default factorization does not produce the exact factorization for tridiagonal system. Can we tight the drop off tolerance so that it can work as LU for tridiagonal system? Thank you. Xiangdong On Wed, Jan 15, 2020 at 9:41 AM Matthew Knepley wrote: > On Wed, Jan

Re: [petsc-users] chowiluviennacl

2020-01-15 Thread Xiangdong
dropping off tolerance like the standard ilu? Thank you. Best, Xiangdong On Tue, Jan 14, 2020 at 10:05 PM Matthew Knepley wrote: > On Tue, Jan 14, 2020 at 9:56 PM Xiangdong wrote: > >> Dear Developers, >> >> I have a quick question about the chowiluviennacl. When I tried to

[petsc-users] chowiluviennacl

2020-01-14 Thread Xiangdong
I am using it correctly. Does chowiluviennacl work for np>1? In addition, are there option keys for the chowiluviennacl one can try? Thank you. Best, Xiangdong

Re: [petsc-users] BAIJCUSPARSE?

2019-10-30 Thread Xiangdong via petsc-users
Thanks for pointing the function MatXAIJSetPreallocation() out. I followed your suggestions and tried it on my problem: preallocate the matrix with XAIJ, set its values by MatSetValuesBlockedLocal, and use this matrix with aijcusparse. It works! Thank you. Xiangdong On Tue, Oct 29, 2019 at 8

Re: [petsc-users] BAIJCUSPARSE?

2019-10-25 Thread Xiangdong via petsc-users
Can anyone comment on the PETSc's GPU version of Block CSR, say BAIJCUSPARSE? Does it make sense to have such format on GPU? Is it under development? Thank you. Xiangdong On Wed, Oct 23, 2019 at 11:36 AM Xiangdong wrote: > Hello everyone, > > I am wondering whether the

[petsc-users] number of rows distribution for matrix from MatLoad

2018-09-24 Thread Xiangdong
neral matrix A, I do not know the number of rows before calling MatLoad, how can I specify the distribution of the matrix? Thank you. Best, Xiangdong

Re: [petsc-users] get sub matrix from MPIBAIJ with MatCreateSubMatrix

2018-07-26 Thread Xiangdong
On Thu, Jul 26, 2018 at 11:48 AM, Smith, Barry F. wrote: > > > > On Jul 26, 2018, at 10:34 AM, Xiangdong wrote: > > > > Hello everyone, > > > > I have a question about get the sub matrix Aodd from a MPIBAIJ matrix A. > For example, if the bs=2 and the

[petsc-users] get sub matrix from MPIBAIJ with MatCreateSubMatrix

2018-07-26 Thread Xiangdong
"Index set does not match blocks". It seems that MatCreateSubMatrix can only provide the whole block, instead of just a specific component of that block. Can you give me some suggestions on extracting the submatrix corresponding to a specific component? Thank you. Best, Xiangdong

[petsc-users] reuse coarsening setup in hypre

2018-06-13 Thread Xiangdong
Hello everyone, If I solve a few matrices with same sparsity pattern by using hypre_boomeramg pc, can I reuse the coarsening setup information? Thank you. Best, Xiangdong

Re: [petsc-users] questions about dmdacreaterestriction

2018-05-07 Thread Xiangdong
actor of 2? Thank you. Xiangdong Below is my test code: int main(int argc, char **argv) { PetscErrorCode ierr; PetscInitialize(&argc, &argv, PETSC_NULL, PETSC_NULL); int Nx=6, Ny=4, Nz=1; DM da; ierr = DMDACreate2d(PETSC_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE, DMDA_

[petsc-users] questions about dmdacreaterestriction

2018-05-07 Thread Xiangdong
type. DMCreateRestriction not implemented for this type." Can you help me get around this? Another simple question, where can I find the explanation/meaning of DMDA_Q0 and DMDA_Q1? Below is my test example. Thank you. Best, Xiangdong #include int main(int argc, char **argv) { PetscErro

Re: [petsc-users] question on VecPointwiseMax

2018-04-19 Thread Xiangdong
/pipermail/petsc-users/2014-May/021520.html Best, Xiangdong On Tue, Apr 17, 2018 at 5:24 PM, Smith, Barry F. wrote: > >Where are you call SNESGetSolution() from? Inside a SNES monitor > routine, a SNES convergence test routine, a SNESLineSearchPostCheck() > routine? > >

Re: [petsc-users] question on VecPointwiseMax

2018-04-17 Thread Xiangdong
t the vector x returned from SNESGetSolution is locked read only, Is it true? If I want do some post processing by modifying the x after each nonlinear iteration, how can I get the solution and modify it? Thank you. Best, Xiangdong On Tue, Apr 17, 2018 at 11:33 AM, Xiangdong wrote: > Hello e

[petsc-users] question on VecPointwiseMax

2018-04-17 Thread Xiangdong
scLogFlops <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Profiling/PetscLogFlops.html#PetscLogFlops>(n); 33: return(0); 34: } Can w and x really be same vector in the VecPointwiseMax? Thanks. Best, Xiangdong

[petsc-users] using hypre's GPU feature through PETSc

2018-04-03 Thread Xiangdong
Hello everyone, The latest Hypre has GPU capability. Can I use hypre GPU feature through PETSc? If it is possible, what configuration changes should I make in PETSc? Thank you. Best, Xiangdong

[petsc-users] question about MatInvertBlockDiagonal_SeqBAIJ

2018-02-22 Thread Xiangdong
red in mdiag or a->idiag+bs2*mbs. What is the purpose of storing this mdiag as an extra copy of diagonal block? When will this mdiag be used? Thank you. Best, Xiangdong if (!a->idiag) { 38: PetscMalloc1(2*bs2*mbs,&a->idiag); 39: PetscLogObjectMemory((PetscObject)A,

Re: [petsc-users] multiply a mpibaij matrix by its block diagonal inverse

2018-02-16 Thread Xiangdong
MPIBAIJ consist of one or two SeqBAIJ? Can you show me a similar example of writing a method for MPIBAIJ based on the SeqBAIJ method? The MatInvertBlockDiagonal is not similar, as that method only involves the diagonal part A and without the off-diagonal part B. Thank you. Xiangdong On Wed, Feb 14

Re: [petsc-users] multiply a mpibaij matrix by its block diagonal inverse

2018-02-14 Thread Xiangdong
Thanks a lot, Barry! I see that you had implemented the bs=3 special case. I will play with these codes and add at least bs=2 case and try to get it working for parallel baij. I will let you know the update. Thank you. Xiangdong On Wed, Feb 14, 2018 at 2:57 PM, Smith, Barry F. wrote: > >

Re: [petsc-users] multiply a mpibaij matrix by its block diagonal inverse

2018-02-14 Thread Xiangdong
Thanks. Xiangdong On Wed, Feb 14, 2018 at 9:49 AM, Smith, Barry F. wrote: > > Hmm, I never had this idea presented to me, I have no way to know if it > is particularly good or bad. So essentially you transform the matrix > "decoupling the physics alone the diagonal" an

Re: [petsc-users] multiply a mpibaij matrix by its block diagonal inverse

2018-02-14 Thread Xiangdong
Yes, the preconditioner is like a multi-stage pccomposite preconditioner. In one stage, I just precondition a subset of matrix corresponding to certain physical unknowns. To get a better decoupled submatrix, I need to apply that operation. Thanks. Xiangdong On Wed, Feb 14, 2018 at 9:39 AM

Re: [petsc-users] multiply a mpibaij matrix by its block diagonal inverse

2018-02-14 Thread Xiangdong
special preconditioners for the extracted/decoupled matrix. The motivation is that after the transformation, one can get a better decoupled matrix to preserve the properties of the unknowns. Thanks. Xiangdong On Tue, Feb 13, 2018 at 6:27 PM, Smith, Barry F. wrote: > > In general you pr

[petsc-users] multiply a mpibaij matrix by its block diagonal inverse

2018-02-13 Thread Xiangdong
have any suggestion on compute invdiag(A)*A for mpibaij matrix? Thanks for your help. Best, Xiangdong

Re: [petsc-users] questions about vectorization

2017-11-13 Thread Xiangdong
ELL format? http://www.mcs.anl.gov/petsc/documentation/linearsolvertable.html Thank you. Xiangdong On Mon, Nov 13, 2017 at 11:32 AM, Zhang, Hong wrote: > Most operations in PETSc would not benefit much from vectorization since > they are memory-bounded. But this does not discourage yo

[petsc-users] questions about vectorization

2017-11-12 Thread Xiangdong
Hello everyone, Can someone comment on the vectorization of PETSc? For example, for the MatMult function, will it perform better or run faster if it is compiled with avx2 or avx512? Thank you. Best, Xiangdong

Re: [petsc-users] questions about pc_comosite

2017-09-29 Thread Xiangdong
Hi Barry, Can you point me the documentation for understanding these iteration patterns? Thanks a lot. Best, Xiangdong On Fri, Sep 29, 2017 at 11:24 AM, Barry Smith wrote: > > They are all different iteration patterns. They definitely should > present different residual results &

[petsc-users] questions about pc_comosite

2017-09-29 Thread Xiangdong
, Xiangdong mpirun -np 1 ./extest -ksp_monitor -pc_type none 0 KSP Residual norm 1.414213562373e+00 1 KSP Residual norm 6.324555320337e-01 2 KSP Residual norm 3.779644730092e-01 3 KSP Residual norm 2.581988897472e-01 4 KSP Residual norm 1.906925178491e-01 5 KSP Residual norm

[petsc-users] MatMult for block matrix

2017-09-11 Thread Xiangdong
by MatCreateVecs. I am using petsc 3.7.6 fortran api. If I create the same B in non-block format, it works fine without the extra vecset. It seems that I cannot reuse the allocation of vec y for block matrix without a reset. Is there any clue to explain this behavior? Thank you. Best, Xiangdong

[petsc-users] MatMult performance on baij vs aij

2017-08-24 Thread Xiangdong
Hello everyone, For the same sparse matrix, will the storage format (baij or aij) have a noticeable performance effect on MatMult give the baij may have a better locality? Thank you. Best, Xiangdong

Re: [petsc-users] MatMPIAIJSetPreallocation question

2017-08-07 Thread Xiangdong
Hi Barry, Thanks for your response. So these extra allocated memory is just a waste of memory, but no harm for other mat related computation. Is it correct? Thank you. Xiangdong On Fri, Aug 4, 2017 at 4:52 PM, Barry Smith wrote: > > > On Aug 4, 2017, at 2:52 PM, Xiangdo

[petsc-users] MatMPIAIJSetPreallocation question

2017-08-04 Thread Xiangdong
unused memory cause? Thank you. Best, Xiangdong

Re: [petsc-users] questions on BAIJ matrix

2017-06-08 Thread Xiangdong
On Thu, Jun 8, 2017 at 3:17 PM, Hong wrote: > Xiangdong: > MatCreateMPIBAIJWithArrays() is obviously buggy, and not been tested. > > >> 1) In the remark of the function MatCreateMPIBAIJWithArrays, it says " bs - >> the block size, only a block size of 1 is supported

[petsc-users] questions on BAIJ matrix

2017-06-08 Thread Xiangdong
am thinking of created two petsc baij matrix (M1baij and M2baij) by calling MatCreateMPIBAIJWithArrays twice and then call MATAXPY to get the sum M=M1baij + M2baij. Is there a better way to do it? Thank you. Best, Xiangdong

Re: [petsc-users] MatSetValuesStencil for cols not in the dmda stencil width

2017-01-26 Thread Xiangdong
Thanks, Matt. For a cell in DMDA 3d with global id (ix,iy,iz), what is the global row id of that cell corresponding to the matrix generated by DMCreateMatrix? It is not always ix + iy*Nx + iz*Ny*Nx for different da_processors_xyz, is it? How can I obtain that global row id? Thanks. Xiangdong

[petsc-users] MatSetValuesStencil for cols not in the dmda stencil width

2017-01-25 Thread Xiangdong
ed ex45 example, the diff file as well as the run log. Thanks for your help. Best, Xiangdong diff --git a/ex45.c b/ex45.c index b4bb565..6bcb074 100644 --- a/ex45.c +++ b/ex45.c @@ -117,8 +117,8 @@ PetscErrorCode ComputeMatrix(KSP ksp,Mat jac,Mat B,void *ctx) DM da; PetscErrorCo

[petsc-users] turn off the snes linesearch

2016-08-03 Thread Xiangdong
step. Any suggestions on this? Thanks. Best, Xiangdong

Re: [petsc-users] vec norm for local portion of a vector

2016-08-01 Thread Xiangdong
On Fri, Jul 29, 2016 at 10:41 AM, Barry Smith wrote: > > > On Jul 27, 2016, at 4:42 PM, Xiangdong wrote: > > > > Hello everyone, > > > > I have a global dmda vector vg. On each processor, if I want to know the > norm of local portion of vg, which functio

[petsc-users] vec norm for local portion of a vector

2016-07-27 Thread Xiangdong
to call? like *vg->ops->norm_local(vg,NORM_2, &normlocal)? Thanks. Best, Xiangdong

[petsc-users] snes true and preconditioned residuals for left npc

2016-07-06 Thread Xiangdong
preconditioned residual at a point different from current solution, which function should I call? Thanks. Best, Xiangdong

Re: [petsc-users] totalview cannot recognize the type Vec_Seq

2016-06-30 Thread Xiangdong
Sorry for the spam. I retyped the same command in front of my coworker, and it just works. Xiangdong On Thu, Jun 30, 2016 at 1:50 PM, Xiangdong wrote: > Hello everyone, > > I am trying to use totalview to debug my codes. For the same binary, in > gdb, (gdb) p ((Vec_Seq*) v->

[petsc-users] totalview cannot recognize the type Vec_Seq

2016-06-30 Thread Xiangdong
lue to fix this? Thanks. Xiangdong

Re: [petsc-users] da_overlap and zero pivot row

2016-06-29 Thread Xiangdong
this trap for nz=1? Thanks. Xiangdong On Wed, Jun 29, 2016 at 11:23 AM, Xiangdong wrote: > The code got trapped in a while loop when I switch to s=2. > > http://www.mcs.anl.gov/petsc/petsc-current/src/dm/impls/da/dadd.c.html > > In dadd.c line 85-96 > /* gone out of process

Re: [petsc-users] da_overlap and zero pivot row

2016-06-29 Thread Xiangdong
m not sure this is the reason for the while loop trap. Thanks. Xiangdong On Tue, Jun 28, 2016 at 5:16 PM, Barry Smith wrote: > > If you make the stencil width as wide at the overlap does the problem go > away and you get expected convergence? > > > On Jun 28, 2016, at 3:48

Re: [petsc-users] da_overlap and zero pivot row

2016-06-28 Thread Xiangdong
information from cell 5 is not available on processor 1. Do you have any suggestion for the overlap case? Thank you. Best, Xiangdong On Mon, Jun 27, 2016 at 4:21 PM, Barry Smith wrote: > > > On Jun 27, 2016, at 3:15 PM, Xiangdong wrote: > > > > Hello everyone, > > > >

[petsc-users] da_overlap and zero pivot row

2016-06-27 Thread Xiangdong
quot;. The option -pc_factor_nonzeros_along_diagonal does not fix this zero pivot issue. Do you have any quick suggestions for me to try to fix this issue? Thank you. Best, Xiangdong

Re: [petsc-users] da_overlap vs width in dmdacreate

2016-06-25 Thread Xiangdong
DMDACreate2d(MPI_Comm comm,DMBoundaryType bx,DMBoundaryType by,DMDAStencilType stencil_type, PetscInt M,PetscInt N,PetscInt m,PetscInt n,PetscInt dof,PetscInt s,const PetscInt lx[],const PetscInt ly[],DM *da) Thanks. Xiangdong On Fri, Jun 24, 2016 at 5:23 PM, Barry Smith wrote: > >

[petsc-users] da_overlap vs width in dmdacreate

2016-06-24 Thread Xiangdong
Hello everyone, I have a quick question. What is the relationship between da_overlap and the width parameter in dmdacreate2d? >From the examples, it seems that width=1 works with da_overlap=4. Could you please explain the relationship or point me to a reference page? Thanks. Xiangdong

Re: [petsc-users] snes_type aspin error

2016-06-23 Thread Xiangdong
aspin option. In general, for the analytical Jacobian, should I put it into jac or jacpre in the FormJaciban() function? Thanks. Best, Xiangdong On Mon, Jun 20, 2016 at 9:51 PM, Barry Smith wrote: > > Could you reproduce the error with a PETSc example or send us the code? > If we

Re: [petsc-users] snes_type aspin error

2016-06-20 Thread Xiangdong
The snesview output says "SNES has not been set up so information may be incomplete" as well as "Nonlinear Additive Schwarz: total subdomain blocks = -2". Why are the total subdomain blocks negative? Thanks. Xiangdong On Mon, Jun 20, 2016 at 1:49 PM, Xiangdong wrote: &g

Re: [petsc-users] snes_type aspin error

2016-06-20 Thread Xiangdong
obian for me based on the information of old Jacobian. Do I need to provide something special to use the aspin? Thanks. Best, Xiangdong > > Barry > > > On Jun 20, 2016, at 11:32 AM, Xiangdong wrote: > > > > Hello everyone, > > > > I am trying differe

Re: [petsc-users] snes_type aspin error

2016-06-20 Thread Xiangdong
evaluations=0 norm schedule ALWAYS Thanks. Xiangdong On Mon, Jun 20, 2016 at 12:54 PM, Matthew Knepley wrote: > Can you give us the output of -snes_view? It would help to see how you are > setting everything up, or maybe > run SNESView() before SNESSolve()? > >Matt > > On M

[petsc-users] snes_type aspin error

2016-06-20 Thread Xiangdong
r messages are below. Any hint for me to fix this? Thanks. Best, Xiangdong [0]PETSC ERROR: - Error Message -- [0]PETSC ERROR: No support for this operation for this object type [0]PETSC ERROR: Mat type shell [0]P

[petsc-users] linesearch problem in snes composite

2016-06-15 Thread Xiangdong
type: lu PC has not been set up so information may be incomplete LU: out-of-place factorization tolerance for zero pivot 2.22045e-14 matrix ordering: natural Thank you. Best, Xiangdong

Re: [petsc-users] multiplication of two vetors

2016-02-10 Thread Xiangdong
What are you going to do with this matrix? Are you going to multiply this matrix with another vector? Xiangdong On Wed, Feb 10, 2016 at 9:06 AM, wen zhao wrote: > Hello > > I have another question about the multiplication of two vector with the > form > > (x) * (x^T), whic

Re: [petsc-users] log_summary time ratio and flops ratio

2016-02-10 Thread Xiangdong
On Mon, Feb 8, 2016 at 6:45 PM, Jed Brown wrote: > Xiangdong writes: > > > iii) since the time ratios of VecDot (2.5) and MatMult (1.5) are still > > high, I rerun the program with ipm module. The IPM summary is here: > > > https://drive.google.com/file/d/0BxEfb1tas

Re: [petsc-users] log_summary time ratio and flops ratio

2016-02-08 Thread Xiangdong
On Mon, Feb 8, 2016 at 6:45 PM, Jed Brown wrote: > Xiangdong writes: > > > iii) since the time ratios of VecDot (2.5) and MatMult (1.5) are still > > high, I rerun the program with ipm module. The IPM summary is here: > > > https://drive.google.com/file/d/0BxEfb1tas

Re: [petsc-users] log_summary time ratio and flops ratio

2016-02-08 Thread Xiangdong
his related to the hardware and network (which the users cannot control) or can I do something on my codes to improve? Thank you. Best, Xiangdong On Fri, Feb 5, 2016 at 10:34 PM, Barry Smith wrote: > > Make the same run with no IO and see if the numbers are much better and > if the

Re: [petsc-users] log_summary time ratio and flops ratio

2016-02-05 Thread Xiangdong
If I want to know whether only rank 0 is slow (since it may has more io) or actually a portion of cores are slow, what tools can I start with? Thanks. Xiangdong On Fri, Feb 5, 2016 at 5:27 PM, Jed Brown wrote: > Matthew Knepley writes: > >> I attached the full summary. At the

Re: [petsc-users] log_summary time ratio and flops ratio

2016-02-05 Thread Xiangdong
On Fri, Feb 5, 2016 at 12:18 PM, Matthew Knepley wrote: > On Fri, Feb 5, 2016 at 11:12 AM, Xiangdong wrote: > >> Hello everyone, >> >> When I looked at the log_summary, I found that flops ratio of VecDot is >> 1.1, but the time ratio is 1.8. Also the flops ratio

[petsc-users] log_summary time ratio and flops ratio

2016-02-05 Thread Xiangdong
it worth looking into these imbalance issue? If yes, how do I know which procs are causing the issue? What tools should I start with? Thanks. Xiangdong Event

Re: [petsc-users] petsc externalpackage directory

2016-02-03 Thread Xiangdong
On Tue, Feb 2, 2016 at 3:11 PM, Satish Balay wrote: > On Tue, 2 Feb 2016, Xiangdong wrote: > > > On Tue, Feb 2, 2016 at 2:27 PM, Satish Balay wrote: > > > > > On Tue, 2 Feb 2016, Barry Smith wrote: > > > > > > > > > > > > On Feb

Re: [petsc-users] petsc externalpackage directory

2016-02-02 Thread Xiangdong
On Tue, Feb 2, 2016 at 2:27 PM, Satish Balay wrote: > On Tue, 2 Feb 2016, Barry Smith wrote: > > > > > > On Feb 2, 2016, at 9:21 AM, Xiangdong wrote: > > > > > > the package is untar and compiled in $PETSC_ARCH/externalpackages, but > the original t

Re: [petsc-users] petsc externalpackage directory

2016-02-02 Thread Xiangdong
the package is untar and compiled in $PETSC_ARCH/externalpackages, but the original tarball .tar file is deleted. Is it correct? Xiangdong On Tue, Feb 2, 2016 at 10:15 AM, Matthew Knepley wrote: > On Tue, Feb 2, 2016 at 9:15 AM, Xiangdong wrote: > >> Not really. My question

Re: [petsc-users] petsc externalpackage directory

2016-02-02 Thread Xiangdong
Not really. My question is if I use download-pastix=1, which directory is the tarball (package pastix_5.2.2.20.tar.bz2) downloaded into? Thanks. Xiangdong On Tue, Feb 2, 2016 at 9:59 AM, Matthew Knepley wrote: > On Tue, Feb 2, 2016 at 8:46 AM, Xiangdong wrote: > >> Hello everyone

[petsc-users] petsc externalpackage directory

2016-02-02 Thread Xiangdong
connection and install petsc there. Thanks. Xiangdong

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Xiangdong
On Mon, Feb 1, 2016 at 5:26 PM, Barry Smith wrote: > > > On Feb 1, 2016, at 2:16 PM, Barry Smith wrote: > > > > > >> On Feb 1, 2016, at 1:46 PM, Xiangdong wrote: > >> > >> Hello everyone, > >> > >> I have a question on snes wit

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Xiangdong
It seems that TSAdaptChoose_Basic only uses the local truncation error to predict the next time step. Do you also include the number of snes iterations in computing the next time step in some adapt option? Thanks. Xiangdong On Mon, Feb 1, 2016 at 4:52 PM, Jed Brown wrote: > Xiangdong wri

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Xiangdong
dt_current, namely, dt_next = dt_current*func(snesits, etc), which function/file should I look into? Thanks. Xiangdong On Mon, Feb 1, 2016 at 3:16 PM, Barry Smith wrote: > > > On Feb 1, 2016, at 1:46 PM, Xiangdong wrote: > > > > Hello everyone, > > > > I have a

[petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Xiangdong
linesearch_bt, but can converge with linesearch_basic (using same initial guess). For the same problem, there are also some steps, at which linearsearch_basic fails, but linesearch_bt converges. Is there a general guide line to decide whether linesearch should be used? Thanks. Xiangdong

Re: [petsc-users] repartition for dynamic load balancing

2016-01-28 Thread Xiangdong
I am thinking to use parmetis to repartition the mesh (based on new updated weights for vertices), and use some functions (maybe DMPlexMigrate) to redistribute the data. I will look into Matt's paper to see whether it is possible. Thanks. Xiangdong On Thu, Jan 28, 2016 at 2:41 PM, Ma

Re: [petsc-users] repartition for dynamic load balancing

2016-01-28 Thread Xiangdong
What functions/tools can I use for dynamic migration in DMPlex framework? Can you also name some external mesh management systems? Thanks. Xiangdong On Thu, Jan 28, 2016 at 12:21 PM, Barry Smith wrote: > > > On Jan 28, 2016, at 11:11 AM, Xiangdong wrote: > > > > Yes, it

Re: [petsc-users] repartition for dynamic load balancing

2016-01-28 Thread Xiangdong
partition to another partition? I am wondering whether there are some functions or libraries help me manage this redistribution. Thanks. Xiangdong On Thu, Jan 28, 2016 at 12:20 AM, Jed Brown wrote: > Xiangdong writes: > > > I have a question on dynamic load balance in petsc. I start

[petsc-users] repartition for dynamic load balancing

2016-01-27 Thread Xiangdong
-partition the mesh and continue the simulation? Thanks. Xiangdong

[petsc-users] user-defined snes stopping criteria

2015-12-11 Thread Xiangdong
Hello everyone, Instead of using the standard atol, rtol, stol etc, can user define a new stopping criterion for snes? For example, if I want to use a specialized norm as my snes stopping criteria, which functions should I call to pass this information? Thank you. Best, Xiangdong

Re: [petsc-users] same_nonzero_pattern in SNESSetJacobian()

2015-09-09 Thread Xiangdong
Each time I call my Jacobian function, it generates the Jacoiban matrix from scratch by inserting entries. The result of this assembling process gives the same nonzero pattern as in the previous iteration. Can SNES/KSP track this too? Thanks. Xiangdong On Wed, Sep 9, 2015 at 5:01 PM, Barry

[petsc-users] same_nonzero_pattern in SNESSetJacobian()

2015-09-09 Thread Xiangdong
. Xiangdong

[petsc-users] DMDA with runtime dof>1

2014-10-31 Thread Xiangdong
time, how can I define a struct with dof doubles? Thank you. Best, Xiangdong

Re: [petsc-users] examples of automatic differentiation with PETSc

2014-10-01 Thread Xiangdong
Is there any reason that AD is not supported in PETSc? Is it because the ADIFOR/ADIC library itself? Thank you. Xiangdong On Wed, Oct 1, 2014 at 4:09 PM, Barry Smith wrote: > > > Sorry that functionality is no longer in PETSc. > > > On Oct 1, 2014, at 2:51 PM, Xiangdong

[petsc-users] examples of automatic differentiation with PETSc

2014-10-01 Thread Xiangdong
Hello everyone, Could you please point me to examples of using automatic differentiation for Jacobian calculation in PETSc? Chapter 9 of the manual briefly talked about adifor, but seems not quite complete. Thank you. Xiangdong

[petsc-users] behavior of running same codes on different clusters many times

2014-08-27 Thread Xiangdong
the network between the nodes. Could these factors cause these different behaviors? Thank you. Best, Xiangdong

Re: [petsc-users] flops performed on each processor

2014-08-22 Thread Xiangdong
simply replacing -log_summary with -log_view ::ascii_info_detail does not produce anything. (Sams as -log_view ascii:filename:ascii_info_detail.) Where does it dump the log? Is this the feature of new petsc? I am using petsc-3.4.3. Thanks. Xiangdong On Fri, Aug 22, 2014 at 2:53 PM, Barry Smith

[petsc-users] flops performed on each processor

2014-08-22 Thread Xiangdong
Hello everyone, In the PETSc log_summary, it outputs the Max flops, the ratio of Max/Min flops. If it is far from 1.0, I would like to know the distributions of flops among all the procs. How can I obtain the flops performed on each proc? Thank you. Best, Xiangdong

[petsc-users] MatGetValuesStencil?

2014-07-13 Thread Xiangdong
A's entries to build another DMDA matrices B, what is the best way to retrieve A's entries? Is it possible to use grid indexing? Thank you. Best, Xiangdong

[petsc-users] DM vector restriction questions

2014-05-25 Thread Xiangdong
gle field. Thank you. Best, Xiangdong

Re: [petsc-users] questions about the SNES Function Norm

2014-05-04 Thread Xiangdong
On Fri, May 2, 2014 at 4:10 PM, Matthew Knepley wrote: > On Fri, May 2, 2014 at 12:53 PM, Xiangdong wrote: >> >> On Thu, May 1, 2014 at 10:21 PM, Barry Smith wrote: >> >>> >>> On May 1, 2014, at 9:12 PM, Xiangdong wrote: >>> >>&

Re: [petsc-users] questions about the SNES Function Norm

2014-05-02 Thread Xiangdong
On Thu, May 1, 2014 at 10:21 PM, Barry Smith wrote: > > On May 1, 2014, at 9:12 PM, Xiangdong wrote: > > > I came up with a simple example to demonstrate this "eliminating row" > behavior. It happens when the solution x to the linearized equation Ax=b

Re: [petsc-users] questions about the SNES Function Norm

2014-05-01 Thread Xiangdong
nonlinear equations, it is likely that the solution of the linearized equation is out of bound, but then we can reset the out-of-bound solution to be lower or upper bound instead of eliminating the variables (the rows). Any suggestions on doing this in petsc? Thank you. Best, Xiangdong P.S. If we

Re: [petsc-users] questions about the SNES Function Norm

2014-05-01 Thread Xiangdong
e correct vector of residue. Are the orders of function calls correct? Thank you. Xiangdong On Thu, May 1, 2014 at 1:58 PM, Barry Smith wrote: > > On May 1, 2014, at 10:32 AM, Xiangdong wrote: > > > Under what condition, SNESGetFunctionNorm() will output different > r

Re: [petsc-users] questions about the SNES Function Norm

2014-05-01 Thread Xiangdong
. Eliminating these rows would give wrong solutions. Thank you. Xiangdong On Tue, Apr 29, 2014 at 3:12 PM, Matthew Knepley wrote: > On Tue, Apr 29, 2014 at 2:09 PM, Xiangdong wrote: > >> It turns out to a be a bug in my FormFunctionLocal(DMDALocalInfo >> *info,PetscScalar *

Re: [petsc-users] Test Jacobian

2014-04-30 Thread Xiangdong
: The snes_fd, snes_fd_color and my own Jacobian work fine separately, but -snes_type test complains the same error message Que mentioned before. Thanks. Xiangdong On Tue, Apr 15, 2014 at 12:31 PM, Barry Smith wrote: > > On Apr 15, 2014, at 11:09 AM, Peter Brune

Re: [petsc-users] questions about the SNES Function Norm

2014-04-29 Thread Xiangdong
array of vecx_local_array, copy the x to vecx_local_array, scatter to global vecx and output vecx. Is there a quick way to restore the array x to a vector and output? Thank you. Best, Xiangdong On Mon, Apr 28, 2014 at 10:28 PM, Barry Smith wrote: > > On Apr 28, 2014, at 3:23 PM, Xia

[petsc-users] questions about the SNES Function Norm

2014-04-28 Thread Xiangdong
Hello everyone, When I run snes program, it outputs "SNES Function norm 1.23456789e+10". It seems that this norm is different from residue norm (even if solving F(x)=0) and also differ from norm of the Jacobian. What is the definition of this "SNES Function Norm"? Thank you. Best, Xiangdong

Re: [petsc-users] SNESFunction undefined reference

2014-04-10 Thread Xiangdong
tsc-current/docs/manualpages/SNES/SNESComputeFunction.html Thanks. Xiangdong On Wed, Apr 9, 2014 at 2:15 PM, Barry Smith wrote: > > SNESFunction is not a function. What do you think it is suppose to > compute? You provide a function for evaluating the nonlinear function with >

Re: [petsc-users] SNESFunction undefined reference

2014-04-09 Thread Xiangdong
On Wed, Apr 9, 2014 at 11:40 AM, Matthew Knepley wrote: > On Wed, Apr 9, 2014 at 10:38 AM, Xiangdong wrote: > >> Hello everyone, >> >> When add this line to src/ex3.c >> >> SNESFunction(snes,x,fval,&ctx); >> >> The compiler complains that

[petsc-users] SNESFunction undefined reference

2014-04-09 Thread Xiangdong
Thank you. Xiangdong

Re: [petsc-users] SNESGetJacobian issue when added to snes/ex3.c

2014-04-08 Thread Xiangdong
ter>0 fixed the matrix unassemble problem. Thanks a lot for mentioning the -mat_view options. Xiangdong > >BTW: there is a lot of built in viewing of PETSc matrices you can do > without writing your own monitor. For example in the master development of > PETSc yo

[petsc-users] SNESGetJacobian issue when added to snes/ex3.c

2014-04-08 Thread Xiangdong
till crashes by reporting argument out of range in MatSetValues_SeqAIJ() or MatSetValues_MPIAIJ(). Any suggestions? Thank you. Xiangdong

Re: [petsc-users] preconditioner for -snes_fd or -snes_fd_color

2014-04-04 Thread Xiangdong
On Fri, Apr 4, 2014 at 5:15 PM, Xiangdong wrote: > > > > On Fri, Apr 4, 2014 at 5:02 PM, Peter Brune wrote: > >> >> >> >> On Fri, Apr 4, 2014 at 3:57 PM, Xiangdong wrote: >> >>> Hello everyone, >>> >>> If we use -snes_

  1   2   >