illegal memory access while training class-based LSTM on GPU
hi, all, I'm training class-based LM model with LSTM, using single machine and one gpu. While cntk running, it's 50% to crash with an illegal memory acess runtime_error, below are output log
[CALL STACK]
./lib/libcntkmath.so ( Microsoft::MSR::CNTK::DebugUtil::PrintCallStack() + 0xce ) [0x7fec45603dbe]
cntk ( void Microsoft::MSR::CNTK::ThrowFormatted<std::runtime_error>(char const*, ...) + 0xdd ) [0x42e89d]
./lib/libcntkmath.so ( + 0x284eeb) [0x7fec455c3eeb]
./lib/libcntkmath.so ( Microsoft::MSR::CNTK::GPUSparseMatrix<double>::MultiplyAndAdd(double, Microsoft::MSR::CNTK::GPUMatrix<double> const&, bool, Microsoft::MSR::CNTK::GPUSparseMatrix<double> const&, bool, Microsoft::MSR::CNTK::GPUSparseMatrix<double>&) + 0xc9c ) [0x7fec455e417c]
./lib/libcntkmath.so ( Microsoft::MSR::CNTK::Matrix<double>::MultiplyAndWeightedAdd(double, Microsoft::MSR::CNTK::Matrix<double> const&, bool, Microsoft::MSR::CNTK::Matrix<double> const&, bool, double, Microsoft::MSR::CNTK::Matrix<double>&) + 0x58b ) [0x7fec4550beeb]
cntk ( ) [0x5394d0]
cntk ( ) [0x4681ee]
cntk ( ) [0x61bcc9]
cntk ( ) [0x61e5e7]
cntk ( ) [0x6b87b0]
cntk ( ) [0x6bde3f]
cntk ( ) [0x6bfdf4]
cntk ( ) [0x6d67fc]
cntk ( ) [0x4aaaca]
cntk ( ) [0x428fd9]
cntk ( ) [0x429438]
cntk ( ) [0x41d528]
/lib64/libc.so.6 ( __libc_start_main + 0xf5 ) [0x7fec438cbb15]
cntk ( ) [0x421509]
CUDA failure 77: an illegal memory access was encountered ; GPU=1 ; hostname=? ; expr=cudaEventSynchronize(done)
[CALL STACK]
./lib/libcntkmath.so ( Microsoft::MSR::CNTK::DebugUtil::PrintCallStack() + 0xce ) [0x7fec45603dbe]
cntk ( void Microsoft::MSR::CNTK::ThrowFormatted<std::runtime_error>(char const*, ...) + 0xdd ) [0x42e89d]
./lib/libcntkmath.so ( + 0x284eeb) [0x7fec455c3eeb]
./lib/libcntkmath.so ( Microsoft::MSR::CNTK::GPUSparseMatrix<double>::ReleaseMemory() + 0x4d ) [0x7fec455d5ddd]
./lib/libcntkmath.so ( Microsoft::MSR::CNTK::GPUSparseMatrix<double>::~GPUSparseMatrix() + 0x17 ) [0x7fec455d5e37]
./lib/libcntkmath.so ( Microsoft::MSR::CNTK::Matrix<double>::Clear() + 0x5c ) [0x7fec454fea9c]
cntk ( std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() + 0x39 ) [0x439b39]
cntk ( ) [0x5f9a3d]
cntk ( std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() + 0x39 ) [0x439b39]
cntk ( ) [0x463694]
cntk ( ) [0x6063ef]
cntk ( ) [0x463b2e]
cntk ( std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() + 0x39 ) [0x439b39]
cntk ( ) [0x483118]
cntk ( ) [0x4834c1]
cntk ( std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() + 0x39 ) [0x439b39]
cntk ( ) [0x6cc578]
cntk ( ) [0x6d738c]
cntk ( ) [0x4aaaca]
cntk ( ) [0x428fd9]
cntk ( ) [0x429438]
cntk ( ) [0x41d528]
/lib64/libc.so.6 ( __libc_start_main + 0xf5 ) [0x7fec438cbb15]
cntk ( ) [0x421509]
CUDA failure 77: an illegal memory access was encountered ; GPU=1 ; hostname=? ; expr=cudaFree(m_pArray)
terminate called after throwing an instance of 'std::runtime_error'
what(): CUDA failure 77: an illegal memory access was encountered ; GPU=1 ; hostname=? ; expr=cudaFree(m_pArray)
./run.sh: line 2: 123027 Aborted cntk configFile=../config/rnn.config
some more informaiton my training data is PTB , the network is describe with NDL, below are detail configuration and ndl:
does anyone knows where and how to fix it? if possible, it's ok for myself to change source code and recompile, but I need some guidance thanks for any suggestion and help
HI, thank you for reporting this issue. We are still working on a way to reproduce this locally ourselves, so that we can give you enough guidance on how to workaround/fix this issue. We hope to get back to you in a few days.
@mradmila thanks very much and good luck
I'm not sure if this has been resolved, but it's been very old. Please try the latest 2.0 release and see if there are still issues. Feel free to open a new issue if needed. Thanks!