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

runParallel() on Bela #20

Open
mzed opened this issue Jul 8, 2022 · 3 comments
Open

runParallel() on Bela #20

mzed opened this issue Jul 8, 2022 · 3 comments

Comments

@mzed
Copy link
Owner

mzed commented Jul 8, 2022

Jake Armitage reported the following:

root@bela:~/RapidLib# ./rapidLibTest
----- Bayes test passed.
----- DTW empty test passed.
----- DTW test passed.
----- Multilayer tests skipped.
before: 20.14
----- Regression run exceptions passed.
----- Regression train exceptions passed.
knn before: 20
error: bad input size: 0
error: bad input size: 6
----- KNN run exceptions passed.
----- KNN get/set K passed.
----- What is this test?
----- Single thread DTW tests passed.
19.3254
0
rapidLibTest: /root/RapidLib/test/rapidLibTest.cpp:402: int main(int, const char **): Assertion `myDTW.runParallel(seriesTwo) == "second series"' failed.
Aborted
@mzed
Copy link
Owner Author

mzed commented Jul 8, 2022

This is failing on the second test of runParallel(). I see I've commented out another test on line 411, which makes me think this method needs some attention in general.

@jarmitage
Copy link

With

assert(myDTW.runParallel(seriesTwo) == "second series");
commented out:

root@bela:~/RapidLib# ./rapidLibTest
----- Bayes test passed.
----- DTW empty test passed.
----- DTW test passed.
----- Multilayer tests skipped.
before: 20.14
----- Regression run exceptions passed.
----- Regression train exceptions passed.
knn before: 20
error: bad input size: 0
error: bad input size: 6
----- KNN run exceptions passed.
----- KNN get/set K passed.
----- What is this test?
----- Single thread DTW tests passed.
19.3254
0
----- Parallel DTW tests passed.
0
1.79769e+308
----- DTW single label passed.
----- DTW parallel single label CRASHES!!!!.
----- DTW stats pass .
mincost 0.5
maxcost 1.58114

@mzed
Copy link
Owner Author

mzed commented Jul 8, 2022

That's good news, I guess.

This might be a challenge to fix. It seems like threading isn't working properly, but I don't have an easy way to reproduce the problem here. I wonder if there's a race condition that's being exposed by the specifics of your setup. I'd be curious to know what myDTW.runParallel(seriesTwo) is returning in the line that was commented out. I don't have a Bela. Is there any way I could borrow one to do some debugging?

Apart from parallel DTW, things look fine. So, if you don't need that then you can probably ignore the problem. Honestly, I haven't been too excited by DTW for real-time control. There are probably better series classification algorithms for many musical use cases.

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