Correct the conversion between int and bool. Apply it on all files except
the one that will be modified by Ralph for the ORTE 2.0. The missing ones are in the rsh PLS. This commit was SVN r11476.
Этот коммит содержится в:
родитель
8673c83578
Коммит
e33c35112b
@ -64,7 +64,7 @@ int mca_bml_r2_component_open(void)
|
||||
false,
|
||||
1,
|
||||
&tmp);
|
||||
mca_bml_r2.show_unreach_errors = (tmp != 0 ? true : false);
|
||||
mca_bml_r2.show_unreach_errors = OPAL_INT_TO_BOOL(tmp);
|
||||
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
|
@ -115,7 +115,7 @@ check_config_value_bool(char *key, ompi_info_t *info)
|
||||
ret = mca_base_param_lookup_int(param, &flag);
|
||||
if (OMPI_SUCCESS != ret) return false;
|
||||
|
||||
return (flag != 0 ? true : false);
|
||||
return OPAL_INT_TO_BOOL(flag);
|
||||
}
|
||||
|
||||
|
||||
|
@ -122,7 +122,7 @@ check_config_value_bool(char *key, ompi_info_t *info)
|
||||
ret = mca_base_param_lookup_int(param, &flag);
|
||||
if (OMPI_SUCCESS != ret) return false;
|
||||
|
||||
return (flag != 0 ? true : false);
|
||||
return OPAL_INT_TO_BOOL(flag);
|
||||
}
|
||||
|
||||
|
||||
|
@ -77,7 +77,7 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_pml_base_recv_request_t);
|
||||
(request)->req_base.req_tag = tag; \
|
||||
(request)->req_base.req_comm = comm; \
|
||||
(request)->req_base.req_proc = NULL; \
|
||||
(request)->req_base.req_pml_complete = (persistent ? true : false); \
|
||||
(request)->req_base.req_pml_complete = OPAL_INT_TO_BOOL(persistent); \
|
||||
(request)->req_base.req_free_called = false; \
|
||||
\
|
||||
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE, \
|
||||
|
@ -89,7 +89,7 @@ typedef struct mca_pml_base_send_request_t mca_pml_base_send_request_t;
|
||||
(request)->req_base.req_tag = (int32_t)tag; \
|
||||
(request)->req_base.req_comm = comm; \
|
||||
/* (request)->req_base.req_proc is set on request allocation */ \
|
||||
(request)->req_base.req_pml_complete = (persistent ? true : false); \
|
||||
(request)->req_base.req_pml_complete = OPAL_INT_TO_BOOL(persistent); \
|
||||
(request)->req_base.req_free_called = false; \
|
||||
(request)->req_base.req_ompi.req_status._cancelled = 0; \
|
||||
\
|
||||
|
@ -125,7 +125,7 @@ do { \
|
||||
persistent) \
|
||||
do { \
|
||||
OMPI_REQUEST_INIT(&(request)->req_base.req_ompi, persistent); \
|
||||
(request)->req_base.req_pml_complete = (persistent ? true : false); \
|
||||
(request)->req_base.req_pml_complete = OPAL_INT_TO_BOOL(persistent); \
|
||||
(request)->req_base.req_free_called = false; \
|
||||
request->req_comm = comm; \
|
||||
request->req_tag = tag; \
|
||||
|
@ -119,12 +119,12 @@ do {
|
||||
(sendreq)->req_send.req_base.req_peer = (int32_t)peer; \
|
||||
(sendreq)->req_send.req_base.req_tag = (int32_t)tag; \
|
||||
(sendreq)->req_send.req_base.req_comm = comm; \
|
||||
(sendreq)->req_send.req_base.req_pml_complete = (persistent ? true : false); \
|
||||
(sendreq)->req_send.req_base.req_pml_complete = OPAL_INT_TO_BOOL(persistent); \
|
||||
(sendreq)->req_send.req_base.req_free_called = false; \
|
||||
(sendreq)->req_send.req_base.req_ompi.req_status._cancelled = 0; \
|
||||
\
|
||||
/* initialize datatype convertor for this request */ \
|
||||
/* if(count > 0) { */ \
|
||||
/* if(count > 0) { */ \
|
||||
/* We will create a convertor specialized for the */ \
|
||||
/* remote architecture and prepared with the datatype. */ \
|
||||
ompi_convertor_copy_and_prepare_for_send( \
|
||||
@ -136,9 +136,9 @@ do {
|
||||
&(sendreq)->req_send.req_convertor ); \
|
||||
ompi_convertor_get_packed_size(&(sendreq)->req_send.req_convertor, \
|
||||
&((sendreq)->req_send.req_bytes_packed) ); \
|
||||
/* } else { */ \
|
||||
/* (sendreq)->req_send.req_bytes_packed = 0; */ \
|
||||
/* } */ \
|
||||
/* } else { */ \
|
||||
/* (sendreq)->req_send.req_bytes_packed = 0; */ \
|
||||
/* } */ \
|
||||
} while(0)
|
||||
|
||||
|
||||
|
@ -171,7 +171,7 @@ int mca_pml_ob1_component_open(void)
|
||||
mca_base_param_register_int("mpi", NULL, "leave_pinned", "leave_pinned", 0);
|
||||
param = mca_base_param_find("mpi", NULL, "leave_pinned");
|
||||
mca_base_param_lookup_int(param, &value);
|
||||
mca_pml_ob1.leave_pinned = (value != 0 ? true : false);
|
||||
mca_pml_ob1.leave_pinned = OPAL_INT_TO_BOOL(value);
|
||||
|
||||
mca_base_param_register_int("mpi", NULL, "leave_pinned_pipeline", "leave_pinned_pipeline", 0);
|
||||
param = mca_base_param_find("mpi", NULL, "leave_pinned_pipeline");
|
||||
|
@ -50,7 +50,7 @@ int MPI_Op_create(MPI_User_function *function, int commute,
|
||||
|
||||
/* Create and cache the op. Sets a refcount of 1. */
|
||||
|
||||
*op = ompi_op_create((commute != 0 ? true : false),
|
||||
*op = ompi_op_create(OPAL_INT_TO_BOOL(commute),
|
||||
(ompi_op_fortran_handler_fn_t*) function);
|
||||
if (NULL == *op) {
|
||||
err = MPI_ERR_INTERN;
|
||||
|
@ -61,7 +61,7 @@ int ompi_mpi_register_params(void)
|
||||
mca_base_param_reg_int_name("mpi", "param_check",
|
||||
"Whether you want MPI API parameters checked at run-time or not. Possible values are 0 (no checking) and 1 (perform checking at run-time)",
|
||||
false, false, MPI_PARAM_CHECK, &value);
|
||||
ompi_mpi_param_check = (value != 0 ? true : false);
|
||||
ompi_mpi_param_check = OPAL_INT_TO_BOOL(value);
|
||||
if (ompi_mpi_param_check) {
|
||||
value = 0;
|
||||
if (MPI_PARAM_CHECK) {
|
||||
@ -94,7 +94,7 @@ int ompi_mpi_register_params(void)
|
||||
"Whether MPI_FINALIZE shows all MPI handles that were not freed or not",
|
||||
false, false,
|
||||
(int) ompi_debug_show_handle_leaks, &value);
|
||||
ompi_debug_show_handle_leaks = (value != 0 ? true : false);
|
||||
ompi_debug_show_handle_leaks = OPAL_INT_TO_BOOL(value);
|
||||
|
||||
/* Whether or not to free MPI handles. Useless without run-time
|
||||
param checking, so implicitly set that to true if we don't want
|
||||
@ -104,7 +104,7 @@ int ompi_mpi_register_params(void)
|
||||
"Whether to actually free MPI objects when their handles are freed",
|
||||
false, false,
|
||||
(int) ompi_debug_no_free_handles, &value);
|
||||
ompi_debug_no_free_handles = (value != 0 ? true : false);
|
||||
ompi_debug_no_free_handles = OPAL_INT_TO_BOOL(value);
|
||||
if (ompi_debug_no_free_handles) {
|
||||
ompi_mpi_param_check = true;
|
||||
value = 0;
|
||||
@ -123,7 +123,7 @@ int ompi_mpi_register_params(void)
|
||||
"Whether to show all MCA parameter value during MPI_INIT or not (good for reproducability of MPI jobs)",
|
||||
false, false,
|
||||
(int) ompi_mpi_show_mca_params, &value);
|
||||
ompi_mpi_show_mca_params = (value != 0 ? true : false);
|
||||
ompi_mpi_show_mca_params = OPAL_INT_TO_BOOL(value);
|
||||
|
||||
/* File to use when dumping the parameters */
|
||||
mca_base_param_reg_string_name("mpi", "show_mca_params_file",
|
||||
@ -136,7 +136,7 @@ int ompi_mpi_register_params(void)
|
||||
"If nonzero, assume that this job is the only (set of) process(es) running on each node and bind processes to processors, starting with processor ID 0",
|
||||
false, false,
|
||||
(int) ompi_mpi_paffinity_alone, &value);
|
||||
ompi_mpi_paffinity_alone = (value != 0 ? true : false);
|
||||
ompi_mpi_paffinity_alone = OPAL_INT_TO_BOOL(value);
|
||||
|
||||
mca_base_param_reg_int_name("mpi", "paffinity_processor",
|
||||
"If set, pin this process to the processor number indicated by the value",
|
||||
@ -149,7 +149,7 @@ int ompi_mpi_register_params(void)
|
||||
mca_base_param_reg_int_name("mpi", "keep_peer_hostnames",
|
||||
"If nonzero, save the string hostnames of all MPI peer processes (mostly for error / debugging output messages). This can add quite a bit of memory usage to each MPI process.",
|
||||
false, false, 1, &value);
|
||||
ompi_mpi_keep_peer_hostnames = (value != 0 ? true : false);
|
||||
ompi_mpi_keep_peer_hostnames = OPAL_INT_TO_BOOL(value);
|
||||
|
||||
/* MPI_ABORT controls */
|
||||
|
||||
@ -174,7 +174,7 @@ int ompi_mpi_register_params(void)
|
||||
&value);
|
||||
#if OMPI_WANT_PRETTY_PRINT_STACKTRACE && ! defined(__WINDOWS__) && defined(HAVE_BACKTRACE)
|
||||
/* Only take the value if we have stack trace capability */
|
||||
ompi_mpi_abort_print_stack = (value != 0 ? true : false);
|
||||
ompi_mpi_abort_print_stack = OPAL_INT_TO_BOOL(value);
|
||||
#else
|
||||
/* If we do not have stack trace capability, ensure that this is
|
||||
hard-coded to false */
|
||||
@ -186,7 +186,7 @@ int ompi_mpi_register_params(void)
|
||||
false, false,
|
||||
(int) ompi_mpi_preconnect_all, &value);
|
||||
|
||||
ompi_mpi_preconnect_all = (value != 0 ? true : false);
|
||||
ompi_mpi_preconnect_all = OPAL_INT_TO_BOOL(value);
|
||||
|
||||
/* The ddt engine has a few parameters */
|
||||
|
||||
|
@ -95,7 +95,7 @@ int mca_base_components_open(const char *type_name, int output_id,
|
||||
|
||||
param = mca_base_param_find("mca", NULL, "component_show_load_errors");
|
||||
mca_base_param_lookup_int(param, &ret);
|
||||
show_errors = (0 != ret) ? true : false;
|
||||
show_errors = OPAL_INT_TO_BOOL(ret);
|
||||
|
||||
/* Setup verbosity for this MCA type */
|
||||
|
||||
|
@ -65,7 +65,7 @@ int orte_proc_info(void)
|
||||
|
||||
id = mca_base_param_register_int("seed", NULL, NULL, NULL, orte_process_info.seed);
|
||||
mca_base_param_lookup_int(id, &tmp);
|
||||
orte_process_info.seed = (tmp ? true : false);
|
||||
orte_process_info.seed = OPAL_INT_TO_BOOL(tmp);
|
||||
|
||||
id = mca_base_param_register_string("gpr", "replica", "uri", NULL, orte_process_info.gpr_replica_uri);
|
||||
mca_base_param_lookup_string(id, &(orte_process_info.gpr_replica_uri));
|
||||
|
@ -158,14 +158,14 @@ int orte_univ_info(void)
|
||||
|
||||
id = mca_base_param_register_int("universe", "persistence", NULL, NULL, orte_universe_info.persistence);
|
||||
mca_base_param_lookup_int(id, &tmp);
|
||||
orte_universe_info.persistence = (tmp ? true : false);
|
||||
orte_universe_info.persistence = OPAL_INT_TO_BOOL(tmp);
|
||||
|
||||
id = mca_base_param_register_string("universe", "scope", NULL, NULL, orte_universe_info.scope);
|
||||
mca_base_param_lookup_string(id, &(orte_universe_info.scope));
|
||||
|
||||
id = mca_base_param_register_int("universe", "console", NULL, NULL, orte_universe_info.console);
|
||||
mca_base_param_lookup_int(id, &tmp);
|
||||
orte_universe_info.console = (tmp ? true : false);
|
||||
orte_universe_info.console = OPAL_INT_TO_BOOL(tmp);
|
||||
|
||||
id = mca_base_param_register_string("universe", "uri", NULL, NULL, orte_universe_info.seed_uri);
|
||||
mca_base_param_lookup_string(id, &(orte_universe_info.seed_uri));
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user