33 * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
44 * University Research and Technology
55 * Corporation. All rights reserved.
6- * Copyright (c) 2004-2013 The University of Tennessee and The University
6+ * Copyright (c) 2004-2018 The University of Tennessee and The University
77 * of Tennessee Research Foundation. All rights
88 * reserved.
99 * Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
2929#include <stddef.h>
3030
3131#include "opal/util/arch.h"
32+ #include "opal/util/output.h"
3233#include "opal/datatype/opal_datatype_internal.h"
3334#include "opal/datatype/opal_datatype.h"
3435#include "opal/datatype/opal_convertor_internal.h"
@@ -40,6 +41,7 @@ bool opal_unpack_debug = false;
4041bool opal_pack_debug = false;
4142bool opal_position_debug = false;
4243bool opal_copy_debug = false;
44+ int opal_ddt_verbose = -1 ; /* Has the datatype verbose it's own output stream */
4345
4446extern int opal_cuda_verbose ;
4547
@@ -177,11 +179,19 @@ int opal_datatype_register_params(void)
177179 return ret ;
178180 }
179181
182+ ret = mca_base_var_register ("opal" , "opal" , NULL , "ddt_verbose" ,
183+ "Set level of opal datatype verbosity" ,
184+ MCA_BASE_VAR_TYPE_INT , NULL , 0 , MCA_BASE_VAR_FLAG_SETTABLE ,
185+ OPAL_INFO_LVL_8 , MCA_BASE_VAR_SCOPE_LOCAL ,
186+ & opal_ddt_verbose );
187+ if (0 > ret ) {
188+ return ret ;
189+ }
180190#if OPAL_CUDA_SUPPORT
181191 /* Set different levels of verbosity in the cuda related code. */
182192 ret = mca_base_var_register ("opal" , "opal" , NULL , "cuda_verbose" ,
183193 "Set level of opal cuda verbosity" ,
184- MCA_BASE_VAR_TYPE_INT , NULL , 0 , MCA_BASE_VAR_FLAG_SETTABLE ,
194+ MCA_BASE_VAR_TYPE_INT , NULL , -1 , MCA_BASE_VAR_FLAG_SETTABLE ,
185195 OPAL_INFO_LVL_8 , MCA_BASE_VAR_SCOPE_LOCAL ,
186196 & opal_cuda_verbose );
187197 if (0 > ret ) {
@@ -226,6 +236,12 @@ int32_t opal_datatype_init( void )
226236 datatype -> desc .desc [1 ].end_loop .size = datatype -> size ;
227237 }
228238
239+ /* Enable a private output stream for datatype */
240+ if ( opal_ddt_verbose > 0 ) {
241+ opal_datatype_dfd = opal_output_open (NULL );
242+ opal_output_set_verbosity (opal_datatype_dfd , opal_ddt_verbose );
243+ }
244+
229245 return OPAL_SUCCESS ;
230246}
231247
0 commit comments