Hi all,
I am working on a threaded code for numerical computations.
I am getting from time to time the message "Cannot convert negative values" and my program stops running. It doesn't crash.
Have used Valgrind to check memory trouble, and it show no errors.
Have tried to reduce datasets and pinpoint where the trouble is. But since the error is periodical I am not able to pinpoint it.
I googled the error message but nothing relevant came up.
Anyone seen this error message before?
Any hints? Ideas on how to proceed?
Sounds like you might have a data race. Make sure that you synchronize the interaction between the threads properly. If you're using GCC or Clang you can compile your code with -fsanitize=thread which will help you find data races.