[petsc-users] Example for MatSeqAIJKron?

2022-12-05 Thread Yuyun Yang
Dear PETSc team, Is there an example for using MatSeqAIJKron? I’m using MatCreate for all matrices in the code, and wonder if I need to switch to MatCreateSeqAIJ in order to use this function? Just want to compute simple Kronecker products of a sparse matrix with an identity matrix. Thank

[petsc-users] How to introduce external iterative solver into PETSc

2022-12-05 Thread 袁煕
Dear PETSc developers, I have my own linear solver and am trying to put it into PETSc as an external solver. Following the implementation of mumps, mkl_cpardiso, supelu etc, I think I should do the follow: 1. Add my solver name into MatSolverType. 2. Register my solver by calling

Re: [petsc-users] About matrix assembly

2022-12-05 Thread Matthew Knepley
On Mon, Dec 5, 2022 at 6:48 AM 김성익 wrote: > 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

Re: [petsc-users] About matrix assembly

2022-12-05 Thread Mark Adams
I don't think you understand COO. Look at the example https://petsc.org/release/src/mat/tutorials/ex18.c.html "MatSetPreallocationCOO" is not a great name because you are giving it the (i,j) indices not just the sizes for memory allocation. A MatSetPreallocationCOO that is consistent with

Re: [petsc-users] How to introduce external iterative solver into PETSc

2022-12-05 Thread Matthew Knepley
On Mon, Dec 5, 2022 at 3:08 AM 袁煕 wrote: > Dear PETSc developers, > > I have my own linear solver and am trying to put it into PETSc as an > external solver. Following the implementation of mumps, mkl_cpardiso, > supelu etc, I think I should do the follow: > > 1. Add my solver name into

[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] Action of inverse of Cholesky factors in parallel

2022-12-05 Thread Jose E. Roman
MUMPS does not support doing the forward or backward solve only. You should ask MUMPS developers to add an option for this, then we would be able to interface it in PETSc. Regarding the other Cholesky options (see https://petsc.org/release/overview/linear_solve_table/), PaStiX has the same

Re: [petsc-users] Example for MatSeqAIJKron?

2022-12-05 Thread Pierre Jolivet
Dear Yuyun, Here is the simple example that I wrote to test the function: https://petsc.org/release/src/mat/tests/ex248.c.html You can stick to MatCreate(), but this will only work if the type of your Mat is indeed MatSeqAIJ. If you need this for other types, let us know. Thanks, Pierre > On 5

Re: [petsc-users] Example for MatSeqAIJKron?

2022-12-05 Thread Yuyun Yang
Great, thank you! From: Pierre Jolivet Date: Monday, December 5, 2022 at 4:34 PM To: Yuyun Yang Cc: petsc-users Subject: Re: [petsc-users] Example for MatSeqAIJKron? Dear Yuyun, Here is the simple example that I wrote to test the function: https://petsc.org/release/src/mat/tests/ex248.c.html

Re: [petsc-users] [EXTERNAL] Re: Kokkos backend for Mat and Vec diverging when running on CUDA device.

2022-12-05 Thread Fackler, Philip via petsc-users
Junchao, Thank you for working on this. If you open the parameter file for, say, the PSI_2 system test case (benchmarks/params_system_PSI_2.txt), simply add -dm_mat_type aijkokkos -dm_vec_type kokkos?` to the "petscArgs=" field (or the corresponding cusparse/cuda option). Thanks, Philip

Re: [petsc-users] Installation With MSYS2 and MinGW Compilers

2022-12-05 Thread Singh, Rajesh K via petsc-users
Hi Pierre, I got following error while compiling PETSc. make all check [cid:image001.png@01D908C1.7267DCE0] Help for this would be appreciated. Thanks, Rajesh From: Pierre Jolivet Sent: Monday, December 5, 2022 1:15 PM To: Singh, Rajesh K Cc: petsc-users@mcs.anl.gov Subject: Re:

Re: [petsc-users] [EXTERNAL] Re: Kokkos backend for Mat and Vec diverging when running on CUDA device.

2022-12-05 Thread Junchao Zhang
Hello, Philip, Do I still need to use the feature-petsc-kokkos branch? --Junchao Zhang On Mon, Dec 5, 2022 at 11:08 AM Fackler, Philip wrote: > Junchao, > > Thank you for working on this. If you open the parameter file for, say, > the PSI_2 system test case

[petsc-users] Installation With MSYS2 and MinGW Compilers

2022-12-05 Thread Singh, Rajesh K via petsc-users
Dear All: I am having diffisulty to install PETSC on the window system. I went through the the steps esplained in the web site and got following error. [cid:image001.png@01D908A4.407860F0] Help for resolving this issue would be really appricaited. Thanks, Rajesh

Re: [petsc-users] [EXTERNAL] Re: Kokkos backend for Mat and Vec diverging when running on CUDA device.

2022-12-05 Thread Junchao Zhang
I configured with xolotl branch feature-petsc-kokkos, and typed `make` under ~/xolotl-build/. Though there were errors, a lot of *Tester were built. [ 62%] Built target xolotlViz [ 63%] Linking CXX executable TemperatureProfileHandlerTester [ 64%] Linking CXX executable

Re: [petsc-users] Installation With MSYS2 and MinGW Compilers

2022-12-05 Thread Pierre Jolivet
Hello Rajesh, Do you need Fortran bindings? Otherwise, ./configure --with-fortran-bindings=0 should do the trick. Sowing compilation is broken with MinGW compiler. If you need Fortran bindings, we could try to fix it. Thanks, Pierre > On 5 Dec 2022, at 9:22 PM, Singh, Rajesh K via petsc-users >

Re: [petsc-users] Installation With MSYS2 and MinGW Compilers

2022-12-05 Thread Pierre Jolivet
> On 5 Dec 2022, at 9:50 PM, Singh, Rajesh K wrote: > > Hi Pierre, > > Thank you so much for prompt response. I will run FORTRAN based code with > PETSc. Therefore I guess I will need Fortran binding. OK, so, two things: 1) as said earlier, Sowing is broken with MinGW, but I’m sadly one of

Re: [petsc-users] Installation With MSYS2 and MinGW Compilers

2022-12-05 Thread Singh, Rajesh K via petsc-users
Hi Pierre, Thank you so much for prompt response. I will run FORTRAN based code with PETSc. Therefore I guess I will need Fortran binding. Regards Rajesh From: Pierre Jolivet Sent: Monday, December 5, 2022 12:41 PM To: Singh, Rajesh K Cc: petsc-users@mcs.anl.gov Subject: Re: [petsc-users]

Re: [petsc-users] How to introduce external iterative solver into PETSc

2022-12-05 Thread 袁煕
Dear Matt It seems that I am in the wrong way! I will retry following your example. Thanks a lot! Yuan 2022年12月5日(月) 22:11 Matthew Knepley : > On Mon, Dec 5, 2022 at 3:08 AM 袁煕 wrote: > >> Dear PETSc developers, >> >> I have my own linear solver and am trying to put it into PETSc as an >>

Re: [petsc-users] Installation With MSYS2 and MinGW Compilers

2022-12-05 Thread Satish Balay via petsc-users
Can you send corresponding configure.log and make.log? [should be in PETSC_DIR/PETSC_ARCH/lib/petsc/conf Also what is your requirement wrt using PETSc on windows? - need to link with other MS compiler libraries? - Can you use WSL? Our primary instructions for windows usage is with MS/Intel

Re: [petsc-users] Installation With MSYS2 and MinGW Compilers

2022-12-05 Thread Satish Balay via petsc-users
The build log looks fine. Its not clear why these warnings [and errors] are coming up in make check [while there are no such warnings in the build]. Since you are using PETSc fromfortran - Can you try compiling/running a test manually and see if that works. cd src/snes/tutorials make ex5f90