[Trilinos-Users] Trilinos-PETSc Interface

Jonathan Hu jhu at sandia.gov
Mon Nov 22 12:40:37 MST 2010


Mark,

     Fyi, I noticed that you're using PETSc 3.1.  I've tested the 
interface only with PETSc 3.0.0.

Jonathan

Jed Brown wrote on 11/21/2010 10:47 AM:
> On Sun, 21 Nov 2010 11:40:49 -0600, Nunion<m.skates82 at gmail.com>  wrote:
>> Hello Jonathan,
>>
>> I am now enabling MPI in my configuration script. with the MPI_BASE_PATH set
>> to my MPI base directory.  When I get to "make" I am getting the following
>> errors, there seems to be some redefinition stuff going on?  What is
>> attached is a subset of the errors.  They are all dealing with
>> EpetraExt_PETScAIJMatrix
>>
>> [ 49%] Built target Tpetra_PowerMethodExample
>> [ 50%] Built target Tpetra_Tpetra_PowerMethod_CopyFiles
>> [ 50%] Built target Tpetra_PowerMethodFileExample
>> [ 50%] Built target Tpetra_PowerMethodVbrExample
>> [ 50%] Building CXX object
>> packages/epetraext/src/CMakeFiles/epetraext.dir/petsc/EpetraExt_PETScAIJMatrix.cpp.o
>> /home/walker/Desktop/PETSc/_NEW/petsc-3.1-p5/include/petscviewer.h: In
>> function ‘PetscErrorCode PetscViewerCreate(_p_PetscViewer**)’:
>> /home/walker/Desktop/PETSc/_NEW/petsc-3.1-p5/include/petscviewer.h:117:
>> error: declaration of C function ‘PetscErrorCode
>> PetscViewerCreate(_p_PetscViewer**)’ conflicts with
>> /home/walker/Desktop/PETSc/_NEW/petsc-3.1-p5/include/petscviewer.h:116:
>> error: previous declaration ‘PetscErrorCode PetscViewerCreate(MPI_Comm,
>> _p_PetscViewer**)’ here
>> /home/walker/Desktop/PETSc/_NEW/petsc-3.1-p5/include/petscviewer.h:117:
>> error: ‘PetscErrorCode PetscViewerCreate(_p_PetscViewer**)’ was declared
>> ‘extern’ and later ‘static’
>> /home/walker/Desktop/PETSc/_NEW/petsc-3.1-p5/include/petscviewer.h:116:
>> error: previous declaration of ‘PetscErrorCode PetscViewerCreate(MPI_Comm,
>> _p_PetscViewer**)’
>> /home/walker/Desktop/PETSc/_NEW/petsc-3.1-p5/include/petscviewer.h: In
>> function ‘PetscErrorCode PetscViewerCreate(_p_PetscViewer**)’:
>> /home/walker/Desktop/PETSc/_NEW/petsc-3.1-p5/include/petscviewer.h:117:
>> error: invalid conversion from ‘int’ to ‘_p_PetscViewer**’
>> /home/walker/Desktop/PETSc/_NEW/petsc-3.1-p5/include/petscviewer.h:117:
>> error: too many arguments to function ‘PetscErrorCode
>> PetscViewerCreate(_p_PetscViewer**)’
> The most likely cause of these errors is including PETSc headers using
>
>    extern "C" {
>    #include<petscviewer.h>
>    }
>
> causing the PetscPolymorphicSubroutine macro to be expanded within an
> extern "C" block.  Wrapping the include statement should not be done
> since it is handled internally.
>
> Jed
>



More information about the Trilinos-Users mailing list