It's been some time since my previous question. Now I want to update the PETSc installation but I cant figure out which versions of PETSc that are supported by OOFEM. Above it appears as if at least 3.4.2 should work. Somewhere else I saw a note that 3.5 might work (but that was in a thread related to Windows). Could someone please help me?

2

(23 replies, posted in Developers Discussion)

I was asked to add a short description of what I am working on when it comes to implementations in OOFEM. I propose something like:

Martin Fagerström (Implementation of cohesive zone models for modelling of delamination in composites)

I, Martin Fagerström, agree that my existing and future contributions* may be licensed under: "LGPL2.1 or any later version"**

I am currently trying to compile and link a parallel version of OOFEM on a computer cluster  where PETSc is already built. To build PETSc, the intel compiler suite of version 11.1 has been used so I am trying to use the same compilers and openmpi environment that has been used to build petsc (v 3.2).

The problem I am facing is that when compiling OOFEM, I get the following error message:

[ 11%] Building CXX object src/oofemlib/CMakeFiles/core.dir/petscsparsemtrx.C.o
/beda/users/home/fagmar/OOFEM_Jim/src/oofemlib/petscsparsemtrx.C(114): error: argument of type "int" is incompatible with parameter of type "const PetscScalar={double} *"
          VecCreateSeqWithArray(PETSC_COMM_SELF, 1, x.giveSize(), x.givePointer(), & globX);
                                                    ^

/beda/users/home/fagmar/OOFEM_Jim/src/oofemlib/petscsparsemtrx.C(114): error: argument of type "double *" is incompatible with parameter of type "Vec *"
          VecCreateSeqWithArray(PETSC_COMM_SELF, 1, x.giveSize(), x.givePointer(), & globX);
                                                                  ^

/beda/users/home/fagmar/OOFEM_Jim/src/oofemlib/petscsparsemtrx.C(114): error #140: too many arguments in function call
          VecCreateSeqWithArray(PETSC_COMM_SELF, 1, x.giveSize(), x.givePointer(), & globX);
                                                                                   ^

/beda/users/home/fagmar/OOFEM_Jim/src/oofemlib/petscsparsemtrx.C(148): error: argument of type "int" is incompatible with parameter of type "const PetscScalar={double} *"
      VecCreateSeqWithArray(PETSC_COMM_SELF, 1, x.giveSize(), x.givePointer(), & globX);
                                                ^

/beda/users/home/fagmar/OOFEM_Jim/src/oofemlib/petscsparsemtrx.C(148): error: argument of type "double *" is incompatible with parameter of type "Vec *"
      VecCreateSeqWithArray(PETSC_COMM_SELF, 1, x.giveSize(), x.givePointer(), & globX);
                                                              ^

/beda/users/home/fagmar/OOFEM_Jim/src/oofemlib/petscsparsemtrx.C(148): error #140: too many arguments in function call
      VecCreateSeqWithArray(PETSC_COMM_SELF, 1, x.giveSize(), x.givePointer(), & globX);
                                                                               ^

compilation aborted for /beda/users/home/fagmar/OOFEM_Jim/src/oofemlib/petscsparsemtrx.C (code 2)
make[2]: *** [src/oofemlib/CMakeFiles/core.dir/petscsparsemtrx.C.o] Error 2
make[1]: *** [src/oofemlib/CMakeFiles/core.dir/all] Error 2
make: *** [all] Error 2

Does that imply that there is some non-standard coding in petscsparsemtrx.C or that I have set up my cluster environment in the wrong way?