Skip to content

modifying osc mt code #2

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

Open
wants to merge 68 commits into
base: master
Choose a base branch
from
Open

modifying osc mt code #2

wants to merge 68 commits into from

Conversation

xinzhao3
Copy link
Owner

@xinzhao3 xinzhao3 commented Nov 8, 2018

No description provided.

int ret = OMPI_SUCCESS;

ret = check_sync_state(module, target, false);
if (ret != OMPI_SUCCESS) {
return ret;
}

if (pthread_equal(tid, mca_osc_ucx_component.main_tid)) {
Copy link

Choose a reason for hiding this comment

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

Does this mean that main_tid works with "receve" worker?

int ret = OMPI_SUCCESS;

ret = check_sync_state(module, target, false);
if (ret != OMPI_SUCCESS) {
return ret;
}

if (pthread_equal(tid, mca_osc_ucx_component.main_tid)) {
Copy link

Choose a reason for hiding this comment

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

Maybe worth making this piece an inline function so it doesn't duplicate in put & get

}
}

curr_thread_info = pthread_getspecific(my_thread_key);
Copy link

Choose a reason for hiding this comment

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

I would shift it in the "if" statement.
Otherwise you are always calling pthread_getspecific twice which we don't want

@@ -323,7 +396,7 @@ static int component_select(struct ompi_win_t *win, void **base, size_t size, in
UCP_PARAM_FIELD_REQUEST_INIT |
UCP_PARAM_FIELD_REQUEST_SIZE;
context_params.features = UCP_FEATURE_RMA | UCP_FEATURE_AMO32 | UCP_FEATURE_AMO64;
context_params.mt_workers_shared = 0;
context_params.mt_workers_shared = 1;
Copy link

Choose a reason for hiding this comment

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

I thought in our implementations workers are not shared, only context.

Copy link

Choose a reason for hiding this comment

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

I guess this is related to the context. But I wanted to double check.

mca_osc_ucx_component.worker_addr_disps = malloc(comm_size * sizeof(int));
if (mca_osc_ucx_component.mem_addr_disps == NULL)
mca_osc_ucx_component.mem_addr_disps = malloc(comm_size * sizeof(int));

if (!is_eps_ready) {
Copy link

Choose a reason for hiding this comment

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

In which case is_ep_ready can be "true"?

}
pthread_mutex_unlock(&curr_worker->lock);
}
}
Copy link

Choose a reason for hiding this comment

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

Don't we need to also update ompi_osc_ucx_flush_all?

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