- do not set the contiguous memory option in the collective operations. It
should not be stored on the file handle anyway, since it is not a property of the file. - protect a realloc for zero byte scenarios. This commit was SVN r32678.
Этот коммит содержится в:
родитель
0d425e2f74
Коммит
ed02927767
@ -105,9 +105,9 @@
|
||||
#endif
|
||||
|
||||
|
||||
if (opal_datatype_is_contiguous_memory_layout(&datatype->super,1)) {
|
||||
fh->f_flags |= OMPIO_CONTIGUOUS_MEMORY;
|
||||
}
|
||||
// if (opal_datatype_is_contiguous_memory_layout(&datatype->super,1)) {
|
||||
// fh->f_flags |= OMPIO_CONTIGUOUS_MEMORY;
|
||||
// }
|
||||
/**************************************************************************
|
||||
** In case the data is not contigous in memory, decode it into an iovec **
|
||||
**************************************************************************/
|
||||
|
@ -107,9 +107,9 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh,
|
||||
#endif
|
||||
|
||||
|
||||
if (opal_datatype_is_contiguous_memory_layout(&datatype->super,1)) {
|
||||
fh->f_flags |= OMPIO_CONTIGUOUS_MEMORY;
|
||||
}
|
||||
// if (opal_datatype_is_contiguous_memory_layout(&datatype->super,1)) {
|
||||
// fh->f_flags |= OMPIO_CONTIGUOUS_MEMORY;
|
||||
// }
|
||||
|
||||
/**************************************************************************
|
||||
** In case the data is not contigous in memory, decode it into an iovec **
|
||||
|
@ -104,9 +104,9 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh,
|
||||
MPI_Aint gc_in;
|
||||
#endif
|
||||
|
||||
if (opal_datatype_is_contiguous_memory_layout(&datatype->super,1)) {
|
||||
fh->f_flags |= OMPIO_CONTIGUOUS_MEMORY;
|
||||
}
|
||||
// if (opal_datatype_is_contiguous_memory_layout(&datatype->super,1)) {
|
||||
// fh->f_flags |= OMPIO_CONTIGUOUS_MEMORY;
|
||||
// }
|
||||
|
||||
|
||||
/* In case the data is not contigous in memory, decode it into an iovec */
|
||||
|
@ -99,13 +99,13 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh,
|
||||
#endif
|
||||
|
||||
|
||||
#if DEBUG_ON
|
||||
#if DEBUG_ON
|
||||
MPI_Aint gc_in;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (opal_datatype_is_contiguous_memory_layout(&datatype->super,1)) {
|
||||
fh->f_flags |= OMPIO_CONTIGUOUS_MEMORY;
|
||||
}
|
||||
// if (opal_datatype_is_contiguous_memory_layout(&datatype->super,1)) {
|
||||
// fh->f_flags |= OMPIO_CONTIGUOUS_MEMORY;
|
||||
// }
|
||||
|
||||
/* In case the data is not contigous in memory, decode it into an iovec */
|
||||
if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) {
|
||||
|
@ -134,9 +134,9 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh,
|
||||
#if TIME_BREAKDOWN
|
||||
print_entry nentry;
|
||||
#endif
|
||||
if (opal_datatype_is_contiguous_memory_layout(&datatype->super,1)) {
|
||||
fh->f_flags = fh->f_flags | OMPIO_CONTIGUOUS_MEMORY;
|
||||
}
|
||||
// if (opal_datatype_is_contiguous_memory_layout(&datatype->super,1)) {
|
||||
// fh->f_flags = fh->f_flags | OMPIO_CONTIGUOUS_MEMORY;
|
||||
// }
|
||||
|
||||
if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) {
|
||||
ret = ompi_io_ompio_decode_datatype (fh,
|
||||
|
@ -165,9 +165,9 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh,
|
||||
#endif
|
||||
|
||||
|
||||
if (opal_datatype_is_contiguous_memory_layout(&datatype->super,1)) {
|
||||
fh->f_flags = fh->f_flags | OMPIO_CONTIGUOUS_MEMORY;
|
||||
}
|
||||
// if (opal_datatype_is_contiguous_memory_layout(&datatype->super,1)) {
|
||||
// fh->f_flags = fh->f_flags | OMPIO_CONTIGUOUS_MEMORY;
|
||||
// }
|
||||
|
||||
|
||||
if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) {
|
||||
|
@ -485,7 +485,7 @@ int ompi_io_ompio_decode_datatype (mca_io_ompio_file_t *fh,
|
||||
size_t remaining_length = 0;
|
||||
uint32_t i;
|
||||
uint32_t temp_count;
|
||||
struct iovec * temp_iov;
|
||||
struct iovec *temp_iov=NULL;
|
||||
size_t temp_data;
|
||||
|
||||
|
||||
@ -553,10 +553,12 @@ int ompi_io_ompio_decode_datatype (mca_io_ompio_file_t *fh,
|
||||
#endif
|
||||
*iovec_count = *iovec_count + temp_count;
|
||||
*max_data = *max_data + temp_data;
|
||||
*iov = (struct iovec *) realloc (*iov, *iovec_count * sizeof(struct iovec));
|
||||
if (NULL == *iov) {
|
||||
opal_output(1, "OUT OF MEMORY\n");
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
if ( temp_count > 0 ) {
|
||||
*iov = (struct iovec *) realloc (*iov, *iovec_count * sizeof(struct iovec));
|
||||
if (NULL == *iov) {
|
||||
opal_output(1, "OUT OF MEMORY\n");
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
}
|
||||
for (i=0 ; i<temp_count ; i++) {
|
||||
(*iov)[i+(*iovec_count-temp_count)].iov_base = temp_iov[i].iov_base;
|
||||
@ -564,9 +566,9 @@ int ompi_io_ompio_decode_datatype (mca_io_ompio_file_t *fh,
|
||||
}
|
||||
|
||||
remaining_length -= temp_data;
|
||||
#if 0
|
||||
if (0 == fh->f_rank) {
|
||||
|
||||
#if 0
|
||||
if (0 == fh->f_rank) {
|
||||
printf ("%d Entries: \n",*iovec_count);
|
||||
for (i=0 ; i<*iovec_count ; i++) {
|
||||
printf ("\t{%p, %d}\n",
|
||||
@ -574,7 +576,7 @@ int ompi_io_ompio_decode_datatype (mca_io_ompio_file_t *fh,
|
||||
(*iov)[i].iov_len);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
if (remaining_length != 0) {
|
||||
printf( "Not all raw description was been extracted (%lu bytes missing)\n",
|
||||
(unsigned long) remaining_length );
|
||||
|
@ -109,7 +109,7 @@ int ompio_io_ompio_file_read (mca_io_ompio_file_t *fh,
|
||||
cycles = ceil((float)max_data/bytes_per_cycle);
|
||||
|
||||
#if 0
|
||||
printf ("Bytes per Cycle: %d Cycles: %d\n",bytes_per_cycle, cycles);
|
||||
printf ("Bytes per Cycle: %d Cycles: %d max_data:%d \n",bytes_per_cycle, cycles, max_data);
|
||||
#endif
|
||||
|
||||
j = fh->f_index_in_file_view;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user