Welcome in the wonderful world of MPI 3.0.
This commit was SVN r28106.
Этот коммит содержится в:
родитель
c438692fac
Коммит
ceb75eae75
@ -56,7 +56,7 @@ void cache_trash( void )
|
||||
/**
|
||||
* Data-type functions.
|
||||
*/
|
||||
ompi_datatype_t* create_inversed_vector( ompi_datatype_t* type, int length )
|
||||
ompi_datatype_t* create_inversed_vector( const ompi_datatype_t const* type, int length )
|
||||
{
|
||||
ompi_datatype_t* type1;
|
||||
|
||||
@ -517,7 +517,7 @@ ompi_datatype_t* test_create_blacs_type( void )
|
||||
return pdt;
|
||||
}
|
||||
|
||||
ompi_datatype_t* test_create_blacs_type1( ompi_datatype_t* base_type )
|
||||
ompi_datatype_t* test_create_blacs_type1( const ompi_datatype_t const * base_type )
|
||||
{
|
||||
ompi_datatype_t *pdt;
|
||||
|
||||
@ -529,7 +529,7 @@ ompi_datatype_t* test_create_blacs_type1( ompi_datatype_t* base_type )
|
||||
return pdt;
|
||||
}
|
||||
|
||||
ompi_datatype_t* test_create_blacs_type2( ompi_datatype_t* base_type )
|
||||
ompi_datatype_t* test_create_blacs_type2( const ompi_datatype_t const* base_type )
|
||||
{
|
||||
ompi_datatype_t *pdt;
|
||||
|
||||
|
@ -44,7 +44,7 @@ extern void cache_trash( void );
|
||||
/**
|
||||
* Data-type functions.
|
||||
*/
|
||||
ompi_datatype_t* create_inversed_vector( ompi_datatype_t* type, int length );
|
||||
ompi_datatype_t* create_inversed_vector( const ompi_datatype_t const* type, int length );
|
||||
|
||||
extern int mpich_typeub( void );
|
||||
extern int mpich_typeub2( void );
|
||||
@ -84,11 +84,11 @@ extern ompi_datatype_t* test_create_twice_two_doubles( void );
|
||||
--C-----D*-[ C ][INT] MPI_INT count 1 disp 0xa80 (2688) extent 4
|
||||
*/
|
||||
extern ompi_datatype_t* test_create_blacs_type( void );
|
||||
extern ompi_datatype_t* test_create_blacs_type1( ompi_datatype_t* base_type );
|
||||
extern ompi_datatype_t* test_create_blacs_type2( ompi_datatype_t* base_type );
|
||||
extern ompi_datatype_t* test_create_blacs_type1( const ompi_datatype_t const* base_type );
|
||||
extern ompi_datatype_t* test_create_blacs_type2( const ompi_datatype_t const* base_type );
|
||||
extern ompi_datatype_t* test_struct( void );
|
||||
extern ompi_datatype_t* create_strange_dt( void );
|
||||
extern ompi_datatype_t* create_contiguous_type( const ompi_datatype_t* data, int count );
|
||||
extern ompi_datatype_t* create_vector_type( const ompi_datatype_t* data, int count,
|
||||
extern ompi_datatype_t* create_contiguous_type( const ompi_datatype_t const* data, int count );
|
||||
extern ompi_datatype_t* create_vector_type( const ompi_datatype_t const* data, int count,
|
||||
int length, int stride );
|
||||
|
||||
|
@ -123,7 +123,7 @@ static int test_upper( unsigned int length )
|
||||
* - and one using 2 convertors created from different data-types.
|
||||
*
|
||||
*/
|
||||
static int local_copy_ddt_count( opal_datatype_t* pdt, int count )
|
||||
static int local_copy_ddt_count( const opal_datatype_t const* pdt, int count )
|
||||
{
|
||||
OPAL_PTRDIFF_TYPE extent;
|
||||
void *pdst, *psrc;
|
||||
@ -159,8 +159,8 @@ static int local_copy_ddt_count( opal_datatype_t* pdt, int count )
|
||||
}
|
||||
|
||||
static int
|
||||
local_copy_with_convertor_2datatypes( opal_datatype_t* send_type, int send_count,
|
||||
opal_datatype_t* recv_type, int recv_count,
|
||||
local_copy_with_convertor_2datatypes( const opal_datatype_t const * send_type, int send_count,
|
||||
const opal_datatype_t const * recv_type, int recv_count,
|
||||
int chunk )
|
||||
{
|
||||
OPAL_PTRDIFF_TYPE send_extent, recv_extent;
|
||||
@ -247,7 +247,7 @@ local_copy_with_convertor_2datatypes( opal_datatype_t* send_type, int send_count
|
||||
}
|
||||
|
||||
|
||||
static int local_copy_with_convertor( opal_datatype_t* pdt, int count, int chunk )
|
||||
static int local_copy_with_convertor( const opal_datatype_t const* pdt, int count, int chunk )
|
||||
{
|
||||
OPAL_PTRDIFF_TYPE extent;
|
||||
void *pdst = NULL, *psrc = NULL, *ptemp = NULL;
|
||||
@ -428,11 +428,11 @@ int main( int argc, char* argv[] )
|
||||
|
||||
printf( ">>--------------------------------------------<<\n" );
|
||||
printf( " Contiguous data-type (opal_datatype_float8)\n" );
|
||||
pdt = &opal_datatype_float8;
|
||||
if( outputFlags & CHECK_PACK_UNPACK ) {
|
||||
local_copy_ddt_count(pdt, 4500);
|
||||
local_copy_with_convertor( pdt, 4500, 12 );
|
||||
local_copy_with_convertor_2datatypes( pdt, 4500, pdt, 4500, 12 );
|
||||
const opal_datatype_t const* ddt = &opal_datatype_float8;
|
||||
local_copy_ddt_count( ddt, 4500);
|
||||
local_copy_with_convertor( ddt, 4500, 12 );
|
||||
local_copy_with_convertor_2datatypes( ddt, 4500, ddt, 4500, 12 );
|
||||
}
|
||||
printf( ">>--------------------------------------------<<\n" );
|
||||
|
||||
|
@ -108,7 +108,7 @@ opal_datatype_t* test_create_blacs_type( void )
|
||||
return pdt;
|
||||
}
|
||||
|
||||
opal_datatype_t* test_create_blacs_type1( opal_datatype_t* base_type )
|
||||
opal_datatype_t* test_create_blacs_type1( const opal_datatype_t const* base_type )
|
||||
{
|
||||
opal_datatype_t *pdt;
|
||||
|
||||
@ -120,7 +120,7 @@ opal_datatype_t* test_create_blacs_type1( opal_datatype_t* base_type )
|
||||
return pdt;
|
||||
}
|
||||
|
||||
opal_datatype_t* test_create_blacs_type2( opal_datatype_t* base_type )
|
||||
opal_datatype_t* test_create_blacs_type2( const opal_datatype_t const* base_type )
|
||||
{
|
||||
opal_datatype_t *pdt;
|
||||
|
||||
|
@ -29,8 +29,8 @@
|
||||
extern uint32_t outputFlags;
|
||||
|
||||
extern void cache_trash( void );
|
||||
extern opal_datatype_t* create_contiguous_type( const opal_datatype_t* type, int length );
|
||||
extern opal_datatype_t* create_vector_type( const opal_datatype_t* data, int count, int length, int stride );
|
||||
extern opal_datatype_t* create_contiguous_type( const opal_datatype_t const* type, int length );
|
||||
extern opal_datatype_t* create_vector_type( const opal_datatype_t const* data, int count, int length, int stride );
|
||||
extern opal_datatype_t* create_strange_dt( void );
|
||||
extern opal_datatype_t* upper_matrix( unsigned int mat_size );
|
||||
extern opal_datatype_t* lower_matrix( unsigned int mat_size );
|
||||
@ -42,11 +42,11 @@ extern opal_datatype_t* test_struct_char_double( void );
|
||||
extern opal_datatype_t* test_create_twice_two_doubles( void );
|
||||
extern opal_datatype_t* test_struct( void );
|
||||
extern opal_datatype_t* test_create_blacs_type( void );
|
||||
extern opal_datatype_t* test_create_blacs_type1( opal_datatype_t* base_type );
|
||||
extern opal_datatype_t* test_create_blacs_type2( opal_datatype_t* base_type );
|
||||
extern opal_datatype_t* test_create_blacs_type1( const opal_datatype_t const* base_type );
|
||||
extern opal_datatype_t* test_create_blacs_type2( const opal_datatype_t const* base_type );
|
||||
|
||||
extern int mpich_typeub( void );
|
||||
extern int mpich_typeub2( void );
|
||||
extern int mpich_typeub3( void );
|
||||
|
||||
#endif /* TEST_OPAL_DDT_LIB_H */
|
||||
#endif /* TEST_OPAL_DDT_LIB_H */
|
||||
|
@ -45,7 +45,7 @@ create_indexed_constant_gap_ddt( int number, /* number of repetitions */
|
||||
bLength[i] = contig_size;
|
||||
displ[i] = displ[i-1] + sizeof(double) * (contig_size + gap_size);
|
||||
}
|
||||
MPI_Type_struct( number, bLength, displ, types, &dt );
|
||||
MPI_Type_create_struct( number, bLength, displ, types, &dt );
|
||||
MPI_DDT_DUMP( dt );
|
||||
free(types);
|
||||
free(bLength);
|
||||
@ -86,23 +86,23 @@ create_indexed_gap_ddt( void )
|
||||
MPI_Datatype types[2] = { MPI_INT, MPI_FLOAT };
|
||||
MPI_Aint displ[2];
|
||||
|
||||
MPI_Address( &(dt[0].is[0].i[0]), &(displ[0]) );
|
||||
MPI_Address( &(dt[0].is[0].f), &(displ[1]) );
|
||||
MPI_Get_address( &(dt[0].is[0].i[0]), &(displ[0]) );
|
||||
MPI_Get_address( &(dt[0].is[0].f), &(displ[1]) );
|
||||
displ[1] -= displ[0];
|
||||
displ[0] -= displ[0];
|
||||
MPI_Type_struct( 2, bLength, displ, types, &dt1 );
|
||||
MPI_Type_create_struct( 2, bLength, displ, types, &dt1 );
|
||||
/*MPI_DDT_DUMP( dt1 );*/
|
||||
MPI_Type_contiguous( 3, dt1, &dt2 );
|
||||
/*MPI_DDT_DUMP( dt2 );*/
|
||||
bLength[0] = 1;
|
||||
bLength[1] = 1;
|
||||
MPI_Address( &(dt[0].v1), &(displ[0]) );
|
||||
MPI_Address( &(dt[0].is[0]), &(displ[1]) );
|
||||
MPI_Get_address( &(dt[0].v1), &(displ[0]) );
|
||||
MPI_Get_address( &(dt[0].is[0]), &(displ[1]) );
|
||||
displ[1] -= displ[0];
|
||||
displ[0] -= displ[0];
|
||||
types[0] = MPI_INT;
|
||||
types[1] = dt2;
|
||||
MPI_Type_struct( 2, bLength, displ, types, &dt3 );
|
||||
MPI_Type_create_struct( 2, bLength, displ, types, &dt3 );
|
||||
/*MPI_DDT_DUMP( dt3 );*/
|
||||
MPI_Type_free( &dt1 );
|
||||
MPI_Type_free( &dt2 );
|
||||
@ -136,7 +136,7 @@ create_indexed_gap_optimized_ddt( void )
|
||||
displ[1] = 8;
|
||||
displ[2] = 44 * 9 + 8;
|
||||
|
||||
MPI_Type_struct( 3, bLength, displ, types, &dt3 );
|
||||
MPI_Type_create_struct( 3, bLength, displ, types, &dt3 );
|
||||
|
||||
MPI_Type_free( &dt1 );
|
||||
MPI_Type_free( &dt2 );
|
||||
@ -301,10 +301,10 @@ static int irecv_isend_wait( int cycles,
|
||||
static int do_test_for_ddt( MPI_Datatype sddt, MPI_Datatype rddt, int length )
|
||||
{
|
||||
int i;
|
||||
MPI_Aint extent;
|
||||
MPI_Aint lb, extent;
|
||||
char *sbuf, *rbuf;
|
||||
|
||||
MPI_Type_extent( sddt, &extent );
|
||||
MPI_Type_get_extent( sddt, &lb, &extent );
|
||||
sbuf = (char*)malloc( length );
|
||||
rbuf = (char*)malloc( length );
|
||||
printf( "# Isend recv\n" );
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user