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

Fix #3605, Port KernelMachine to OpenMP #3738

Closed
wants to merge 1 commit into from
Closed

Fix #3605, Port KernelMachine to OpenMP #3738

wants to merge 1 commit into from

Conversation

iRmantou
Copy link

No description provided.

@karlnapf
Copy link
Member

A unit test for single a multi threads of a kernel machine would help

@iRmantou
Copy link
Author

@karlnapf I see this PR has passed Travis. Travis CI can't check this , isn't it ? use ./bin/shogun-unit-test?

@karlnapf
Copy link
Member

Yeah travis only checks single threaded.
Can you at least memcheck this locally using multiple threads?
If that is ok, we can merge

@iRmantou
Copy link
Author

@karlnapf there is no unit test for KernelMachine in tests/unit/machine, isn't it? So I need to create it by myself ?

@iRmantou
Copy link
Author

Can I use LibSVR_unittest which inherited from KernelMachine to test KernelMachine ?

@karlnapf
Copy link
Member

Yes.
Just run it locally with single thread and multiple ones and make sure your patch didn't change the output/result

@iRmantou
Copy link
Author

result

@karlnapf Is this right?

@karlnapf
Copy link
Member

karlnapf commented Mar 26, 2017

Almost, run this with a memory checker that checks thread safety

http://valgrind.org/docs/manual/hg-manual.html

Oh and please check whether the unit test uses the code you changed (i.e. runs in openmp parallel)

@iRmantou
Copy link
Author

@karlnapf I cleaned the whole build directory and recompiled it with my code, so I am sure the unit test use the changed code, then I used valgrind , and there is no error message. The results are as follows
varf
Is there anything I might have missed or need to note?

@karlnapf
Copy link
Member

What I meant is:
Check the unit test code. Does it run things single AND multithreaded.
Also, tell valgrind to use the helgrind tool, see above readme

@iRmantou
Copy link
Author

I have set export OMP_NUM_THREADS before I run the unit test.
What I should check or set in the unit test code like : LibSVR_unittest.cc to make sure it run things with multithreaded and single?

@karlnapf
Copy link
Member

It doesnt really matter how you do it, the point is that you need to be aware what you are checking there. And that needs things to be explicitly executed single and multithreaded

@karlnapf
Copy link
Member

Any updates here?

@stale
Copy link

stale bot commented Feb 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 26, 2020
@stale
Copy link

stale bot commented Mar 4, 2020

This issue is now being closed due to a lack of activity. Feel free to reopen it.

@stale stale bot closed this Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants