1
1

Remove legacy FCA_IS_LOCAL_PROCESS macro

and use OPAL_PROC_ON_LOCAL_NODE instead

cmr=v1.8.2:reviewer=rhc

This commit was SVN r32079.
Этот коммит содержится в:
Gilles Gouaillardet 2014-06-25 02:37:53 +00:00
родитель f70b4a33ec
Коммит fae7adf8ee
4 изменённых файлов: 42 добавлений и 47 удалений

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

@ -1,13 +1,14 @@
/**
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
$HEADER$
/*
* Copyright (c) 2011 Mellanox Technologies. All rights reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef MCA_COLL_FCA_H
#define MCA_COLL_FCA_H
@ -58,14 +59,6 @@
ompi_ddt_is_contiguous_memory_layout(__dtype, __count)
#endif
#ifdef OMPI_PROC_FLAG_LOCAL
#define FCA_IS_LOCAL_PROCESS(n) ((n) & OMPI_PROC_FLAG_LOCAL)
#else
#define FCA_IS_LOCAL_PROCESS(n) OPAL_PROC_ON_LOCAL_NODE(n)
#endif
BEGIN_C_DECLS
/*

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

@ -1,11 +1,14 @@
/**
Copyright (c) 2011 Mellanox Technologies. All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
$HEADER$
/*
* Copyright (c) 2011 Mellanox Technologies. All rights reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "coll_fca.h"
/*
@ -42,7 +45,7 @@ static int have_remote_peers(ompi_group_t *group, size_t size, int *local_peers)
ret = 0;
for (i = 0; i < size; ++i) {
proc = ompi_group_peer_lookup(group, i);
if (FCA_IS_LOCAL_PROCESS(proc->proc_flags)) {
if (OPAL_PROC_ON_LOCAL_NODE(proc->proc_flags)) {
++*local_peers;
} else {
ret = 1;
@ -69,7 +72,7 @@ static int __get_local_ranks(mca_coll_fca_module_t *fca_module)
fca_module->num_local_procs = 0;
for (rank = 0; rank < ompi_comm_size(comm); ++rank) {
proc = __local_rank_lookup(comm, rank);
if (FCA_IS_LOCAL_PROCESS(proc->proc_flags)) {
if (OPAL_PROC_ON_LOCAL_NODE(proc->proc_flags)) {
if (rank == fca_module->rank) {
fca_module->local_proc_idx = fca_module->num_local_procs;
}
@ -89,7 +92,7 @@ static int __get_local_ranks(mca_coll_fca_module_t *fca_module)
i = 0;
for (rank = 0; rank < ompi_comm_size(comm); ++rank) {
proc = __local_rank_lookup(comm, rank);
if (FCA_IS_LOCAL_PROCESS(proc->proc_flags)) {
if (OPAL_PROC_ON_LOCAL_NODE(proc->proc_flags)) {
fca_module->local_ranks[i++] = rank;
}
}

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

@ -1,12 +1,14 @@
/**
* Copyright (c) 2013 Mellanox Technologies, Inc.
* All rights reserved.
* $COPYRIGHT$
* Copyright (c) 2013 Mellanox Technologies, Inc.
* All rights reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
* Additional copyrights may follow
*
* $HEADER$
* */
* $HEADER$
*/
#ifndef MCA_SCOLL_FCA_H
#define MCA_SCOLL_FCA_H
@ -19,12 +21,6 @@
#include "scoll_fca_api.h"
#include "scoll_fca_debug.h"
#ifdef OMPI_PROC_FLAG_LOCAL
#define FCA_IS_LOCAL_PROCESS(n) ((n) & OMPI_PROC_FLAG_LOCAL)
#else
#define FCA_IS_LOCAL_PROCESS(n) OPAL_PROC_ON_LOCAL_NODE(n)
#endif
BEGIN_C_DECLS
struct mca_scoll_fca_component_t {
/** Base coll component */

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

@ -1,12 +1,15 @@
/**
* Copyright (c) 2013 Mellanox Technologies, Inc.
* All rights reserved.
* $COPYRIGHT$
* Copyright (c) 2013 Mellanox Technologies, Inc.
* All rights reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
* Additional copyrights may follow
*
* $HEADER$
* */
* $HEADER$
*/
#include "oshmem_config.h"
#include "scoll_fca.h"
#include <stdio.h>
@ -109,7 +112,7 @@ static int have_remote_peers(struct oshmem_group_t *group,
ret = 0;
for (i = 0; i < size; ++i) {
proc = group->proc_array[i];
if (FCA_IS_LOCAL_PROCESS(proc->proc_flags)) {
if (OPAL_PROC_ON_LOCAL_NODE(proc->proc_flags)) {
++*local_peers;
} else {
ret = 1;
@ -132,7 +135,7 @@ static int _get_local_ranks(mca_scoll_fca_module_t *fca_module)
fca_module->num_local_procs = 0;
for (rank = 0; rank < comm->proc_count; ++rank) {
proc = comm->proc_array[rank];
if (FCA_IS_LOCAL_PROCESS(proc->proc_flags)) {
if (OPAL_PROC_ON_LOCAL_NODE(proc->proc_flags)) {
if (proc->proc_name.vpid == (uint32_t) fca_module->rank) {
fca_module->local_proc_idx = fca_module->num_local_procs;
}
@ -151,7 +154,7 @@ static int _get_local_ranks(mca_scoll_fca_module_t *fca_module)
i = 0;
for (rank = 0; rank < comm->proc_count; ++rank) {
proc = comm->proc_array[rank];
if (FCA_IS_LOCAL_PROCESS(proc->proc_flags)) {
if (OPAL_PROC_ON_LOCAL_NODE(proc->proc_flags)) {
fca_module->local_ranks[i++] = rank;
}
}