OSHMEM: SHMEM_API_ macro fix
The verbose level was initialized too early group shmem mca params together fixed by Roman, reviewed by Igor/Mike cmr=v1.7.5:reviewer=ompi-rm1.7 This commit was SVN r31107.
Этот коммит содержится в:
родитель
554da83865
Коммит
84a6330b27
@ -99,6 +99,7 @@ bool oshmem_mpi_thread_multiple = false;
|
|||||||
int oshmem_mpi_thread_requested = SHMEM_THREAD_SINGLE;
|
int oshmem_mpi_thread_requested = SHMEM_THREAD_SINGLE;
|
||||||
int oshmem_mpi_thread_provided = SHMEM_THREAD_SINGLE;
|
int oshmem_mpi_thread_provided = SHMEM_THREAD_SINGLE;
|
||||||
long *preconnect_value = 0;
|
long *preconnect_value = 0;
|
||||||
|
int shmem_api_logger_output = -1;
|
||||||
|
|
||||||
MPI_Comm oshmem_comm_world;
|
MPI_Comm oshmem_comm_world;
|
||||||
|
|
||||||
@ -252,29 +253,10 @@ int oshmem_shmem_init(int argc, char **argv, int requested, int *provided)
|
|||||||
|
|
||||||
int oshmem_shmem_preconnect_all(void)
|
int oshmem_shmem_preconnect_all(void)
|
||||||
{
|
{
|
||||||
int mca_value = 0;
|
|
||||||
int rc = OSHMEM_SUCCESS;
|
int rc = OSHMEM_SUCCESS;
|
||||||
|
|
||||||
(void) mca_base_var_register("oshmem",
|
|
||||||
"oshmem",
|
|
||||||
NULL,
|
|
||||||
"preconnect_all",
|
|
||||||
"Whether to force SHMEM processes to fully "
|
|
||||||
"wire-up the connections between SHMEM "
|
|
||||||
"processes during "
|
|
||||||
"initialization (vs. making connections lazily -- "
|
|
||||||
"upon the first SHMEM traffic between each "
|
|
||||||
"process peer pair)",
|
|
||||||
MCA_BASE_VAR_TYPE_INT,
|
|
||||||
NULL,
|
|
||||||
0,
|
|
||||||
MCA_BASE_VAR_FLAG_SETTABLE,
|
|
||||||
OPAL_INFO_LVL_9,
|
|
||||||
MCA_BASE_VAR_SCOPE_READONLY,
|
|
||||||
&mca_value);
|
|
||||||
|
|
||||||
/* force qp creation and rkey exchange for memheap. Does not force exchange of static vars */
|
/* force qp creation and rkey exchange for memheap. Does not force exchange of static vars */
|
||||||
if (mca_value) {
|
if (oshmem_preconnect_all) {
|
||||||
long val;
|
long val;
|
||||||
int nproc = 0;
|
int nproc = 0;
|
||||||
int i;
|
int i;
|
||||||
@ -326,6 +308,18 @@ static int _shmem_init(int argc, char **argv, int requested, int *provided)
|
|||||||
*/
|
*/
|
||||||
ompi_proc_local_proc = (ompi_proc_t*) oshmem_proc_local_proc;
|
ompi_proc_local_proc = (ompi_proc_t*) oshmem_proc_local_proc;
|
||||||
|
|
||||||
|
/* Register the OSHMEM layer's MCA parameters */
|
||||||
|
if (OSHMEM_SUCCESS != (ret = oshmem_shmem_register_params())) {
|
||||||
|
error = "oshmem_info_register: oshmem_register_params failed";
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
/* Setting verbosity for macros like SHMEM_API_VERBOSE, SHMEM_API_ERROR.
|
||||||
|
* We need to set it right after registering mca verbosity variables
|
||||||
|
*/
|
||||||
|
shmem_api_logger_output = opal_output_open(NULL);
|
||||||
|
opal_output_set_verbosity(shmem_api_logger_output,
|
||||||
|
oshmem_shmem_api_verbose);
|
||||||
|
|
||||||
if (OSHMEM_SUCCESS != (ret = oshmem_group_cache_list_init())) {
|
if (OSHMEM_SUCCESS != (ret = oshmem_group_cache_list_init())) {
|
||||||
error = "oshmem_group_cache_list_init() failed";
|
error = "oshmem_group_cache_list_init() failed";
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
int oshmem_shmem_lock_recursive = 0;
|
int oshmem_shmem_lock_recursive = 0;
|
||||||
int oshmem_shmem_api_verbose = 0;
|
int oshmem_shmem_api_verbose = 0;
|
||||||
|
int oshmem_preconnect_all = 0;
|
||||||
|
|
||||||
int oshmem_shmem_register_params(void)
|
int oshmem_shmem_register_params(void)
|
||||||
{
|
{
|
||||||
@ -44,5 +45,23 @@ int oshmem_shmem_register_params(void)
|
|||||||
MCA_BASE_VAR_SCOPE_READONLY,
|
MCA_BASE_VAR_SCOPE_READONLY,
|
||||||
&oshmem_shmem_api_verbose);
|
&oshmem_shmem_api_verbose);
|
||||||
|
|
||||||
|
(void) mca_base_var_register("oshmem",
|
||||||
|
"oshmem",
|
||||||
|
NULL,
|
||||||
|
"preconnect_all",
|
||||||
|
"Whether to force SHMEM processes to fully "
|
||||||
|
"wire-up the connections between SHMEM "
|
||||||
|
"processes during "
|
||||||
|
"initialization (vs. making connections lazily -- "
|
||||||
|
"upon the first SHMEM traffic between each "
|
||||||
|
"process peer pair)",
|
||||||
|
MCA_BASE_VAR_TYPE_INT,
|
||||||
|
NULL,
|
||||||
|
0,
|
||||||
|
MCA_BASE_VAR_FLAG_SETTABLE,
|
||||||
|
OPAL_INFO_LVL_9,
|
||||||
|
MCA_BASE_VAR_SCOPE_READONLY,
|
||||||
|
&oshmem_preconnect_all);
|
||||||
|
|
||||||
return OSHMEM_SUCCESS;
|
return OSHMEM_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,12 @@ OSHMEM_DECLSPEC extern int oshmem_shmem_lock_recursive;
|
|||||||
*/
|
*/
|
||||||
OSHMEM_DECLSPEC extern int oshmem_shmem_api_verbose;
|
OSHMEM_DECLSPEC extern int oshmem_shmem_api_verbose;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether to force SHMEM processes to fully
|
||||||
|
* wire-up the connections between SHMEM
|
||||||
|
*/
|
||||||
|
OSHMEM_DECLSPEC extern int oshmem_preconnect_all;
|
||||||
|
|
||||||
END_C_DECLS
|
END_C_DECLS
|
||||||
|
|
||||||
#endif /* OSHMEM_RUNTIME_PARAMS_H */
|
#endif /* OSHMEM_RUNTIME_PARAMS_H */
|
||||||
|
@ -30,7 +30,6 @@ void start_pes(int npes)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(OSHMEM_PROFILING) || (OSHMEM_PROFILING == 0)
|
#if !defined(OSHMEM_PROFILING) || (OSHMEM_PROFILING == 0)
|
||||||
int shmem_api_logger_output = -1;
|
|
||||||
|
|
||||||
void shmem_init(void)
|
void shmem_init(void)
|
||||||
{
|
{
|
||||||
@ -45,10 +44,6 @@ void shmem_init(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
shmem_api_logger_output = opal_output_open(NULL);
|
|
||||||
opal_output_set_verbosity(shmem_api_logger_output,
|
|
||||||
oshmem_shmem_api_verbose);
|
|
||||||
|
|
||||||
err = oshmem_shmem_init(0, NULL, required, &provided);
|
err = oshmem_shmem_init(0, NULL, required, &provided);
|
||||||
if (OSHMEM_SUCCESS != err) {
|
if (OSHMEM_SUCCESS != err) {
|
||||||
/* since spec does not propagete error to user we can only abort */
|
/* since spec does not propagete error to user we can only abort */
|
||||||
|
@ -35,7 +35,7 @@ OSHMEM_DECLSPEC extern int shmem_api_logger_output;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SHMEM_API_ERROR(...) \
|
#define SHMEM_API_ERROR(...) \
|
||||||
oshmem_output_verbose(0, shmem_api_logger_output, \
|
oshmem_output(shmem_api_logger_output, \
|
||||||
"Error: %s:%d - %s()", __SPML_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__)
|
"Error: %s:%d - %s()", __SPML_FILE__, __LINE__, __FUNCTION__, __VA_ARGS__)
|
||||||
|
|
||||||
#endif /*SHMEM_API_LOGGER_H*/
|
#endif /*SHMEM_API_LOGGER_H*/
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user