@@ -125,9 +125,7 @@ static int component_init(bool enable_progress_threads, bool enable_mpi_threads)
125
125
126
126
status = ucp_config_read ("MPI" , NULL , & config );
127
127
if (UCS_OK != status ) {
128
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
129
- "%s:%d: ucp_config_read failed: %d\n" ,
130
- __FILE__ , __LINE__ , status );
128
+ OSC_UCX_VERBOSE (1 , "ucp_config_read failed: %d" , status );
131
129
return OMPI_ERROR ;
132
130
}
133
131
@@ -139,9 +137,7 @@ static int component_init(bool enable_progress_threads, bool enable_mpi_threads)
139
137
OBJ_CLASS (ompi_osc_ucx_request_t ),
140
138
0 , 0 , 8 , 0 , 8 , NULL , 0 , NULL , NULL , NULL );
141
139
if (OMPI_SUCCESS != ret ) {
142
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
143
- "%s:%d: opal_free_list_init failed: %d\n" ,
144
- __FILE__ , __LINE__ , ret );
140
+ OSC_UCX_VERBOSE (1 , "opal_free_list_init failed: %d" , ret );
145
141
goto error ;
146
142
}
147
143
@@ -164,9 +160,7 @@ static int component_init(bool enable_progress_threads, bool enable_mpi_threads)
164
160
status = ucp_init (& context_params , config , & mca_osc_ucx_component .ucp_context );
165
161
ucp_config_release (config );
166
162
if (UCS_OK != status ) {
167
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
168
- "%s:%d: ucp_init failed: %d\n" ,
169
- __FILE__ , __LINE__ , status );
163
+ OSC_UCX_VERBOSE (1 , "ucp_init failed: %d" , status );
170
164
ret = OMPI_ERROR ;
171
165
goto error ;
172
166
}
@@ -196,6 +190,7 @@ static int component_finalize(void) {
196
190
OBJ_DESTRUCT (& mca_osc_ucx_component .requests );
197
191
opal_progress_unregister (progress_callback );
198
192
ucp_cleanup (mca_osc_ucx_component .ucp_context );
193
+ opal_common_ucx_mca_deregister ();
199
194
return OMPI_SUCCESS ;
200
195
}
201
196
@@ -265,19 +260,15 @@ static inline int mem_map(void **base, size_t size, ucp_mem_h *memh_ptr,
265
260
266
261
status = ucp_mem_map (mca_osc_ucx_component .ucp_context , & mem_params , memh_ptr );
267
262
if (status != UCS_OK ) {
268
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
269
- "%s:%d: ucp_mem_map failed: %d\n" ,
270
- __FILE__ , __LINE__ , status );
263
+ OSC_UCX_VERBOSE (1 , "ucp_mem_map failed: %d" , status );
271
264
ret = OMPI_ERROR ;
272
265
goto error ;
273
266
}
274
267
275
268
mem_attrs .field_mask = UCP_MEM_ATTR_FIELD_ADDRESS | UCP_MEM_ATTR_FIELD_LENGTH ;
276
269
status = ucp_mem_query ((* memh_ptr ), & mem_attrs );
277
270
if (status != UCS_OK ) {
278
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
279
- "%s:%d: ucp_mem_query failed: %d\n" ,
280
- __FILE__ , __LINE__ , status );
271
+ OSC_UCX_VERBOSE (1 , "ucp_mem_query failed: %d" , status );
281
272
ret = OMPI_ERROR ;
282
273
goto error ;
283
274
}
@@ -336,38 +327,30 @@ static int component_select(struct ompi_win_t *win, void **base, size_t size, in
336
327
status = ucp_worker_create (mca_osc_ucx_component .ucp_context , & worker_params ,
337
328
& (mca_osc_ucx_component .ucp_worker ));
338
329
if (UCS_OK != status ) {
339
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
340
- "%s:%d: ucp_worker_create failed: %d\n" ,
341
- __FILE__ , __LINE__ , status );
330
+ OSC_UCX_VERBOSE (1 , "ucp_worker_create failed: %d" , status );
342
331
ret = OMPI_ERROR ;
343
332
goto error_nomem ;
344
333
}
345
334
346
335
ret = opal_progress_register (progress_callback );
347
336
progress_registered = true;
348
337
if (OMPI_SUCCESS != ret ) {
349
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
350
- "%s:%d: opal_progress_register failed: %d\n" ,
351
- __FILE__ , __LINE__ , ret );
338
+ OSC_UCX_VERBOSE (1 , "opal_progress_register failed: %d" , ret );
352
339
goto error ;
353
340
}
354
341
355
342
/* query UCP worker attributes */
356
343
worker_attr .field_mask = UCP_WORKER_ATTR_FIELD_THREAD_MODE ;
357
344
status = ucp_worker_query (mca_osc_ucx_component .ucp_worker , & worker_attr );
358
345
if (UCS_OK != status ) {
359
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
360
- "%s:%d: ucp_worker_query failed: %d\n" ,
361
- __FILE__ , __LINE__ , status );
346
+ OSC_UCX_VERBOSE (1 , "ucp_worker_query failed: %d" , status );
362
347
ret = OMPI_ERROR ;
363
348
goto error_nomem ;
364
349
}
365
350
366
351
if (mca_osc_ucx_component .enable_mpi_threads == true &&
367
352
worker_attr .thread_mode != UCS_THREAD_MODE_MULTI ) {
368
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
369
- "%s:%d: ucx does not support multithreading\n" ,
370
- __FILE__ , __LINE__ );
353
+ OSC_UCX_VERBOSE (1 , "ucx does not support multithreading" );
371
354
ret = OMPI_ERROR ;
372
355
goto error_nomem ;
373
356
}
@@ -450,9 +433,7 @@ static int component_select(struct ompi_win_t *win, void **base, size_t size, in
450
433
status = ucp_worker_get_address (mca_osc_ucx_component .ucp_worker ,
451
434
& my_addr , & my_addr_len );
452
435
if (status != UCS_OK ) {
453
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
454
- "%s:%d: ucp_worker_get_address failed: %d\n" ,
455
- __FILE__ , __LINE__ , status );
436
+ OSC_UCX_VERBOSE (1 , "ucp_worker_get_address failed: %d" , status );
456
437
ret = OMPI_ERROR ;
457
438
goto error ;
458
439
}
@@ -472,9 +453,7 @@ static int component_select(struct ompi_win_t *win, void **base, size_t size, in
472
453
ep_params .address = (ucp_address_t * )& (recv_buf [disps [i ]]);
473
454
status = ucp_ep_create (mca_osc_ucx_component .ucp_worker , & ep_params , & ep );
474
455
if (status != UCS_OK ) {
475
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
476
- "%s:%d: ucp_ep_create failed: %d\n" ,
477
- __FILE__ , __LINE__ , status );
456
+ OSC_UCX_VERBOSE (1 , "ucp_ep_create failed: %d" , status );
478
457
ret = OMPI_ERROR ;
479
458
goto error ;
480
459
}
@@ -519,9 +498,7 @@ static int component_select(struct ompi_win_t *win, void **base, size_t size, in
519
498
status = ucp_rkey_pack (mca_osc_ucx_component .ucp_context , module -> memh ,
520
499
& rkey_buffer , & rkey_buffer_size );
521
500
if (status != UCS_OK ) {
522
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
523
- "%s:%d: ucp_rkey_pack failed: %d\n" ,
524
- __FILE__ , __LINE__ , status );
501
+ OSC_UCX_VERBOSE (1 , "ucp_rkey_pack failed: %d" , status );
525
502
ret = OMPI_ERROR ;
526
503
goto error ;
527
504
}
@@ -532,9 +509,7 @@ static int component_select(struct ompi_win_t *win, void **base, size_t size, in
532
509
status = ucp_rkey_pack (mca_osc_ucx_component .ucp_context , module -> state_memh ,
533
510
& state_rkey_buffer , & state_rkey_buffer_size );
534
511
if (status != UCS_OK ) {
535
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
536
- "%s:%d: ucp_rkey_pack failed: %d\n" ,
537
- __FILE__ , __LINE__ , status );
512
+ OSC_UCX_VERBOSE (1 , "ucp_rkey_pack failed: %d" , status );
538
513
ret = OMPI_ERROR ;
539
514
goto error ;
540
515
}
@@ -581,9 +556,7 @@ static int component_select(struct ompi_win_t *win, void **base, size_t size, in
581
556
status = ucp_ep_rkey_unpack (ep , & (recv_buf [disps [i ] + 2 * sizeof (uint64_t )]),
582
557
& ((module -> win_info_array [i ]).rkey ));
583
558
if (status != UCS_OK ) {
584
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
585
- "%s:%d: ucp_ep_rkey_unpack failed: %d\n" ,
586
- __FILE__ , __LINE__ , status );
559
+ OSC_UCX_VERBOSE (1 , "ucp_ep_rkey_unpack failed: %d" , status );
587
560
ret = OMPI_ERROR ;
588
561
goto error ;
589
562
}
@@ -593,9 +566,7 @@ static int component_select(struct ompi_win_t *win, void **base, size_t size, in
593
566
status = ucp_ep_rkey_unpack (ep , & (recv_buf [disps [i ] + 2 * sizeof (uint64_t ) + rkey_sizes [i ]]),
594
567
& ((module -> state_info_array [i ]).rkey ));
595
568
if (status != UCS_OK ) {
596
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
597
- "%s:%d: ucp_ep_rkey_unpack failed: %d\n" ,
598
- __FILE__ , __LINE__ , status );
569
+ OSC_UCX_VERBOSE (1 , "ucp_ep_rkey_unpack failed: %d" , status );
599
570
ret = OMPI_ERROR ;
600
571
goto error ;
601
572
}
@@ -750,9 +721,7 @@ int ompi_osc_ucx_win_attach(struct ompi_win_t *win, void *base, size_t len) {
750
721
module -> local_dynamic_win_info [insert_index ].memh ,
751
722
& rkey_buffer , (size_t * )& rkey_buffer_size );
752
723
if (status != UCS_OK ) {
753
- opal_output_verbose (1 , ompi_osc_base_framework .framework_output ,
754
- "%s:%d: ucp_rkey_pack failed: %d\n" ,
755
- __FILE__ , __LINE__ , status );
724
+ OSC_UCX_VERBOSE (1 , "ucp_rkey_pack failed: %d" , status );
756
725
return OMPI_ERROR ;
757
726
}
758
727
0 commit comments