Re: [petsc-users] Question for Petsc

2023-02-16 Thread Stefano Zampini
For bddc, you can also take a look at https://gitlab.com/petsc/petsc/-/blob/main/src/ksp/ksp/tutorials/ex71.c On Thu, Feb 16, 2023, 19:41 Matthew Knepley wrote: > On Thu, Feb 16, 2023 at 9:14 AM ziming xiong > wrote: > >> Hello, >> I want to use Petsc to implement high performance computing,

Re: [petsc-users] Question for Petsc

2023-02-16 Thread Matthew Knepley
On Thu, Feb 16, 2023 at 9:14 AM ziming xiong wrote: > Hello, > I want to use Petsc to implement high performance computing, and I mainly > want to apply DDM methods to parallel computing. I have implemented some of > the DDM methods (such as ASM, Bjacobi, etc.), but I don't understand the >

[petsc-users] Question for Petsc

2023-02-16 Thread ziming xiong
Hello, I want to use Petsc to implement high performance computing, and I mainly want to apply DDM methods to parallel computing. I have implemented some of the DDM methods (such as ASM, Bjacobi, etc.), but I don't understand the PCBDDC method. The official example

[petsc-users] Question about PETSC with finite volume approach

2018-02-21 Thread 기계항공및원자력공학부
Dear Petsc-User, Hi, I am Seungjin Seo, and I am trying to use PETSC to solve my problem. I want to solve a heat conduction equation using finite volume methods in 2D and 3D. I am going to import Gmsh files. Can you recommend me an example case for this purpose? Also, can I set different

Re: [petsc-users] Question about PETSC

2017-03-16 Thread Barry Smith
> On Mar 16, 2017, at 4:56 AM, Валентин Егоров > wrote: > > Thank you for answering, I will try. > Sincerely, > Valentin > > Matt is correct. The best way to get into PETSc is by studying the example > codes provided in the source tree. > > As a precursor to

Re: [petsc-users] Question about PETSC

2017-03-16 Thread Валентин Егоров
Thank you for answering, I will try. Sincerely, Valentin 2017-03-16 10:37 GMT+03:00 Dave May : > > > On Thu, 16 Mar 2017 at 07:16, Matthew Knepley wrote: > >> Hi Valentin, >> >> Have you seen this example: https://bitbucket.org/petsc/petsc/src/ >>

Re: [petsc-users] Question about PETSC

2017-03-16 Thread Dave May
On Thu, 16 Mar 2017 at 07:16, Matthew Knepley wrote: > Hi Valentin, > > Have you seen this example: > https://bitbucket.org/petsc/petsc/src/1830d94e4628b31f970259df1d58bc250c9af32a/src/ksp/ksp/examples/tutorials/ex2f.F?at=master=file-view-default > > Would that be enough to

Re: [petsc-users] Question about PETSC

2017-03-16 Thread Matthew Knepley
Hi Valentin, Have you seen this example: https://bitbucket.org/petsc/petsc/src/1830d94e4628b31f970259df1d58bc250c9af32a/src/ksp/ksp/examples/tutorials/ex2f.F?at=master=file-view-default Would that be enough to get started? Thanks, Matt On Thu, Mar 16, 2017 at 12:37 AM, Валентин Егоров

[petsc-users] Question about PETSC

2017-03-15 Thread Валентин Егоров
Hello! My name is Valentin Egorov. I am from Russia. And I have a question for you about PETSC. I would like to make a programm on Fortran with PETSC, but I can't. I have a matrix 400*400. I have also vector B with 400 elements. I need to solve linear equations. Could you help me to do it. I can't

Re: [petsc-users] Question about PETSc installs and MPI

2014-07-20 Thread Jed Brown
Barry Smith bsm...@mcs.anl.gov writes: How about the attached patch for getting PETSc built for complex in either C or C++ to work in the other language as well? I like it and now I notice that PETSC_CLANGUAGE_CXX now appears in only one place (CHKERRCXX), which I hope we can also

Re: [petsc-users] Question about PETSc installs and MPI

2014-07-19 Thread Satish Balay
@mcs.anl.gov; Francis Poulin; Kim Usi Subject: Re: [petsc-users] Question about PETSc installs and MPI I ran the program on linux with 1,2, 4 processes under valgrind for both types of boundary conditions and it ran fine. Suggest your colleagues do a test configure of PETSc using —download

Re: [petsc-users] Question about PETSc installs and MPI

2014-07-19 Thread John Yawney
Hi Barry, Matt, and Satish, Thank you for the quick responses. It's true I forgot the return 0 at the end. I remember I was looking at it before and meant to add the line in but I sent the original version of the code. I had a working version of the mpi compilers on my computer but I understand

Re: [petsc-users] Question about PETSc installs and MPI

2014-07-19 Thread Satish Balay
...@mcs.anl.gov] Sent: Friday, July 18, 2014 9:57 PM To: John Yawney Cc: petsc-users@mcs.anl.gov; Francis Poulin; Kim Usi Subject: Re: [petsc-users] Question about PETSc installs and MPI I ran the program on linux with 1,2, 4 processes under valgrind for both types of boundary conditions

Re: [petsc-users] Question about PETSc installs and MPI

2014-07-19 Thread Francis Poulin
From: Satish Balay [ba...@mcs.anl.gov] Sent: Saturday, July 19, 2014 11:52 AM To: petsc-users Cc: Francis Poulin Subject: Re: [petsc-users] Question about PETSc installs and MPI And it appears the original code was tested with 'real' numbers and petsc-3.4. It was not really tested

Re: [petsc-users] Question about PETSc installs and MPI

2014-07-19 Thread Francis Poulin
From: Francis Poulin Sent: Saturday, July 19, 2014 2:09 PM To: petsc-users Subject: RE: [petsc-users] Question about PETSc installs and MPI Hello Satish, Thanks for the help on both counts. 1) I installed csh and petscmpiexec works, but I think I will stick to mpirun 2) Your modifications

Re: [petsc-users] Question about PETSc installs and MPI

2014-07-19 Thread Barry Smith
/ Telephone: +1 519 888 4567 x32637 From: Francis Poulin Sent: Saturday, July 19, 2014 2:09 PM To: petsc-users Subject: RE: [petsc-users] Question about PETSc installs and MPI Hello Satish, Thanks for the help on both counts. 1) I installed csh

Re: [petsc-users] Question about PETSc installs and MPI

2014-07-19 Thread Barry Smith
From: Francis Poulin Sent: Saturday, July 19, 2014 2:09 PM To: petsc-users Subject: RE: [petsc-users] Question about PETSc installs and MPI Hello Satish, Thanks for the help on both counts. 1) I installed csh and petscmpiexec works, but I think I will stick to mpirun

[petsc-users] Question about PETSc installs and MPI

2014-07-18 Thread John Yawney
Hello, I had a question about PETSc installations. On my local computer I configured PETSc (v 3.4.2) using the options: ./configure --with-cc=mpicc --with-cxx=mpic++ --download-f-blas-lapack --download-mpich --download-hypre I wrote a test program that defines a vector using DMDAs, computes a

Re: [petsc-users] Question about PETSc installs and MPI

2014-07-18 Thread Barry Smith
I ran the program on linux with 1,2, 4 processes under valgrind for both types of boundary conditions and it ran fine. Suggest your colleagues do a test configure of PETSc using —download-mpich and see if they still get the problem or if it runs ok. The can also run with valgrind

Re: [petsc-users] Question about PETSc installs and MPI

2014-07-18 Thread Matthew Knepley
On Fri, Jul 18, 2014 at 8:16 PM, John Yawney jyawney...@gmail.com wrote: Hello, I had a question about PETSc installations. On my local computer I configured PETSc (v 3.4.2) using the options: ./configure --with-cc=mpicc --with-cxx=mpic++ --download-f-blas-lapack --download-mpich

Re: [petsc-users] Question about PETSc installs and MPI

2014-07-18 Thread Satish Balay
On Fri, 18 Jul 2014, John Yawney wrote: Hello, I had a question about PETSc installations. On my local computer I configured PETSc (v 3.4.2) using the options: ./configure --with-cc=mpicc --with-cxx=mpic++ --download-f-blas-lapack --download-mpich --download-hypre BTW: the above doesn't

[petsc-users] Question on PETSc solver iteration and convergence

2014-01-27 Thread Danyang Su
Hi All, I implement KSP solver in a Newton iteration. The convergence parameters are: rtol 1.0E-8, abstol 1.0E-50, dtol 1.0E5, maxits 1000. Does the following convergence monitoring make sense? I thought the solver should stop before iteration 36, but it stops at iteration 70. 0 KSP

Re: [petsc-users] Question on PETSc solver iteration and convergence

2014-01-27 Thread Matthew Knepley
On Mon, Jan 27, 2014 at 4:27 PM, Danyang Su danyang...@gmail.com wrote: Hi All, I implement KSP solver in a Newton iteration. The convergence parameters are: rtol 1.0E-8, abstol 1.0E-50, dtol 1.0E5, maxits 1000. These tolerances use the preconditioned residual norm. You can sue the true

Re: [petsc-users] Question on PETSc solver iteration and convergence

2014-01-27 Thread Torquil Macdonald Sørensen
On 27/01/14 23:27, Danyang Su wrote: Does the following convergence monitoring make sense? I thought the solver should stop before iteration 36, but it stops at iteration 70. 0 KSP preconditioned resid norm 4.208619583781e-002 true resid norm 2.227983625699e-005 ||r(i)||/||b||

[petsc-users] question on PETSc option '-snes_mf_operator'

2012-09-27 Thread Zou (Non-US), Ling
Dear all, I have a question on the PETSc option '-snes_mf_operator'. I am reading thePETSc Users Manual Revision 3.3. On page 100, 2nd paragraph, it says: == However, it allows us to check the analytic Jacobian we

[petsc-users] question on PETSc option '-snes_mf_operator'

2012-09-27 Thread Matthew Knepley
On Thu, Sep 27, 2012 at 2:01 PM, Zou (Non-US), Ling ling.zou at inl.govwrote: Dear all, I have a question on the PETSc option '-snes_mf_operator'. I am reading thePETSc Users Manual Revision 3.3. On page 100, 2nd paragraph, it says:

[petsc-users] question on PETSc option '-snes_mf_operator'

2012-09-27 Thread Zou (Non-US), Ling
Thank you Matt. I've noticed that there is a different option '-snes_fd', and I guess PETSc will use finite difference method for both Jacobian (action) and Preconditioner? By the way, do you have any comments on my another question? One more question, if I pass '-snes' to

[petsc-users] question on PETSc option '-snes_mf_operator'

2012-09-27 Thread Matthew Knepley
On Thu, Sep 27, 2012 at 2:13 PM, Zou (Non-US), Ling ling.zou at inl.govwrote: Thank you Matt. I've noticed that there is a different option '-snes_fd', and I guess PETSc will use finite difference method for both Jacobian (action) and Preconditioner? -snes_fd uses FD to create the entire

[petsc-users] question on PETSc option '-snes_mf_operator'

2012-09-27 Thread Dmitry Karpeev
On Thu, Sep 27, 2012 at 1:22 PM, Matthew Knepley knepley at gmail.com wrote: On Thu, Sep 27, 2012 at 2:13 PM, Zou (Non-US), Ling ling.zou at inl.govwrote: Thank you Matt. I've noticed that there is a different option '-snes_fd', and I guess PETSc will use finite difference method for both

[petsc-users] question on PETSc option '-snes_mf_operator'

2012-09-27 Thread Zou (Non-US), Ling
Thanks again, Matt. Your answers are really helpful to me. Best, Ling On Thu, Sep 27, 2012 at 12:22 PM, Matthew Knepley knepley at gmail.com wrote: On Thu, Sep 27, 2012 at 2:13 PM, Zou (Non-US), Ling ling.zou at inl.govwrote: Thank you Matt. I've noticed that there is a different

[petsc-users] question on PETSc option '-snes_mf_operator'

2012-09-27 Thread Zou (Non-US), Ling
Thank you Dmitry. Yes, I am now fully understanding what '-snes_mf' and '-snes_mf_operator' are doing. Got a bit confused by the '-snes' keyword used in Moose. As you mentioned, this is for input completeness sake, so I guess there are default options as this keyword is used. I will dig out what

[petsc-users] Question about petsc-3.2-p5/src/ts/examples/tutorials/ex15.c

2011-12-28 Thread Feng-Chao Wang
Dear Hong, Thank you very much for your patient explanations. I got that. Thank you! Feng-Chao 2011-12-28 Feng-Chao Wang Message: 2 Date: Tue, 27 Dec 2011 10:16:10 -0600 From: Hong Zhang hzh...@mcs.anl.gov Subject: Re: [petsc-users] Question about petsc-3.2-p5/src/ts/examples/tutorials

[petsc-users] Question about petsc-3.2-p5/src/ts/examples/tutorials/ex15.c

2011-12-27 Thread Fatcharm
Dear all, I am working with an example of petsc-3.2-p5/src/ts/examples/tutorials/ex15.c I noticed that in ex15.c, Jtype == 0 means that /* use user provided Jacobian evaluation routine */ Jtype == 1 is for /* slow finite difference J; */ and Jtype == 2 is /* Use coloring to compute finite

[petsc-users] Question about petsc-3.2-p5/src/ts/examples/tutorials/ex15.c

2011-12-27 Thread Hong Zhang
Feng-Chao, Jtype == 1 is for /* slow finite difference J; */ computes dense Jacobian one column at a time, taking prohibitively long time for large matrices. For 101*101 matrix, i.e., it evaluates 1.e+4 columns (evaluate function 1.e+4 times). Running it on my Mac, the execution terminates after a

[petsc-users] Question on PETSc makefile

2011-08-25 Thread Alan Wei
Dear all, I hope you're having a nice day. I met a problem on makefile of PETSc. Original PETSc has the makefile in the same directory of the .c files. However, I want to put all .c files to another directory. I changed the makefile also; however it always has a error saying the PETSc

[petsc-users] Question on PETSc makefile

2011-08-25 Thread Matthew Knepley
On Thu, Aug 25, 2011 at 6:56 PM, Alan Wei zhenglun.wei at gmail.com wrote: Dear all, I hope you're having a nice day. I met a problem on makefile of PETSc. Original PETSc has the makefile in the same directory of the .c files. However, I want to put all .c files to another directory.

[petsc-users] Question on PETSc makefile

2011-08-25 Thread Barry Smith
ComputeRHS.o: Programs/ComputeRHS.c Programs/ComputeRHS.h Programs/def.h chkopts -${CLINKER} -o ComputerRHS.o Programs/ComputeRHS.c ${PETSC_SNES_LIB} Don't use the CLINKER to compile code. That is only for linking the executable. So for example you should be able to us myprogram:

[petsc-users] Question on PETSc makefile

2011-08-25 Thread Satish Balay
PETSc makefiles don't support multiple source dirs properly. As an alternative - you can try using gnumake's vpath feature [thats lets you treat multiple sourcedirs as a single source dir]. Attaching makefile with this change.. Satish On Thu, 25 Aug 2011, Alan Wei wrote: Dear all, I

[petsc-users] Question on PETSc makefile

2011-08-25 Thread Alan Wei
Thanks a lot for the explanation. I will simply leave the makefile in the same directory of codes to avoid making mistakes. best, Alan On Thu, Aug 25, 2011 at 2:01 PM, Barry Smith bsmith at mcs.anl.gov wrote: ComputeRHS.o: Programs/ComputeRHS.c Programs/ComputeRHS.h Programs/def.h chkopts

[petsc-users] question about petsc and gpus

2011-05-04 Thread Alexander Grayver
Hello Randall, As far as I know, if you don't set particular device the device with index 0 in cuda device array will be used (at least tried to be). Otherwise, you can use cudaSetDevice or cudaChooseDevice Regards, Alexander On 03.05.2011 19:06, Randall Mackie wrote: I have access to a

[petsc-users] question about petsc and gpus

2011-05-03 Thread Randall Mackie
I have access to a computer with a GPU, and I wanted to play around a bit with petsc on this gpu. So I have compiled petsc-dev with cusp, thrust, and cuda to give GPU support, and I am ready to run some examples. However, something is not clear to me: how does petsc know which gpu to run

[petsc-users] question about petsc and gpus

2011-05-03 Thread Barry Smith
On May 3, 2011, at 12:06 PM, Randall Mackie wrote: I have access to a computer with a GPU, and I wanted to play around a bit with petsc on this gpu. So I have compiled petsc-dev with cusp, thrust, and cuda to give GPU support, and I am ready to run some examples. However, something is