1
1

Per the developer conference, let's be a little nicer during MPI_Finalize and ease up on the cpu by inserting usleep into the loop over opal_progress while waiting for the RTE barrier to complete. This is a non-performant area of the code, and while most codes may call finalize at close-to-similar times, there are some that may choose to have one or more procs continue to perform some work prior to finalizing.

So save a little power while we are waiting.

cmr=v1.8.2:reviewer=jladd:subject=save power during finalize

This commit was SVN r32077.
Этот коммит содержится в:
Ralph Castain 2014-06-24 21:59:50 +00:00
родитель 563eaf0726
Коммит f70b4a33ec
2 изменённых файлов: 14 добавлений и 1 удалений

Просмотреть файл

@ -2,6 +2,7 @@
* Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved.
* Copyright (c) 2013 Mellanox Technologies, Inc.
* All rights reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved.
*
* $COPYRIGHT$
*
@ -250,6 +251,18 @@ OMPI_DECLSPEC extern mca_base_framework_t ompi_rte_base_framework;
} \
}while(0);
#define OMPI_LAZY_WAIT_FOR_COMPLETION(flg) \
do { \
opal_output_verbose(1, ompi_rte_base_framework.framework_output, \
"%s lazy waiting on RTE event at %s:%d", \
OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), \
__FILE__, __LINE__); \
while ((flg)) { \
opal_progress(); \
usleep(100); \
} \
}while(0);
typedef struct {
opal_list_item_t super;
ompi_process_name_t name;

Просмотреть файл

@ -217,7 +217,7 @@ int ompi_mpi_finalize(void)
}
/* wait for barrier to complete */
OMPI_WAIT_FOR_COMPLETION(coll->active);
OMPI_LAZY_WAIT_FOR_COMPLETION(coll->active);
OBJ_RELEASE(coll);
/* check for timing request - get stop time and report elapsed