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

UBSAN detects division by zero in impurity_trace.cpp:417 #123

Open
Wentzell opened this issue Oct 11, 2019 · 1 comment
Open

UBSAN detects division by zero in impurity_trace.cpp:417 #123

Wentzell opened this issue Oct 11, 2019 · 1 comment
Assignees

Comments

@Wentzell
Copy link
Member

During Warmup of the Py_histograms test UBSAN reports a division by zero in c++/triqs_cthyb/impurity_trace.cpp:417 with backtrace

cthyb/c++/triqs_cthyb/impurity_trace.cpp:417:66: runtime error: division by zero
    #0 0x7fc53ea88567 in triqs_cthyb::impurity_trace::compute(double, double) /mnt/home/wentzell/Dropbox/Coding/cthyb/c++/triqs_cthyb/impurity_trace.cpp:417:66
    #1 0x7fc53ed0330a in triqs_cthyb::move_insert_c_cdag::attempt() /mnt/home/wentzell/Dropbox/Coding/cthyb/c++/triqs_cthyb/moves/insert.cpp:108:74
    #2 0x7fc53e97f9e7 in triqs::mc_tools::move_set<double>::attempt() /mnt/home/wentzell/opt/triqs_2.2.x_san/include/triqs/mc_tools/./mc_move_set.hpp:201:42
    #3 0x7fc53e97f9e7 in triqs::mc_tools::move_set<double>::attempt() /mnt/home/wentzell/opt/triqs_2.2.x_san/include/triqs/mc_tools/./mc_move_set.hpp:201:42
    #4 0x7fc53ea6faa0 in triqs::mc_tools::mc_generic<double>::run(unsigned long, unsigned long, std::__1::function<bool ()>, bool) /mnt/home/wentzell/opt/triqs_2.2.x_san/include/triqs/mc_tools/mc_generic.hpp:227:31
    #5 0x7fc53ea6f09c in triqs::mc_tools::mc_generic<double>::warmup(unsigned long, long, std::__1::function<bool ()>) /mnt/home/wentzell/opt/triqs_2.2.x_san/include/triqs/mc_tools/mc_generic.hpp:131:14
    #6 0x7fc53e82831d in triqs::mc_tools::mc_generic<double>::warmup_and_accumulate(unsigned long, unsigned long, unsigned long, std::__1::function<bool ()>) /mnt/home/wentzell/opt/triqs_2.2.x_san/include/triqs/mc_tools/mc_generic.hpp:180:20
    #7 0x7fc53e80d9fc in triqs_cthyb::solver_core::solve(triqs_cthyb::solve_parameters_t const&) /mnt/home/wentzell/Dropbox/Coding/cthyb/c++/triqs_cthyb/solver_core.cpp:403:12
    #8 0x7fc53e570129 in SolverCore_solve(_object*, _object*, _object*) /mnt/home/wentzell/Dropbox/Coding/cthyb/build/python/triqs_cthyb/solver_core_wrap.cxx:839:17

@parcollet This is your line of code, please review.

@Wentzell
Copy link
Member Author

Cf.

histo->trace_first_over_sec_term << real(trace_partial / first_term);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants