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

Invalid reads using intel compiler

Tags: None
(comma "," separated)
osurce
Registered Member
Posts
3
Karma
0

Invalid reads using intel compiler

Fri Feb 05, 2016 3:19 pm
This program
Code: Select all
#include <Eigen/Core>

#include <unsupported/Eigen/MatrixFunctions>

typedef Eigen::MatrixXcd matrixcd;

int main() {
   
    matrixcd a = matrixcd::Random(2, 2);
    matrixcd b = a.exp();
   
}


compiled using the intel compiler (inital release of the 2015 version, 20140723) with the - openmp flag, i.e.
Code: Select all
icc main.cpp -openmp -I/path/to/eigen

yields several invalid reads when run with valgrind.
The output starts like this:
Code: Select all
==9486== Invalid read of size 16
==9486==    at 0x51EC7A8: __intel_sse2_strlen (in /opt/intel/composer_xe_2015.0.090/compiler/lib/intel64/libiomp5.so)
==9486==    by 0x518E7C8: __kmp_env_get (kmp_environment.c:128)
==9486==    by 0x51A6670: __kmp_register_library_startup() (kmp_runtime.c:6176)
==9486==    by 0x51A7DB7: __kmp_do_serial_initialize() (kmp_runtime.c:6300)
==9486==    by 0x519D604: __kmp_get_global_thread_id_reg (kmp_runtime.c:278)
==9486==    by 0x517DEE5: __kmp_entry_thread (kmp.h:2888)
==9486==    by 0x517DEE5: __kmpc_bound_num_threads (kmp_csupport.c:169)
==9486==    by 0x40A333: void Eigen::internal::parallelize_gemm<true, Eigen::internal::gemm_functor<std::complex<double>, long, Eigen::internal::general_matrix_matrix_product<long, std::complex<double>, 0, false, std::complex<double>, 0, false, 0>, Eigen::Matrix<std::complex<double>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<double>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<double>, -1, -1, 0, -1, -1>, Eigen::internal::gemm_blocking_space<0, std::complex<double>, std::complex<double>, -1, -1, -1, 1, false> >, long>(Eigen::internal::gemm_functor<std::complex<double>, long, Eigen::internal::general_matrix_matrix_product<long, std::complex<double>, 0, false, std::complex<double>, 0, false, 0>, Eigen::Matrix<std::complex<double>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<double>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<double>, -1, -1, 0, -1, -1>, Eigen::internal::gemm_blocking_space<0, std::complex<double>, std::complex<double>, -1, -1, -1, 1, false> > const&, long, long, bool)


Any ideas ?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Those comes from the OpenMP runtime library, not Eigen. It is very likely that they are doing some low-level tricks confusing valgrind.

And of course, you are not the first to find those:
http://stackoverflow.com/questions/2874 ... -commercia
http://stackoverflow.com/questions/2833 ... emory-leak


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft