1
1

- reduce kruft in finding out which thread level to use (still need to

check initial values against Brian's new stuff)
- remove some additional kruft

This commit was SVN r5021.
Этот коммит содержится в:
Jeff Squyres 2005-03-25 03:06:06 +00:00
родитель c33fb9a5b0
Коммит c57377a965
3 изменённых файлов: 22 добавлений и 23 удалений

Просмотреть файл

@ -149,8 +149,7 @@ OMPI_DECLSPEC int mca_base_components_close(int output_id, ompi_list_t *compone
/* mca_base_init_select_components.c */
OMPI_DECLSPEC int mca_base_init_select_components(int requested,
bool allow_multi_user_threads,
bool have_hidden_threads, int *provided);
int *provided);
#if 0
/* JMS Not implemented yet */

Просмотреть файл

@ -39,11 +39,15 @@
*
* The contents of this function will likely be replaced
*/
int mca_base_init_select_components(int requested,
bool allow_multi_user_threads,
bool have_hidden_threads, int *provided)
int mca_base_init_select_components(int requested, int *provided)
{
bool user_threads, hidden_threads;
bool user_cumulative, hidden_cumulative;
/* Set initial values */
user_cumulative = true;
hidden_cumulative = false;
/* Make final lists of available modules (i.e., call the query/init
functions and see if they return happiness). For pml, there will
@ -53,7 +57,7 @@ int mca_base_init_select_components(int requested,
if (OMPI_SUCCESS != mca_mpool_base_init(&user_threads)) {
return OMPI_ERROR;
}
allow_multi_user_threads &= user_threads;
user_cumulative &= user_threads;
/* JMS: At some point, we'll need to feed it the thread level to
ensure to pick one high enough (e.g., if we need CR) */
@ -61,24 +65,24 @@ int mca_base_init_select_components(int requested,
user_threads = true;
hidden_threads = false;
if (OMPI_SUCCESS != mca_pml_base_select(&mca_pml,
&user_threads, &hidden_threads)) {
&user_threads, &hidden_threads)) {
return OMPI_ERROR;
}
allow_multi_user_threads &= user_threads;
have_hidden_threads |= hidden_threads;
user_cumulative &= user_threads;
hidden_cumulative |= hidden_threads;
if (OMPI_SUCCESS != mca_ptl_base_select(&user_threads, &hidden_threads)) {
return OMPI_ERROR;
}
allow_multi_user_threads &= user_threads;
have_hidden_threads |= hidden_threads;
user_cumulative &= user_threads;
hidden_cumulative |= hidden_threads;
if (OMPI_SUCCESS != mca_coll_base_find_available(&user_threads,
&hidden_threads)) {
return OMPI_ERROR;
}
allow_multi_user_threads &= user_threads;
have_hidden_threads |= hidden_threads;
user_cumulative &= user_threads;
hidden_cumulative |= hidden_threads;
/* io and topo components are selected later, because the io framework is
opened lazily (at the first MPI_File_* function invocation). */
@ -89,7 +93,7 @@ int mca_base_init_select_components(int requested,
/* JMS ...Do more here with the thread level, etc.... */
*provided = requested;
if (have_hidden_threads) {
if (hidden_cumulative) {
ompi_set_using_threads(true);
}

Просмотреть файл

@ -78,14 +78,14 @@ ompi_thread_t *ompi_mpi_main_thread = NULL;
int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
{
int ret, param;
bool allow_multi_user_threads;
bool have_hidden_threads;
bool compound_cmd=false;
ompi_proc_t** procs;
size_t nprocs;
char *error = NULL;
bool compound_cmd = false;
/* Join the run-time environment - do the things that don't hit the registry */
/* Join the run-time environment - do the things that don't hit
the registry */
if (ORTE_SUCCESS != (ret = orte_init_stage1())) {
error = "ompi_mpi_init: orte_init_stage1 failed";
goto error;
@ -171,10 +171,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
final thread level */
if (OMPI_SUCCESS !=
(ret = mca_base_init_select_components(requested,
allow_multi_user_threads,
have_hidden_threads,
provided))) {
(ret = mca_base_init_select_components(requested, provided))) {
error = "mca_base_init_select_components() failed";
goto error;
}
@ -387,7 +384,6 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
/* All done */
ompi_mpi_initialized = true;
ompi_mpi_finalized = false;
if (orte_debug_flag) {
ompi_output(0, "[%d,%d,%d] ompi_mpi_init completed",