Skip to content

Commit 9579788

Browse files
committed
Fix PGI warning: ompi/datatype
Signed-off-by: Austen Lauria <[email protected]>
1 parent d6658b2 commit 9579788

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

ompi/datatype/ompi_datatype_module.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -547,9 +547,14 @@ int32_t ompi_datatype_init( void )
547547
ompi_mpi_##name.dt.d_f_to_c_index = index; \
548548
rc = opal_pointer_array_set_item(&ompi_datatype_f_to_c_table, \
549549
index, &ompi_mpi_##name); \
550-
assert( rc == OPAL_SUCCESS ); \
551-
if( ompi_datatype_number_of_predefined_data < (ompi_mpi_##name).dt.d_f_to_c_index + 1 ) \
552-
ompi_datatype_number_of_predefined_data = (ompi_mpi_##name).dt.d_f_to_c_index + 1; \
550+
if(OPAL_SUCCESS != rc) { \
551+
fprintf(stderr, "ERROR: opal_pointer_array_set_item() returned %d\n", rc); \
552+
fprintf(stderr, "Failure in %s:%d\n", __func__, __LINE__); \
553+
return rc; \
554+
} \
555+
if( ompi_datatype_number_of_predefined_data < (ompi_mpi_##name).dt.d_f_to_c_index + 1 ) { \
556+
ompi_datatype_number_of_predefined_data = (ompi_mpi_##name).dt.d_f_to_c_index + 1; \
557+
} \
553558
} while(0)
554559

555560
/*

0 commit comments

Comments
 (0)