Doesn't compile with PETSc master
GetDP 2.7.0 doesn't compile together with the newest PETSc master, because there has been a change with the PetscOptions API in PETSc:
https://bitbucket.org/petsc/petsc/commits/13cf9f3a154671946d9fc1df5182efb9d0780d74
On that page it is possible to see how e.g. all the PETSc examples and such were changed due to the change in PetscOptions. I think that for most of the errors it amounts to just inserting "PETSC_NULL" as an additional argument.
The compile-time error message is:
[ 60%] Building CXX object CMakeFiles/getdp.dir/Legacy/LinAlg.cpp.o /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/GeoEntity.cpp: In function ‘void Geo_CreateEdgesOfElement(Geo_Element*)’: /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/GeoEntity.cpp:55:39: warning: ‘Nbr_Entities2’ may be used uninitialized in this function [-Wmaybe-uninitialized] CurrentGeoData->EdgesXNodes) ; ^ /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/GeoEntity.cpp: In function ‘void Geo_CreateFacetsOfElement(Geo_Element*)’: /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/GeoEntity.cpp:96:40: warning: ‘Nbr_Entities2’ may be used uninitialized in this function [-Wmaybe-uninitialized] CurrentGeoData->FacetsXEdges) ; ^ [ 61%] Building CXX object CMakeFiles/getdp.dir/Legacy/LinAlg_PETSC.cpp.o [ 62%] Building CXX object CMakeFiles/getdp.dir/Legacy/LinAlg_SPARSKIT.cpp.o [ 63%] Building CXX object CMakeFiles/getdp.dir/Legacy/SolvingAnalyse.cpp.o [ 64%] Building CXX object CMakeFiles/getdp.dir/Legacy/SolvingOperations.cpp.o /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/LinAlg_PETSC.cpp: In function ‘void LinAlg_InitializeSolver(int*, char***)’: /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/LinAlg_PETSC.cpp:100:63: error: cannot convert ‘char*’ to ‘PetscOptions {aka _n_PetscOptions*}’ for argument ‘2’ to ‘PetscErrorCode PetscOptionsInsertFile(MPI_Comm, PetscOptions, const char*, PetscBool)’ PetscOptionsInsertFile(MyComm, (argv)[i+1], PETSC_FALSE); ^ /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/LinAlg_PETSC.cpp: In function ‘void LinAlg_CreateMatrix(gMatrix, gSolver*, int, int)’: /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/LinAlg_PETSC.cpp:204:68: error: cannot convert ‘PetscInt* {aka int*}’ to ‘const char*’ for argument ‘3’ to ‘PetscErrorCode PetscOptionsGetInt(PetscOptions, const char*, const char*, PetscInt*, PetscBool*)’ PetscOptionsGetInt(PETSC_NULL, "-petsc_prealloc", &prealloc, &set); ^ /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/LinAlg_PETSC.cpp:205:78: error: cannot convert ‘PetscInt* {aka int*}’ to ‘const char*’ for argument ‘3’ to ‘PetscErrorCode PetscOptionsGetInt(PetscOptions, const char*, const char*, PetscInt*, PetscBool*)’ PetscOptionsGetInt(PETSC_NULL, "-petsc_prealloc_full", &prealloc_full, &set); ^ /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/LinAlg_PETSC.cpp: In function ‘void _solve(gMatrix*, gVector*, gSolver*, gVector*, int, int)’: /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/LinAlg_PETSC.cpp:1280:76: error: cannot convert ‘const char*’ to ‘PetscOptions {aka _n_PetscOptions*}’ for argument ‘1’ to ‘PetscErrorCode PetscOptionsSetValue(PetscOptions, const char*, const char*)’ _try(PetscOptionsSetValue("-pc_factor_nonzeros_along_diagonal", "1e-12")); ^ /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/LinAlg_PETSC.cpp: In function ‘void LinAlg_SetGlobalSolverOptions(const string&)’: /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/LinAlg_PETSC.cpp:1360:44: error: cannot convert ‘const char*’ to ‘PetscOptions {aka _n_PetscOptions*}’ for argument ‘1’ to ‘PetscErrorCode PetscOptionsInsertString(PetscOptions, const char*)’ _try(PetscOptionsInsertString(opt.c_str())); ^ /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/LinAlg_PETSC.cpp: In function ‘void _solveNL(gMatrix*, gVector*, gMatrix*, gVector*, gSolver*, gVector*, int, int)’: /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/LinAlg_PETSC.cpp:1466:69: error: cannot convert ‘PetscBool*’ to ‘const char*’ for argument ‘3’ to ‘PetscErrorCode PetscOptionsGetBool(PetscOptions, const char*, const char*, PetscBool*, PetscBool*)’ PetscOptionsGetTruth(PETSC_NULL, "-fd_jacobian", &fd_jacobian, 0); ^ /home/tmac/src/upstream/getdp-2.7.0-source/Legacy/LinAlg_PETSC.cpp:1467:61: error: cannot convert ‘PetscBool*’ to ‘const char*’ for argument ‘3’ to ‘PetscErrorCode PetscOptionsGetBool(PetscOptions, const char*, const char*, PetscBool*, PetscBool*)’ PetscOptionsGetTruth(PETSC_NULL, "-snes_fd", &snes_fd, 0); ^ CMakeFiles/getdp.dir/build.make:1598: recipe for target 'CMakeFiles/getdp.dir/Legacy/LinAlg_PETSC.cpp.o' failed