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

Deprecate ABT_{thread/task}_{retain/release} #138

Merged

Conversation

shintaro-iwasaki
Copy link
Collaborator

As discussed in #17, ABT_thread_retain(), ABT_thread_release(), ABT_task_retain(), and ABT_task_release(), which have been designed to control refcounts of threads and tasks, have the following issues:

  1. Currently, they are broken (i.e., ABT_thread_release() does not free a thread even if the counter becomes 0).
  2. Fixing it is costly since this adds atomic refcount operations on freeing threads (i.e., ABT_thread_free()).
  3. These functions are not used in our understanding. At least, they do not appear in our tests.

This PR deprecates these functions. If there's no complaint, they will be removed in the future release.

Note that this patch does not break the current release/retain mechanism; it will just warn programmers:

# GCC 5.4
warning: ‘ABT_thread_retain’ is deprecated [-Wdeprecated-declarations]
    ABT_thread_retain(thread);
    ^

Note: ax_gcc_func_attribute.m4 does not have a license issue and is used in MPICH, for example.
https://github.com/pmodels/mpich/blob/master/confdb/ax_gcc_func_attribute.m4

ABT_DEPRECATED is an attribute for a deprecated function.
ABT_thread_retain(), ABT_thread_release(), ABT_task_retain(), ABT_task_release()
have been designed to control refcounts of threads and tasks. These functions
have the following issues:
1. Currently, they are broken (i.e., ABT_thread_release() does not free a thread
   even if the counter becomes 0).
2. Fixing it is costly since this adds atomic refcount operations on freeing
   threads (i.e., ABT_thread_free()).
3. These functions are not used in our understanding. At least, they do not
   appear in our tests.
This patch deprecates these functions. If there's no complaint, they are removed
in the future release.
@shintaro-iwasaki
Copy link
Collaborator Author

test:jenkins/all

2 similar comments
@shintaro-iwasaki
Copy link
Collaborator Author

test:jenkins/all

@shintaro-iwasaki
Copy link
Collaborator Author

test:jenkins/all

@shintaro-iwasaki
Copy link
Collaborator Author

These functions are marked as deprecated, but they are not removed immediately; please let us know if these functions are actually used.

@shintaro-iwasaki shintaro-iwasaki merged commit 22bb569 into pmodels:master Feb 14, 2020
@shintaro-iwasaki shintaro-iwasaki deleted the DeprecateRetainRelease branch August 7, 2020 19:28
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.

1 participant