[petsc-users] Question about Sequential & Parallel part

2022-10-19 Thread 김성익
Dear PETSc users, I have a question about structure of programming. My blueprint of Finite Element programming with PETSc solver is below. [image: image.png] The blue box is whole loop for my FE program. There is a loop B that performs a convergence iteration (KU=F) inside the loop A in which

[petsc-users] Question - about the 'Hint for performance tuning'

2023-01-02 Thread 김성익
Hello, Happy new year!! I have some questions about “Hint for performance tuning” in user guide of petsc. 1. In the “Performance Pitfalls and Advice” section, there are 2 modes “debug” and “optimized builds. My current setup is debug mode. So I want to change for test the performance

[petsc-users] Question-Memory of matsetvalue

2022-12-30 Thread 김성익
Hello, I have a question about memory of matsetvalue. When I assembly the local matrix to global matrix, I’m just using matsetvalue. Because the connectivity is so complex I can’t use matsetvalues. I asked this question because I was curious about how ram memory is allocated differently for

[petsc-users] Question about eigenvalue and eigenvectors

2022-12-24 Thread 김성익
Hello, I tried to calculate the eigenvalues and eigenvectors in 3 by 3 matrix (real and nonsymmetric). I already checked the kspcomputeeigenvalues and kspcomputeritz. However, the target matrix is just 3 by 3 matrix. So I need another way to calculate the values and vectors. Can anyone

[petsc-users] About Preconditioner and MUMPS

2022-12-06 Thread 김성익
Hello, I have some questions about pc and mumps_icntl. 1. What’s the difference between adopt preconditioner by code (for example, PetscCall(PCSetType(pc,PCLU)) and option -pc_type lu?? And also, What’s the priority between code pcsettype and option -pc_type ?? 2. When I tried to use

Re: [petsc-users] About MatMumpsSetIcntl function

2022-11-30 Thread 김성익
value: 5 2022년 11월 30일 (수) 오후 11:54, Matthew Knepley 님이 작성: > On Wed, Nov 30, 2022 at 9:31 AM 김성익 wrote: > >> After folloing the comment, ./app -pc_type lu -ksp_type preonly >> -ksp_monitor_true_residual -ksp_converged_reason -ksp_view >> -mat_mumps_icntl_7 5

Re: [petsc-users] About MatMumpsSetIcntl function

2022-11-30 Thread 김성익
type: seqaij rows=24, cols=24 total: nonzeros=576, allocated nonzeros=840 total number of mallocs used during MatSetValues calls=48 using I-node routines: found 5 nodes, limit used is 5 2022년 11월 30일 (수) 오후 11:26, Matthew Knepley 님이 작성: > On Wed, Nov 30, 2022 at 9:20 AM

Re: [petsc-users] About MatMumpsSetIcntl function

2022-11-30 Thread 김성익
t 9:10 AM 김성익 wrote: > >> When I adopt icntl by using option, the outputs are as below. >> >> WARNING! There are options you set that were not used! >> WARNING! could be spelling mistake, etc! >> There is one unused database option. It is: >> Opt

Re: [petsc-users] About MatMumpsSetIcntl function

2022-11-30 Thread 김성익
(수) 오후 11:04, Matthew Knepley 님이 작성: > On Wed, Nov 30, 2022 at 8:58 AM 김성익 wrote: > >> I'm working on FEM. >> When I used mumps alone, I fount it efficient to use mumps with metis. >> So my purpose is using MUMPSsolver with METIS. >> >> I tried to set metis

Re: [petsc-users] parallelize matrix assembly process

2022-12-12 Thread 김성익
ng over vertices. You want to > iterate over elements. > > Mark > > > > On Mon, Dec 12, 2022 at 6:16 AM 김성익 wrote: > >> Hello, >> >> >> I need some keyword or some examples for parallelizing matrix assemble >> process. >> >> My curre

[petsc-users] parallelize matrix assembly process

2022-12-12 Thread 김성익
Hello, I need some keyword or some examples for parallelizing matrix assemble process. My current state is as below. - Finite element analysis code for Structural mechanics. - problem size : 3D solid hexa element (number of elements : 125,000), number of degree of freedom : 397,953 - Matrix

[petsc-users] About MPIRUN

2022-12-06 Thread 김성익
Hello, There is a code which can run in not mpirun and also it can run in mpi_linear_solver_server. However, it has an error in just mpirun case such as mpirun -np ./program. The error output is as below. [0]PETSC ERROR: - Error Message

[petsc-users] About matrix assembly

2022-12-05 Thread 김성익
Hello, In matrix preallocation procedure, I tried 2 options to preallocate global matrix. The first is ‘MatSeqAIJSetPreallocation’ and the second is ‘MatSetPreallocationCOO’. When I adopt the first option “MatSeqAIJSetPreallocation(Mat, nz, nnz)”, I just put overestimated nz for getting enough

Re: [petsc-users] About MPIRUN

2022-12-06 Thread 김성익
-abort [ubuntu:02473] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages Could this be the cause of the former petsc error?? Thanks, Hyung Kim 2022년 12월 6일 (화) 오후 10:58, Matthew Knepley 님이 작성: > On Tue, Dec 6, 2022 at 6:45 AM 김성익 wrot

Re: [petsc-users] About Preconditioner and MUMPS

2022-12-07 Thread 김성익
must append this option "-mpi_pc_type pu". If I don't apply "-mpi_pc_type lu", the metis option ("-mpi_mat_mumps_icntl_7 5"). Can I get some information about this? Thanks, Hyung Kim 2022년 12월 7일 (수) 오전 12:24, Barry Smith 님이 작성: > > > On Dec 6

Re: [petsc-users] About Preconditioner and MUMPS

2022-12-07 Thread 김성익
t 5:13 AM 김성익 wrote: > >> I want to use METIS for ordering. >> I heard the MUMPS has good performance with METIS ordering. >> >> However there are some wonder things. >> 1. With option "-mpi_linear_solver_server -ksp_type preonly -pc_type >> mpi -mp

Re: [petsc-users] About MPIRUN

2022-12-07 Thread 김성익
. How to solve this problem? I want to get a scalar array so that all process array has the same value with global vector size and values. Thanks, Hyung Kim 2022년 12월 7일 (수) 오후 1:34, 김성익 님이 작성: > I already done VecAssemblyBegin/End(). > > However, only mpirun case these outputs are re

[petsc-users] Matrix version of VecScatterCreateToAll

2022-12-18 Thread 김성익
Hello, Is there a matrix version function of VecScatterCreateToAll? I'm using preallocator for preallocation of global matrix. Prior to using the preallocator, information related to allocation is stored in the specific matrix, and this information must be viewed in all mpi ranks. For using

Re: [petsc-users] Matrix version of VecScatterCreateToAll

2022-12-18 Thread 김성익
eallocator, each rank only needs to insert entries > it knows (i.e., don't need to get all entries) > > Maybe you could provide an example code for us to better understand what > you mean? > > --Junchao Zhang > > > On Sun, Dec 18, 2022 at 8:25 AM 김성익 wrote: > >>

[petsc-users] extract preconditioner matrix

2022-12-14 Thread 김성익
Hello, I tried to find the way to adapt my own preconditioner. In other words, I want to apply and solve a new preconditioner rather than using the existing one in Petsc. So, my questions are as below 1. Is this possible to adapt my own preconditioner?? 2. Also is it possible to extract

Re: [petsc-users] extract preconditioner matrix

2022-12-14 Thread 김성익
is harmful for iterative solver. So my goal is, combine algebraic multigrid with some tuning jacobian matrix. To this goal, I am investigating what is possible and what is impossible. Thanks, Hyung Kim 2022년 12월 15일 (목) 오전 11:34, Barry Smith 님이 작성: > > > On Dec 14, 2022, at 9:10 PM, 김

Re: [petsc-users] About Preconditioner and MUMPS

2022-12-07 Thread 김성익
, Hyung Kim 2022년 12월 7일 (수) 오후 8:41, Matthew Knepley 님이 작성: > On Wed, Dec 7, 2022 at 6:15 AM 김성익 wrote: > >> I think I don't understand the meaning of >> -pc_type mpi >> > > This option says to use the PCMPI preconditioner. This allows you to > parallelize the >

Re: [petsc-users] parallelize matrix assembly process

2022-12-12 Thread 김성익
> the output of a parallel run with -info so we can see how much > communication is done in the matrix assembly. > > Barry > > > > On Dec 12, 2022, at 6:16 AM, 김성익 wrote: > > > > Hello, > > > > > > I need some keyword or some examples fo

Re: [petsc-users] parallelize matrix assembly process

2022-12-12 Thread 김성익
cation is difficult to estimate, you > can use MatPreallocator, see an example at > https://gitlab.com/petsc/petsc/-/blob/main/src/mat/tests/ex230.c > > --Junchao Zhang > > > On Mon, Dec 12, 2022 at 5:16 AM 김성익 wrote: > >> Hello, >> >> >> I need some keyw

[petsc-users] About MatMumpsSetIcntl function

2022-11-29 Thread 김성익
Hello, I tried to adopt METIS option in MUMPS by using ' PetscCall(MatMumpsSetIcntl(Mat, 7, 5));' However, there is an error as follows [0]PETSC ERROR: Object is in wrong state [0]PETSC ERROR: Only for factored matrix [0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.

[petsc-users] Question About Assembly matrix and declaration of KSP & pc

2022-11-30 Thread 김성익
Hello, I’m working on FEM using PETSc. As everyone knows, it is necessary to repeatedly solve Ax=B. Regarding this, I have 4 questions. 1. There are many steps for preparing KSPSolve. For example KSPcreate, KSPSetOperators, KSPGetPC, PCSetType, PCFactorSetMatSolverType,

Re: [petsc-users] Question About Assembly matrix and declaration of KSP & pc

2022-11-30 Thread 김성익
pley 님이 작성: > On Wed, Nov 30, 2022 at 7:51 AM 김성익 wrote: > >> Thank you for your comments. >> However, I have more questions. >> >> 1. Generally, (KSPCreate, KSPSetOperators, KSPGetPC, PCSetType, >> PCFactorSetMatSolverType, KSPSetFromOptions ) >> above functi

Re: [petsc-users] About MatMumpsSetIcntl function

2022-11-30 Thread 김성익
:18, Jose E. Roman 님이 작성: > You have to call PCFactorGetMatrix() first. See any of the examples that > use MatMumpsSetIcntl(), for instance > https://petsc.org/release/src/ksp/ksp/tutorials/ex52.c.html > > Jose > > > > El 30 nov 2022, a las 6:52, 김성익 escribió: > &g

[petsc-users] Speed of matrix assembly

2022-11-30 Thread 김성익
Hello, I set a large-sized global matrix through matsetsize and proceed with the process of assembling multiple local-sized matrices into a global matrix (By using MatSetValue). However, only using matsetsize much less than expected performance. In this case, what can be done to speed up

Re: [petsc-users] Question About Assembly matrix and declaration of KSP & pc

2022-11-30 Thread 김성익
on't fully understand under what circumstances the functions mentioned above should be called again. Can you explain when each function should be called? Thanks, Hyung Kim 2022년 11월 30일 (수) 오후 8:37, Mark Adams 님이 작성: > > > On Wed, Nov 30, 2022 at 5:08 AM 김성익 wrote: > >> Hello, &g

Re: [petsc-users] About MatMumpsSetIcntl function

2022-11-30 Thread 김성익
' and 'matmumpsseticntl'. How can I fix this? Thanks, Hyung Kim 2022년 11월 30일 (수) 오후 10:44, Matthew Knepley 님이 작성: > On Wed, Nov 30, 2022 at 8:40 AM 김성익 wrote: > >> Following your comments, >> >> After matrix assembly end, >> PetscCall(KSPGetPC(ksp,)); >> PetscCall(K

Re: [petsc-users] Question about handling matrix

2023-02-01 Thread 김성익
y rows and > columns) and use MatAXPY. > > 김성익 writes: > > > Hello, > > > > > > I want to put small matrix to large matrix. > > The schematic of operation is as below. > > [image: image.png] > > Is there any function for put small matrix to large matrix at once? > > > > Thanks, > > Hyung Kim >

[petsc-users] Question about MatGetRow

2023-02-03 Thread 김성익
Hello, By using MatGetRow, user can get vectors from local matrix (at each process). However, I need other process's row values. So I have 2 questions. 1. Is there any function for getting arrays from other process's?? 2. Or is there any function like matrix version of vecscattertoall??

Re: [petsc-users] Question about MatGetRow

2023-02-03 Thread 김성익
eateSubMatrix/ > > Note, PETSc lets you give NULL arguments if there is a reasonable default. > In this case give NULL for the column IS and you will get the whole > columns. > > Mark > > On Fri, Feb 3, 2023 at 4:05 AM 김성익 wrote: > >> Hello, >> >> >

Re: [petsc-users] Question about MatGetRow

2023-02-03 Thread 김성익
the array about first row of global matrix in all processes? Hyung Kim 2023년 2월 3일 (금) 오후 10:26, Matthew Knepley 님이 작성: > On Fri, Feb 3, 2023 at 8:06 AM 김성익 wrote: > >> Following your comments, >> I want to check below things. >> For example, the global dense matrix

Re: [petsc-users] Question about MatGetRow

2023-02-03 Thread 김성익
:45 AM 김성익 wrote: > >> Following your comments, >> If I extract first row of below matrix. >> [image: image.png] >> IS isrow; >> PetscInt *indices; >> PetscMalloc1(1, *indices); >> > > That should be > > >> Indices[0] = 0; &

Re: [petsc-users] Question about MatGetRow

2023-02-03 Thread 김성익
said it cannot get the values of first row of global matrix. Please let me know how can I fix this scripts for getting the 1st row of global matrix in all processes. Hyung Kim 2023년 2월 3일 (금) 오후 10:54, Matthew Knepley 님이 작성: > On Fri, Feb 3, 2023 at 8:52 AM 김성익 wrote: > >> I wan

Re: [petsc-users] Question about MatGetRow

2023-02-04 Thread 김성익
b 3, 2023 at 9:04 AM 김성익 wrote: > >> Actually in the last mail, below scripts are running in all processes. >> >> IS isrow; >> PetscInt *indices; >> PetscMalloc1(1, ); >> Indices[0] = 0; >> ISCreateGenreral(PETSC_COMM_WORLD, 1, indices, PETSC_OWN_

[petsc-users] Question about handling matrix

2023-02-01 Thread 김성익
Hello, I want to put small matrix to large matrix. The schematic of operation is as below. [image: image.png] Is there any function for put small matrix to large matrix at once? Thanks, Hyung Kim