1
1

atomics: Remove requirement of 64 bit atomics

Remove two of the three  instances of components requiring
64 bit atomics, even on 32 bit systems.  The SM OSC component
also uses 64 bit atomics, but is a more complicated fix that
will follow this one.  Currently, no one is testing on
platforms that don't provide 64 bit atomics (even in 32 bit
mode), but with the removal of the non-inline assembly for
IA32, the older compilers on Absoft's test systems now
result in no practical way to call cmpxchg8 in 32 bit mode.
At that point, these failures started popping up.

Signed-off-by: Brian Barrett <bbarrett@amazon.com>
Этот коммит содержится в:
Brian Barrett 2017-09-11 18:06:09 +00:00
родитель 6775b2a9c6
Коммит 637ebf60f9
4 изменённых файлов: 13 добавлений и 5 удалений

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

@ -2,6 +2,8 @@
* Copyright (c) 2016 Inria. All rights reserved.
* Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2017 Amazon.com, Inc. or its affiliates. All Rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -34,7 +36,7 @@ struct mca_coll_monitoring_module_t {
mca_coll_base_module_t super;
mca_coll_base_comm_coll_t real;
mca_monitoring_coll_data_t*data;
int64_t is_initialized;
int32_t is_initialized;
};
typedef struct mca_coll_monitoring_module_t mca_coll_monitoring_module_t;
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_coll_monitoring_module_t);

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

@ -1,5 +1,7 @@
/*
* Copyright (c) 2016-2017 Inria. All rights reserved.
* Copyright (c) 2017 Amazon.com, Inc. or its affiliates. All Rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -118,7 +120,7 @@ static int
mca_coll_monitoring_module_enable(mca_coll_base_module_t*module, struct ompi_communicator_t*comm)
{
mca_coll_monitoring_module_t*monitoring_module = (mca_coll_monitoring_module_t*) module;
if( 1 == opal_atomic_add_64(&monitoring_module->is_initialized, 1) ) {
if( 1 == opal_atomic_add_32(&monitoring_module->is_initialized, 1) ) {
MONITORING_SAVE_FULL_PREV_COLL_API(monitoring_module, comm);
monitoring_module->data = mca_common_monitoring_coll_new(comm);
OPAL_MONITORING_PRINT_INFO("coll_module_enabled");
@ -130,7 +132,7 @@ static int
mca_coll_monitoring_module_disable(mca_coll_base_module_t*module, struct ompi_communicator_t*comm)
{
mca_coll_monitoring_module_t*monitoring_module = (mca_coll_monitoring_module_t*) module;
if( 0 == opal_atomic_sub_64(&monitoring_module->is_initialized, 1) ) {
if( 0 == opal_atomic_sub_32(&monitoring_module->is_initialized, 1) ) {
MONITORING_RELEASE_FULL_PREV_COLL_API(monitoring_module, comm);
mca_common_monitoring_coll_release(monitoring_module->data);
monitoring_module->data = NULL;

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

@ -2,6 +2,8 @@
* Copyright (c) 2016-2017 Inria. All rights reserved.
* Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2017 Amazon.com, Inc. or its affiliates. All Rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -34,7 +36,7 @@
/* Define the ompi_osc_monitoring_module_## template ##_init_done variable */
#define OMPI_OSC_MONITORING_MODULE_INIT_GENERATE(template) \
static int64_t OMPI_OSC_MONITORING_MODULE_INIT(template)
static int32_t OMPI_OSC_MONITORING_MODULE_INIT(template)
/* Define and set the ompi_osc_monitoring_## template ##_template
* variable. The functions recorded here are linked to the original

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

@ -1,5 +1,7 @@
/*
* Copyright (c) 2016-2017 Inria. All rights reserved.
* Copyright (c) 2017 Amazon.com, Inc. or its affiliates. All Rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -59,7 +61,7 @@
static inline void* \
ompi_osc_monitoring_## template ##_set_template (ompi_osc_base_module_t*module) \
{ \
if( 1 == opal_atomic_add_64(&(OMPI_OSC_MONITORING_MODULE_INIT(template)), 1) ) { \
if( 1 == opal_atomic_add_32(&(OMPI_OSC_MONITORING_MODULE_INIT(template)), 1) ) { \
/* Saves the original module functions in \
* ompi_osc_monitoring_module_## template ##_template \
*/ \