22/*
33 * Copyright (c) 2013-2017 Intel, Inc. All rights reserved
44 *
5- * Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved.
5+ * Copyright (c) 2014-2017 Cisco Systems, Inc. All rights reserved
66 * Copyright (c) 2015-2016 Los Alamos National Security, LLC. All rights
77 * reserved.
88 * $COPYRIGHT$
@@ -341,13 +341,16 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
341341 NULL , /* Optional name or fabric to resolve */
342342 NULL , /* Optional service name or port to request */
343343 0ULL , /* Optional flag */
344- hints , /* In: Hints to filter providers */
344+ hints , /* In: Hints to filter providers */
345345 & providers ); /* Out: List of matching providers */
346- if (0 != ret ) {
346+ if (FI_ENODATA == - ret ) {
347+ // It is not an error if no information is returned.
348+ goto error ;
349+ } else if (0 != ret ) {
347350 opal_show_help ("help-mtl-ofi.txt" , "OFI call fail" , true,
348351 "fi_getinfo" ,
349352 ompi_process_info .nodename , __FILE__ , __LINE__ ,
350- fi_strerror (- ret ), ret );
353+ fi_strerror (- ret ), - ret );
351354 goto error ;
352355 }
353356
@@ -376,7 +379,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
376379 opal_show_help ("help-mtl-ofi.txt" , "OFI call fail" , true,
377380 "fi_fabric" ,
378381 ompi_process_info .nodename , __FILE__ , __LINE__ ,
379- fi_strerror (- ret ), ret );
382+ fi_strerror (- ret ), - ret );
380383 goto error ;
381384 }
382385
@@ -393,7 +396,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
393396 opal_show_help ("help-mtl-ofi.txt" , "OFI call fail" , true,
394397 "fi_domain" ,
395398 ompi_process_info .nodename , __FILE__ , __LINE__ ,
396- fi_strerror (- ret ), ret );
399+ fi_strerror (- ret ), - ret );
397400 goto error ;
398401 }
399402
@@ -412,7 +415,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
412415 opal_show_help ("help-mtl-ofi.txt" , "OFI call fail" , true,
413416 "fi_endpoint" ,
414417 ompi_process_info .nodename , __FILE__ , __LINE__ ,
415- fi_strerror (- ret ), ret );
418+ fi_strerror (- ret ), - ret );
416419 goto error ;
417420 }
418421
@@ -570,23 +573,23 @@ ompi_mtl_ofi_finalize(struct mca_mtl_base_module_t *mtl)
570573 opal_progress_unregister (ompi_mtl_ofi_progress_no_inline );
571574
572575 /* Close all the OFI objects */
573- if (ret = fi_close ((fid_t )ompi_mtl_ofi .ep )) {
576+ if (( ret = fi_close ((fid_t )ompi_mtl_ofi .ep ) )) {
574577 goto finalize_err ;
575578 }
576579
577- if (ret = fi_close ((fid_t )ompi_mtl_ofi .cq )) {
580+ if (( ret = fi_close ((fid_t )ompi_mtl_ofi .cq ) )) {
578581 goto finalize_err ;
579582 }
580583
581- if (ret = fi_close ((fid_t )ompi_mtl_ofi .av )) {
584+ if (( ret = fi_close ((fid_t )ompi_mtl_ofi .av ) )) {
582585 goto finalize_err ;
583586 }
584587
585- if (ret = fi_close ((fid_t )ompi_mtl_ofi .domain )) {
588+ if (( ret = fi_close ((fid_t )ompi_mtl_ofi .domain ) )) {
586589 goto finalize_err ;
587590 }
588591
589- if (ret = fi_close ((fid_t )ompi_mtl_ofi .fabric )) {
592+ if (( ret = fi_close ((fid_t )ompi_mtl_ofi .fabric ) )) {
590593 goto finalize_err ;
591594 }
592595
@@ -596,7 +599,7 @@ ompi_mtl_ofi_finalize(struct mca_mtl_base_module_t *mtl)
596599 opal_show_help ("help-mtl-ofi.txt" , "OFI call fail" , true,
597600 "fi_close" ,
598601 ompi_process_info .nodename , __FILE__ , __LINE__ ,
599- fi_strerror (- ret ), ret );
602+ fi_strerror (- ret ), - ret );
600603
601604 return OMPI_ERROR ;
602605}
0 commit comments