From 9bfca8b27401a89a45043914b24de195505e4651 Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Mon, 28 Nov 2016 19:20:48 +0900 Subject: [PATCH] pml/ob1: Reduce per-rank memory footprint slightly `sturct mca_pml_ob1_comm_proc_t`, which is allocated per connected rank in a communicator, had two paddings after `expected_sequence` and `send_sequence` by alignments. By changing the order of the members, the size of `mca_pml_ob1_comm_proc_t` is reduced by 8 bytes on 64-bit architectures. Signed-off-by: KAWASHIMA Takahiro --- ompi/mca/pml/ob1/pml_ob1_comm.c | 2 +- ompi/mca/pml/ob1/pml_ob1_comm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ompi/mca/pml/ob1/pml_ob1_comm.c b/ompi/mca/pml/ob1/pml_ob1_comm.c index 4333c11e6a..40c54771a8 100644 --- a/ompi/mca/pml/ob1/pml_ob1_comm.c +++ b/ompi/mca/pml/ob1/pml_ob1_comm.c @@ -26,8 +26,8 @@ static void mca_pml_ob1_comm_proc_construct(mca_pml_ob1_comm_proc_t* proc) { - proc->expected_sequence = 1; proc->ompi_proc = NULL; + proc->expected_sequence = 1; proc->send_sequence = 0; OBJ_CONSTRUCT(&proc->frags_cant_match, opal_list_t); OBJ_CONSTRUCT(&proc->specific_receives, opal_list_t); diff --git a/ompi/mca/pml/ob1/pml_ob1_comm.h b/ompi/mca/pml/ob1/pml_ob1_comm.h index 10839eb3ea..33f1695519 100644 --- a/ompi/mca/pml/ob1/pml_ob1_comm.h +++ b/ompi/mca/pml/ob1/pml_ob1_comm.h @@ -33,8 +33,8 @@ BEGIN_C_DECLS struct mca_pml_ob1_comm_proc_t { opal_object_t super; - uint16_t expected_sequence; /**< send message sequence number - receiver side */ struct ompi_proc_t* ompi_proc; + uint16_t expected_sequence; /**< send message sequence number - receiver side */ #if OPAL_ENABLE_MULTI_THREADS volatile int32_t send_sequence; /**< send side sequence number */ #else