From d6d73b7724d5495d0d493645b1e4c4a403f513d6 Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Thu, 26 Sep 2019 15:54:46 -0500 Subject: [PATCH] mtl/ofi: replace OMPI_UNLIKELY with OPAL version one off patch for v4.0.x. for some reason commit on master didn't have this problem. Signed-off-by: Howard Pritchard (cherry picked from commit 5f3dbdb5c8a94a4f426ecca1a3a91c83035f956c) Note that this commit is actually a cherry-pick from the v4.0.x branch. This is the opposite direction than what we nornmally do: we usually commit to master first and then cherry-pick to the release branches (vs. the other way around). As is probably evident from the original commit message above, through a comedy of errors, this commit was actually applied to the v4.0.x branch first and then cherry-picked back to master (i.e., the problem *did* exist in the original master commit 3aca4af548a3d781b6b52f89f4d6c7e66d379609, but it was not recongized at the time). Signed-off-by: Jeff Squyres --- ompi/mca/mtl/ofi/mtl_ofi.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ompi/mca/mtl/ofi/mtl_ofi.h b/ompi/mca/mtl/ofi/mtl_ofi.h index 9301f6d641..314ee4b670 100644 --- a/ompi/mca/mtl/ofi/mtl_ofi.h +++ b/ompi/mca/mtl/ofi/mtl_ofi.h @@ -2,6 +2,8 @@ * Copyright (c) 2013-2018 Intel, Inc. All rights reserved * Copyright (c) 2017 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2019 Triad National Security, LLC. All rights + * reserved. * * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved. * $COPYRIGHT$ @@ -562,7 +564,7 @@ ompi_mtl_ofi_isend_generic(struct mca_mtl_base_module_t *mtl, sep_peer_fiaddr = fi_rx_addr(endpoint->peer_fiaddr, ctxt_id, ompi_mtl_ofi.rx_ctx_bits); ompi_ret = ompi_mtl_datatype_pack(convertor, &start, &length, &free_after); - if (OMPI_UNLIKELY(OMPI_SUCCESS != ompi_ret)) return ompi_ret; + if (OPAL_UNLIKELY(OMPI_SUCCESS != ompi_ret)) return ompi_ret; ofi_req->buffer = (free_after) ? start : NULL; ofi_req->length = length;