Skip to content

Commit 6774357

Browse files
authored
Merge pull request #9831 from jsquyres/pr/unrelated-updates-except-that-theyre-part-of-changes-we-want-for-the-v4.1.x-branch-and-so-theyre-lumped-together-on-the-same-pr
Two updates: 1) better message in msgq, 2) pedantic casting in osc/rdma
2 parents 5a3c4d9 + cefdf12 commit 6774357

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

ompi/debuggers/ompi_msgq_dll.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
3-
* Copyright (c) 2007-2018 Cisco Systems, Inc. All rights reserved.
3+
* Copyright (c) 2007-2022 Cisco Systems, Inc. All rights reserved
44
* Copyright (c) 2004-2010 The University of Tennessee and The University
55
* of Tennessee Research Foundation. All rights
66
* reserved.
@@ -1165,7 +1165,7 @@ static int fetch_request( mqs_process *proc, mpi_process_info *p_info,
11651165
// data_name in res->extra_text[2] (vs. extra_text[1]),
11661166
// where it is guaranteed to fit.
11671167
data_name[4] = '\0';
1168-
snprintf( (char*)res->extra_text[1], 64, "Data: %d",
1168+
snprintf( (char*)res->extra_text[1], 64, "Data: %d instances of MPI datatype",
11691169
(int)res->desired_length);
11701170
snprintf( (char*)res->extra_text[2], 64, "%s",
11711171
data_name );

ompi/mca/osc/rdma/osc_rdma_accumulate.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* reserved.
1010
* Copyright (c) 2019-2021 Google, LLC. All rights reserved.
1111
* Copyright (c) 2021 IBM Corporation. All rights reserved.
12+
* Copyright (c) 2022 Cisco Systems, Inc. All rights reserved
1213
* $COPYRIGHT$
1314
*
1415
* Additional copyrights may follow
@@ -208,9 +209,9 @@ static int ompi_osc_rdma_fetch_and_op_cas (ompi_osc_rdma_sync_t *sync, const voi
208209
new_value = old_value;
209210

210211
if (&ompi_mpi_op_replace.op == op) {
211-
memcpy ((void *)((intptr_t) &new_value + offset), (void *)((intptr_t) origin_addr + dt->super.true_lb), extent);
212+
memcpy ((void *)((ptrdiff_t) &new_value + offset), (void *)((ptrdiff_t) origin_addr + dt->super.true_lb), extent);
212213
} else if (&ompi_mpi_op_no_op.op != op) {
213-
ompi_op_reduce (op, (void *) ((intptr_t) origin_addr + dt->super.true_lb), (void*)((intptr_t) &new_value + offset), 1, dt);
214+
ompi_op_reduce (op, (void *) ((ptrdiff_t) origin_addr + dt->super.true_lb), (void*)((ptrdiff_t) &new_value + offset), 1, dt);
214215
}
215216

216217
ret = ompi_osc_rdma_btl_cswap (module, peer->data_btl_index, peer->data_endpoint, address, target_handle,

0 commit comments

Comments
 (0)