Switched FCA collectives component from dlopen to compile-time linking to libfca
This commit was SVN r27557.
Этот коммит содержится в:
родитель
4569f77645
Коммит
ca308974e0
@ -40,7 +40,7 @@ AC_DEFUN([OMPI_CHECK_FCA],[
|
||||
[fca_api.h],
|
||||
[$ompi_check_fca_libs],
|
||||
[fca_get_version],
|
||||
[],
|
||||
[-l$ompi_check_fca_libs],
|
||||
[$ompi_check_fca_dir],
|
||||
[$ompi_check_fca_libdir],
|
||||
[ompi_check_fca_happy="yes"],
|
||||
|
@ -37,10 +37,10 @@ endif
|
||||
mcacomponentdir = $(pkglibdir)
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
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)
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
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)
|
||||
|
@ -122,9 +122,6 @@ struct mca_coll_fca_component_t {
|
||||
/** MCA parameter: Path to fca spec file */
|
||||
char* fca_spec_file;
|
||||
|
||||
/** MCA parameter: Path to libfca.so */
|
||||
char* fca_lib_path;
|
||||
|
||||
/** MCA parameter: FCA device */
|
||||
char* fca_dev;
|
||||
|
||||
@ -171,8 +168,6 @@ struct mca_coll_fca_component_t {
|
||||
int fca_np;
|
||||
|
||||
/* 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 */
|
||||
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 */
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include <fca_api.h>
|
||||
#include <config/fca_parse_specfile.h>
|
||||
|
||||
#ifndef FCA_API
|
||||
#define OMPI_FCA_VERSION 12
|
||||
@ -45,53 +46,6 @@
|
||||
#define FCA_MINOR_BIT 16ul
|
||||
#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,
|
||||
int num_local_ranks,
|
||||
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_PROGRESS 1
|
||||
|
||||
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);
|
||||
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,
|
||||
static inline int mca_coll_fca_comm_init(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)
|
||||
@ -170,7 +85,7 @@ static inline int mca_coll_fca_comm_init(mca_coll_fca_ops_t *fca_ops,
|
||||
spec.desc = *comm_desc;
|
||||
spec.proc_idx = local_proc_idx;
|
||||
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,
|
||||
|
@ -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_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
|
||||
*/
|
||||
@ -99,8 +85,7 @@ static int mca_coll_fca_mpi_progress_cb(void)
|
||||
if (!mca_coll_fca_component.fca_context)
|
||||
return 0;
|
||||
|
||||
if (mca_coll_fca_component.fca_ops.progress)
|
||||
mca_coll_fca_component.fca_ops.progress(mca_coll_fca_component.fca_context);
|
||||
fca_progress(mca_coll_fca_component.fca_context);
|
||||
#endif
|
||||
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;
|
||||
char x[3];
|
||||
|
||||
if (mca_coll_fca_component.fca_lib_handle)
|
||||
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;
|
||||
/* Make sure this is only run once */
|
||||
if (mca_coll_fca_component.fca_context) {
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
memset(&mca_coll_fca_component.fca_ops, 0, sizeof(mca_coll_fca_component.fca_ops));
|
||||
|
||||
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());
|
||||
fca_ver = FCA_API_CLEAR_MICRO(fca_get_version());
|
||||
major = (fca_ver>>FCA_MAJOR_BIT);
|
||||
minor = (fca_ver>>FCA_MINOR_BIT) & 0xf;
|
||||
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) {
|
||||
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);
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
|
||||
GET_FCA_SYM(init);
|
||||
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);
|
||||
spec = fca_parse_spec_file(mca_coll_fca_component.fca_spec_file);
|
||||
if (!spec) {
|
||||
FCA_ERROR("Failed to parse FCA spec file `%s'", mca_coll_fca_component.fca_spec_file);
|
||||
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->progress.func = mca_coll_fca_progress_cb;
|
||||
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) {
|
||||
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;
|
||||
}
|
||||
|
||||
mca_coll_fca_component.fca_ops.free_init_spec(spec);
|
||||
fca_free_init_spec(spec);
|
||||
mca_coll_fca_init_fca_translations();
|
||||
|
||||
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)
|
||||
{
|
||||
opal_progress_unregister(mca_coll_fca_mpi_progress_cb);
|
||||
mca_coll_fca_component.fca_ops.cleanup(mca_coll_fca_component.fca_context);
|
||||
mca_coll_fca_component.fca_context = NULL;
|
||||
dlclose(mca_coll_fca_component.fca_lib_handle);
|
||||
mca_coll_fca_component.fca_lib_handle = NULL;
|
||||
if (mca_coll_fca_component.fca_context) {
|
||||
fca_cleanup(mca_coll_fca_component.fca_context);
|
||||
mca_coll_fca_component.fca_context = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static int fca_register(void)
|
||||
@ -253,12 +200,6 @@ static int fca_register(void)
|
||||
""COLL_FCA_HOME"/etc/fca_mpi_spec.ini",
|
||||
&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",
|
||||
"[integer] Minimal allowed job's NP to activate FCA",
|
||||
false, false,
|
||||
@ -346,11 +287,9 @@ static int fca_open(void)
|
||||
{
|
||||
FCA_VERBOSE(2, "==>");
|
||||
|
||||
/*const mca_base_component_t *c = &mca_coll_fca_component.super.collm_version;*/
|
||||
|
||||
mca_coll_fca_output = opal_output_open(NULL);
|
||||
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;
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -359,7 +298,7 @@ static int fca_close(void)
|
||||
{
|
||||
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;
|
||||
|
||||
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*/
|
||||
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);
|
||||
if (!my_info) {
|
||||
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",
|
||||
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);
|
||||
free(all_info);
|
||||
}
|
||||
@ -173,13 +173,13 @@ static int __fca_comm_new(mca_coll_fca_module_t *fca_module)
|
||||
|
||||
/* Examine comm_new return value */
|
||||
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;
|
||||
}
|
||||
|
||||
/* Release allocate rank_info on node managers */
|
||||
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 */
|
||||
@ -211,21 +211,20 @@ static int __create_fca_comm(mca_coll_fca_module_t *fca_module)
|
||||
fca_module->num_local_procs);
|
||||
|
||||
comm_size = ompi_comm_size(fca_module->comm);
|
||||
ret = mca_coll_fca_comm_init(&mca_coll_fca_component.fca_ops,
|
||||
mca_coll_fca_component.fca_context,
|
||||
ret = mca_coll_fca_comm_init(mca_coll_fca_component.fca_context,
|
||||
fca_module->rank, comm_size,
|
||||
fca_module->local_proc_idx, fca_module->num_local_procs,
|
||||
&fca_module->fca_comm_desc, &fca_module->fca_comm);
|
||||
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;
|
||||
}
|
||||
|
||||
/* 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);
|
||||
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;
|
||||
}
|
||||
|
||||
@ -239,12 +238,12 @@ static void __destroy_fca_comm(mca_coll_fca_module_t *fca_module)
|
||||
{
|
||||
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) {
|
||||
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);
|
||||
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(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) {
|
||||
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_extent = extent;
|
||||
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",
|
||||
id, dtype->name, dtype_info->fca_dtype, dtype_info->mpi_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) {
|
||||
return op_info;
|
||||
} 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)
|
||||
return NULL;
|
||||
op_info->mpi_op = op;
|
||||
@ -153,12 +153,12 @@ int mca_coll_fca_barrier(struct ompi_communicator_t *comm,
|
||||
int ret;
|
||||
|
||||
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 == -EUSEMPI) {
|
||||
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_SUCCESS;
|
||||
@ -216,7 +216,7 @@ int mca_coll_fca_bcast(void *buff, int count, struct ompi_datatype_t *datatype,
|
||||
|
||||
/* Call 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 */
|
||||
if (ret < 0) {
|
||||
@ -224,7 +224,7 @@ int mca_coll_fca_bcast(void *buff, int count, struct ompi_datatype_t *datatype,
|
||||
if (ret == -EUSEMPI) {
|
||||
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;
|
||||
}
|
||||
|
||||
@ -269,12 +269,12 @@ int mca_coll_fca_reduce(void *sbuf, void *rbuf, int count,
|
||||
}
|
||||
|
||||
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 == -EUSEMPI) {
|
||||
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_SUCCESS;
|
||||
@ -310,12 +310,12 @@ int mca_coll_fca_allreduce(void *sbuf, void *rbuf, int count,
|
||||
}
|
||||
|
||||
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 == -EUSEMPI) {
|
||||
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_SUCCESS;
|
||||
@ -394,7 +394,7 @@ int mca_coll_fca_allgather(void *sbuf, int scount, struct ompi_datatype_t *sdtyp
|
||||
|
||||
/* Call FCA Allgather */
|
||||
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 */
|
||||
if (ret < 0) {
|
||||
@ -403,7 +403,7 @@ int mca_coll_fca_allgather(void *sbuf, int scount, struct ompi_datatype_t *sdtyp
|
||||
if (ret == -EUSEMPI) {
|
||||
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;
|
||||
}
|
||||
|
||||
@ -489,7 +489,7 @@ int mca_coll_fca_allgatherv(void *sbuf, int scount,
|
||||
|
||||
/* Call 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 */
|
||||
if (ret < 0) {
|
||||
@ -498,7 +498,7 @@ int mca_coll_fca_allgatherv(void *sbuf, int scount,
|
||||
if (ret == -EUSEMPI) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user