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

Sample delivered in the middle of new region/task initialization process. #11

Open
wants to merge 6 commits into
base: ompt-final-barrier
Choose a base branch
from

Conversation

vladaindjic
Copy link

The following commits should emphasize the problem of delivering the sample in the middle of the region/task initialization process.

Since, this process is not done atomically, it is possible that the tool receive the sample in the middle of it (process) and calls the ompt_get_task_info function in order to get information about active tasks/regions.
The proposal is to always initialize the task/region's descriptor before setting it to thread's descriptor as currently valid. Since the initialization process is scattered across multiple functions and even multiple threads, it is possible that these changes won't handle all edge cases. However, they should point out to the problems that should be consider in future.

The best way to handle this problem is to introduce some variable that should show whether thread is initializing the region/task. If so, the ompt_get_task_info could return the value 1, which should indicate that there'a a task/region at this level, but the information about it are incomplete (this should satisfies the OMPT 5.0 standard specification). However, this approach would require memoizing some information about the old task/region during the process of setting the new one, so it may introduce additional memory footprint.

1. parallel_data at level 0 present, but not at outer levels (1, 2, etc.), even though there are few levels of nested regions.
2. The same region descriptor may be passed multiple times to ompt_callback_parallel_end.
1. ompt_state_wait_barrier_implicit_parallel has been used instead of deprecated ompt_state_wait_barrier_implicit
2. In function __ompt_get_task_info_internal, check if prev_team exists before getting master_id.
…urrently active task doesn't match the team of the currently active region.
…ould be the value of the thread_num argument when thread tries get the information about the outer region in which it is not involved.
…rent. FIXME: It is still possible to receive the sample between some operations and receive invalid values about active task/region.
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