fca:
- keep compat to fca v1.2 and fca 2.0 - fix segv - keep compat to ompi 1.4.x This commit was SVN r23569.
Этот коммит содержится в:
родитель
e0844f3a40
Коммит
7d1a8a154d
@ -18,7 +18,7 @@ AC_DEFUN([OMPI_CHECK_FCA],[
|
||||
AC_ARG_WITH([fca],
|
||||
[AC_HELP_STRING([--with-fca(=DIR)],
|
||||
[Build fca (Voltaire Fabric Collective Accelerator) support, searching for libraries in DIR])])
|
||||
OMPI_CHECK_WITHDIR([fca], [$with_fca], [include/fca_core/fca_api.h])
|
||||
OMPI_CHECK_WITHDIR([fca], [$with_fca], [lib/libfca.so])
|
||||
|
||||
AS_IF([test "$with_fca" != "no"],
|
||||
[AS_IF([test ! -z "$with_fca" -a "$with_fca" != "yes"],
|
||||
@ -30,13 +30,14 @@ AC_DEFUN([OMPI_CHECK_FCA],[
|
||||
CPPFLAGS_save="$CPPFLAGS"
|
||||
LDFLAGS_save="$LDFLAGS"
|
||||
LIBS_save="$LIBS"
|
||||
CPPFLAGS="$CPPFLAGS -I$ompi_check_fca_dir/include/fca -I$ompi_check_fca_dir/include/fca_core"
|
||||
|
||||
OMPI_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1)
|
||||
OMPI_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1)
|
||||
OMPI_LOG_MSG([$1_LIBS : $$1_LIBS], 1)
|
||||
|
||||
OMPI_CHECK_PACKAGE([$1],
|
||||
[fca_core/fca_api.h],
|
||||
[fca_api.h],
|
||||
[$ompi_check_fca_libs],
|
||||
[fca_get_version],
|
||||
[],
|
||||
|
@ -10,7 +10,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
AM_CPPFLAGS = $(coll_fca_CPPFLAGS) -DCOLL_FCA_HOME=\"$(coll_fca_HOME)\"
|
||||
AM_CPPFLAGS = $(coll_fca_CPPFLAGS) -DCOLL_FCA_HOME=\"$(coll_fca_HOME)\" -I$(coll_fca_HOME)/include/fca -I$(coll_fca_HOME)/include/fca_core
|
||||
|
||||
#dist_pkgdata_DATA = help-coll-fca.txt
|
||||
coll_fca_sources = \
|
||||
|
@ -10,11 +10,7 @@
|
||||
#ifndef MCA_COLL_FCA_H
|
||||
#define MCA_COLL_FCA_H
|
||||
|
||||
#include <fca_core/fca_api.h>
|
||||
#ifdef FCA_PROF
|
||||
#include <fca_core/fca_prof.h>
|
||||
#endif
|
||||
|
||||
#include <fca_api.h>
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "mpi.h"
|
||||
@ -37,6 +33,12 @@
|
||||
#define FCA_DT_IS_CONTIGUOUS_MEMORY_LAYOUT ompi_ddt_is_contiguous_memory_layout
|
||||
#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
|
||||
|
||||
|
@ -29,7 +29,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 (OPAL_PROC_ON_LOCAL_NODE(proc->proc_flags)) {
|
||||
if (FCA_IS_LOCAL_PROCESS(proc->proc_flags)) {
|
||||
++*local_peers;
|
||||
} else {
|
||||
ret = 1;
|
||||
@ -56,8 +56,13 @@ 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 (OPAL_PROC_ON_LOCAL_NODE(proc->proc_flags))
|
||||
if (FCA_IS_LOCAL_PROCESS(proc->proc_flags))
|
||||
++fca_module->num_local_procs;
|
||||
|
||||
FCA_MODULE_VERBOSE(fca_module, 4, "rank %d flags 0x%x host %s", rank,
|
||||
proc->proc_flags,
|
||||
proc->proc_hostname);
|
||||
|
||||
}
|
||||
fca_module->local_ranks = calloc(fca_module->num_local_procs, sizeof *fca_module->local_ranks);
|
||||
|
||||
@ -65,7 +70,7 @@ static int __get_local_ranks(mca_coll_fca_module_t *fca_module)
|
||||
index = 0;
|
||||
for (rank = 0; rank< ompi_comm_size(comm); ++rank) {
|
||||
proc = __local_rank_lookup(comm, rank);
|
||||
if (!OPAL_PROC_ON_LOCAL_NODE(proc->proc_flags))
|
||||
if (!FCA_IS_LOCAL_PROCESS(proc->proc_flags))
|
||||
continue;
|
||||
|
||||
if (rank == fca_module->rank)
|
||||
|
@ -51,7 +51,7 @@ static mca_coll_fca_dtype_info_t* mca_coll_fca_get_dtype(ompi_datatype_t *dtype)
|
||||
dtype_info->mpi_dtype_extent = extent;
|
||||
dtype_info->fca_dtype = fca_dtype;
|
||||
dtype_info->fca_dtype_extent = mca_coll_fca_component.fca_ops.get_dtype_size(fca_dtype);
|
||||
FCA_VERBOSE(2, "Added new dtype[%d]: %s fca id: %d, mpi sizet: %d, fca size: %d",
|
||||
FCA_VERBOSE(2, "Added new dtype[%d]: %s fca id: %d, mpi size: %d, fca size: %d",
|
||||
id, dtype->name, dtype_info->fca_dtype, dtype_info->mpi_dtype_extent,
|
||||
dtype_info->fca_dtype_extent);
|
||||
return dtype_info;
|
||||
@ -127,7 +127,7 @@ static int mca_coll_fca_fill_reduce_spec(int count, ompi_datatype_t *dtype,
|
||||
|
||||
/* Check operation */
|
||||
op_info = mca_coll_fca_get_op(op);
|
||||
if (!op) {
|
||||
if (!op_info) {
|
||||
FCA_VERBOSE(10, "Unsupported op: %s", op->o_name);
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user