Now I don't call static void delete_context() { initialized_.clear(); contexts_.clear(); current_context_id_ = 0; } in my class destructor, but in an outer class. The workflow runs like this: 1. construct b 2. run b (use viennacl::linalg::solve()) 3. destruct b 4. construct c 5. run c (use viennacl::linalg::solve()) 6. destruct c ... 7. delete_context() This temporarily solves my crash issue, though I have not figured out the crash reason.
I found that the error message in crash point is ViennaCL: Could not find program 'float_vector' So after I delete the contexts in b, some programs are deleted? But I set the context in c and switched to that context. Theoretically, all programs should be recompiled.
I found that the error message in crash point is ViennaCL: Could not find program 'float_vector' So after I delete the contexts in b, some programs are deleted? But I set the context in c and switched to that context.
I found that the error message in crash point is ViennaCL: Could not find program 'float_vector' So after I delete the contexts in a, some programs are deleted? But I set the context in b and switched to that context.
I found that the error message in crash point is ViennaCL: Could not find program 'float_vector'
I create cl_context and pass it to viennacl. Then I ran kernels both in my program and math function in viennacl. When I release this context, how could I perfectly relase all resources of viennacl related to this context?
This issue is very strange. It only occurs when I embed the codes to software. Strangely when I run my console program, it won't crash. The software don't use ViennaCL except for this piece of code. Theoretically speaking, it should be same when I run console or the software run the code. And I can't debug the software since I don't have source code. That's the reason why I can't really locate the issue... One thing reproduces the issue is clearing contexts_ in backend.hpp But if I don't clear the...
Hi. After adding static void delete_context() { initialized_.clear(); contexts_.clear(); current_context_id_ = 0; } in backend.hpp, and the program run this way: 1. construct b 2. run b (use viennacl::linalg::solve()) 3. destruct b 4. construct c 5. run c (use viennacl::linalg::solve()) 6. destruct c Sadly I found that program crashes when running to the viennacl::linalg::solve() function in Step 5. But if I don't use delete_context() in the destructor of b (step 3), it won't crash. It's interesting...