1
1

Switched FCA collectives component from dlopen to compile-time linking to libfca

This commit was SVN r27557.
Этот коммит содержится в:
Mike Dubman 2012-11-02 17:30:00 +00:00
родитель 4569f77645
Коммит ca308974e0
7 изменённых файлов: 48 добавлений и 200 удалений

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

@ -40,7 +40,7 @@ AC_DEFUN([OMPI_CHECK_FCA],[
[fca_api.h], [fca_api.h],
[$ompi_check_fca_libs], [$ompi_check_fca_libs],
[fca_get_version], [fca_get_version],
[], [-l$ompi_check_fca_libs],
[$ompi_check_fca_dir], [$ompi_check_fca_dir],
[$ompi_check_fca_libdir], [$ompi_check_fca_libdir],
[ompi_check_fca_happy="yes"], [ompi_check_fca_happy="yes"],

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

@ -37,10 +37,10 @@ endif
mcacomponentdir = $(pkglibdir) mcacomponentdir = $(pkglibdir)
mcacomponent_LTLIBRARIES = $(component_install) mcacomponent_LTLIBRARIES = $(component_install)
mca_coll_fca_la_SOURCES = $(coll_fca_sources) mca_coll_fca_la_SOURCES = $(coll_fca_sources)
mca_coll_fca_la_LIBADD = mca_coll_fca_la_LIBADD = $(coll_fca_LIBS)
mca_coll_fca_la_LDFLAGS = -module -avoid-version $(coll_fca_LDFLAGS) mca_coll_fca_la_LDFLAGS = -module -avoid-version $(coll_fca_LDFLAGS)
noinst_LTLIBRARIES = $(component_noinst) noinst_LTLIBRARIES = $(component_noinst)
libmca_coll_fca_la_SOURCES =$(coll_fca_sources) libmca_coll_fca_la_SOURCES =$(coll_fca_sources)
libmca_coll_fca_la_LIBADD = libmca_coll_fca_la_LIBADD = $(coll_fca_LIBS)
libmca_coll_fca_la_LDFLAGS = -module -avoid-version $(coll_fca_LDFLAGS) libmca_coll_fca_la_LDFLAGS = -module -avoid-version $(coll_fca_LDFLAGS)

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

@ -122,9 +122,6 @@ struct mca_coll_fca_component_t {
/** MCA parameter: Path to fca spec file */ /** MCA parameter: Path to fca spec file */
char* fca_spec_file; char* fca_spec_file;
/** MCA parameter: Path to libfca.so */
char* fca_lib_path;
/** MCA parameter: FCA device */ /** MCA parameter: FCA device */
char* fca_dev; char* fca_dev;
@ -171,8 +168,6 @@ struct mca_coll_fca_component_t {
int fca_np; int fca_np;
/* FCA global stuff */ /* FCA global stuff */
void *fca_lib_handle; /* FCA dynamic library */
mca_coll_fca_ops_t fca_ops; /* FCA operations */
fca_t *fca_context; /* FCA context handle */ fca_t *fca_context; /* FCA context handle */
mca_coll_fca_dtype_info_t fca_dtypes[FCA_DT_MAX_PREDEFINED]; /* FCA dtype translation */ mca_coll_fca_dtype_info_t fca_dtypes[FCA_DT_MAX_PREDEFINED]; /* FCA dtype translation */
mca_coll_fca_op_info_t fca_reduce_ops[FCA_MAX_OPS]; /* FCA op translation */ mca_coll_fca_op_info_t fca_reduce_ops[FCA_MAX_OPS]; /* FCA op translation */

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

@ -10,6 +10,7 @@
#include "ompi_config.h" #include "ompi_config.h"
#include <fca_api.h> #include <fca_api.h>
#include <config/fca_parse_specfile.h>
#ifndef FCA_API #ifndef FCA_API
#define OMPI_FCA_VERSION 12 #define OMPI_FCA_VERSION 12
@ -45,53 +46,6 @@
#define FCA_MINOR_BIT 16ul #define FCA_MINOR_BIT 16ul
#define EUSEMPI 287 #define EUSEMPI 287
typedef struct mca_coll_fca_ops_t {
/* FCA Context operations */
int (*init)(fca_init_spec_t *spec, fca_t **context);
void (*cleanup)(fca_t *context);
/* Fabric communicator creation */
int (*comm_new)(fca_t *context, fca_comm_new_spec_t *spec, fca_comm_desc_t *comm_desc);
int (*comm_end)(fca_t *context, int comm_id);
void* (*get_rank_info)(fca_t *context, int *size);
void (*free_rank_info)(void *rank_info);
/* Local communicator creation */
int (*comm_init)(fca_t *context, int proc_idx, int num_procs, int comm_size,
fca_comm_desc_t *comm_desc, fca_comm_t** fca_comm);
void (*comm_destroy)(fca_comm_t *comm);
int (*comm_get_caps)(fca_comm_t *comm, fca_comm_caps_t *caps);
/* Collectives supported by FCA */
int (*do_reduce)(fca_comm_t *comm, fca_reduce_spec_t *spec);
int (*do_all_reduce)(fca_comm_t *comm, fca_reduce_spec_t *spec);
int (*do_bcast)(fca_comm_t *comm, fca_bcast_spec_t *spec);
int (*do_barrier)(fca_comm_t *comm);
/* Helper functions */
unsigned long (*get_version)(void);
char * (*get_version_string)(void);
fca_init_spec_t *(*parse_spec_file)(char* spec_ini_file);
void (*free_init_spec)(fca_init_spec_t *fca_init_spec);
int (*translate_mpi_op)(char *mpi_op);
int (*translate_mpi_dtype)(char *mpi_dtype);
int (*get_dtype_size)(int dtype);
const char* (*strerror)(int code);
} mca_coll_fca_ops_t;
static inline int mca_coll_fca_comm_init(mca_coll_fca_ops_t *fca_ops,
fca_t *fca_context, int rank, int comm_size,
int local_proc_idx, int num_local_procs,
fca_comm_desc_t *comm_desc,
fca_comm_t **fca_comm)
{
return fca_ops->comm_init(fca_context, local_proc_idx, num_local_procs,
comm_size, comm_desc, fca_comm);
}
static inline void mca_coll_fca_get_bcast_root(int root_rank, int *local_ranks, static inline void mca_coll_fca_get_bcast_root(int root_rank, int *local_ranks,
int num_local_ranks, int num_local_ranks,
fca_bcast_spec_t *spec) fca_bcast_spec_t *spec)
@ -119,46 +73,7 @@ static inline void mca_coll_fca_get_reduce_root(int root_rank, int my_rank,
#define OMPI_FCA_ALLGATHERV 1 #define OMPI_FCA_ALLGATHERV 1
#define OMPI_FCA_PROGRESS 1 #define OMPI_FCA_PROGRESS 1
typedef struct mca_coll_fca_ops_t { static inline int mca_coll_fca_comm_init(fca_t *fca_context, int rank, int comm_size,
/* FCA Context operations */
int (*init)(fca_init_spec_t *spec, fca_t **context);
void (*cleanup)(fca_t *context);
void (*progress)(fca_t *context);
/* Fabric communicator creation */
int (*comm_new)(fca_t *context, fca_comm_new_spec_t *spec, fca_comm_desc_t *comm_desc);
int (*comm_end)(fca_t *context, int comm_id);
void* (*get_rank_info)(fca_t *context, int *size);
void (*free_rank_info)(void *rank_info);
/* Local communicator creation */
int (*comm_init)(fca_t *context, fca_comm_init_spec_t *spec, fca_comm_t** fca_comm);
void (*comm_destroy)(fca_comm_t *comm);
int (*comm_get_caps)(fca_comm_t *comm, fca_comm_caps_t *caps);
/* Collectives supported by FCA */
int (*do_reduce)(fca_comm_t *comm, fca_reduce_spec_t *spec);
int (*do_all_reduce)(fca_comm_t *comm, fca_reduce_spec_t *spec);
int (*do_bcast)(fca_comm_t *comm, fca_bcast_spec_t *spec);
int (*do_barrier)(fca_comm_t *comm);
int (*do_allgather)(fca_comm_t *comm, fca_gather_spec_t *spec);
int (*do_allgatherv)(fca_comm_t *comm, fca_gatherv_spec_t *spec);
/* Helper functions */
unsigned long (*get_version)(void);
char * (*get_version_string)(void);
fca_init_spec_t *(*parse_spec_file)(char* spec_ini_file);
void (*free_init_spec)(fca_init_spec_t *fca_init_spec);
int (*translate_mpi_op)(char *mpi_op);
int (*translate_mpi_dtype)(char *mpi_dtype);
int (*get_dtype_size)(int dtype);
const char* (*strerror)(int code);
} mca_coll_fca_ops_t;
static inline int mca_coll_fca_comm_init(mca_coll_fca_ops_t *fca_ops,
fca_t *fca_context, int rank, int comm_size,
int local_proc_idx, int num_local_procs, int local_proc_idx, int num_local_procs,
fca_comm_desc_t *comm_desc, fca_comm_desc_t *comm_desc,
fca_comm_t **fca_comm) fca_comm_t **fca_comm)
@ -170,7 +85,7 @@ static inline int mca_coll_fca_comm_init(mca_coll_fca_ops_t *fca_ops,
spec.desc = *comm_desc; spec.desc = *comm_desc;
spec.proc_idx = local_proc_idx; spec.proc_idx = local_proc_idx;
spec.num_procs = num_local_procs; spec.num_procs = num_local_procs;
return fca_ops->comm_init(fca_context, &spec, fca_comm); return fca_comm_init(fca_context, &spec, fca_comm);
} }
static inline void mca_coll_fca_get_bcast_root(int root_rank, int *local_ranks, static inline void mca_coll_fca_get_bcast_root(int root_rank, int *local_ranks,

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

@ -68,20 +68,6 @@ mca_coll_fca_component_t mca_coll_fca_component = {
#define FCA_API_CLEAR_MICRO(__x) ((__x>>FCA_MINOR_BIT)<<FCA_MINOR_BIT) #define FCA_API_CLEAR_MICRO(__x) ((__x>>FCA_MINOR_BIT)<<FCA_MINOR_BIT)
#define FCA_API_VER(__major,__minor) (__major<<FCA_MAJOR_BIT | __minor<<FCA_MINOR_BIT) #define FCA_API_VER(__major,__minor) (__major<<FCA_MAJOR_BIT | __minor<<FCA_MINOR_BIT)
#define GET_FCA_SYM(__name) \
{ \
dlsym_quiet((void **)&mca_coll_fca_component.fca_ops.__name, "fca_" #__name);\
if (!mca_coll_fca_component.fca_ops.__name) { \
FCA_ERROR("Symbol %s not found", "fca_" #__name); \
return OMPI_ERROR; \
} \
}
static void dlsym_quiet(void **p, char *name)
{
*p = dlsym(mca_coll_fca_component.fca_lib_handle, name);
}
/** /**
* Called from FCA blocking functions to progress MPI * Called from FCA blocking functions to progress MPI
*/ */
@ -99,8 +85,7 @@ static int mca_coll_fca_mpi_progress_cb(void)
if (!mca_coll_fca_component.fca_context) if (!mca_coll_fca_component.fca_context)
return 0; return 0;
if (mca_coll_fca_component.fca_ops.progress) fca_progress(mca_coll_fca_component.fca_context);
mca_coll_fca_component.fca_ops.progress(mca_coll_fca_component.fca_context);
#endif #endif
return 0; return 0;
} }
@ -131,23 +116,12 @@ int mca_coll_fca_get_fca_lib(struct ompi_communicator_t *comm)
unsigned long fca_ver, major, minor, detected_ver; unsigned long fca_ver, major, minor, detected_ver;
char x[3]; char x[3];
if (mca_coll_fca_component.fca_lib_handle) /* Make sure this is only run once */
if (mca_coll_fca_component.fca_context) {
return OMPI_SUCCESS; return OMPI_SUCCESS;
mca_coll_fca_component.fca_lib_handle = dlopen(mca_coll_fca_component.fca_lib_path, RTLD_LAZY);
if (!mca_coll_fca_component.fca_lib_handle) {
FCA_ERROR("Failed to load FCA from %s: %s", mca_coll_fca_component.fca_lib_path, strerror(errno));
return OMPI_ERROR;
} }
memset(&mca_coll_fca_component.fca_ops, 0, sizeof(mca_coll_fca_component.fca_ops)); fca_ver = FCA_API_CLEAR_MICRO(fca_get_version());
FCA_VERBOSE(1, "FCA Loaded from: %s", mca_coll_fca_component.fca_lib_path);
GET_FCA_SYM(get_version);
GET_FCA_SYM(get_version_string);
fca_ver = FCA_API_CLEAR_MICRO(mca_coll_fca_component.fca_ops.get_version());
major = (fca_ver>>FCA_MAJOR_BIT); major = (fca_ver>>FCA_MAJOR_BIT);
minor = (fca_ver>>FCA_MINOR_BIT) & 0xf; minor = (fca_ver>>FCA_MINOR_BIT) & 0xf;
sprintf(x, "%ld%ld", major, minor); sprintf(x, "%ld%ld", major, minor);
@ -157,39 +131,12 @@ int mca_coll_fca_get_fca_lib(struct ompi_communicator_t *comm)
if (detected_ver != OMPI_FCA_VERSION) { if (detected_ver != OMPI_FCA_VERSION) {
FCA_ERROR("Unsupported FCA version: %s, please update FCA to v%d, now v%ld", FCA_ERROR("Unsupported FCA version: %s, please update FCA to v%d, now v%ld",
mca_coll_fca_component.fca_ops.get_version_string(), fca_get_version_string(),
OMPI_FCA_VERSION, fca_ver); OMPI_FCA_VERSION, fca_ver);
return OMPI_ERROR; return OMPI_ERROR;
} }
GET_FCA_SYM(init); spec = fca_parse_spec_file(mca_coll_fca_component.fca_spec_file);
GET_FCA_SYM(cleanup);
#ifdef OMPI_FCA_PROGRESS
GET_FCA_SYM(progress);
#endif
GET_FCA_SYM(comm_new);
GET_FCA_SYM(comm_end);
GET_FCA_SYM(get_rank_info);
GET_FCA_SYM(free_rank_info);
GET_FCA_SYM(comm_init);
GET_FCA_SYM(comm_destroy);
GET_FCA_SYM(comm_get_caps);
GET_FCA_SYM(do_reduce);
GET_FCA_SYM(do_all_reduce);
GET_FCA_SYM(do_bcast);
GET_FCA_SYM(do_barrier);
#if OMPI_FCA_ALLGATHER == 1
GET_FCA_SYM(do_allgather);
GET_FCA_SYM(do_allgatherv);
#endif
GET_FCA_SYM(parse_spec_file);
GET_FCA_SYM(free_init_spec);
GET_FCA_SYM(translate_mpi_op);
GET_FCA_SYM(translate_mpi_dtype);
GET_FCA_SYM(get_dtype_size);
GET_FCA_SYM(strerror);
spec = mca_coll_fca_component.fca_ops.parse_spec_file(mca_coll_fca_component.fca_spec_file);
if (!spec) { if (!spec) {
FCA_ERROR("Failed to parse FCA spec file `%s'", mca_coll_fca_component.fca_spec_file); FCA_ERROR("Failed to parse FCA spec file `%s'", mca_coll_fca_component.fca_spec_file);
return OMPI_ERROR; return OMPI_ERROR;
@ -199,13 +146,13 @@ int mca_coll_fca_get_fca_lib(struct ompi_communicator_t *comm)
spec->rank_id = ompi_comm_rank(MPI_COMM_WORLD); spec->rank_id = ompi_comm_rank(MPI_COMM_WORLD);
spec->progress.func = mca_coll_fca_progress_cb; spec->progress.func = mca_coll_fca_progress_cb;
spec->progress.arg = NULL; spec->progress.arg = NULL;
ret = mca_coll_fca_component.fca_ops.init(spec, &mca_coll_fca_component.fca_context); ret = fca_init(spec, &mca_coll_fca_component.fca_context);
if (ret < 0) { if (ret < 0) {
FCA_ERROR("Failed to initialize FCA: %s", mca_coll_fca_component.fca_ops.strerror(ret)); FCA_ERROR("Failed to initialize FCA: %s", fca_strerror(ret));
return OMPI_ERROR; return OMPI_ERROR;
} }
mca_coll_fca_component.fca_ops.free_init_spec(spec); fca_free_init_spec(spec);
mca_coll_fca_init_fca_translations(); mca_coll_fca_init_fca_translations();
opal_progress_register(mca_coll_fca_mpi_progress_cb); opal_progress_register(mca_coll_fca_mpi_progress_cb);
@ -215,10 +162,10 @@ int mca_coll_fca_get_fca_lib(struct ompi_communicator_t *comm)
static void mca_coll_fca_close_fca_lib(void) static void mca_coll_fca_close_fca_lib(void)
{ {
opal_progress_unregister(mca_coll_fca_mpi_progress_cb); opal_progress_unregister(mca_coll_fca_mpi_progress_cb);
mca_coll_fca_component.fca_ops.cleanup(mca_coll_fca_component.fca_context); if (mca_coll_fca_component.fca_context) {
fca_cleanup(mca_coll_fca_component.fca_context);
mca_coll_fca_component.fca_context = NULL; mca_coll_fca_component.fca_context = NULL;
dlclose(mca_coll_fca_component.fca_lib_handle); }
mca_coll_fca_component.fca_lib_handle = NULL;
} }
static int fca_register(void) static int fca_register(void)
@ -253,12 +200,6 @@ static int fca_register(void)
""COLL_FCA_HOME"/etc/fca_mpi_spec.ini", ""COLL_FCA_HOME"/etc/fca_mpi_spec.ini",
&mca_coll_fca_component.fca_spec_file); &mca_coll_fca_component.fca_spec_file);
mca_base_param_reg_string(c, "library_path",
"FCA /path/to/libfca.so",
false, false,
""COLL_FCA_HOME"/lib/libfca.so",
&mca_coll_fca_component.fca_lib_path);
mca_base_param_reg_int(c, "np", mca_base_param_reg_int(c, "np",
"[integer] Minimal allowed job's NP to activate FCA", "[integer] Minimal allowed job's NP to activate FCA",
false, false, false, false,
@ -346,11 +287,9 @@ static int fca_open(void)
{ {
FCA_VERBOSE(2, "==>"); FCA_VERBOSE(2, "==>");
/*const mca_base_component_t *c = &mca_coll_fca_component.super.collm_version;*/
mca_coll_fca_output = opal_output_open(NULL); mca_coll_fca_output = opal_output_open(NULL);
opal_output_set_verbosity(mca_coll_fca_output, mca_coll_fca_component.fca_verbose); opal_output_set_verbosity(mca_coll_fca_output, mca_coll_fca_component.fca_verbose);
mca_coll_fca_component.fca_lib_handle = NULL;
mca_coll_fca_component.fca_context = NULL; mca_coll_fca_component.fca_context = NULL;
return OMPI_SUCCESS; return OMPI_SUCCESS;
} }
@ -359,7 +298,7 @@ static int fca_close(void)
{ {
FCA_VERBOSE(2, "==>"); FCA_VERBOSE(2, "==>");
if (!mca_coll_fca_component.fca_lib_handle || !mca_coll_fca_component.fca_context) if (!mca_coll_fca_component.fca_context)
return OMPI_SUCCESS; return OMPI_SUCCESS;
mca_coll_fca_close_fca_lib(); mca_coll_fca_close_fca_lib();

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

@ -97,7 +97,7 @@ static int __fca_comm_new(mca_coll_fca_module_t *fca_module)
/* call fca_get_rank_info() on node managers only*/ /* call fca_get_rank_info() on node managers only*/
if (fca_module->local_proc_idx == 0) { if (fca_module->local_proc_idx == 0) {
my_info = mca_coll_fca_component.fca_ops.get_rank_info(mca_coll_fca_component.fca_context, my_info = fca_get_rank_info(mca_coll_fca_component.fca_context,
&info_size); &info_size);
if (!my_info) { if (!my_info) {
FCA_ERROR("fca_get_rank_info returned NULL"); FCA_ERROR("fca_get_rank_info returned NULL");
@ -158,7 +158,7 @@ static int __fca_comm_new(mca_coll_fca_module_t *fca_module)
FCA_MODULE_VERBOSE(fca_module, 1, "starting fca_comm_new(), rank_count: %d", FCA_MODULE_VERBOSE(fca_module, 1, "starting fca_comm_new(), rank_count: %d",
spec.rank_count); spec.rank_count);
ret = mca_coll_fca_component.fca_ops.comm_new(mca_coll_fca_component.fca_context, ret = fca_comm_new(mca_coll_fca_component.fca_context,
&spec, &fca_module->fca_comm_desc); &spec, &fca_module->fca_comm_desc);
free(all_info); free(all_info);
} }
@ -173,13 +173,13 @@ static int __fca_comm_new(mca_coll_fca_module_t *fca_module)
/* Examine comm_new return value */ /* Examine comm_new return value */
if (ret < 0) { if (ret < 0) {
FCA_ERROR("COMM_NEW failed: %s", mca_coll_fca_component.fca_ops.strerror(ret)); FCA_ERROR("COMM_NEW failed: %s", fca_strerror(ret));
return OMPI_ERROR; return OMPI_ERROR;
} }
/* Release allocate rank_info on node managers */ /* Release allocate rank_info on node managers */
if (fca_module->local_proc_idx == 0) { if (fca_module->local_proc_idx == 0) {
mca_coll_fca_component.fca_ops.free_rank_info(my_info); fca_free_rank_info(my_info);
} }
/* Pass fca_comm_desc to all ranks using MPI_Bcast */ /* Pass fca_comm_desc to all ranks using MPI_Bcast */
@ -211,21 +211,20 @@ static int __create_fca_comm(mca_coll_fca_module_t *fca_module)
fca_module->num_local_procs); fca_module->num_local_procs);
comm_size = ompi_comm_size(fca_module->comm); comm_size = ompi_comm_size(fca_module->comm);
ret = mca_coll_fca_comm_init(&mca_coll_fca_component.fca_ops, ret = mca_coll_fca_comm_init(mca_coll_fca_component.fca_context,
mca_coll_fca_component.fca_context,
fca_module->rank, comm_size, fca_module->rank, comm_size,
fca_module->local_proc_idx, fca_module->num_local_procs, fca_module->local_proc_idx, fca_module->num_local_procs,
&fca_module->fca_comm_desc, &fca_module->fca_comm); &fca_module->fca_comm_desc, &fca_module->fca_comm);
if (ret < 0) { if (ret < 0) {
FCA_ERROR("COMM_INIT failed: %s", mca_coll_fca_component.fca_ops.strerror(ret)); FCA_ERROR("COMM_INIT failed: %s", fca_strerror(ret));
return OMPI_ERROR; return OMPI_ERROR;
} }
/* get communicator capabilities */ /* get communicator capabilities */
ret = mca_coll_fca_component.fca_ops.comm_get_caps(fca_module->fca_comm, ret = fca_comm_get_caps(fca_module->fca_comm,
&fca_module->fca_comm_caps); &fca_module->fca_comm_caps);
if (ret < 0) { if (ret < 0) {
FCA_ERROR("GET_COMM_CAPS failed: %s", mca_coll_fca_component.fca_ops.strerror(ret)); FCA_ERROR("GET_COMM_CAPS failed: %s", fca_strerror(ret));
return OMPI_ERROR; return OMPI_ERROR;
} }
@ -239,12 +238,12 @@ static void __destroy_fca_comm(mca_coll_fca_module_t *fca_module)
{ {
int ret; int ret;
mca_coll_fca_component.fca_ops.comm_destroy(fca_module->fca_comm); fca_comm_destroy(fca_module->fca_comm);
if (fca_module->rank == 0) { if (fca_module->rank == 0) {
ret = mca_coll_fca_component.fca_ops.comm_end(mca_coll_fca_component.fca_context, ret = fca_comm_end(mca_coll_fca_component.fca_context,
fca_module->fca_comm_desc.comm_id); fca_module->fca_comm_desc.comm_id);
if (ret < 0) { if (ret < 0) {
FCA_ERROR("COMM_END failed: %s", mca_coll_fca_component.fca_ops.strerror(ret)); FCA_ERROR("COMM_END failed: %s", fca_strerror(ret));
} }
} }

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

@ -35,7 +35,7 @@ static mca_coll_fca_dtype_info_t* mca_coll_fca_get_dtype(ompi_datatype_t *dtype)
/* assert we don't overwrite another datatype */ /* assert we don't overwrite another datatype */
assert(dtype_info->mpi_dtype == MPI_DATATYPE_NULL); assert(dtype_info->mpi_dtype == MPI_DATATYPE_NULL);
fca_dtype = mca_coll_fca_component.fca_ops.translate_mpi_dtype(dtype->name); fca_dtype = fca_translate_mpi_dtype(dtype->name);
if (fca_dtype < 0) { if (fca_dtype < 0) {
return NULL; return NULL;
} }
@ -44,7 +44,7 @@ static mca_coll_fca_dtype_info_t* mca_coll_fca_get_dtype(ompi_datatype_t *dtype)
dtype_info->mpi_dtype = dtype; dtype_info->mpi_dtype = dtype;
dtype_info->mpi_dtype_extent = extent; dtype_info->mpi_dtype_extent = extent;
dtype_info->fca_dtype = fca_dtype; dtype_info->fca_dtype = fca_dtype;
dtype_info->fca_dtype_extent = mca_coll_fca_component.fca_ops.get_dtype_size(fca_dtype); dtype_info->fca_dtype_extent = fca_get_dtype_size(fca_dtype);
FCA_VERBOSE(2, "Added new dtype[%d]: %s fca id: %d, mpi size: %lu, fca size: %lu", FCA_VERBOSE(2, "Added new dtype[%d]: %s fca id: %d, mpi size: %lu, fca size: %lu",
id, dtype->name, dtype_info->fca_dtype, dtype_info->mpi_dtype_extent, id, dtype->name, dtype_info->fca_dtype, dtype_info->mpi_dtype_extent,
dtype_info->fca_dtype_extent); dtype_info->fca_dtype_extent);
@ -66,7 +66,7 @@ static mca_coll_fca_op_info_t *mca_coll_fca_get_op(ompi_op_t *op)
if (op_info->mpi_op == op) { if (op_info->mpi_op == op) {
return op_info; return op_info;
} else if (op_info->mpi_op == MPI_OP_NULL) { } else if (op_info->mpi_op == MPI_OP_NULL) {
fca_op = mca_coll_fca_component.fca_ops.translate_mpi_op(op->o_name); fca_op = fca_translate_mpi_op(op->o_name);
if (fca_op < 0) if (fca_op < 0)
return NULL; return NULL;
op_info->mpi_op = op; op_info->mpi_op = op;
@ -153,12 +153,12 @@ int mca_coll_fca_barrier(struct ompi_communicator_t *comm,
int ret; int ret;
FCA_VERBOSE(5,"Using FCA Barrier"); FCA_VERBOSE(5,"Using FCA Barrier");
ret = mca_coll_fca_component.fca_ops.do_barrier(fca_module->fca_comm); ret = fca_do_barrier(fca_module->fca_comm);
if (ret < 0) { if (ret < 0) {
if (ret == -EUSEMPI) { if (ret == -EUSEMPI) {
goto orig_barrier; goto orig_barrier;
} }
FCA_ERROR("Barrier failed: %s", mca_coll_fca_component.fca_ops.strerror(ret)); FCA_ERROR("Barrier failed: %s", fca_strerror(ret));
return OMPI_ERROR; return OMPI_ERROR;
} }
return OMPI_SUCCESS; return OMPI_SUCCESS;
@ -216,7 +216,7 @@ int mca_coll_fca_bcast(void *buff, int count, struct ompi_datatype_t *datatype,
/* Call FCA Bcast */ /* Call FCA Bcast */
FCA_VERBOSE(5, "Using FCA Bcast"); FCA_VERBOSE(5, "Using FCA Bcast");
ret = mca_coll_fca_component.fca_ops.do_bcast(fca_module->fca_comm, &spec); ret = fca_do_bcast(fca_module->fca_comm, &spec);
/* Destroy convertor if operation failed */ /* Destroy convertor if operation failed */
if (ret < 0) { if (ret < 0) {
@ -224,7 +224,7 @@ int mca_coll_fca_bcast(void *buff, int count, struct ompi_datatype_t *datatype,
if (ret == -EUSEMPI) { if (ret == -EUSEMPI) {
goto orig_bcast; goto orig_bcast;
} }
FCA_ERROR("Bcast failed: %s", mca_coll_fca_component.fca_ops.strerror(ret)); FCA_ERROR("Bcast failed: %s", fca_strerror(ret));
return OMPI_ERROR; return OMPI_ERROR;
} }
@ -269,12 +269,12 @@ int mca_coll_fca_reduce(void *sbuf, void *rbuf, int count,
} }
FCA_VERBOSE(5,"Using FCA Reduce"); FCA_VERBOSE(5,"Using FCA Reduce");
ret = mca_coll_fca_component.fca_ops.do_reduce(fca_module->fca_comm, &spec); ret = fca_do_reduce(fca_module->fca_comm, &spec);
if (ret < 0) { if (ret < 0) {
if (ret == -EUSEMPI) { if (ret == -EUSEMPI) {
goto orig_reduce; goto orig_reduce;
} }
FCA_ERROR("Reduce failed: %s", mca_coll_fca_component.fca_ops.strerror(ret)); FCA_ERROR("Reduce failed: %s", fca_strerror(ret));
return OMPI_ERROR; return OMPI_ERROR;
} }
return OMPI_SUCCESS; return OMPI_SUCCESS;
@ -310,12 +310,12 @@ int mca_coll_fca_allreduce(void *sbuf, void *rbuf, int count,
} }
FCA_VERBOSE(5,"Using FCA Allreduce"); FCA_VERBOSE(5,"Using FCA Allreduce");
ret = mca_coll_fca_component.fca_ops.do_all_reduce(fca_module->fca_comm, &spec); ret = fca_do_all_reduce(fca_module->fca_comm, &spec);
if (ret < 0) { if (ret < 0) {
if (ret == -EUSEMPI) { if (ret == -EUSEMPI) {
goto orig_allreduce; goto orig_allreduce;
} }
FCA_ERROR("Allreduce failed: %s", mca_coll_fca_component.fca_ops.strerror(ret)); FCA_ERROR("Allreduce failed: %s", fca_strerror(ret));
return OMPI_ERROR; return OMPI_ERROR;
} }
return OMPI_SUCCESS; return OMPI_SUCCESS;
@ -394,7 +394,7 @@ int mca_coll_fca_allgather(void *sbuf, int scount, struct ompi_datatype_t *sdtyp
/* Call FCA Allgather */ /* Call FCA Allgather */
FCA_VERBOSE(5,"Using FCA Allgather size"); FCA_VERBOSE(5,"Using FCA Allgather size");
ret = mca_coll_fca_component.fca_ops.do_allgather(fca_module->fca_comm, &spec); ret = fca_do_allgather(fca_module->fca_comm, &spec);
/* Destroy convertors if operation failed */ /* Destroy convertors if operation failed */
if (ret < 0) { if (ret < 0) {
@ -403,7 +403,7 @@ int mca_coll_fca_allgather(void *sbuf, int scount, struct ompi_datatype_t *sdtyp
if (ret == -EUSEMPI) { if (ret == -EUSEMPI) {
goto orig_allgather; goto orig_allgather;
} }
FCA_ERROR("Allgather failed: %s", mca_coll_fca_component.fca_ops.strerror(ret)); FCA_ERROR("Allgather failed: %s", fca_strerror(ret));
return OMPI_ERROR; return OMPI_ERROR;
} }
@ -489,7 +489,7 @@ int mca_coll_fca_allgatherv(void *sbuf, int scount,
/* Call FCA AllgatherV */ /* Call FCA AllgatherV */
FCA_VERBOSE(5,"Using FCA Allgatherv"); FCA_VERBOSE(5,"Using FCA Allgatherv");
ret = mca_coll_fca_component.fca_ops.do_allgatherv(fca_module->fca_comm, &spec); ret = fca_do_allgatherv(fca_module->fca_comm, &spec);
/* Destroy convertors if operation failed */ /* Destroy convertors if operation failed */
if (ret < 0) { if (ret < 0) {
@ -498,7 +498,7 @@ int mca_coll_fca_allgatherv(void *sbuf, int scount,
if (ret == -EUSEMPI) { if (ret == -EUSEMPI) {
goto orig_allgatherv; goto orig_allgatherv;
} }
FCA_ERROR("Allgatherv failed: %s", mca_coll_fca_component.fca_ops.strerror(ret)); FCA_ERROR("Allgatherv failed: %s", fca_strerror(ret));
return OMPI_ERROR; return OMPI_ERROR;
} }