diff --git a/ompi/mca/coll/fca/coll_fca.h b/ompi/mca/coll/fca/coll_fca.h index d3bfb4a70e..cd41001199 100644 --- a/ompi/mca/coll/fca/coll_fca.h +++ b/ompi/mca/coll/fca/coll_fca.h @@ -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 /* diff --git a/ompi/mca/coll/fca/coll_fca_module.c b/ompi/mca/coll/fca/coll_fca_module.c index f4fb79f6f1..b793f3c9e3 100644 --- a/ompi/mca/coll/fca/coll_fca_module.c +++ b/ompi/mca/coll/fca/coll_fca_module.c @@ -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; } } diff --git a/oshmem/mca/scoll/fca/scoll_fca.h b/oshmem/mca/scoll/fca/scoll_fca.h index 04e7c14bc0..07b946b15f 100644 --- a/oshmem/mca/scoll/fca/scoll_fca.h +++ b/oshmem/mca/scoll/fca/scoll_fca.h @@ -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 */ diff --git a/oshmem/mca/scoll/fca/scoll_fca_module.c b/oshmem/mca/scoll/fca/scoll_fca_module.c index 5ed79de2e4..88e78b2f0f 100644 --- a/oshmem/mca/scoll/fca/scoll_fca_module.c +++ b/oshmem/mca/scoll/fca/scoll_fca_module.c @@ -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 @@ -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; } }