OSHMEM: fix bug in scoll/mpi, add fortran support
dtypes support to oshmem scoll mpi. added comment to oshmem scoll mpi component regarding casting size_t to int. Fixed by Elena, Reviewed by Igor/Mike cmr=v1.7.5:reviewer=ompi-rm1.7 This commit was SVN r30856.
Этот коммит содержится в:
родитель
323e4418b9
Коммит
4572bd58e5
@ -56,7 +56,8 @@ mca_scoll_mpi_component_t mca_scoll_mpi_component = {
|
||||
},
|
||||
90, /* priority */
|
||||
0, /* verbose level */
|
||||
1 /* mpi_enable */
|
||||
1, /* mpi_enable */
|
||||
2 /*mpi_np */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -20,6 +20,16 @@ static struct ompi_datatype_t* shmem_dtype_to_ompi_dtype(oshmem_op_t *op)
|
||||
return &ompi_mpi_c_float_complex.dt;
|
||||
case OSHMEM_OP_TYPE_DCOMPLEX:
|
||||
return &ompi_mpi_c_double_complex.dt;
|
||||
case OSHMEM_OP_TYPE_FINT4:
|
||||
return &ompi_mpi_integer4.dt;
|
||||
case OSHMEM_OP_TYPE_FINT8:
|
||||
return &ompi_mpi_integer8.dt;
|
||||
case OSHMEM_OP_TYPE_FREAL4:
|
||||
return &ompi_mpi_real4.dt;
|
||||
case OSHMEM_OP_TYPE_FREAL8:
|
||||
return &ompi_mpi_real8.dt;
|
||||
case OSHMEM_OP_TYPE_FREAL16:
|
||||
return &ompi_mpi_real16.dt;
|
||||
default:
|
||||
switch (dtsize) {
|
||||
case 64:
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
int mca_scoll_mpi_init_query(bool enable_progress_threads, bool enable_mpi_threads)
|
||||
{
|
||||
return OSHMEM_ERROR;
|
||||
return OSHMEM_SUCCESS;
|
||||
}
|
||||
|
||||
static void mca_scoll_mpi_module_clear(mca_scoll_mpi_module_t *mpi_module)
|
||||
|
@ -51,6 +51,12 @@ int mca_scoll_mpi_broadcast(struct oshmem_group_t *group,
|
||||
}
|
||||
dtype = &ompi_mpi_char.dt;
|
||||
root = oshmem_proc_group_find_id(group, PE_root);
|
||||
/* Open SHMEM specification has the following constrains (page 85):
|
||||
* "If using C/C++, nelems must be of type integer. If you are using Fortran, it must be a
|
||||
* default integer value". And also fortran signature says "INTEGER".
|
||||
* Since ompi coll components doesn't support size_t at the moment,
|
||||
* and considering this contradiction, we cast size_t to int here
|
||||
* in case if the value is less than INT_MAX and fallback to previous module otherwise. */
|
||||
#ifdef INCOMPATIBLE_SHMEM_OMPI_COLL_APIS
|
||||
if (INT_MAX < nlong) {
|
||||
MPI_COLL_VERBOSE(20,"RUNNING FALLBACK BCAST");
|
||||
@ -100,6 +106,12 @@ int mca_scoll_mpi_collect(struct oshmem_group_t *group,
|
||||
rbuf = target;
|
||||
stype = &ompi_mpi_char.dt;
|
||||
rtype = &ompi_mpi_char.dt;
|
||||
/* Open SHMEM specification has the following constrains (page 85):
|
||||
* "If using C/C++, nelems must be of type integer. If you are using Fortran, it must be a
|
||||
* default integer value". And also fortran signature says "INTEGER".
|
||||
* Since ompi coll components doesn't support size_t at the moment,
|
||||
* and considering this contradiction, we cast size_t to int here
|
||||
* in case if the value is less than INT_MAX and fallback to previous module otherwise. */
|
||||
#ifdef INCOMPATIBLE_SHMEM_OMPI_COLL_APIS
|
||||
if (INT_MAX < nlong) {
|
||||
MPI_COLL_VERBOSE(20,"RUNNING FALLBACK COLLECT");
|
||||
@ -144,6 +156,12 @@ int mca_scoll_mpi_reduce(struct oshmem_group_t *group,
|
||||
dtype = shmem_dtype_to_ompi_dtype(op);
|
||||
h_op = shmem_op_to_ompi_op(op->op);
|
||||
count = nlong/op->dt_size;
|
||||
/* Open SHMEM specification has the following constrains (page 85):
|
||||
* "If using C/C++, nelems must be of type integer. If you are using Fortran, it must be a
|
||||
* default integer value". And also fortran signature says "INTEGER".
|
||||
* Since ompi coll components doesn't support size_t at the moment,
|
||||
* and considering this contradiction, we cast size_t to int here
|
||||
* in case if the value is less than INT_MAX and fallback to previous module otherwise. */
|
||||
#ifdef INCOMPATIBLE_SHMEM_OMPI_COLL_APIS
|
||||
if (INT_MAX < count) {
|
||||
MPI_COLL_VERBOSE(20,"RUNNING FALLBACK REDUCE");
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user