Questions tagged [petsc]

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.

145 questions
1
vote
0 answers

PETSc PF objects and user defined functions

Presently I am working with a large PETSc program which needs to be modular. I need to use PF objects in PETSc (at least I guess so as I need to pass functions as arguments with enough flexibility with MPI vectors. Is there any other way?) But the…
Soumya
  • 21
  • 4
0
votes
0 answers

(PETSc4py) Creating Distributed Sparse Block Matrix with `createAIJWithArrays'

I am trying to create a sparse block matrix in PETSc4py using local matrices assembled with SciPy. Below is a simple example code with comments import numpy as np import petsc4py from petsc4py import PETSc import scipy.sparse as sp def main(): …
0
votes
1 answer

Why does setting the values of a PETSc solution Vector not affect the result of DMDAVecGetArray?

The following program is meant to set the value of the internally defined vector in petsc, which can then be read by DMDAVecGetArray: #include #include int main(int argc, char **argv) { PetscInitialize(&argc, &argv,…
Yes
  • 339
  • 3
  • 19
0
votes
0 answers

Why is the makefile for this program I am trying to download not working? Is it an issue with the access to the $PETSC_DIR?

I have been trying to follow the instructions to build an executable file called CrunchTope, and unfortunately every time I enter make into my BASH shell Mac terminal after updating it to the latest version using git pull and installing PETSc, it…
Luis E
  • 1
0
votes
0 answers

Proper way to compile and link against petsc using cmake

I followed the configuration and installation of PETSc according to https://petsc.org/release/install/install/#installing-with-open-mpi-with-shared-mpi-libraries as a user not root. The basic check went OK according to the log: Running check…
Al-Farouq
  • 5
  • 3
0
votes
0 answers

'symbol lookup error: undefined symbol' after change of module system on cluster

after the operating system of the cluster I am running my application on with PETSC (Version 3.19) has been changed from CentOS 7 to Rocky Linux 8 and also the module system has been changed to Lmod, I get several error: symbol lookup error:…
Mahe
  • 1
0
votes
0 answers

Ex1_5 test error during PETSc make all test

I am installing PETSc on Ubuntu 16.04 to later on build CrunchTope. The installation goes fine using the process defined on the PETSC website. When I run make all check, I get a positive reply that the tests were successful. make all check: I then…
0
votes
0 answers

PETSc4Py Creating dense distributed matrix

I'm trying to create a new distributed matrix initialized by NumPy array using petsc4py. My intention was to distribute every row of the matrix to different process and let them solve a linear system afterwards, but the distribution itself is not…
Eenoku
  • 2,741
  • 4
  • 32
  • 64
0
votes
1 answer

Install PetSc on Windows

Hello I'm trying to install PetSc on Windows11 with MSyS2 using the tutorial. But when I'm trying to do the last step of the installation using this line : " $ /usr/bin/python ./configure --with-mpiexec='/C/Program\ Files/Microsoft\…
0
votes
1 answer

Writing the eigenvectors, obtained using SLEPc, to a file in C

I have recently started using SLEPc for diagonalizing large sparse matrices, taking advantage of MPI. Everything works fine, except at the end when I want to write the eigenvectors to a file. I do this: PetscViewerASCIIOpen(PETSC_COMM_WORLD,…
0
votes
1 answer

How do you correctly define the dependencies to FFTW in a cmake file?

I want to use fftw in my c++ program. For this, I have installed petsc alongside the --download-fftw option, since I want to be using Petsc in the future as well. I simply downloaded the most recent stable version, ran ./configure with the…
Yes
  • 339
  • 3
  • 19
0
votes
1 answer

PETsc mpiaij matrix is shrinking with added number of processprs

I am trying to do some matrix matrix multiplication using PETsc but if I increase the number of processes using the mpiexec -n, the matrix would be smaller than expected by the factor of number of processes. The matrices seem to also be splitting…
HLTran
  • 1
  • 1
0
votes
0 answers

cannot open shared object file: No such file or directory, even after modifying LD_LIBRARY_PATH variable

I have been trying to use PETSc for some MPI enhanced matrix operations, but I keep getting this error when I submit the job using slurm on a supercomputer: ERROR: ERROR: LoadError: LoadError: could not load library…
0
votes
0 answers

petsc4py converting rectangular numpy matrix to petsc matrix

The code below works only if input is a square numpy matrix (eg np.eye(3)) but not if input is a rectangular matrix. import numpy as np from petsc4py import PETSc input = np.array([[0,1,0,0],[1,0,0,0],[0,0,0,1]]) #input = np.eye(3) indices =…
Frostyant
  • 97
  • 1
  • 7
0
votes
0 answers

I can't compile Petsc in the terminal interface, but I can compile successfully in src/ksp/ksp/tutorials under the Petsc file

I have also configured environment variables, what should I do? I reinstalled the official tutorial and installed it, and watched some installation videos, because I'm not very familiar with linux, but it didn't work enter image description here