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
How to pass array of PETSc Vec to a function
I am trying to pass an array of Vec's in PETSc to a function, modify it internally and retrieve the results. A pseudocode is as follows:
PetscErrorCode foo(Vec *y, int n) {
// ...
ierr = VecDuplicateVecs(x, n, &y); CHKERRQ(ierr);
…

Rubem_blah
- 73
- 5
0
votes
1 answer
Accessing NSGA2 population size using pyoptsparse driver with OpenMDAO
I am attempting to modify the GA population size for when using the NSGA2 optimizer through OpenMDAO's pyoptsparse driver.
I tried accessing PopSize from pyNSGA2.py using opt_settings dictionary as follows:
prob.driver =…

Peter
- 3
- 2
0
votes
1 answer
Installing Petsc on Windows
I installed cygwin with python, make and diffutils.
When I am using the command:
./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack
I am getting an error "Windows Python Detected. Please rerun…
user8210645
0
votes
1 answer
There has been an error in the installation of petcs. How to solve it?
Computer configuration: my computer is maosx system, in the virtual machine installed ubuntu, the original system install ladder (VPN), Linux did not install a successful ladder (VPN).
Environment configuration: install petsc in the virtual…

Kexin Tian
- 3
- 3
0
votes
1 answer
Issue installing petsc4py with Anaconda using pip, to indicate external PETSc directory
I) The issue
I cannot install petsc4py in my Anaconda environment using pip.
Installing with conda doesn't work because it won't check my predefined PETSC_DIR and PETSC_ARCH environment variables during installation. numpy and cython are…

Breno
- 748
- 8
- 18
0
votes
0 answers
parallel computing use Petsc in C
I learn how to use Petsc in C, I want to solve linear system with KSP ( find x in Ax=b, A is matrix(nxn), b is vector (n)) in Petsc. The library provides some tools to compute parallel in C. However, I have a trouble and find the answer, I hope to…

Nguyen
- 1
- 1
0
votes
1 answer
PETSc hangs on MatView()
I'm trying to create and print MATDENSE matrix in PETSc. My MWE looks like this:
static char help[] = "";
#include
#include
int main(int argc,char **args)
{
Mat A;
PetscInt Istart,Iend,m = 2,n =…

Eenoku
- 2,741
- 4
- 32
- 64
0
votes
0 answers
"out of memory" issue with PETsc in Ubuntu
I am running an OpenMDAO code that uses 2 parallel groups. I have installed PETSc4py and mpi4py inside a virtual python environment. I am getting the following error while running my code. The error reads as follows: "Out of memory. Allocated: 0,…

arnab marik
- 23
- 3
0
votes
1 answer
How to call PetscFinalize from the root processor only?
In my Fortran program, I call an external function only at the root processor. I have a few checks to ensure that the function worked. If it doesn't work, then I stopthe program and call PetscFinalize. For example:
if(rank==0) then
call_status =…

psoo
- 91
- 1
- 3
0
votes
0 answers
Corrupted heap despite correct allocation and deallocation
Here's an interesting problem that doesn't seem to have an obvious solution. After allocating a pointer to be a 16 element long PetscReal vector, filling it with data, and pulling the data from it, on deallocate() this error is thrown:
*** Error in…

Daniel R. Livingston
- 1,227
- 14
- 36
0
votes
3 answers
Using PETSc to efficiently solve a small system sequentially?
I require solving a large set of (independent) Ax=b linear problems.
This cannot be parallelized (or more specifically, this is within each processor's responsibility anyway).
The Ax=b sets are small (say 10x10 at most) but are dense (Usually all…

TheWhitestOfFangs
- 403
- 3
- 14
0
votes
1 answer
Construct sparse matrix with vectors using Petsc library
I'm learning to use petsc in c/c++ in order to use a sparse matrix factorization function (MatICCFactor) in it. The first step I did is to read a toy matrix into petsc to create a sparse matrix and view the matrix before I do anything with it. I'm a…

Wendy
- 13
- 6
0
votes
2 answers
Make error: main.o: Command not found Makefile: recipe for target 'all' failed
# Makefile for Defmod
FFLAGS =
FPPFLAGS =
LDLIBS =
-include ${PETSC_DIR}/conf/variables
-include ${PETSC_DIR}/conf/rules
-include ${PETSC_DIR}/lib/petsc/conf/variables
-include ${PETSC_DIR}/lib/petsc/conf/rules
OBJS = main.o m_global.o m_local.o…

Ck Mo
- 1
- 1
0
votes
1 answer
Installing Petsc from source, Specified destDir same as current PETSC_DIR/PETSC_ARCH
I'm doing my best to install petsc from source. Here's what I did:
$ git clone -b maint https://bitbucket.org/petsc/petsc petsc
$ cd petsc/
$ pwd
/Users/kilojoules/install_petsc/petsc
$ export PETSC_DIR=/Users/kilojoules/install_petsc/petsc
$ make
…

kilojoules
- 9,768
- 18
- 77
- 149
0
votes
2 answers
Difference between "ASCII" and "Binary" formats in PETSc
I wanted to know what the difference is between binary format and ASCII format. The thing is I need to use PETSc to do some matrix manipulations and all my matrices are stored in text files.
PETSc has different set of rules for dealing with these…

smilingbuddha
- 14,334
- 33
- 112
- 189