[petsc-users] calling PETSc from C++
Francis Poulin
fpoulin at uwaterloo.ca
Mon Mar 12 15:37:30 CDT 2012
Hello,
I am trying to call Petsc from a C++ program and having difficulties. I'm using v3.2.6 and I can run all the examples so I assumed that everything was installed ok. The body of the function is very simple, see below. I get a segmentation fault. In my installation I used mpich
I have a colleague who also installed openmp and this works for him on the same version of Petsc. Could it be that Petsc is confused because I have two different MPI's installed? I am hoping that it will use the one that it configured but I do have the other MPI in the same path.
Sorry for my confusion but any help would be appreciated.
Francis
P.S. I have a .txt file that has the output for the seg fault.
int main(int argc, char** argv) {
// Initialize Petsc
PetscInitialize(&argc, &argv, 0, 0);
// Finalize Petsc
PetscFinalize();
}
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: output.txt
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120312/cc943eb5/attachment.txt>
More information about the petsc-users
mailing list