OPM / opm-core

Collection of utilities, solvers and other components.
http://www.opm-project.org
GNU General Public License v3.0
44 stars 50 forks source link

opm-core broken related to petsc #1166

Closed GitPaean closed 7 years ago

GitPaean commented 7 years ago

The following is the error message.

[ 20%] Building CXX object CMakeFiles/opmcore.dir/opm/core/linalg/LinearSolverUmfpack.cpp.o
/home/kaib/software/petsc-3.7.3/arch-linux2-c-debug/bin/mpicxx   -DDUNE_COMMON_FIELDVECTOR_SIZE_IS_METHOD=1 -DHAVE_CONFIG_H=1 -DHAVE_OPM_GRID -DSILENCE_EXTERNAL_WARNINGS -I/home/kaib/OPM-master-test/debug/opm-core-build -I/home/kaib/OPM-master-test/debug/opm-core -I/usr/include/suitesparse -I/usr/include/superlu -I/home/kaib/software/petsc-3.7.3/arch-linux2-c-debug/include -I/home/kaib/software/petsc-3.7.3/include -I/home/kaib/local/dune2.4.1/release2.4.1_O2_g_mpi/include -I/home/kaib/OPM-master-test/debug/opm-common -I/home/kaib/OPM-master-test/debug/opm-material -I/home/kaib/OPM-master-test/debug/opm-output -I/home/kaib/OPM-master-test/debug/opm-grid -isystem /usr/local/include -isystem /home/kaib/OPM-master-test/debug/opm-parser/lib/eclipse/include -isystem /home/kaib/OPM-master-test/debug/opm-parser-build/lib/eclipse/include -isystem /home/kaib/OPM-master-test/debug/opm-parser/lib/json/include  -pipe -std=c++0x -pedantic -Wall -Wextra -Wformat-nonliteral -Wcast-align -Wpointer-arith -Wmissing-declarations -Wcast-qual -Wshadow -Wwrite-strings -Wchar-subscripts -Wredundant-decls -Wno-unknown-pragmas -pthread -std=c++14 -O2 -g -fno-omit-frame-pointer -march=native -mtune=native -DDEBUG -fPIC   -pthread -std=c++14 -o CMakeFiles/opmcore.dir/opm/core/linalg/LinearSolverUmfpack.cpp.o -c /home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverUmfpack.cpp
CMakeFiles/opmcore.dir/build.make:182: recipe for target 'CMakeFiles/opmcore.dir/opm/core/linalg/LinearSolverFactory.cpp.o' failed
make[2]: *** [CMakeFiles/opmcore.dir/opm/core/linalg/LinearSolverFactory.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.cpp:23:0:
/home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.hpp:45:33: error: ‘parameter’ does not name a type
         LinearSolverPetsc(const parameter::ParameterGroup& param);
                                 ^
/home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.hpp:45:58: error: expected unqualified-id before ‘&’ token
         LinearSolverPetsc(const parameter::ParameterGroup& param);
                                                          ^
/home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.hpp:45:58: error: expected ‘)’ before ‘&’ token
/home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.hpp:45:58: error: constructors may not be ref-qualified
/home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.hpp:45:58: error: expected ‘;’ at end of member declaration
/home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.hpp:45:60: error: ‘param’ does not name a type
         LinearSolverPetsc(const parameter::ParameterGroup& param);
                                                            ^
In file included from /home/kaib/software/petsc-3.7.3/include/petscksp.h:6:0,
                 from /home/kaib/software/petsc-3.7.3/include/petscsnes.h:6,
                 from /home/kaib/software/petsc-3.7.3/include/petscts.h:7,
                 from /home/kaib/software/petsc-3.7.3/include/petsc.h:26,
                 from /home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.cpp:27:
/home/kaib/software/petsc-3.7.3/include/petscpc.h:199:83: warning: redundant redeclaration of ‘PetscErrorCode PCBJacobiGetLocalBlocks(PC, PetscInt*, const PetscInt**)’ in same scope [-Wredundant-decls]
 PETSC_EXTERN PetscErrorCode PCBJacobiGetLocalBlocks(PC,PetscInt*,const PetscInt*[]);
                                                                                   ^
/home/kaib/software/petsc-3.7.3/include/petscpc.h:99:29: note: previous declaration of ‘PetscErrorCode PCBJacobiGetLocalBlocks(PC, PetscInt*, const PetscInt**)’
 PETSC_EXTERN PetscErrorCode PCBJacobiGetLocalBlocks(PC,PetscInt*,const PetscInt*[]);
                             ^
/home/kaib/software/petsc-3.7.3/include/petscpc.h:200:83: warning: redundant redeclaration of ‘PetscErrorCode PCBJacobiGetTotalBlocks(PC, PetscInt*, const PetscInt**)’ in same scope [-Wredundant-decls]
 PETSC_EXTERN PetscErrorCode PCBJacobiGetTotalBlocks(PC,PetscInt*,const PetscInt*[]);
                                                                                   ^
/home/kaib/software/petsc-3.7.3/include/petscpc.h:97:29: note: previous declaration of ‘PetscErrorCode PCBJacobiGetTotalBlocks(PC, PetscInt*, const PetscInt**)’
 PETSC_EXTERN PetscErrorCode PCBJacobiGetTotalBlocks(PC,PetscInt*,const PetscInt*[]);
                             ^
In file included from /home/kaib/software/petsc-3.7.3/include/petsc.h:27:0,
                 from /home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.cpp:27:
/home/kaib/software/petsc-3.7.3/include/petsctao.h:163:66: warning: redundant redeclaration of ‘PetscErrorCode TaoComputeDualVariables(Tao, Vec, Vec)’ in same scope [-Wredundant-decls]
 PETSC_EXTERN PetscErrorCode TaoComputeDualVariables(Tao, Vec, Vec);
                                                                  ^
/home/kaib/software/petsc-3.7.3/include/petsctao.h:162:29: note: previous declaration of ‘PetscErrorCode TaoComputeDualVariables(Tao, Vec, Vec)’
 PETSC_EXTERN PetscErrorCode TaoComputeDualVariables(Tao, Vec, Vec);
                             ^
/home/kaib/software/petsc-3.7.3/include/petsctao.h:191:68: warning: redundant redeclaration of ‘PetscErrorCode TaoSetOptionsPrefix(Tao, const char*)’ in same scope [-Wredundant-decls]
 PETSC_EXTERN PetscErrorCode TaoSetOptionsPrefix(Tao, const char p[]);
                                                                    ^
In file included from /home/kaib/software/petsc-3.7.3/include/petsc.h:27:0,
                 from /home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.cpp:27:
/home/kaib/software/petsc-3.7.3/include/petsctao.h:104:29: note: previous declaration of ‘PetscErrorCode TaoSetOptionsPrefix(Tao, const char*)’
 PETSC_EXTERN PetscErrorCode TaoSetOptionsPrefix(Tao,const char []);
                             ^
/home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.cpp: In function ‘_p_Mat* Opm::{anonymous}::to_petsc_mat(int, int, const int*, const int*, const double*)’:
/home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.cpp:189:130: warning: cast from type ‘const double*’ to type ‘double*’ casts away qualifiers [-Wcast-qual]
         auto err = MatCreateSeqAIJWithArrays( PETSC_COMM_WORLD, size, size, const_cast<int*>(ia), const_cast<int*>(ja), (double*)sa, &A );
                                                                                                                                  ^
/home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.cpp: At global scope:
/home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.cpp:231:48: error: ‘parameter’ does not name a type
     LinearSolverPetsc::LinearSolverPetsc(const parameter::ParameterGroup& param)
                                                ^
/home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.cpp:231:73: error: expected unqualified-id before ‘&’ token
     LinearSolverPetsc::LinearSolverPetsc(const parameter::ParameterGroup& param)
                                                                         ^
/home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.cpp:231:73: error: expected ‘)’ before ‘&’ token
/home/kaib/OPM-master-test/debug/opm-core/opm/core/linalg/LinearSolverPetsc.cpp:231:75: error: expected initializer before ‘param’
     LinearSolverPetsc::LinearSolverPetsc(const parameter::ParameterGroup& param)
                                                                           ^
CMakeFiles/opmcore.dir/build.make:254: recipe for target 'CMakeFiles/opmcore.dir/opm/core/linalg/LinearSolverPetsc.cpp.o' failed
make[2]: *** [CMakeFiles/opmcore.dir/opm/core/linalg/LinearSolverPetsc.cpp.o] Error 1
make[2]: Leaving directory '/home/kaib/OPM-master-test/debug/opm-core-build'
CMakeFiles/Makefile2:710: recipe for target 'CMakeFiles/opmcore.dir/all' failed
make[1]: *** [CMakeFiles/opmcore.dir/all] Error 2
make[1]: Leaving directory '/home/kaib/OPM-master-test/debug/opm-core-build'
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
GitPaean commented 7 years ago

I think we just need to remove parameter::.

GitPaean commented 7 years ago

closed by #1167 .