The data-type tests have to be updated too.
This commit was SVN r12334.
Этот коммит содержится в:
родитель
882b429f64
Коммит
14c49b226a
@ -33,7 +33,6 @@ int main( int argc, char* argv[] )
|
|||||||
int i;
|
int i;
|
||||||
uint32_t iov_count;
|
uint32_t iov_count;
|
||||||
size_t max_data;
|
size_t max_data;
|
||||||
int32_t free_after;
|
|
||||||
uint32_t pack_checksum, contiguous_checksum, sparse_checksum, manual_checksum;
|
uint32_t pack_checksum, contiguous_checksum, sparse_checksum, manual_checksum;
|
||||||
struct iovec iov[2];
|
struct iovec iov[2];
|
||||||
ompi_convertor_t* convertor;
|
ompi_convertor_t* convertor;
|
||||||
@ -62,7 +61,7 @@ int main( int argc, char* argv[] )
|
|||||||
* of the buffered operation.
|
* of the buffered operation.
|
||||||
*/
|
*/
|
||||||
convertor = ompi_convertor_create( ompi_mpi_local_arch, 0 );
|
convertor = ompi_convertor_create( ompi_mpi_local_arch, 0 );
|
||||||
ompi_convertor_personalize( convertor, CONVERTOR_WITH_CHECKSUM, NULL, NULL, NULL );
|
ompi_convertor_personalize( convertor, CONVERTOR_WITH_CHECKSUM, NULL );
|
||||||
ompi_convertor_prepare_for_send( convertor, sparse, SIZE, sparse_array );
|
ompi_convertor_prepare_for_send( convertor, sparse, SIZE, sparse_array );
|
||||||
|
|
||||||
iov[0].iov_base = packed;
|
iov[0].iov_base = packed;
|
||||||
@ -70,7 +69,7 @@ int main( int argc, char* argv[] )
|
|||||||
max_data = iov[0].iov_len;
|
max_data = iov[0].iov_len;
|
||||||
|
|
||||||
iov_count = 1;
|
iov_count = 1;
|
||||||
ompi_convertor_pack( convertor, iov, &iov_count, &max_data, &free_after );
|
ompi_convertor_pack( convertor, iov, &iov_count, &max_data );
|
||||||
pack_checksum = convertor->checksum;
|
pack_checksum = convertor->checksum;
|
||||||
|
|
||||||
OBJ_RELEASE(convertor);
|
OBJ_RELEASE(convertor);
|
||||||
@ -80,7 +79,7 @@ int main( int argc, char* argv[] )
|
|||||||
* be sent over the network (still simulation).
|
* be sent over the network (still simulation).
|
||||||
*/
|
*/
|
||||||
convertor = ompi_convertor_create( ompi_mpi_local_arch, 0 );
|
convertor = ompi_convertor_create( ompi_mpi_local_arch, 0 );
|
||||||
ompi_convertor_personalize( convertor, CONVERTOR_WITH_CHECKSUM, NULL, NULL, NULL );
|
ompi_convertor_personalize( convertor, CONVERTOR_WITH_CHECKSUM, NULL );
|
||||||
ompi_convertor_prepare_for_send( convertor, MPI_INT, SIZE, packed );
|
ompi_convertor_prepare_for_send( convertor, MPI_INT, SIZE, packed );
|
||||||
|
|
||||||
iov[0].iov_base = array;
|
iov[0].iov_base = array;
|
||||||
@ -88,7 +87,7 @@ int main( int argc, char* argv[] )
|
|||||||
max_data = iov[0].iov_len;
|
max_data = iov[0].iov_len;
|
||||||
|
|
||||||
iov_count = 1;
|
iov_count = 1;
|
||||||
ompi_convertor_pack( convertor, iov, &iov_count, &max_data, &free_after );
|
ompi_convertor_pack( convertor, iov, &iov_count, &max_data );
|
||||||
contiguous_checksum = convertor->checksum;
|
contiguous_checksum = convertor->checksum;
|
||||||
|
|
||||||
OBJ_RELEASE(convertor);
|
OBJ_RELEASE(convertor);
|
||||||
@ -99,7 +98,7 @@ int main( int argc, char* argv[] )
|
|||||||
* separate iovec.
|
* separate iovec.
|
||||||
*/
|
*/
|
||||||
convertor = ompi_convertor_create( ompi_mpi_local_arch, 0 );
|
convertor = ompi_convertor_create( ompi_mpi_local_arch, 0 );
|
||||||
ompi_convertor_personalize( convertor, CONVERTOR_WITH_CHECKSUM, NULL, NULL, NULL );
|
ompi_convertor_personalize( convertor, CONVERTOR_WITH_CHECKSUM, NULL );
|
||||||
ompi_convertor_prepare_for_recv( convertor, sparse, SIZE, sparse_array );
|
ompi_convertor_prepare_for_recv( convertor, sparse, SIZE, sparse_array );
|
||||||
|
|
||||||
max_data = sizeof(int) * SIZE;
|
max_data = sizeof(int) * SIZE;
|
||||||
@ -109,7 +108,7 @@ int main( int argc, char* argv[] )
|
|||||||
iov[1].iov_len = max_data - iov[0].iov_len;
|
iov[1].iov_len = max_data - iov[0].iov_len;
|
||||||
|
|
||||||
iov_count = 2;
|
iov_count = 2;
|
||||||
ompi_convertor_unpack( convertor, iov, &iov_count, &max_data, &free_after );
|
ompi_convertor_unpack( convertor, iov, &iov_count, &max_data );
|
||||||
sparse_checksum = convertor->checksum;
|
sparse_checksum = convertor->checksum;
|
||||||
|
|
||||||
OBJ_RELEASE(convertor);
|
OBJ_RELEASE(convertor);
|
||||||
|
@ -411,7 +411,7 @@ static int test_upper( unsigned int length )
|
|||||||
ompi_datatype_t *pdt;
|
ompi_datatype_t *pdt;
|
||||||
ompi_convertor_t * pConv;
|
ompi_convertor_t * pConv;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
int rc, freeAfter;
|
int rc;
|
||||||
unsigned int i, j, iov_count, split_chunk, total_length;
|
unsigned int i, j, iov_count, split_chunk, total_length;
|
||||||
size_t max_data;
|
size_t max_data;
|
||||||
struct iovec a;
|
struct iovec a;
|
||||||
@ -455,7 +455,7 @@ static int test_upper( unsigned int length )
|
|||||||
a.iov_len = split_chunk;
|
a.iov_len = split_chunk;
|
||||||
iov_count = 1;
|
iov_count = 1;
|
||||||
max_data = split_chunk;
|
max_data = split_chunk;
|
||||||
ompi_convertor_unpack( pConv, &a, &iov_count, &max_data, &freeAfter );
|
ompi_convertor_unpack( pConv, &a, &iov_count, &max_data );
|
||||||
ptr += max_data;
|
ptr += max_data;
|
||||||
i -= max_data;
|
i -= max_data;
|
||||||
if( mat2[0] != inbuf[0] ) assert(0);
|
if( mat2[0] != inbuf[0] ) assert(0);
|
||||||
@ -790,7 +790,7 @@ local_copy_with_convertor_2datatypes( ompi_datatype_t* send_type, int send_count
|
|||||||
struct iovec iov;
|
struct iovec iov;
|
||||||
uint32_t iov_count;
|
uint32_t iov_count;
|
||||||
size_t max_data;
|
size_t max_data;
|
||||||
int32_t free_after = 0, length = 0, done1 = 0, done2 = 0;
|
int32_t length = 0, done1 = 0, done2 = 0;
|
||||||
TIMER_DATA_TYPE start, end, unpack_start, unpack_end;
|
TIMER_DATA_TYPE start, end, unpack_start, unpack_end;
|
||||||
long total_time, unpack_time = 0;
|
long total_time, unpack_time = 0;
|
||||||
|
|
||||||
@ -837,14 +837,12 @@ local_copy_with_convertor_2datatypes( ompi_datatype_t* send_type, int send_count
|
|||||||
iov.iov_len = chunk;
|
iov.iov_len = chunk;
|
||||||
|
|
||||||
if( done1 == 0 ) {
|
if( done1 == 0 ) {
|
||||||
done1 = ompi_convertor_pack( send_convertor, &iov, &iov_count, &max_data, &free_after );
|
done1 = ompi_convertor_pack( send_convertor, &iov, &iov_count, &max_data );
|
||||||
assert( free_after == 0 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( done2 == 0 ) {
|
if( done2 == 0 ) {
|
||||||
GET_TIME( unpack_start );
|
GET_TIME( unpack_start );
|
||||||
done2 = ompi_convertor_unpack( recv_convertor, &iov, &iov_count, &max_data, &free_after );
|
done2 = ompi_convertor_unpack( recv_convertor, &iov, &iov_count, &max_data );
|
||||||
assert( free_after == 0 );
|
|
||||||
GET_TIME( unpack_end );
|
GET_TIME( unpack_end );
|
||||||
unpack_time += ELAPSED_TIME( unpack_start, unpack_end );
|
unpack_time += ELAPSED_TIME( unpack_start, unpack_end );
|
||||||
}
|
}
|
||||||
@ -877,7 +875,7 @@ static int local_copy_with_convertor( ompi_datatype_t* pdt, int count, int chunk
|
|||||||
struct iovec iov;
|
struct iovec iov;
|
||||||
uint32_t iov_count;
|
uint32_t iov_count;
|
||||||
size_t max_data;
|
size_t max_data;
|
||||||
int32_t free_after = 0, length = 0, done1 = 0, done2 = 0;
|
int32_t length = 0, done1 = 0, done2 = 0;
|
||||||
TIMER_DATA_TYPE start, end, unpack_start, unpack_end;
|
TIMER_DATA_TYPE start, end, unpack_start, unpack_end;
|
||||||
long total_time, unpack_time = 0;
|
long total_time, unpack_time = 0;
|
||||||
|
|
||||||
@ -923,14 +921,12 @@ static int local_copy_with_convertor( ompi_datatype_t* pdt, int count, int chunk
|
|||||||
iov.iov_len = chunk;
|
iov.iov_len = chunk;
|
||||||
|
|
||||||
if( done1 == 0 ) {
|
if( done1 == 0 ) {
|
||||||
done1 = ompi_convertor_pack( send_convertor, &iov, &iov_count, &max_data, &free_after );
|
done1 = ompi_convertor_pack( send_convertor, &iov, &iov_count, &max_data );
|
||||||
assert( free_after == 0 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( done2 == 0 ) {
|
if( done2 == 0 ) {
|
||||||
GET_TIME( unpack_start );
|
GET_TIME( unpack_start );
|
||||||
done2 = ompi_convertor_unpack( recv_convertor, &iov, &iov_count, &max_data, &free_after );
|
done2 = ompi_convertor_unpack( recv_convertor, &iov, &iov_count, &max_data );
|
||||||
assert( free_after == 0 );
|
|
||||||
GET_TIME( unpack_end );
|
GET_TIME( unpack_end );
|
||||||
unpack_time += ELAPSED_TIME( unpack_start, unpack_end );
|
unpack_time += ELAPSED_TIME( unpack_start, unpack_end );
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user