1
1

fix support for fca 2.2, warning fixes on rhel 6.x

This commit was SVN r26166.
Этот коммит содержится в:
Mike Dubman 2012-03-20 10:00:52 +00:00
родитель 0322db7cde
Коммит a45898ea9c
4 изменённых файлов: 19 добавлений и 17 удалений

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

@ -113,18 +113,12 @@ static inline void mca_coll_fca_get_reduce_root(int root_rank, int my_rank,
spec->is_root = root_rank == my_rank;
}
#elif OMPI_FCA_VERSION == 20 || OMPI_FCA_VERSION == 21
#elif OMPI_FCA_VERSION == 20 || OMPI_FCA_VERSION == 21 || OMPI_FCA_VERSION == 22
#define OMPI_FCA_ALLGATHER 1
#define OMPI_FCA_ALLGATHERV 1
#define OMPI_FCA_PROGRESS 1
#define FCA_API_ABI_MAJOR 2
#if OMPI_FCA_VERSION == 20
# define FCA_API_ABI_MINOR 0
#else
# define FCA_API_ABI_MINOR 1
#endif
typedef struct mca_coll_fca_ops_t {
/* FCA Context operations */

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

@ -128,7 +128,8 @@ int mca_coll_fca_get_fca_lib(struct ompi_communicator_t *comm)
{
struct fca_init_spec *spec;
int ret;
unsigned long fca_ver;
unsigned long fca_ver, major, minor, detected_ver;
char x[3];
if (mca_coll_fca_component.fca_lib_handle)
return OMPI_SUCCESS;
@ -145,12 +146,19 @@ int mca_coll_fca_get_fca_lib(struct ompi_communicator_t *comm)
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());
if (fca_ver != FCA_API_VER(FCA_API_ABI_MAJOR,FCA_API_ABI_MINOR)) {
FCA_ERROR("Unsupported FCA version: %s, please update FCA to v%d.%d",
major = (fca_ver>>FCA_MAJOR_BIT);
minor = (fca_ver>>FCA_MINOR_BIT) & 0xf;
sprintf(x, "%ld%ld", major, minor);
detected_ver = atol(x);
FCA_VERBOSE(1, "FCA ABI version: %ld supported: %d", 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",
mca_coll_fca_component.fca_ops.get_version_string(),
FCA_API_ABI_MAJOR,
FCA_API_ABI_MINOR);
OMPI_FCA_VERSION, fca_ver);
return OMPI_ERROR;
}
@ -296,7 +304,7 @@ static int fca_register(void)
mca_base_param_reg_int(c, "enable_allgatherv",
"[1|0|] Enable/Disable FCA Allgatherv support",
false, false,
OMPI_FCA_ALLGATHER,
OMPI_FCA_ALLGATHERV,
&mca_coll_fca_component.fca_enable_allgatherv);
mca_base_param_reg_int(c, "enable_gather",

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

@ -122,8 +122,8 @@ static int __fca_comm_new(mca_coll_fca_module_t *fca_module)
/* Allocate buffer for gathering rank information on rank0 */
if (fca_module->rank == 0) {
FCA_MODULE_VERBOSE(fca_module, 1, "Total rank_info size: %d", all_info_size);
all_info_size = 0;
FCA_MODULE_VERBOSE(fca_module, 1, "Total rank_info size: %d", all_info_size);
disps = calloc(ompi_comm_size(comm), sizeof *disps);
for (i = 0; i < ompi_comm_size(comm); ++i) {
disps[i] = all_info_size;

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

@ -189,7 +189,7 @@ int mca_coll_fca_bcast(void *buff, int count, struct ompi_datatype_t *datatype,
/* Setup exchange buffer */
spec.root = root;
if (mca_coll_fca_array_size(datatype, count, &gap, &size)) {
spec.buf = buff + gap;
spec.buf = (char*)buff + gap;
} else {
mca_coll_fca_convertor_create(&conv, datatype, count, buff,
(root == fca_module->rank)
@ -336,7 +336,7 @@ static size_t __setup_gather_sendbuf(void *sbuf, void *inplace_sbuf, int scount,
size_t gap, ssize;
if (mca_coll_fca_array_size(sdtype, scount, &gap, &ssize)) {
*real_sendbuf = ((MPI_IN_PLACE == sbuf) ? inplace_sbuf : sbuf) + gap;
*real_sendbuf = (char*)((MPI_IN_PLACE == sbuf) ? inplace_sbuf : sbuf) + gap;
} else {
FCA_VERBOSE(5, "Packing send buffer");
if (MPI_IN_PLACE == sbuf) {