PETSc, pronounced PET-see (the S is silent), is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations.
Questions tagged [petsc]
145 questions
0
votes
1 answer
PETSc Matrix copy raises exception: why?
I'm using petsc4py, and getting an exception I don't understand. I define the following function:
def tsIJacobian(self, ts, t, u, udot, shift, A, B):
self.setup_problem()
psol = fe.as_backend_type(self.sol.vector()).vec()
pA =…

Leon Avery
- 856
- 2
- 8
- 20
0
votes
0 answers
PETSC time stepping under mpirun mode
Dear all,
I'm a freshman in learning PETSC. I wrote a very simple 1D diffusion problem code based on PETSC library(Just simple FDM code). I want to use PETSC's parallel solver in each time step. Here is the pseudo…

walkandthinker
- 33
- 5
0
votes
1 answer
Generic Makefile for PETSc
I am using a general makefile as follows:
# Determine the platform
UNAME_S := $(shell uname -s)
# CC
CC := g++
# Folders
SRCDIR := src
BUILDDIR := build
TARGETDIR := bin
# Targets
EXECUTABLE := NSDG
TARGET := $(TARGETDIR)/$(EXECUTABLE)
# Final…

user3496912
- 195
- 1
- 6
0
votes
0 answers
Slepc shell matrices with multiple processes
I currently use explicit matrix storage for my generalized Eigenvalue equation of the form $AX = \lambda BX$ with eigenvalue lambda and eigenvector $X$. $A$ and $B$ are pentadiagonal by blocks, Hermitian and every block is Hermitian as well.
The…

Toon
- 187
- 11
0
votes
0 answers
Unable to use f2py to link large PETSc/SLEPc Fortran code
I am attempting to use f2py to create a python module for my Fortran code that uses both PETSc and SLEPc (this question is very closely related to this post, but the discussion there was unable to solve my problem--see comments at bottom of this…

aherrema
- 77
- 7
0
votes
1 answer
Cannot use petsc with cmake
I was trying to build a project that uses PETSc. To do so, I downloaded the cmake modules from https://github.com/jedbrown/cmake-modules . When I tried to build the project, I got the following error messages:
(...)
-- petsc_lib_dir…

Lucas Guesser
- 3
- 4
0
votes
1 answer
Compiling error in with make with cygwin
I am compiling an open source code after installing petsc library on cygwin. I tried to make the file but got the following error:
$ make TopOpt
/usr/bin/mpicxx -o TopOpt.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas…

ElaineT
- 13
- 4
0
votes
0 answers
Implementing Pre-Conditioned Conjugate Gradient with PETSc
I'm writing some C code to run OLS on a large dataset of approximately 40 million observations. I am interested in using pre-conditioned conjugate gradient algorithm (PCG) utilizing incomplete Cholesky (ICC) decomposition to obtain the…

inb
- 1
- 1
0
votes
1 answer
Advantage to calling PetscInitialize on a sub communicator
I was wondering if anybody knew any reason why it might be advantageous to call PetscInitialize on a subcommunicator? For example, I have a problem that I am running on 4 cores, but only two of them need to utilize Petsc. I can call…

costoich
- 11
- 2
0
votes
1 answer
Solving large system of linear equations using MPI+CUDA and PETSc distributed arrays
I'd like to use PETSc library to solve large distributed across processes systems of linear equations in my own program. Also I'd like to engage available GPU resources for this aim. I'm using structured mesh for discrete representation of 3D…

kpa
- 43
- 8
0
votes
1 answer
How to run petsc in MPI mode correct?
I'm using petsc as a solver for my project. However, the solver in parallel mode creates much more process then my expectation.
The code using python and petsc4py. The machine have 4 cores.
(a). If I run it directly, petsc uses only 1 process to…

Ji Zhang
- 128
- 1
- 11
0
votes
1 answer
Using f2py on a Fortran code linked to PETSc
My question is related to this post:
Including a compiled module in module that is wrapped with f2py (Minimum working example)?
in which the poster was trying to compile a Fortran code (Test.f90) with f2py and link that to a pre-compiled library…

costoich
- 11
- 2
0
votes
0 answers
PETSc with shared memory
I have an MPI parallel code using PETSc to solve a linear equation system with a matrix-free GMRES method. It works fine, but each process uses about the same amount of memory, independent of the number of processes I use. So when using many…

Nixmich
- 11
- 2
0
votes
2 answers
OpenMDAO PetscTgtVecWrapper TypeError
I'm trying to get a parallel workflow to run in which I'm evaluating over 1000 parallel cases inside a ParallelGroup. If I run on a low amount of cores it doesn't crash, but increasing the number of nodes at some point raises an error, which…

frza
- 56
- 4
0
votes
0 answers
Structured grid with irregular shape in PETSc (DM context)
I have a finite diference problem in structured grid in PETSc, and DM context helps me to create the matrix really easy, DM give me a whole matrix of rectangular domain that is good to me because I'm using this reference system, but I have an…

SoilRos
- 51
- 5