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
1
vote
0 answers
hwloc/linux warning and PETSc Segmentation Violation error
I am trying to run a program using mpirun command (as shown below).
mpirun -np 4 python test.py
But I am getting following warning first:
hwloc/linux: Ignoring PCI device with non-16bit domain.
Pass --enable-32bits-pci-domain to configure to…

Pavan
- 133
- 7
1
vote
0 answers
PETSc configure and building with Intel compilers with cygwin
i'm trying to configure and build PETSC library to use in my project, in the website of PETSC they recommend cygwin to install the library on windows.
with Intel compilers they provide a file "win32fe.exe" to use it with the configure file.
i follow…

farah soufiane
- 11
- 1
1
vote
0 answers
PETSc - MatLUFactor - Problem for `mpiaij` matrix and replace by SuperLU
I am a beginner in using PETSc and I am trying to develop a function to reverse a PETSc matrix. However, as I am using a mpiaij matrix, PETSc shows no support for this type.
[0]PETSC ERROR: No support for this operation for this object type
[0]PETSC…

lcs_27
- 11
- 3
1
vote
1 answer
compiling cpp code includes PETSc with Cmake
I want to use PETSc in a cpp code. I installed PETScand when run the cmd echo $PETSC_DIRI got the path to the library.
I make a hello world code and
#include "petsc.h"
#include
int main()
{
std::cout << "Hello Wold" <<…

mehdi_bm
- 381
- 1
- 3
- 16
1
vote
2 answers
Configure debug setting for PETSc in VScode
This will be a long shot, but I would like to know if anyone in the community has the .json setting for running PETSc in VScode (for debbuging).
Best Regards

Manuel Oliveira
- 527
- 5
- 19
1
vote
1 answer
PETSc memory corruption on using DMDAVecGetArray
I'm trying to use PETSc's DMDA Vectors with 2 degrees of freedom and access them using struct, like in the manual.
However, when I try to use DMDAVecGetArray even with one degree of freedom (like in example below) I get memory double free or…

Sergey
- 1,166
- 14
- 27
1
vote
1 answer
PETSc vectorize operations with neighboring vector values
I'm implementing finite difference algorithm from uFDTD book. Many FDM equations involve operations on adjoined vector elements.
For example, an update equation for electric field
ez[m] = ez[m] + (hy[m] - hy[m-1]) * imp0
uses adjoined vector values…

Sergey
- 1,166
- 14
- 27
1
vote
1 answer
Header files not found by 'make'
The make instruction is not finding the libraries required for compilation. They are in other folder than the usual /usr/include folder.
I'm complying a simulation software called magnum.fe I already installed all the required dependencies (FEniCS =…

Joshua Salazar
- 205
- 4
- 14
1
vote
0 answers
CVODE PETSc interface gives a memory corruption error
I'm trying to figure out how CVODE interfaces with PETSc since I've been getting a memory corruption error when running the examples. I've isolated a minimal reproducible example below
running this
int main(int argc,char **argv)
{
N_Vector …

Praharsh Suryadevara
- 659
- 6
- 7
1
vote
0 answers
Detecting some strange errors in installation of PETSc on centOS
I met 2 problems when I build PETSc as follows:
./configure --prefix=/home/lengjun/softwares/petsc_install
make PETSC_DIR=/home/lengjun/softwares/petsc-3.14.1 PETSC_ARCH=arch-linux2-c-debug all
make PETSC_DIR=/home/lengjun/softwares/petsc-3.14.1…

Jun
- 11
- 1
1
vote
1 answer
Can I write to a closed socket and forcefully correct the broken pipe error?
I have an application that runs on a large number of processors. On processor 0, I have a function that writes data to a socket if it is open. This function runs in a loop in a separate thread on processor 0, i.e. processor 0 is responsible for its…

wvn
- 624
- 5
- 12
1
vote
0 answers
Seg Fault/Error when running problem with Petsc only in Valgrind
I made the unfortunate decision to uninstall what I had working for petsc/gcc/macports/brew/ etc., because Valgrind wasn't working for me. I got Valgrind to work for me, reinstalled Petsc and slepc etc., but then after I successfully create my…

yuzuruKayle
- 11
- 3
1
vote
0 answers
petsc4py mapping from _DMDA_Vec_array to Vec for use in TS
I have initialized ts = PETSc.TS().create() and attempt to solve with some initial distribution with ts.setSolution(u) and get a type error.
It seems as though it would like the type Vec but is getting passed as a _DMDA_Vec_array.
The setup goes as…

scottbaker
- 153
- 1
- 6
1
vote
1 answer
How to solve 'fatal error: mpi.h: No such file or directory' during PETSc compilation in WSL
I am trying to install PETSc on Ubuntu running within the windows subsystem for windows, but the steps detailed on the official webpage lead to a compilation error.
First I cloned the PETSc repo and ran the configure command: ./configure…

Pux
- 421
- 3
- 18
1
vote
1 answer
(PETSc with FEM) How can we set the boundary conditions (Dirichlet and neumann)?
I need help for understanding the PETSc examples of finite element method with SNES nonlinear solver. Is there any good materials or sources to understand the examples? (I already read PETSc user manual, but there is no information which I need.)
I…

서승진
- 11
- 1