From 67d9bc599536e197f3fa21400cfb91af4e30e506 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 13 Mar 2018 09:48:15 -0700 Subject: [PATCH] Update the loop stats. The loop should be updated on each internal iteration. This is a manually-created patch for the v2.x branch, derived from 78480351955b8a27d44221090736df1716f3c384 on master. Signed-off-by: George Bosilca Signed-off-by: Jeff Squyres --- opal/datatype/opal_datatype_get_count.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/opal/datatype/opal_datatype_get_count.c b/opal/datatype/opal_datatype_get_count.c index 7b539fbec81..7b33b734808 100644 --- a/opal/datatype/opal_datatype_get_count.c +++ b/opal/datatype/opal_datatype_get_count.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * Copyright (c) 2004-2009 The University of Tennessee and The University + * Copyright (c) 2004-2018 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. @@ -58,9 +58,8 @@ ssize_t opal_datatype_get_element_count( const opal_datatype_t* datatype, size_t continue; } if( OPAL_DATATYPE_LOOP == pElems[pos_desc].elem.common.type ) { - ddt_loop_desc_t* loop = &(pElems[pos_desc].loop); do { - PUSH_STACK( pStack, stack_pos, pos_desc, OPAL_DATATYPE_LOOP, loop->loops, 0 ); + PUSH_STACK( pStack, stack_pos, pos_desc, OPAL_DATATYPE_LOOP, pElems[pos_desc].loop.loops, 0 ); pos_desc++; } while( OPAL_DATATYPE_LOOP == pElems[pos_desc].elem.common.type ); /* let's start another loop */ DDT_DUMP_STACK( pStack, stack_pos, pElems, "advance loops" ); @@ -121,9 +120,8 @@ int32_t opal_datatype_set_element_count( const opal_datatype_t* datatype, size_t continue; } if( OPAL_DATATYPE_LOOP == pElems[pos_desc].elem.common.type ) { - ddt_loop_desc_t* loop = &(pElems[pos_desc].loop); do { - PUSH_STACK( pStack, stack_pos, pos_desc, OPAL_DATATYPE_LOOP, loop->loops, 0 ); + PUSH_STACK( pStack, stack_pos, pos_desc, OPAL_DATATYPE_LOOP, pElems[pos_desc].loop.loops, 0 ); pos_desc++; } while( OPAL_DATATYPE_LOOP == pElems[pos_desc].elem.common.type ); /* let's start another loop */ DDT_DUMP_STACK( pStack, stack_pos, pElems, "advance loops" );