This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Eigen error about Openmp

Tags: None
(comma "," separated)
rainlord
Registered Member
Posts
1
Karma
0

Eigen error about Openmp

Wed Oct 06, 2021 12:26 pm
My program use ceres library ,the ceres library was compiled with OPENMP, and I set the Eigen marco as fellow:
ADD_DEFINITIONS(-DEIGEN_MALLOC_ALREADY_ALIGNED=0);because of the eigen alignment problem.
But when my program run at ceres fuction of solve(),It will abort , the stack trace as fellow:
Is there anyone can tell where am i wrong? thanks alot!!!
*** Aborted at 1633520985 (unix time) try "date -d @1633520985" if you are using GNU date ***
PC: @ 0x0 (unknown)
*** SIGSEGV (@0x0) received by PID 1691 (TID 0x7f609628f700) from PID 0; stack trace: ***
SvoInterface::stereoCallback()44444444
@ 0x7f60c6072f20 (unknown)
@ 0x55fa678b0755 Eigen::internal::gemm_pack_lhs<>::operator()()
@ 0x55fa678cf638 Eigen::internal::general_matrix_matrix_product<>::run()
@ 0x7f60c45ddffe svo::ceres_backend::SpeedAndBiasError::EvaluateWithMinimalJacobians()
@ 0x7f60bf8c16a5 ceres::internal::ResidualBlock::Evaluate()
@ 0x7f60bf8e3991 _ZN5ceres8internal16ProgramEvaluatorINS0_21BlockEvaluatePreparerENS0_19BlockJacobianWriterENS0_21NullJacobianFinalizerEE8EvaluateERKNS0_9Evaluator15EvaluateOptionsEPKdPdSC_SC_PNS0_12SparseMatrixE._omp_fn.2
@ 0x7f60bf3fbedf GOMP_parallel
@ 0x7f60bf8e542a ceres::internal::ProgramEvaluator<>::Evaluate()
@ 0x7f60bf8f81bd ceres::internal::TrustRegionMinimizer::EvaluateGradientAndJacobian()
@ 0x7f60bf8f8c52 ceres::internal::TrustRegionMinimizer::IterationZero()
@ 0x7f60bf8fd5b4 ceres::internal::TrustRegionMinimizer::Minimize()
@ 0x7f60bf8cf18d ceres::Solver::Solve()
@ 0x7f60bf8d0019 ceres::Solve()
@ 0x7f60c453fcc7 svo::Estimator::optimize()
@ 0x7f60c452bde5 svo::CeresBackendInterface::optimizationLoop()
@ 0x7f60c66fa6df (unknown)
@ 0x7f60c4d6a6db start_thread
@ 0x7f60c615588f clone

My cmakelist as fellow:
project(svo_ceres_backend)
cmake_minimum_required(VERSION 2.8.3)
find_package(catkin_simple REQUIRED)
catkin_simple(ALL_DEPS_REQUIRED)
include(SvoSetup)
ADD_DEFINITIONS(-DEIGEN_MALLOC_ALREADY_ALIGNED=0)
################################################################################
# generic setup (compiler flags, etc.)
#find_package(Glog REQUIRED)
include(cmake/glog.cmake)
include(cmake/PCL.cmake)
find_package(Ceres REQUIRED PATHS "/home/rainlord/git/ceres-solver-1.14.x/ceres_install/")
message("CERES_INCLUDE_DIRS:${CERES_INCLUDE_DIRS}")
set(GFLAGS_INCLUDE_DIRS "/usr/local/include/gflags")
set(GFLAGS_LIBRARIES "/usr/local/lib/libgflags.so.2.2")
# OpenMP
find_package(OpenMP QUIET)
if (OPENMP_FOUND)
add_definitions(-DUSE_OPENMP)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif ()
include_directories("/usr/include/eigen3/")
include_directories(${GLOG_INCLUDE_DIRS} ${CERES_INCLUDE_DIRS} ${GFLAGS_INCLUDE_DIRS} ${PCL_INCLUDE_DIRS})


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]