Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
114 views

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 ...
SoilRos's user avatar
  • 61
0 votes
1 answer
168 views

I know PETSc allows its vectors to carry ghost values thanks to VecCreateGhost() or VecMPISetGhost()functions. Does anyone know if there is similar functions to create a matrix with ghost lines ? ...
Myriam Pipo's user avatar
5 votes
2 answers
19k views

I have a code on my computer uses Petsc which depends on mpi. On my computer it works well. I put it on cluster, exported paths of gcc, Petsc and openmpi (although I was using mpich on my computer I ...
Shibli's user avatar
  • 6,199
0 votes
0 answers
292 views

Say I have a matrix M: >>> print type(M) <class 'pyop2.petsc_base.Mat'> >>> dir(M) ['Snapshot', '_Assembly', '_Versioned__version', '__call__', '__class__', '__delattr__', '...
Moonwalker's user avatar
  • 2,242
0 votes
0 answers
197 views

How i can run program, that writen using PETSC, in multiple threads without ./mpiexec -n <>? Maybe i need init MPI separately? Can u get reference to example how init MPI with PetscInitialize()...
toodef's user avatar
  • 125
1 vote
1 answer
699 views

I tried to compile PESTC using this configuration: ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-f-blas-lapack=1 --download-openmpi --with-shared-libraries make PETSC_DIR=/...
Arruda's user avatar
  • 880
1 vote
1 answer
203 views

I just started with PETSC and I'm trying to plot a matrix using matView. My code is like: MatCreateSeqAIJWithArrays(PETSC_COMM_WORLD, nodes, nodes, rows, cols, values, net); //I want to visualize "...
Francielly Rodrigues's user avatar
0 votes
1 answer
74 views

I am using KiFMM and PETSc for my code. It had no problems for the serial version, but when I am trying to use MPI with 2 nodes I am now getting an error at (*trgPos)(j,i), which is of type DblNumMat ...
M K's user avatar
  • 69
0 votes
1 answer
62 views

What type and value does PETSC_COMM_WORLD in the following header expand to? Is it just a redefinition for MPI_Comm with extern scope? #define PETSC_EXTERN extern PETSC_VISIBILITY_PUBLIC ...
ocramz's user avatar
  • 841
0 votes
0 answers
80 views

In PETSc, a number of common-use structures such as Vec, Mat, IS, etc. are defined similarly, as in the 4 snippets below. Questions: when and how is PETSCHEADER expanded? I am writing the foreign ...
ocramz's user avatar
  • 841
1 vote
2 answers
2k views

I am trying to install PETSc on Cygwin terminal by invoking following command.. ./configure --with-cc='win32fe cl' --with-fc='win32fe ifort' --with-cxx='win32fe cl' --download-fblaslapack and /...
Manish's user avatar
  • 11
0 votes
1 answer
883 views

I have a very basic program using PETSC #include "PETSC/petsc.h" #include "PETSC/petscsys.h" #include "PETSC/petscmat.h" int main(int argc, char *argv[]) { PetscMPIInt rank,size; ...
M K's user avatar
  • 69
2 votes
2 answers
117 views

I'm figuring out how haskell-mpi works by rewriting the binding. I'm trying to re-use the MPICH installation that was set up by installing PETSc (which is working fine). Question: make main gives me a ...
ocramz's user avatar
  • 841
3 votes
2 answers
238 views

I'd like to wrap a function-like C macro in a C function (and in turn wrap it in Haskell with a {#fun ... #} block), but the c2hs preprocessor chokes on the do.. while(0) syntax; here's the code: ...
ocramz's user avatar
  • 841
2 votes
1 answer
2k views

I am trying to create a petsc-matrix form an already existing csc-matrix. With this in mind I created the following example code: import numpy as np import scipy.sparse as sp import math as math from ...
Schwartz Richard's user avatar
0 votes
1 answer
113 views

I am using a code in C for hydro simulations with radiative transfer. There is need for PETSc, which I got compiled on my local machine. But on compiling my code I get the error message: error: ’...
varadarajan's user avatar
4 votes
1 answer
202 views

I would like to make (a subset of) the PETSc library available from Haskell via a FFI interface in order to hide the memory and error management from the user; built PETSc 3.5.3 with shared ...
ocramz's user avatar
  • 841
0 votes
1 answer
113 views

I am using Petsc Ksp routines. I construct an operator using MatSetValuesStencil, where in each call of this function I specify one row matrix values of length 5. There is a case where I sometimes ...
user14416's user avatar
  • 3,032
0 votes
1 answer
520 views

Is it possible to load the matrix in PETSc binary format from external file at runtime with use of Octave C++ API? I've found the Doxygen documentation, but I can't find anything useful among so many ...
Eenoku's user avatar
  • 3,007
1 vote
1 answer
406 views

I'm not sure if this question belongs here or not. But I am having a problem with my code with PETSc saying that there is a floating point error. It is similar to the problem discussed in the links ...
user4352158's user avatar
0 votes
0 answers
988 views

I tried installing petsc with homebrew on OSX 10.10.1 with: $brew install petsc I get one error installing one dependency: ==> Installing petsc dependency: hypre ==> Using Homebrew-provided ...
ilciavo's user avatar
  • 3,564
0 votes
0 answers
717 views

I have been a user of pseudo arc-length continuation, nonlinear solvers... in Trilinos LOCA (c++) for years but I recently come across the python package petsc4py. This simplified a lot my programming ...
user3177306's user avatar
2 votes
1 answer
358 views

I'm using PETSc and I wanted to do something like, I know I can do: Mat A Vec x,y MatMult(A,x,y) VecScale(y,0.5) I was just curious if there is a function that would do all of these in one shot. It ...
Miguel's user avatar
  • 1,373
0 votes
2 answers
1k views

I'm trying to program LU decomposition app in PETSc. My idea was, that the program will print the unfactorized matrix, then the factorized matrix and count time taken by a factorization itself. I've ...
Eenoku's user avatar
  • 3,007
2 votes
0 answers
597 views

Does anyone have any experience on Domain Decomposition using PETSc library? I have used PETSc for creating my vectors and matrix within my c++ code. I also used KSP to solve the linear system. I ...
Nazi's user avatar
  • 67
1 vote
1 answer
4k views

I have a pretty beginners' question, but I'm really lost now. I'm beginning with PETSc, but I have problems with compilation of my code. I'm trying to use my own Makefile, but compiler keeps yelling "...
Eenoku's user avatar
  • 3,007
5 votes
2 answers
1k views

In 3.3 they had a grate news - an example of FEM solving using only PETCs SNES on GPU. I am new to PETSc and have a problem - I need to create a sphere in 3d space and apply forces to it... so I need ...
DuckQueen's user avatar
  • 900
1 vote
0 answers
134 views

I have a working code that solves a certain problem by using KSPSolve from Petsc (using gmres solver with ilu pre-conditioner). I wanted to call this code from MATLAB so I coded a mex-file. However, ...
Tohiko's user avatar
  • 2,012
0 votes
1 answer
252 views

I have a c++ code that can be run in parallel but with shared memory methods. I linked the code to PETSc and PETSc is able to run the code in parallel but with distributed memory method. When I run ...
Nazi's user avatar
  • 67
1 vote
0 answers
59 views

I got a "Inserting -nan+iG error" at function MatSetValues. My code goes like this: I first use code below to change a double into PETScScalar (I am using Complex version). for(i=0;i<nz;i++)temp[...
altria's user avatar
  • 53
0 votes
1 answer
271 views

I have sequential block AIJ matrices which are written in c++ and I am going to use PETSc to create MPI matrices. So, I have to substitute my sparse block AIJ matrices into MPI block AIJ PETSc ...
Nazi's user avatar
  • 67
0 votes
1 answer
979 views

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 ...
jengmge's user avatar
  • 97
3 votes
1 answer
186 views

What is the rule of thumb for using PetscMalloc2 (PetscMallocX) instead of PetscMalloc twice (X times)? Should the chunks have similar sizes, or is it always more efficient to allocate them together / ...
Armut's user avatar
  • 1,167
3 votes
4 answers
5k views

I am new in PETSc. I have a big c++ code and I want to add PETSc to some of the files that I already have, so I have to change my makefile in a way that it can compile PETSc as well. Is it possible ...
Nazi's user avatar
  • 67
0 votes
1 answer
659 views

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....
user3097509's user avatar
0 votes
1 answer
645 views

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 '...
Denis's user avatar
  • 1,546
0 votes
1 answer
1k views

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. ...
user3046263's user avatar
0 votes
2 answers
214 views

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 ...
user3029623's user avatar
2 votes
1 answer
3k views

I'm on Ubuntu 13.04 64-bit and I'm attempting to build a "Hello world" program in PETSc using CMake. I have the following program solve1.c (loosely based on ex1.c from the PETSc examples), which ...
rettvest's user avatar
  • 1,297
2 votes
2 answers
1k views

I'm trying to solve the Poisson equation in real space on a multi GPUs architecture using a code in C/CUDA with the MPI library. For the moment, I'm only interested in solving the problem in a ...
Alex's user avatar
  • 160
0 votes
3 answers
1k views

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 ...
Sebastian's user avatar
  • 124
10 votes
1 answer
4k views

I can't seem to find a way how to efficiently load scipy sparse matrices, e.g. csr_matrix, into a petsc4py matrix, e.g. PETSc.Mat().createAIJ. I found this thread, but I'm not able to apply it. I ...
zonksoft's user avatar
  • 2,429
1 vote
0 answers
111 views

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 ...
Soumya's user avatar
  • 21
2 votes
2 answers
415 views

For a unit test, I'm trying to make sure that a PETSc vector has been destroy. However, I can't seem to find an adequate command that does this gracefully. The best I've been able to do is call ...
user1488900's user avatar
3 votes
3 answers
7k views

I have Windows 7 OS. I have followed the instructions from the PETSc web page; in the command prompt of VS 2005 I have opened cygwin and installed PETSc with the command: ./configure --with-cc='...
user1487833's user avatar
6 votes
1 answer
5k views

I am starting use PETSc library to solve linear system of equations in parallel. I have installed all packages, build and run successfully the examples in petsc/src/ksp/ksp/examples/tutorials/ folder, ...
Nurlan's user avatar
  • 2,990
0 votes
2 answers
9k views

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 ...
smilingbuddha's user avatar

1 2
3