1515 * reserved.
1616 * Copyright (c) 2015 Research Organization for Information Science
1717 * and Technology (RIST). All rights reserved.
18- * Copyright (c) 2018 IBM Corporation. All rights reserved.
18+ * Copyright (c) 2018-2022 IBM Corporation. All rights reserved.
1919 * Copyright (c) 2020 Intel, Inc. All rights reserved.
2020 * $COPYRIGHT$
2121 *
4242#include "ompi/mca/pml/pml.h"
4343#include "ompi/mca/pml/base/base.h"
4444#include "ompi/mca/pml/base/pml_base_request.h"
45+ #if MPI_VERSION >= 4
46+ #include "ompi/mca/pml/base/pml_base_sendreq.h"
47+ #endif
4548
4649/*
4750 * The following file was created by configure. It contains extern
@@ -100,12 +103,28 @@ char *ompi_pml_base_bsend_allocator_name = NULL;
100103static char * ompi_pml_base_wrapper = NULL ;
101104#endif
102105
106+ #if MPI_VERSION >= 4
107+ #define OMPI_PML_BASE_WARN_DEP_CANCEL_SEND_DEFAULT OMPI_PML_BASE_WARN_DEP_CANCEL_SEND_ONCE
108+ int ompi_pml_base_warn_dep_cancel_send_level = OMPI_PML_BASE_WARN_DEP_CANCEL_SEND_DEFAULT ;
109+ mca_base_var_enum_value_t ompi_pml_base_warn_dep_cancel_send_values [] = {
110+ {.value = OMPI_PML_BASE_WARN_DEP_CANCEL_SEND_ALWAYS , .string = "always" },
111+ {.value = OMPI_PML_BASE_WARN_DEP_CANCEL_SEND_ONCE , .string = "once" },
112+ {.value = OMPI_PML_BASE_WARN_DEP_CANCEL_SEND_NEVER , .string = "never" },
113+ {0 , NULL }
114+ };
115+ #endif
116+
103117static int mca_pml_base_register (mca_base_register_flag_t flags )
104118{
105119#if !MCA_ompi_pml_DIRECT_CALL
106120 int var_id ;
107121#endif
108122
123+ #if MPI_VERSION >= 4
124+ mca_base_var_enum_t * ompi_pml_base_warn_dep_cancel_send_enum = NULL ;
125+ int rc ;
126+ #endif
127+
109128 ompi_pml_base_bsend_allocator_name = "basic" ;
110129 (void ) mca_base_var_register ("ompi" , "pml" , "base" , "bsend_allocator" , NULL ,
111130 MCA_BASE_VAR_TYPE_STRING , NULL , 0 , 0 ,
@@ -124,6 +143,21 @@ static int mca_pml_base_register(mca_base_register_flag_t flags)
124143 (void ) mca_base_var_register_synonym (var_id , "ompi" , "pml" , NULL , "wrapper" , 0 );
125144#endif
126145
146+ #if MPI_VERSION >= 4
147+ mca_base_var_enum_create ("pml_base_deprecate_warnings" , ompi_pml_base_warn_dep_cancel_send_values ,
148+ & ompi_pml_base_warn_dep_cancel_send_enum );
149+ rc = mca_base_var_register ("ompi" , "pml" , "base" , "warn_dep_cancel_send" ,
150+ "How often to issue warnings for deprecated cancelation of send requests" ,
151+ MCA_BASE_VAR_TYPE_INT , ompi_pml_base_warn_dep_cancel_send_enum , 0 , 0 ,
152+ OPAL_INFO_LVL_9 , MCA_BASE_VAR_SCOPE_READONLY ,
153+ & ompi_pml_base_warn_dep_cancel_send_level );
154+ OBJ_RELEASE (ompi_pml_base_warn_dep_cancel_send_enum );
155+ if (OPAL_ERR_VALUE_OUT_OF_BOUNDS == rc ) {
156+ ompi_pml_base_warn_dep_cancel_send_level = OMPI_PML_BASE_WARN_DEP_CANCEL_SEND_DEFAULT ;
157+ opal_output (0 , "pml:base:register: Warning invalid deprecation warning value specified. Using default: %d" ,
158+ ompi_pml_base_warn_dep_cancel_send_level );
159+ }
160+ #endif
127161 return OMPI_SUCCESS ;
128162}
129163
0 commit comments