ompi/mpi: Fix MPI_UNDEFINED handling in mpi_type_create_f90_(real|complex)
Signed-off-by: Joshua Hursey <jhursey@us.ibm.com>
Этот коммит содержится в:
родитель
5e302f5279
Коммит
a5e9c3501b
@ -46,6 +46,7 @@ static const char FUNC_NAME[] = "MPI_Type_create_f90_complex";
|
||||
int MPI_Type_create_f90_complex(int p, int r, MPI_Datatype *newtype)
|
||||
{
|
||||
uint64_t key;
|
||||
int p_key, r_key;
|
||||
|
||||
OPAL_CR_NOOP_PROGRESS();
|
||||
|
||||
@ -65,8 +66,10 @@ int MPI_Type_create_f90_complex(int p, int r, MPI_Datatype *newtype)
|
||||
/* if the user does not care about p or r set them to 0 so the
|
||||
* test associate with them will always succeed.
|
||||
*/
|
||||
if( MPI_UNDEFINED == p ) p = 0;
|
||||
if( MPI_UNDEFINED == r ) r = 0;
|
||||
p_key = p;
|
||||
r_key = r;
|
||||
if( MPI_UNDEFINED == p ) p_key = 0;
|
||||
if( MPI_UNDEFINED == r ) r_key = 0;
|
||||
|
||||
/**
|
||||
* With respect to the MPI standard, MPI-2.0 Sect. 10.2.5, MPI_TYPE_CREATE_F90_xxxx,
|
||||
@ -87,7 +90,7 @@ int MPI_Type_create_f90_complex(int p, int r, MPI_Datatype *newtype)
|
||||
const int* a_i[2];
|
||||
int rc;
|
||||
|
||||
key = (((uint64_t)p) << 32) | ((uint64_t)r);
|
||||
key = (((uint64_t)p_key) << 32) | ((uint64_t)r_key);
|
||||
if( OPAL_SUCCESS == opal_hash_table_get_value_uint64( &ompi_mpi_f90_complex_hashtable,
|
||||
key, (void**)newtype ) ) {
|
||||
return MPI_SUCCESS;
|
||||
|
@ -46,6 +46,7 @@ static const char FUNC_NAME[] = "MPI_Type_create_f90_real";
|
||||
int MPI_Type_create_f90_real(int p, int r, MPI_Datatype *newtype)
|
||||
{
|
||||
uint64_t key;
|
||||
int p_key, r_key;
|
||||
|
||||
OPAL_CR_NOOP_PROGRESS();
|
||||
|
||||
@ -65,8 +66,10 @@ int MPI_Type_create_f90_real(int p, int r, MPI_Datatype *newtype)
|
||||
/* if the user does not care about p or r set them to 0 so the
|
||||
* test associate with them will always succeed.
|
||||
*/
|
||||
if( MPI_UNDEFINED == p ) p = 0;
|
||||
if( MPI_UNDEFINED == r ) r = 0;
|
||||
p_key = p;
|
||||
r_key = r;
|
||||
if( MPI_UNDEFINED == p ) p_key = 0;
|
||||
if( MPI_UNDEFINED == r ) r_key = 0;
|
||||
|
||||
/**
|
||||
* With respect to the MPI standard, MPI-2.0 Sect. 10.2.5, MPI_TYPE_CREATE_F90_xxxx,
|
||||
@ -87,7 +90,7 @@ int MPI_Type_create_f90_real(int p, int r, MPI_Datatype *newtype)
|
||||
const int* a_i[2] = {&p, &r};
|
||||
int rc;
|
||||
|
||||
key = (((uint64_t)p) << 32) | ((uint64_t)r);
|
||||
key = (((uint64_t)p_key) << 32) | ((uint64_t)r_key);
|
||||
if( OPAL_SUCCESS == opal_hash_table_get_value_uint64( &ompi_mpi_f90_real_hashtable,
|
||||
key, (void**)newtype ) ) {
|
||||
return MPI_SUCCESS;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user