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

UCS/API event_set #3426

Merged
merged 1 commit into from
May 2, 2019
Merged

Conversation

hiroyuki-sato
Copy link
Contributor

What

This PR is aim for porting OpenUCX to macOS.
This PR a request for review design API.

Why ?

macOS doesn't exist epoll function. Instead, it needs to use kqueue.

How ?

I'm seperating epoll codes into ucs/sys/event_set.{c,h}.

@yosefe Could you review this?

@swx-jenkins1
Copy link

Can one of the admins verify this patch?

@shamisp shamisp added Portability WIP-DNM Work in progress / Do not review labels Mar 28, 2019
@shamisp
Copy link
Contributor

shamisp commented Mar 28, 2019

ok to test

@swx-jenkins1
Copy link

Test PASSed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/6771/ for details.

@mellanox-github
Copy link
Contributor

Test PASSed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/9560/ for details (Mellanox internal link).

@shamisp shamisp requested review from shamisp and yosefe March 28, 2019 20:03
src/ucs/sys/event_set.c Show resolved Hide resolved
src/ucs/sys/event_set.c Show resolved Hide resolved
src/ucs/sys/event_set.c Outdated Show resolved Hide resolved
src/ucs/sys/event_set.c Outdated Show resolved Hide resolved
src/ucs/sys/event_set.c Outdated Show resolved Hide resolved
src/ucs/sys/event_set.h Show resolved Hide resolved
src/ucs/sys/event_set.h Show resolved Hide resolved
src/ucs/sys/event_set.h Outdated Show resolved Hide resolved
src/ucs/sys/event_set.h Outdated Show resolved Hide resolved
src/ucs/sys/event_set.h Show resolved Hide resolved
@yosefe
Copy link
Contributor

yosefe commented Mar 31, 2019

also, need to add unit test for it, and add it to Makefile

@hiroyuki-sato
Copy link
Contributor Author

Hello, @yosefe

Thank you for the comment.
I fixed several comments. I have some questions. I'll post later.
Is ucx/test/gtest/ucs/test_* unit test file?
And Is it required to write in C++?

Best regards.

@yosefe
Copy link
Contributor

yosefe commented Apr 1, 2019

@hiroyuki-sato yes, these are the unit test files, they have to be i C++ because it uses google test infrastructure. i'd suggest to copy/paste from another test for start, ucs tests are pretty simple

@swx-jenkins1
Copy link

Test FAILed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/6796/ for details.

@hiroyuki-sato
Copy link
Contributor Author

Hello, @yosefe

Thanks!, I added a unit test skeleton and run test.
hiroyuki-sato@e40cf72

I'll add test cases.

GTEST_FILTER='*test_event_set*' make -C test/gtest test

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/9588/ for details (Mellanox internal link).

@swx-jenkins1
Copy link

Test PASSed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/6800/ for details.

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/9591/ for details (Mellanox internal link).

Copy link
Contributor Author

@hiroyuki-sato hiroyuki-sato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, @yosefe

Could you review those commit?

src/ucs/sys/event_set.c Show resolved Hide resolved
src/ucs/sys/event_set.h Outdated Show resolved Hide resolved
test/gtest/ucs/test_event_set.cc Outdated Show resolved Hide resolved
test/gtest/ucs/test_event_set.cc Show resolved Hide resolved
@swx-jenkins1
Copy link

Test FAILed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/6942/ for details.

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/9754/ for details (Mellanox internal link).

src/ucs/sys/event_set.c Outdated Show resolved Hide resolved
src/ucs/sys/event_set.c Outdated Show resolved Hide resolved
src/ucs/sys/event_set.c Outdated Show resolved Hide resolved
src/ucs/sys/event_set.c Outdated Show resolved Hide resolved
src/ucs/sys/event_set.c Outdated Show resolved Hide resolved
src/ucs/sys/event_set.h Outdated Show resolved Hide resolved
test/gtest/ucs/test_event_set.cc Outdated Show resolved Hide resolved
test/gtest/ucs/test_event_set.cc Outdated Show resolved Hide resolved
test/gtest/ucs/test_event_set.cc Outdated Show resolved Hide resolved
test/gtest/ucs/test_event_set.cc Outdated Show resolved Hide resolved
@hiroyuki-sato
Copy link
Contributor Author

Hello, @yosefe Thank you for the comment. I'll fix it.

@hiroyuki-sato
Copy link
Contributor Author

Hello, @yosefe and @shamisp.
I changed codes. Please take a look when you have time.

Currently, I created two tests.

  • event read test
  • event timeout test.

Do we need to create a write(EPOLLOUT) test?
If so, I think it needs to use two thread. One is event writer, the other is event waiter.
Do I need to use pthread_create? Do you have any idea?

@swx-jenkins1
Copy link

Test PASSed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/7101/ for details.

@swx-jenkins1
Copy link

Test PASSed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/7102/ for details.

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/9943/ for details (Mellanox internal link).

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/9944/ for details (Mellanox internal link).

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/10061/ for details (Mellanox internal link).

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/10063/ for details (Mellanox internal link).

@swx-jenkins1
Copy link

Test PASSed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/7205/ for details.

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/10070/ for details (Mellanox internal link).

@swx-jenkins1
Copy link

Test PASSed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/7206/ for details.

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/10071/ for details (Mellanox internal link).

@hiroyuki-sato
Copy link
Contributor Author

Hello, @yosefe
Could you tell me more detail MellanoxLab test results?
Could you send me the test output?
Those code passed in my environment and Mellanox

Best regards.

@swx-jenkins1
Copy link

Test PASSed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/7210/ for details.

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/10076/ for details (Mellanox internal link).

src/ucs/sys/event_set.c Show resolved Hide resolved
src/ucs/sys/event_set.h Outdated Show resolved Hide resolved
@yosefe
Copy link
Contributor

yosefe commented May 1, 2019

@hiroyuki-sato pls also squash all commits (we have too many already: 37) and commit title would be:
"UCS/SYS/TEST: Add event set abstraction"

Copy link
Contributor Author

@hiroyuki-sato hiroyuki-sato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yosefe Thank you for your review. I squashed all commits. Please take a look again.

src/ucs/sys/event_set.c Show resolved Hide resolved
src/ucs/sys/event_set.h Show resolved Hide resolved
test/gtest/ucs/test_event_set.cc Outdated Show resolved Hide resolved
@swx-jenkins1
Copy link

Test PASSed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/7220/ for details.

Copy link
Contributor Author

@hiroyuki-sato hiroyuki-sato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yosefe Thank you for the comment. I changed about your comments. Please take a look again when you get a chance.

src/ucs/sys/event_set.c Show resolved Hide resolved
@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/10088/ for details (Mellanox internal link).

@yosefe yosefe changed the title [WIP] UCS/API event_set UCS/API event_set May 1, 2019
@swx-jenkins1
Copy link

Test PASSed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/7222/ for details.

@mellanox-github
Copy link
Contributor

Test PASSed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/10090/ for details (Mellanox internal link).

# include "config.h"
#endif

#define UCS_EVENT_EPOLL_MAX_EVENTS 16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yosefe Why it is 16 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shamisp
Copy link
Contributor

shamisp commented May 2, 2019

👍

@shamisp shamisp merged commit 1ad5b17 into openucx:master May 2, 2019
@hiroyuki-sato hiroyuki-sato deleted the event_set_functions branch June 30, 2020 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants