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

new(lct): Lightweight Communication Tools #52

Merged
merged 1 commit into from
Aug 21, 2023
Merged

new(lct): Lightweight Communication Tools #52

merged 1 commit into from
Aug 21, 2023

Conversation

JiakunYan
Copy link
Collaborator

@JiakunYan JiakunYan commented Aug 5, 2023

This PR splits the original LCI library into two libraries: LCI and LCT (Lightweight Communication Tools).

I moved part of the non-communication-related functionality into the LCT library, with the hope that we can reuse the code in other libraries/benchmarks without rewriting them (just including lct.h). In addition, this makes it possible to benchmark individual parts of the LCI library (such as the completion queue).

Currently, the functionalities in the LCT library include:

  • timing.
  • string searching and manipulation.
  • query thread id and number.
  • logging.
  • performance counters.
  • different implementation of queues.

I choose to implement LCT in C++ since it is more convenient. LCT still has a C API.

Regarding performance overheads: we lost some opportunities for compiler optimizations across function calls (unless we do link-time optimizations), but since most of the functionalities here are not on the critical path (except thread id and queues), I think it should be fine. I did not notice any visible performance loss with HPX microbenchmarks and Octo-Tiger.

Eventually, we can gradually move all the code from LCI to LCT and make LCI a C++ library (with a C API).

Other changes:

  • I changed the environmental variable LCM_LOG_LEVEL to LCI_LOG_LEVEL.
  • I changed the default completion implementation from CAS based to FAA based. It will give a much better performance to multithreaded pop. Users can use the environmental LCI_CQ_TYPE to switch to another implementation or the cmake option LCI_USE_INLINE_CQ to switch back to the C implementation.
  • I refactored the implementation of the performance counters. It is much more generic and can serve also as a timer.

@JiakunYan
Copy link
Collaborator Author

@omor1 Let me know if you have any comments before I merge this.

@omor1
Copy link
Member

omor1 commented Aug 9, 2023

@omor1 Let me know if you have any comments before I merge this.

I'm still out at ICPP, not sure when I'll have time to check this.

@JiakunYan JiakunYan merged commit a0b000f into master Aug 21, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants