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
0
votes
1 answer

using PETSc in gfortran, but it didn't compile

I want to test and use PESTc in fortran, so I wrote something very simple and null like (petscexe.F): PROGRAM petscexe INCLUDE 'petscsys.h' END PROGRAM petscexe to see if the header file can be correctly imported. I compile the file with…
jengmge
  • 77
  • 1
  • 5
0
votes
1 answer

generating petsc binary file using python

I am trying to create a PETSC binary file using python. I try to run the script on bash shell but I get an error $ python -c 'print file.shape\n import sys,os\n sys.path.append(os.path.join(os.environ['PETSC_DIR'],'bin','pythonscripts'))\nimport…
user3097509
  • 13
  • 1
  • 4
0
votes
1 answer

creal and cimag problems with Clang 3.4

I am compiling a library with Petsc using Clang 3.4 and get: error: use of undeclared identifier 'creal' it follows from the following define: petscmath.h:121:38: note: expanded from macro 'PetscRealPartComplex' #define PetscRealPartComplex(a) …
Denis
  • 1,526
  • 6
  • 24
  • 40
0
votes
1 answer

Howto enable stronger optimization builds

I am trying to build PETSc and have problems to enable optimization. Without specifying, PETSc always creates a debugging build, but I can turn that off with passing --with-debugging=0 to cmake. However, this only enables -O1 by default, but as my…
0
votes
2 answers

C and MPI: function works differently with same data

I have successfully wrote a complicate function with PETSc library (it's a MPI-based scientific library for parallel solving huge linear systems). This library provides its own "malloc" version and basic datatypes (i.e. "PetscInt" as standard…
0
votes
3 answers

easy petsc function call in a class

The following question might be easy to answer, but I did not find any solution in the Internet. To put it in a nutshell, I put some petsc function calls in a class. The following equation solver script works without any problems: static char help[]…
Sebastian
  • 124
  • 1
  • 9
-1
votes
1 answer

Why the PETSC code run in 1 process and doesn't run in 2 processes?

This is a simple code from the book PETSc for Partial Differential Equations: Numerical Solutions in C and Python. It computes the zero of atan(x). If I run it in one process, it runs properly. However, if I run in two processes, it doesn't run. I…
-1
votes
1 answer

compile error related to "in expansion of macro ‘CHKERRQ"’

I have this compiler error related to "in expansion of macro ‘CHKERRQ’" from PETSC whenever I call "CHKERRQ", I am not sure what causes it, could anyone please give any advice? Thanks for your help in advance, Feng
Feng
  • 11
  • 1
-1
votes
1 answer

Compile petsc included code using a makefile, failed for '.f90' but passed for '.F90'

I'm leaning petsc (3.13.1) on a Linux virtual machine. The compiler is mpich-3.2.1 compiled with gfortran. While going through the tutorials I found the extensinos are .F90, the files did not work after I changed the ext to .f90. I added some rules…
Frank Han
  • 39
  • 1
  • 8
1 2 3
9
10