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 threads framework #15

Merged
merged 1 commit into from
Mar 24, 2020
Merged

Fix threads framework #15

merged 1 commit into from
Mar 24, 2020

Conversation

shintaro-iwasaki
Copy link

This PR addresses most of the problems newly found except the following items that I think are still discussed:

  • TSD management
  • Definitions of REQUEST_PENDING and REQUEST_COMPLETED
  • Some cleanups.

The head repository is

https://github.com/shintaro-iwasaki/ompi-1
branch: topic/thread_framework2

Could you please squash this branch so that I can resolve some of his comments.

@hppritcha
Copy link
Owner

I'm finding some problems here. Will do a review.

@shintaro-iwasaki
Copy link
Author

Thanks!

@@ -30,3 +30,5 @@ libmca_threads_pthreads_la_SOURCES = \
threads_pthreads_tsd.h \
threads_pthreads_wait_sync.c \
threads_pthreads_wait_sync.h

AM_LDFLAGS = -labt
Copy link
Owner

Choose a reason for hiding this comment

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

I don't think this is right. Why add -labt for pthreads specific Makefile.am?

Copy link
Author

Choose a reason for hiding this comment

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

You are right. It is wrong. I will fix it soon.

Copy link
Author

Choose a reason for hiding this comment

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

I wrongly put it in pthreads/Makefile.am. This AM_LDFLAGS was moved to argobots/Makefile.am.

@@ -115,8 +115,6 @@ OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_recursive_mutex_t);
}
#endif

#endif
Copy link
Owner

Choose a reason for hiding this comment

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

why did you remove this endif? it looks correct to me. It closes the defined(OPAL_PTHREAD_RECURSIVE_MUTEX_INITIALIZER) no?

Copy link
Author

Choose a reason for hiding this comment

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

This change should have been done to qthreads/threads_qthreads_mutex.h instead. Fixed.

@@ -30,7 +30,7 @@

static inline void opal_threads_argobots_ensure_init(void)
{
if (ABT_initialized() != 0) {
if (ABT_initialized() != ABT_SUCCESS) {
Copy link
Owner

Choose a reason for hiding this comment

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

would you mind reversing the check to have ABT_SUCCESS != ABT_initialize()? I know it looks weird but that's the "openmpi" coding style.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you. I will follow the Open MPI style. I will examine other checks.

Copy link
Author

Choose a reason for hiding this comment

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

I found some did not follow.

if (NULL == t->t_run || t->t_handle 1= (pthread_t)-1) {
to
if (NULL == t->t_run || (pthread_t)-1 != t->t_handle) {

I fixed them as far as I could find.

Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov>
@shintaro-iwasaki
Copy link
Author

I fixed them. Could you please look at this PR again?

@hppritcha hppritcha merged commit b39d27f into hppritcha:topic/thread_framework2 Mar 24, 2020
janciesko pushed a commit to janciesko/ompi that referenced this pull request Sep 24, 2020
* piggybacking Bull functionalities

* coll/adapt: Fix naming conventions and C11 atomic use

This commit fixes some naming convention issues, such as function names
which should follow the naming ompi_coll_adapt instead of
mca_coll_adapt, reserved for component and module naming (cf. tuned
collective component);

It also fixes the use of _Atomic construct, which is only valid in C11.
OPAL constructs have already been adapted to that use, so use
opal_atomic_* types instead.

* coll/adapt: Remove unused component field in module

This commit removes an unneeded field referencing the component in the
module of adapt, as it is already available through the
mca_coll_adapt_component global variable.

Signed-off-by: Marc Sergent <marc.sergent@atos.net>
Co-authored-by: Lemarinier, Pierre <pierre.lemarinier@atos.net>
Co-authored-by: pierrele <31764860+pierrele@users.noreply.github.com>
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