Remove all warnings from the datatype tests.
Этот коммит содержится в:
родитель
79d8f6e54d
Коммит
1895f29537
@ -577,7 +577,7 @@ struct structure {
|
|||||||
|
|
||||||
ompi_datatype_t* create_struct_constant_gap_resized_ddt( ompi_datatype_t* type )
|
ompi_datatype_t* create_struct_constant_gap_resized_ddt( ompi_datatype_t* type )
|
||||||
{
|
{
|
||||||
struct structure *data;
|
struct structure data[1];
|
||||||
ompi_datatype_t *struct_type, *temp_type;
|
ompi_datatype_t *struct_type, *temp_type;
|
||||||
ompi_datatype_t *types[2] = {type, type};
|
ompi_datatype_t *types[2] = {type, type};
|
||||||
int blocklens[2] = {1, 1};
|
int blocklens[2] = {1, 1};
|
||||||
|
@ -429,8 +429,6 @@ static int local_copy_with_convertor( opal_datatype_t const * const pdt, int cou
|
|||||||
printf( "\t unpack in %ld microsec [pack in %ld microsec]\n", unpack_time,
|
printf( "\t unpack in %ld microsec [pack in %ld microsec]\n", unpack_time,
|
||||||
total_time - unpack_time );
|
total_time - unpack_time );
|
||||||
|
|
||||||
/****** GEORGE: PLEASE FIX ME *****/
|
|
||||||
#if 0
|
|
||||||
if(outputFlags & VALIDATE_DATA) {
|
if(outputFlags & VALIDATE_DATA) {
|
||||||
for( int i = errors = 0; i < (count * extent); i++ ) {
|
for( int i = errors = 0; i < (count * extent); i++ ) {
|
||||||
if( ((char*)pdst)[i] != ((char*)psrc)[i] ) {
|
if( ((char*)pdst)[i] != ((char*)psrc)[i] ) {
|
||||||
@ -447,7 +445,6 @@ static int local_copy_with_convertor( opal_datatype_t const * const pdt, int cou
|
|||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
clean_and_return:
|
clean_and_return:
|
||||||
if( NULL != send_convertor ) OBJ_RELEASE( send_convertor );
|
if( NULL != send_convertor ) OBJ_RELEASE( send_convertor );
|
||||||
if( NULL != recv_convertor ) OBJ_RELEASE( recv_convertor );
|
if( NULL != recv_convertor ) OBJ_RELEASE( recv_convertor );
|
||||||
|
@ -35,7 +35,7 @@ create_struct_constant_gap_resized_ddt( int number, /* IGNORED: number of repet
|
|||||||
int contig_size, /* IGNORED: number of elements in a contiguous chunk */
|
int contig_size, /* IGNORED: number of elements in a contiguous chunk */
|
||||||
int gap_size ) /* IGNORED: number of elements in a gap */
|
int gap_size ) /* IGNORED: number of elements in a gap */
|
||||||
{
|
{
|
||||||
struct structure *data;
|
struct structure data[1];
|
||||||
MPI_Datatype struct_type, temp_type;
|
MPI_Datatype struct_type, temp_type;
|
||||||
MPI_Datatype types[2] = {MPI_DOUBLE, MPI_DOUBLE};
|
MPI_Datatype types[2] = {MPI_DOUBLE, MPI_DOUBLE};
|
||||||
int blocklens[2] = {1, 1};
|
int blocklens[2] = {1, 1};
|
||||||
|
@ -95,9 +95,9 @@ static int testcase(ompi_datatype_t * newtype, size_t arr[10][2]) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
memset(a.iov_base, 0xAA, 1024);
|
memset(a.iov_base, 0xAA, 1024);
|
||||||
memcpy(a.iov_base+1024, (char *)pbar + arr[i][1], arr[i][0]);
|
memcpy((char*)a.iov_base+1024, (char *)pbar + arr[i][1], arr[i][0]);
|
||||||
memset(a.iov_base+1024+arr[i][0], 0xAA, 1024);
|
memset((char*)a.iov_base+1024+arr[i][0], 0xAA, 1024);
|
||||||
a.iov_base += 1024;
|
a.iov_base = (char*)a.iov_base + 1024;
|
||||||
a.iov_len = arr[i][0];
|
a.iov_len = arr[i][0];
|
||||||
iov_count = 1;
|
iov_count = 1;
|
||||||
max_data = a.iov_len;
|
max_data = a.iov_len;
|
||||||
@ -105,7 +105,7 @@ static int testcase(ompi_datatype_t * newtype, size_t arr[10][2]) {
|
|||||||
opal_convertor_set_position(pConv, &pos);
|
opal_convertor_set_position(pConv, &pos);
|
||||||
assert(arr[i][1] == pos);
|
assert(arr[i][1] == pos);
|
||||||
opal_convertor_unpack( pConv, &a, &iov_count, &max_data );
|
opal_convertor_unpack( pConv, &a, &iov_count, &max_data );
|
||||||
a.iov_base -= 1024;
|
a.iov_base = (char*)a.iov_base - 1024;
|
||||||
free(a.iov_base);
|
free(a.iov_base);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ static int testcase(ompi_datatype_t * newtype, size_t arr[10][2]) {
|
|||||||
if(0 == errors) {
|
if(0 == errors) {
|
||||||
fprintf(stderr, "ERROR ! count=%d, position=%d, ptr = %p"
|
fprintf(stderr, "ERROR ! count=%d, position=%d, ptr = %p"
|
||||||
" got (%d,%d,%d,%g,%g,%g) expected (%d,%d,%d,%g,%g,%g)\n",
|
" got (%d,%d,%d,%g,%g,%g) expected (%d,%d,%d,%g,%g,%g)\n",
|
||||||
N, j, &bar[j],
|
N, j, (void*)&bar[j],
|
||||||
bar[j].i[0],
|
bar[j].i[0],
|
||||||
bar[j].i[1],
|
bar[j].i[1],
|
||||||
bar[j].i[2],
|
bar[j].i[2],
|
||||||
@ -141,18 +141,14 @@ static int testcase(ompi_datatype_t * newtype, size_t arr[10][2]) {
|
|||||||
return errors;
|
return errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int unpack_ooo()
|
static int unpack_ooo(void)
|
||||||
{
|
{
|
||||||
ompi_datatype_t * t1;
|
ompi_datatype_t * t1;
|
||||||
ompi_datatype_t * t2;
|
ompi_datatype_t * t2;
|
||||||
ompi_datatype_t * type[2];
|
ompi_datatype_t * type[2];
|
||||||
ompi_datatype_t * newtype;
|
ompi_datatype_t * newtype;
|
||||||
MPI_Aint disp[2];
|
MPI_Aint disp[2];
|
||||||
int len[2];
|
int len[2], rc;
|
||||||
size_t pos;
|
|
||||||
|
|
||||||
int rc;
|
|
||||||
unsigned int i, j, split_chunk, total_length;
|
|
||||||
|
|
||||||
rc = ompi_datatype_create_vector(2, 1, 2, MPI_INT, &t1);
|
rc = ompi_datatype_create_vector(2, 1, 2, MPI_INT, &t1);
|
||||||
if (OMPI_SUCCESS != rc) {
|
if (OMPI_SUCCESS != rc) {
|
||||||
@ -164,7 +160,7 @@ static int unpack_ooo()
|
|||||||
fprintf(stderr, "could not commit vector t1\n");
|
fprintf(stderr, "could not commit vector t1\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = ompi_datatype_create_vector(2, 1, 2, MPI_DOUBLE, &t2);
|
rc = ompi_datatype_create_vector(2, 1, 2, MPI_DOUBLE, &t2);
|
||||||
if (OMPI_SUCCESS != rc) {
|
if (OMPI_SUCCESS != rc) {
|
||||||
fprintf(stderr, "could not create vector t2\n");
|
fprintf(stderr, "could not create vector t2\n");
|
||||||
@ -299,7 +295,6 @@ static int unpack_ooo()
|
|||||||
|
|
||||||
int main( int argc, char* argv[] )
|
int main( int argc, char* argv[] )
|
||||||
{
|
{
|
||||||
ompi_datatype_t *pdt, *pdt1, *pdt2, *pdt3;
|
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
opal_init_util(&argc, &argv);
|
opal_init_util(&argc, &argv);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user