Topic: poofem-2.3 build fails with PETSC3.X.X
I am facing errors while trying to build parallel version of oofem (poofem).
error#1: oofem + petsc 3.5.X (i guess due to versioning of petsc)
error#2: oofem + petsc 3.4.X / 3.3.X / 3.2.X / 3.1.X
any help/hint (which helps me to build poofem) regarding any of these issues will be very useful.
*********************************************ERROR 1********************************************************
I have CentOS6.5 and following libraries are not at standard path,
all of them have been installed at custom location:-
PETSC-3.5.4
Python-3.4.2
oofem-2.3 (http://www.oofem.org/cgi-bin/OOFEM/down … em-2.3.zip)
ckit (http://mech.fsv.cvut.cz/software/Ckit.tgz &&)
elixir (http://mech.fsv.cvut.cz/software/Elixir.tgz)
MPICH
IML
now from OOFEMROOT(oofem2.3)'s build directory i configure in this way:
PETSC_DIR=/root/Downloads/petsc-3.5.4 cmake -DPYTHON_EXECUTABLE=/root/Downloads/PYTHON/bin/python3 -DPYTHON_INCLUDE_DIR=/root/Downloads/PYTHON/include/ -DCMAKE_INSTALL_PREFIX:PATH=/root/Downloads/OOFEM/OOFEM/ -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_CXX_FLAGS="-fPIC" -DUSE_IML="ON" -DIML_DIR=/opt/user1/user1_Installed/Application_Dependencies/include/ -DCKIT_DIR=/opt/user1/user1_Installed/Application_Dependencies/ -DELIXIR_DIR=/opt/user1/user1_Installed/Application_Dependencies/ -DUSE_PARALLEL="ON" -DUSE_PETSC="ON" -DMY_PETSC_DIR=/root/Downloads/petsc-3.5.4 -DMY_PETSC_ARCH=x86_64 ..
Configure log is:
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- Check for working C compiler: /root/Downloads/MPICH3/bin/mpicc
-- Check for working C compiler: /root/Downloads/MPICH3/bin/mpicc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /root/Downloads/MPICH3/bin/mpicxx
-- Check for working CXX compiler: /root/Downloads/MPICH3/bin/mpicxx -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.23")
-- checking for module 'PETSc'
-- found PETSc, version 3.5.0
-- Found MPI_C: /root/Downloads/MPICH3/lib/libmpi.so
-- Found MPI_CXX: /root/Downloads/MPICH3/lib/libmpicxx.so;/root/Downloads/MPICH3/lib/libmpi.so
-- Looking for C++ include iml/cg.h
-- Looking for C++ include iml/cg.h - found
-- Looking for C++ include iml/gmres.h
-- Looking for C++ include iml/gmres.h - found
-- Found PythonInterp: /root/Downloads/PYTHON/bin/python3 (found suitable version "3.4.2", minimum required is "2.7")
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - found
-- Looking for include file time.h
-- Looking for include file time.h - found
-- Looking for include file strings.h
-- Looking for include file strings.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file execinfo.h
-- Looking for include file execinfo.h - found
-- Looking for strncasecmp
-- Looking for strncasecmp - found
-- Looking for access
-- Looking for access - found
-- Looking for cbrt
-- Looking for cbrt - found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for M_PI
-- Looking for M_PI - found
-- Looking for M_LN2
-- Looking for M_LN2 - found
-- Performing Test HAVE_MACRO_VA_ARGS
-- Performing Test HAVE_MACRO_VA_ARGS - Success
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Found Doxygen: /usr/bin/doxygen (found version "1.6.1")
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
PYTHON_INCLUDE_DIR
-- Build files have been written to: /root/Downloads/OOFEM/oofem-2.3/build
configuration was success , but while making i get:
[ 75%] Building CXX object src/oofemlib/CMakeFiles/core.dir/calmls.C.o
[ 75%] Building CXX object src/oofemlib/CMakeFiles/core.dir/petscsolver.C.o
/root/Downloads/petsc-3.5.4/include/petscksp.h: In member function ‘oofem::NM_Status oofem::PetscSolver::petsc_solve(oofem::PetscSparseMtrx*, _p_Vec*, _p_Vec*)’:
/root/Downloads/petsc-3.5.4/include/petscksp.h:260: error: too many arguments to function ‘PetscErrorCode KSPSetOperators(_p_KSP*, _p_Mat*, _p_Mat*)’
/root/Downloads/OOFEM/oofem-2.3/src/oofemlib/petscsolver.C:142: error: at this point in file
/root/Downloads/petsc-3.5.4/include/petscksp.h:260: error: too many arguments to function ‘PetscErrorCode KSPSetOperators(_p_KSP*, _p_Mat*, _p_Mat*)’
/root/Downloads/OOFEM/oofem-2.3/src/oofemlib/petscsolver.C:145: error: at this point in file
/root/Downloads/OOFEM/oofem-2.3/src/oofemlib/petscsolver.C: At global scope:
/root/Downloads/OOFEM/oofem-2.3/src/oofemlib/petscsolver.C:48: warning: ‘oofem::__dummy_PetscSolver’ defined but not used
make[2]: *** [src/oofemlib/CMakeFiles/core.dir/petscsolver.C.o] Error 1
make[1]: *** [src/oofemlib/CMakeFiles/core.dir/all] Error 2
make: *** [all] Error 2
Since problem seems to be with PETSC-3.5.4 , so i downloaded PETSC-3.5.0 & updated MY_PETSC_DIR accordingly , but i am getting same error
*************************************************** ERROR 2 *****************************************************************
so i again reverted to PETSC- 3.4.5 via -DMY_PETSC_DIR=/root/Downloads/petsc-3.4.5
but in this case my configure step fails as:
PETSC_DIR=/root/Downloads/petsc-3.4.5 cmake -DPYTHON_EXECUTABLE=/root/Downloads/PYTHON/bin/python3 -DPYTHON_INCLUDE_DIR=/root/Downloads/PYTHON/include/ -DCMAKE_INSTALL_PREFIX:PATH=/root/Downloads/OOFEM/OOFEM/ -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_CXX_FLAGS="-fPIC" -DUSE_IML="ON" -DIML_DIR=/opt/user1/user1_Installed/Application_Dependencies/include/ -DCKIT_DIR=/opt/user1/user1_Installed/Application_Dependencies/ -DELIXIR_DIR=/opt/user1/user1_Installed/Application_Dependencies/ -DUSE_PARALLEL="ON" -DUSE_PETSC="ON" -DMY_PETSC_DIR=/root/Downloads/petsc-3.4.5 -DMY_PETSC_ARCH=x86_64 ..
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- Check for working C compiler: /root/Downloads/MPICH3/bin/mpicc
-- Check for working C compiler: /root/Downloads/MPICH3/bin/mpicc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /root/Downloads/MPICH3/bin/mpicxx
-- Check for working CXX compiler: /root/Downloads/MPICH3/bin/mpicxx -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.23")
-- checking for module 'PETSc'
-- package 'PETSc' not found
CMake Error at /opt/user1/user1_Installed/Application_Dependencies/share/cmake-3.0/Modules/FindPkgConfig.cmake:341 (message):
A required package was not found
Call Stack (most recent call first):
/opt/user1/user1_Installed/Application_Dependencies/share/cmake-3.0/Modules/FindPkgConfig.cmake:395 (_pkg_check_modules_internal)
CMakeLists.txt:302 (pkg_check_modules)
-- Found MPI_C: /root/Downloads/MPICH3/lib/libmpi.so
-- Found MPI_CXX: /root/Downloads/MPICH3/lib/libmpicxx.so;/root/Downloads/MPICH3/lib/libmpi.so
-- Looking for C++ include iml/cg.h
-- Looking for C++ include iml/cg.h - found
-- Looking for C++ include iml/gmres.h
-- Looking for C++ include iml/gmres.h - found
-- Found PythonInterp: /root/Downloads/PYTHON/bin/python3 (found suitable version "3.4.2", minimum required is "2.7")
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - found
-- Looking for include file time.h
-- Looking for include file time.h - found
-- Looking for include file strings.h
-- Looking for include file strings.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file execinfo.h
-- Looking for include file execinfo.h - found
-- Looking for strncasecmp
-- Looking for strncasecmp - found
-- Looking for access
-- Looking for access - found
-- Looking for cbrt
-- Looking for cbrt - found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for M_PI
-- Looking for M_PI - found
-- Looking for M_LN2
-- Looking for M_LN2 - found
-- Performing Test HAVE_MACRO_VA_ARGS
-- Performing Test HAVE_MACRO_VA_ARGS - Success
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Found Doxygen: /usr/bin/doxygen (found version "1.6.1")
-- Configuring incomplete, errors occurred!
See also "/root/Downloads/OOFEM/oofem-2.3/build/CMakeFiles/CMakeOutput.log".
I have attached CMakeOutput.log file for reference. Please note that MY_PETSC_DIR points to source package , also i tried setting MY_PETSC_DIR to the PETSC 3.X install( bin conf include lib share ) directory, but configure error remains same.
i have tried further reverting back to previous versions (3.4/3.3/3.2/3.1), but the this configure error remain same.