Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tools] memory_test_crosscorrelate fails with mkl #764

Open
junghans opened this issue Jul 1, 2020 · 7 comments
Open

[tools] memory_test_crosscorrelate fails with mkl #764

junghans opened this issue Jul 1, 2020 · 7 comments
Assignees
Labels

Comments

@junghans
Copy link
Member

junghans commented Jul 1, 2020

see votca/tools#267 (comment) for details

@JensWehner
Copy link
Member

I would just disable the tests

@junghans
Copy link
Member Author

junghans commented Jul 1, 2020

We excluded them for now in votca/tools@e553a43, but we could also disable them completely.

@junghans
Copy link
Member Author

junghans commented Jul 2, 2020

@JoshuaSBrown any opinion?

The full backtrace is:

==11438== Memcheck, a memory error detector
==11438== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==11438== Using Valgrind-3.16.0 and LibVEX; rerun with -h for copyright info
==11438== Command: /__w/tools/tools/builddir/tools/src/tests/unit_test_crosscorrelate
==11438== 
==11438== Syscall param sched_setaffinity(mask) points to unaddressable byte(s)
==11438==    at 0xC9571BD: syscall (in /usr/lib64/libc-2.30.so)
==11438==    by 0xC02153C: __kmp_affinity_determine_capable (z_Linux_util.cpp:189)
==11438==    by 0xBFC28B2: __kmp_env_initialize(char const*) (kmp_settings.cpp:5747)
==11438==    by 0xBFA9B8B: __kmp_do_serial_initialize (kmp_runtime.cpp:7093)
==11438==    by 0xBFA9B8B: __kmp_do_middle_initialize (kmp_runtime.cpp:7236)
==11438==    by 0xBFA9B8B: __kmp_middle_initialize (kmp_runtime.cpp:7345)
==11438==    by 0xBF873D1: omp_get_num_procs@@VERSION (kmp_ftn_entry.h:616)
==11438==    by 0x9B8F8ED: mkl_serv_get_dynamic (in /opt/intel/compilers_and_libraries_2020.1.217/linux/mkl/lib/intel64_lin/libmkl_intel_thread.so)
==11438==    by 0xE28723D: static_dfti_commit (in /opt/intel/compilers_and_libraries_2020.1.217/linux/mkl/lib/intel64_lin/libmkl_avx2.so)
==11438==    by 0x825B17F: DftiCommitDescriptor (in /opt/intel/compilers_and_libraries_2020.1.217/linux/mkl/lib/intel64_lin/libmkl_core.so)
==11438==    by 0x947013B: fftw_plan_guru64_dft_r2c (in /opt/intel/compilers_and_libraries_2020.1.217/linux/mkl/lib/intel64_lin/libmkl_intel_lp64.so)
==11438==    by 0x946EFCA: fftw_plan_dft_r2c (in /opt/intel/compilers_and_libraries_2020.1.217/linux/mkl/lib/intel64_lin/libmkl_intel_lp64.so)
==11438==    by 0x946F00A: fftw_plan_dft_r2c_1d (in /opt/intel/compilers_and_libraries_2020.1.217/linux/mkl/lib/intel64_lin/libmkl_intel_lp64.so)
==11438==    by 0x4894410: void Eigen::FFT<double, Eigen::default_fft_impl<double> >::fwd<Eigen::Map<Eigen::Matrix<double, -1, 1, 0, -1, 1>, 0, Eigen::Stride<0, 0> >, Eigen::Matrix<std::complex<double>, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<std::complex<double>, -1, 1, 0, -1, 1> >&, Eigen::MatrixBase<Eigen::Map<Eigen::Matrix<double, -1, 1, 0, -1, 1>, 0, Eigen::Stride<0, 0> > > const&, long) (in /__w/tools/tools/builddir/tools/src/libtools/libvotca_tools.so.7)
==11438==    by 0x4893CA7: votca::tools::CrossCorrelate::AutoCorrelate(votca::tools::DataCollection<double>::selection&) (in /__w/tools/tools/builddir/tools/src/libtools/libvotca_tools.so.7)
==11438==    by 0x4043E3: crosscorrelate_test::crosscorrelate::test_method() (in /__w/tools/tools/builddir/tools/src/tests/unit_test_crosscorrelate)
==11438==    by 0x403D64: crosscorrelate_test::crosscorrelate_invoker() (in /__w/tools/tools/builddir/tools/src/tests/unit_test_crosscorrelate)
==11438==    by 0x494A501: ??? (in /usr/lib64/libboost_unit_test_framework.so.1.69.0)
==11438==    by 0x494956C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in /usr/lib64/libboost_unit_test_framework.so.1.69.0)
==11438==    by 0x49495F7: boost::execution_monitor::execute(boost::function<int ()> const&) (in /usr/lib64/libboost_unit_test_framework.so.1.69.0)
==11438==    by 0x49496CD: boost::execution_monitor::vexecute(boost::function<void ()> const&) (in /usr/lib64/libboost_unit_test_framework.so.1.69.0)
==11438==    by 0x497391E: boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned int) (in /usr/lib64/libboost_unit_test_framework.so.1.69.0)
==11438==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==11438== 

I am a bit confused why fftw_plan_dft_r2c_1d is coming from libmkl_intel_lp64.so and not libfftw3.so.

@junghans
Copy link
Member Author

junghans commented Jul 2, 2020

I can reproduce this locally in side the votca/buildenv:intel container.

docker run -it votca/buildenv:intel /bin/bash
git clone --recursive https://github.com/votca/votca
cd votca
cmake -B build -DENABLE_TESTING=ON
cd build
make
ctest -V -R  memory_test_crosscorrelate

@JensWehner
Copy link
Member

yes that mkl thing is weird. Somehow the eigen interface seems to work with the mkl fftw. The unit test for correlate does not fail. it seems that the fftw and mkl interface for fft are the same. Really weird.

@junghans
Copy link
Member Author

junghans commented Jul 3, 2020

Yeah, mkl has an internal fftw implementation, so there are duplicated symbols.

@junghans
Copy link
Member Author

junghans commented Jul 5, 2020

Revert 314aa1e when issue was found.

@junghans junghans transferred this issue from votca/tools Sep 26, 2021
@junghans junghans changed the title memory_test_crosscorrelate fails with mkl [tools] memory_test_crosscorrelate fails with mkl Sep 26, 2021
@junghans junghans added the tools label Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants