toolset version: mlpack 2.1.0, armadillo 7.500.0, openblas 0.2.19, boost 1.62.0
platform: visual studio 2015 win64
Code:
using namespace mlpack;
int main(int argc, char ** argv)
{
Timer::Start("some_timer");
Timer::Stop("some_timer");
return 0;
}
Exception:
0x00007FFAD9097788 处(位于 VTM.exe 中)引发的异常: Microsoft C++ 异常: std::bad_alloc,位于内存位置 0x000000EFE24FF320 处。
0x00007FFAD9097788 处(位于 VTM.exe 中)引发的异常: Microsoft C++ 异常: std::bad_alloc,位于内存位置 0x000000EFE24FCD30 处。
0x00007FFAD9097788 处(位于 VTM.exe 中)引发的异常: Microsoft C++ 异常: [rethrow],位于内存位置 0x0000000000000000 处。
0x00007FFAD9097788 处(位于 VTM.exe 中)引发的异常: Microsoft C++ 异常: std::bad_alloc,位于内存位置 0x000000EFE24FCD30 处。
0x00007FFAD9097788 处(位于 VTM.exe 中)引发的异常: Microsoft C++ 异常: [rethrow],位于内存位置 0x0000000000000000 处。
0x00007FFAD9097788 处(位于 VTM.exe 中)引发的异常: Microsoft C++ 异常: std::bad_alloc,位于内存位置 0x000000EFE24FCD30 处。
0x00007FFAD9097788 处(位于 VTM.exe 中)有未经处理的异常: Microsoft C++ 异常: std::bad_alloc,位于内存位置 0x000000EFE24FCD30 处。
Call Stack:
KernelBase.dll!00007ffad9097788() 未知
vcruntime140.dll!00007ffacfb52a10() 未知
ntdll.dll!00007ffadc5f8f23() 未知
mlpack.dll!std::_Tree_comp_alloc
mlpack.dll!std::map
mlpack.dll!mlpack::Timers::StartTimer(const std::basic_string
VTM.exe!main(int argc, char * * argv) 行 7 C++
[外部代码]
Hi there,
I can't reproduce this because I don't have a Windows machine. I have an idea, but I don't think it will work.
Can you change line 130 of src/mlpack/core/util/timers.cpp from
if ((timerState[timerName] == 1) && (timerName != "total_time"))
to
if ((timerState.count(timerName) > 0) && (timerState[timerName] == 1) && (timerName != "total_time"))
and see if anything is different?
Thanks a lot! Finally, I find that is my fault. I have linked the Release library in Debug mode by mistaken. I will close this issue. Thanks again for you help.
Great, glad you got it figured out! :)
Most helpful comment
Thanks a lot! Finally, I find that is my fault. I have linked the Release library in Debug mode by mistaken. I will close this issue. Thanks again for you help.