# Questions tagged [petsc]

PETSc is an open source suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations.

151 questions
Filter by
Sorted by
Tagged with
2k views

### Why is my parallel solver slower than my sequential solver?

I was playing around with PETSc and noticed that when I run my program with more than one process via MPI it seems to run even slower! How can I check to see what is going on?
265 views

183 views

### Efficiency of parallel direct linear solver

I am currently working on solving a positive definite symmetric systems in parallel. The parallel direct solver I used is MUMPS. However, the performance and efficiency of the parallel direct solver ...
2k views

### Which python library for GPU sparse linear system solver library

I have a fluid dynamic solver written in python which I want to accelerate by moving the most expensive computations to the GPU. Ideally all arrays and sparse matrices used in my code should remain on ...
297 views

### setting COMM_WORLD size from petsc4py without mpiexec command line

I would like to create a parallel solver using petsc4py as one component of a larger application. I can easily get PETSc.COMM_WORLD.getSize() to be 4 by calling mpiexec -n 4 python my_prog.py ...
133 views

### Get a matrix with absolute values in PETSc [closed]

Is there any function to create or change a matrix, to have $A_{ij} = \text{abs}(A_{ij})$ in PETSc? If possible it should work with MPIAIJ matrices, not only local.
145 views

### Which iterative method and preconditioner from petsc should be used when solving linear algebra in parallel?

I am currently trying to parallelize the incompressible flow solver code. However, when I run the code I realise that the parallel code takes much longer time than sequential code to finish one ...
274 views

### Why does PETSc take unexpectedly long to set up its KSP solver with a custom preconditioner? [closed]

I am attempting to solve a large system, $\bf{Ax} = \bf{b}$ with the help of PETSc. Due to the size of the problem, I'm using a matrix-free approach, where $\bf{A}$ is just a shell. I'm also providing ...
1k views

### What is a robust, iterative solver for large 3-d linear-elastic problems?

I'm diving into the fascinating world of finite element analysis and would like to solve a large thermo-mechanical problem (only thermal $\rightarrow$ mechanical, no feedback). For the mechanical ...
61 views

### Parallel dense solve with submatrices from mesh refinement with Petsc

For a Bounday Element Method problem I require the solution of a system of linear equations with multiple right-hand sides. Though this is a dense system, I still want to do it via Petsc in parallel. ...
78 views

### How to deal with multi-region problems (in PETSc)

Consider a problem where space is filled with a liquid and a solid phase, with a large, complicated geometry. On each of the phases, there's an electrical potential/poisson equation. The equations are ...
793 views

### Linear solvers: How to deal with a singular system? (Poisson equation with Neumann boundary conditions)

The question is in the context of iterative numerical solution of large PDE systems with Finite Differences or Finite Elements: Stating the Poisson equation with Neumann boundary conditions will lead ...
424 views

### Algebraic multigrid in PETSc

Consider a potential/poisson equation on a very large, complicated geometry. Currently, an self-written FEM and linear solvers from NumPy are used. Performance is, of course, not good enough for ...
346 views

### Why does PETSc matrix memory allocation improve performance so much?

Context In the Portable, Extensible Toolkit for Scientific Computing (PETSc), the user often creates matrices and vectors. These objects are then used as input for other routines like iterative ...
2k views

### Thrust for GPU programming

I'm very new to GPGPU programming so please forgive me if the question is not particularly appropriate. From what I understand GPU programming is a very intricate piece of engineering work when ...
I am leveraging the SLEPc library for solving the first $k$ (where $k = 3$ or $4$) eigenvalues and their corresponding vectors for a matrix of size 200,000. The matrix is sparse and symmetric. I ...