This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "MPICH primary repository". The branch, master has been updated via 1357dae1ed0c3b73032e0205c2cce138fbb90b05 (commit) via fd9a5aa1ca10c8bd4701f6fda44d8c5b16d3256f (commit) via 6445f67c7ef34a8c66d8a1085ddd1011c2f69e0b (commit) via 5d727bbf5fee0cde239015fc537e7179bf84d312 (commit) from 1d622ee99084f0e624c83f961e6b21d2021178b7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.mpich.org/mpich.git/commitdiff/1357dae1ed0c3b73032e0205c2cce138fb... commit 1357dae1ed0c3b73032e0205c2cce138fbb90b05 Author: Paul Coffman <[email protected]> Date: Thu Feb 13 11:22:36 2014 -0600 fix hintfile pocessing to initialize flag ADIOI_incorporate_system_hints need to initialize flag or hints from ROMIO_HINTS file with NULL MPI_Info could be ignored in some situations Signed-off-by: Rob Latham <[email protected]> diff --git a/src/mpi/romio/adio/common/system_hints.c b/src/mpi/romio/adio/common/system_hints.c index 507e188..546b9d4 100644 --- a/src/mpi/romio/adio/common/system_hints.c +++ b/src/mpi/romio/adio/common/system_hints.c @@ -156,7 +156,8 @@ void ADIOI_incorporate_system_hints(MPI_Info info, MPI_Info sysinfo, MPI_Info *new_info) { - int i, nkeys_sysinfo, flag; + int i, nkeys_sysinfo, flag=0; // must initialize flag to 0 + char val[MPI_MAX_INFO_VAL], key[MPI_MAX_INFO_KEY]; if (sysinfo == MPI_INFO_NULL) http://git.mpich.org/mpich.git/commitdiff/fd9a5aa1ca10c8bd4701f6fda44d8c5b16... commit fd9a5aa1ca10c8bd4701f6fda44d8c5b16d3256f Author: Rob Latham <[email protected]> Date: Wed Mar 26 15:53:23 2014 -0500 romio pvfs2 warning fixes missing prototypes, shadowed declarations, format string conversions, and mismatched datatypes all flagged by clang Signed-off-by: none diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2.h b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2.h index 329cac2..95c5912 100644 --- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2.h +++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2.h @@ -63,4 +63,14 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); + +int ADIOI_PVFS2_WriteStridedListIO(ADIO_File fd, const void *buf, int count, + MPI_Datatype datatype, int file_ptr_type, + ADIO_Offset offset, ADIO_Status *status, + int *error_code); +int ADIOI_PVFS2_WriteStridedDtypeIO(ADIO_File fd, const void *buf, int count, + MPI_Datatype datatype, int file_ptr_type, + ADIO_Offset offset, ADIO_Status *status, + int *error_code); + #endif diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c index f581876..0901252 100644 --- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c +++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c @@ -164,7 +164,7 @@ int ADIOI_PVFS2_StridedDtypeIO(ADIO_File fd, void *buf, int count, if (ret != 0) { fprintf(stderr, "ADIOI_PVFS2_StridedDtypeIO: Warning - PVFS_sys_" "read/write returned %d and completed %Ld bytes.\n", - ret, resp_io.total_completed); + ret, (long long)resp_io.total_completed); *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, @@ -212,7 +212,8 @@ int convert_mpi_pvfs2_dtype(MPI_Datatype *mpi_dtype, { int num_int = -1, num_addr = -1, num_dtype = -1, combiner = -1, i = -1, ret = -1, leaf = -1; - int *arr_int = NULL, *arr_addr = NULL; + int *arr_int = NULL; + MPI_Aint *arr_addr = NULL; MPI_Datatype *arr_dtype = NULL; PVFS_Request *old_pvfs_dtype = NULL; PVFS_Request *old_pvfs_dtype_arr = NULL; @@ -699,34 +700,34 @@ void print_dtype_info(int combiner, arr_int[0], arr_int[1], arr_int[2]); break; case MPI_COMBINER_HVECTOR: - fprintf(stderr, "HVECTOR(%d,%d,%d)\n", + fprintf(stderr, "HVECTOR(%d,%d,%ld)\n", arr_int[0], arr_int[1],arr_addr[0]); break; case MPI_COMBINER_INDEXED: fprintf(stderr, "INDEXED(%d,[", arr_int[0]); for (i = 0; i < arr_int[0]; i++) - fprintf(stderr, "(%d,%Ld) ", + fprintf(stderr, "(%d,%d) ", arr_int[1+i], - (int64_t) arr_int[arr_int[0]+1+i]); + arr_int[arr_int[0]+1+i]); fprintf(stderr, "]\n"); break; case MPI_COMBINER_HINDEXED: fprintf(stderr, "HINDEXED(%d,[", arr_int[0]); for (i = 0; i < arr_int[0]; i++) - fprintf(stderr, "(%d,%Ld) ", + fprintf(stderr, "(%d,%lld) ", arr_int[1+i], - (int64_t) arr_addr[i]); + (long long)arr_addr[i]); fprintf(stderr, "]\n"); break; case MPI_COMBINER_STRUCT: fprintf(stderr, "STRUCT(%d,[", arr_int[0]); for (i = 0; i < arr_int[0]; i++) - fprintf(stderr, "(%d,%Ld) ", + fprintf(stderr, "(%d,%lld) ", arr_int[1+i], - (int64_t) arr_addr[i]); + (long long) arr_addr[i]); fprintf(stderr, "]\n"); break; case MPI_COMBINER_DUP: diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c index 5ca14dd..c5d03d1 100644 --- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c +++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c @@ -42,8 +42,8 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, int64_t cur_flat_buf_reg_off = 0; int64_t cur_flat_file_reg_off = 0; ADIOI_Flatlist_node *flat_buf_p, *flat_file_p; - MPI_Count buftype_size = -1, buftype_extent = -1, - filetype_size = -1, filetype_extent = -1; + MPI_Count buftype_size = -1, filetype_size = -1; + MPI_Aint filetype_extent = -1, buftype_extent = -1;; int buftype_is_contig = -1, filetype_is_contig = -1; /* PVFS2 specific parameters */ @@ -297,8 +297,8 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count, if (ret != 0) { fprintf(stderr, "ADIOI_PVFS2_StridedListIO: Warning - PVFS_sys_" - "read/write returned %d and completed %Ld bytes.\n", - ret, resp_io.total_completed); + "read/write returned %d and completed %lld bytes.\n", + ret, (long long)resp_io.total_completed); *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, @@ -650,7 +650,7 @@ void print_buf_file_ol_pairs(int64_t buf_off_arr[], buf_ol_count); for (i = 0; i < buf_ol_count; i++) { - fprintf(stderr, "(%Ld, %d) ", buf_off_arr[i], buf_len_arr[i]); + fprintf(stderr, "(%lld, %d) ", (long long)buf_off_arr[i], buf_len_arr[i]); } fprintf(stderr, "\n"); @@ -658,7 +658,7 @@ void print_buf_file_ol_pairs(int64_t buf_off_arr[], file_ol_count); for (i = 0; i < file_ol_count; i++) { - fprintf(stderr, "(%Ld, %d) ", file_off_arr[i], file_len_arr[i]); + fprintf(stderr, "(%lld, %d) ", (long long)file_off_arr[i], file_len_arr[i]); } fprintf(stderr, "\n\n"); diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c index d862ad3..2aee893 100644 --- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c +++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c @@ -90,8 +90,8 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, if (!buftype_is_contig && filetype_is_contig) { /* noncontiguous in memory, contiguous in file. */ - int64_t file_offsets; - int32_t file_lengths; + int64_t file_offset; + int32_t file_length; ADIOI_Flatten_datatype(datatype); flat_buf = ADIOI_Flatlist; @@ -101,8 +101,8 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, fd->disp + etype_size * offset; file_list_count = 1; - file_offsets = off; - file_lengths = 0; + file_offset = off; + file_length = 0; total_blks_to_read = count*flat_buf->count; b_blks_read = 0; @@ -124,7 +124,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, ((PVFS_size)buf + j*buftype_extent + flat_buf->indices[i]); mem_lengths[b_blks_read % MAX_ARRAY_SIZE] = flat_buf->blocklens[i]; - file_lengths += flat_buf->blocklens[i]; + file_length += flat_buf->blocklens[i]; b_blks_read++; if (!(b_blks_read % MAX_ARRAY_SIZE) || (b_blks_read == total_blks_to_read)) { @@ -139,14 +139,14 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, err_flag = PVFS_Request_hindexed(mem_list_count, mem_lengths, mem_offsets, PVFS_BYTE, &mem_req); if (err_flag < 0) break; - err_flag = PVFS_Request_contiguous(file_lengths, + err_flag = PVFS_Request_contiguous(file_length, PVFS_BYTE, &file_req); if (err_flag < 0) break; #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_read_a, 0, NULL ); #endif err_flag = PVFS_sys_read(pvfs_fs->object_ref, file_req, - file_offsets, PVFS_BOTTOM, mem_req, + file_offset, PVFS_BOTTOM, mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_read_b, 0, NULL ); @@ -169,8 +169,8 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, * leave here */ if (err_flag || b_blks_read == total_blks_to_read) break; - file_offsets += file_lengths; - file_lengths = 0; + file_offset += file_length; + file_length = 0; } } /* for (i=0; i<flat_buf->count; i++) */ j++; @@ -262,8 +262,8 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, /* contiguous in memory, noncontiguous in file. should be the most common case. */ - int mem_lengths; - char *mem_offsets; + int mem_length=0; + intptr_t mem_offset; i = 0; j = st_index; @@ -291,7 +291,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, n_read_lists = total_blks_to_read/MAX_ARRAY_SIZE; extra_blks = total_blks_to_read%MAX_ARRAY_SIZE; - mem_offsets = buf; + mem_offset = (intptr_t)buf; mem_lengths = 0; /* if at least one full readlist, allocate file arrays @@ -317,7 +317,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, if(!i) { file_offsets[0] = offset; file_lengths[0] = st_frd_size; - mem_lengths = st_frd_size; + mem_length = st_frd_size; } for (k=0; k<MAX_ARRAY_SIZE; k++) { if (i || k) { @@ -333,7 +333,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, n_filetypes++; } } /* for (k=0; k<MAX_ARRAY_SIZE; k++) */ - err_flag = PVFS_Request_contiguous(mem_lengths, + err_flag = PVFS_Request_contiguous(mem_length, PVFS_BYTE, &mem_req); /* --BEGIN ERROR HANDLING-- */ if (err_flag != 0) { @@ -367,7 +367,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, MPE_Log_event( ADIOI_MPE_read_a, 0, NULL ); #endif err_flag = PVFS_sys_read(pvfs_fs->object_ref, file_req, 0, - mem_offsets, mem_req, + (void *)mem_offset, mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_read_b, 0, NULL ); @@ -387,7 +387,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, total_bytes_read += resp_io.total_completed; - mem_offsets += mem_lengths; + mem_offset += mem_length; mem_lengths = 0; } /* for (i=0; i<n_read_lists; i++) */ @@ -405,7 +405,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, flat_file->indices[j]; if (k == (extra_blks - 1)) { file_lengths[k] = bufsize - (int32_t) mem_lengths - - (int32_t) mem_offsets + (int32_t) buf; + - mem_offset + (int32_t) buf; } else file_lengths[k] = flat_file->blocklens[j]; } /* if(i || k) */ @@ -416,7 +416,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, n_filetypes++; } } /* for (k=0; k<extra_blks; k++) */ - err_flag = PVFS_Request_contiguous(mem_lengths, + err_flag = PVFS_Request_contiguous(mem_length, PVFS_BYTE, &mem_req); /* --BEGIN ERROR HANDLING-- */ if (err_flag != 0) { @@ -447,7 +447,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count, MPE_Log_event( ADIOI_MPE_read_a, 0, NULL ); #endif err_flag = PVFS_sys_read(pvfs_fs->object_ref, file_req, 0, - mem_offsets, mem_req, &(pvfs_fs->credentials), &resp_io); + (void *)mem_offset, mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_read_b, 0, NULL ); #endif diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c index 954d32c..f51bf79 100644 --- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c +++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c @@ -106,8 +106,8 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, if (!buftype_is_contig && filetype_is_contig) { /* noncontiguous in memory, contiguous in file. */ - int64_t file_offsets; - int32_t file_lengths; + int64_t file_offset; + int32_t file_length; ADIOI_Flatten_datatype(datatype); flat_buf = ADIOI_Flatlist; @@ -119,8 +119,8 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, else off = fd->fp_ind; file_list_count = 1; - file_offsets = off; - file_lengths = 0; + file_offset = off; + file_length = 0; total_blks_to_write = count*flat_buf->count; b_blks_wrote = 0; @@ -142,7 +142,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, ((PVFS_size)buf + j*buftype_extent + flat_buf->indices[i]); mem_lengths[b_blks_wrote % MAX_ARRAY_SIZE] = flat_buf->blocklens[i]; - file_lengths += flat_buf->blocklens[i]; + file_length += flat_buf->blocklens[i]; b_blks_wrote++; if (!(b_blks_wrote % MAX_ARRAY_SIZE) || (b_blks_wrote == total_blks_to_write)) { @@ -168,7 +168,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, } /* --END ERROR HANDLING-- */ - err_flag = PVFS_Request_contiguous(file_lengths, + err_flag = PVFS_Request_contiguous(file_length, PVFS_BYTE, &file_req); /* --BEGIN ERROR HANDLING-- */ if (err_flag != 0) { @@ -185,7 +185,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); #endif err_flag = PVFS_sys_write(pvfs_fs->object_ref, file_req, - file_offsets, PVFS_BOTTOM, + file_offset, PVFS_BOTTOM, mem_req, &(pvfs_fs->credentials), &resp_io); @@ -208,8 +208,8 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, /* --END ERROR HANDLING-- */ if (b_blks_wrote == total_blks_to_write) break; - file_offsets += file_lengths; - file_lengths = 0; + file_offset += file_length; + file_length = 0; PVFS_Request_free(&mem_req); PVFS_Request_free(&file_req); } @@ -303,8 +303,8 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, /* contiguous in memory, noncontiguous in file. should be the most common case. */ - int mem_lengths; - char *mem_offsets; + int mem_length; + intptr_t mem_offset; i = 0; j = st_index; @@ -333,8 +333,8 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, n_write_lists = total_blks_to_write/MAX_ARRAY_SIZE; extra_blks = total_blks_to_write%MAX_ARRAY_SIZE; - mem_offsets = buf; - mem_lengths = 0; + mem_offset = (intptr_t) buf; + mem_length = 0; /* if at least one full writelist, allocate file arrays at max array size and don't free until very end */ @@ -359,7 +359,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, if(!i) { file_offsets[0] = offset; file_lengths[0] = st_fwr_size; - mem_lengths = st_fwr_size; + mem_length = st_fwr_size; } for (k=0; k<MAX_ARRAY_SIZE; k++) { if (i || k) { @@ -367,7 +367,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, ((ADIO_Offset)n_filetypes)*filetype_extent + flat_file->indices[j]; file_lengths[k] = flat_file->blocklens[j]; - mem_lengths += file_lengths[k]; + mem_length += file_lengths[k]; } if (j<(flat_file->count - 1)) j++; else { @@ -376,7 +376,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, } } /* for (k=0; k<MAX_ARRAY_SIZE; k++) */ - err_flag = PVFS_Request_contiguous(mem_lengths, + err_flag = PVFS_Request_contiguous(mem_length, PVFS_BYTE, &mem_req); /* --BEGIN ERROR HANDLING-- */ if (err_flag != 0) { @@ -410,7 +410,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); #endif err_flag = PVFS_sys_write(pvfs_fs->object_ref, file_req, 0, - mem_offsets, mem_req, + (void *)mem_offset, mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_b, 0, NULL ); @@ -427,7 +427,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, /* --END ERROR HANDLING-- */ total_bytes_written += resp_io.total_completed; - mem_offsets += mem_lengths; + mem_offset += mem_length; mem_lengths = 0; PVFS_Request_free(&file_req); PVFS_Request_free(&mem_req); @@ -448,7 +448,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, flat_file->indices[j]; if (k == (extra_blks - 1)) { file_lengths[k] = bufsize - (int32_t) mem_lengths - - (int32_t) mem_offsets + (int32_t) buf; + - mem_offset + (int32_t) buf; } else file_lengths[k] = flat_file->blocklens[j]; } /* if(i || k) */ @@ -460,7 +460,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, } } /* for (k=0; k<extra_blks; k++) */ - err_flag = PVFS_Request_contiguous(mem_lengths, + err_flag = PVFS_Request_contiguous(mem_length, PVFS_BYTE, &mem_req); /* --BEGIN ERROR HANDLING-- */ if (err_flag != 0) { @@ -492,7 +492,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); #endif err_flag = PVFS_sys_write(pvfs_fs->object_ref, file_req, 0, - mem_offsets, mem_req, + (void *)mem_offset, mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_b, 0, NULL ); http://git.mpich.org/mpich.git/commitdiff/6445f67c7ef34a8c66d8a1085ddd1011c2... commit 6445f67c7ef34a8c66d8a1085ddd1011c2f69e0b Author: Rob Latham <[email protected]> Date: Wed Mar 26 15:46:49 2014 -0500 romio pvfs2: const-ify interface MPI3 const-ification has propigated into ROMIO a bit. Declare most write buffers const, but cast it away when calling the not-const pvfs2 system interface Signed-off-by: none diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2.h b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2.h index 618090d..329cac2 100644 --- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2.h +++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2.h @@ -23,13 +23,13 @@ void ADIOI_PVFS2_ReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); -void ADIOI_PVFS2_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS2_WriteContig(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); void ADIOI_PVFS2_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *error_code); -void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS2_WriteStrided(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); @@ -38,7 +38,7 @@ void ADIOI_PVFS2_ReadStrided(ADIO_File fd, void *buf, int count, ADIO_Offset offset, ADIO_Status *status, int *error_code); void ADIOI_PVFS2_Flush(ADIO_File fd, int *error_code); -void ADIOI_PVFS2_Delete(char *filename, int *error_code); +void ADIOI_PVFS2_Delete(const char *filename, int *error_code); void ADIOI_PVFS2_Resize(ADIO_File fd, ADIO_Offset size, int *error_code); void ADIOI_PVFS2_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); int ADIOI_PVFS2_Feature(ADIO_File fd, int flag); @@ -47,7 +47,7 @@ void ADIOI_PVFS2_IReadContig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, MPI_Request *request, int *error_code); -void ADIOI_PVFS2_IWriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS2_IWriteContig(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, MPI_Request *request, int *error_code); @@ -55,7 +55,7 @@ void ADIOI_PVFS2_AIO_contig(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, MPI_Request *request, int flag, int *error_code); -void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code); diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_aio.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_aio.c index 14e7144..88be6f1 100644 --- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_aio.c +++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_aio.c @@ -32,12 +32,12 @@ void ADIOI_PVFS2_IReadContig(ADIO_File fd, void *buf, int count, offset, request, READ, error_code); } -void ADIOI_PVFS2_IWriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS2_IWriteContig(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, MPI_Request *request, int *error_code) { - ADIOI_PVFS2_AIO_contig(fd, buf, count, datatype, file_ptr_type, + ADIOI_PVFS2_AIO_contig(fd, (void *)buf, count, datatype, file_ptr_type, offset, request, WRITE, error_code); } diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_delete.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_delete.c index cff53e6..f5770bb 100644 --- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_delete.c +++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_delete.c @@ -10,7 +10,7 @@ #include "ad_pvfs2_common.h" -void ADIOI_PVFS2_Delete(char *filename, int *error_code) +void ADIOI_PVFS2_Delete(const char *filename, int *error_code) { PVFS_credentials credentials; PVFS_sysresp_getparent resp_getparent; diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write.c index 877f57f..93e142b 100644 --- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write.c +++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write.c @@ -10,7 +10,7 @@ #include "ad_pvfs2_io.h" #include "ad_pvfs2_common.h" -void ADIOI_PVFS2_WriteContig(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS2_WriteContig(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) @@ -55,7 +55,7 @@ void ADIOI_PVFS2_WriteContig(ADIO_File fd, void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); #endif - ret = PVFS_sys_write(pvfs_fs->object_ref, file_req, offset, buf, + ret = PVFS_sys_write(pvfs_fs->object_ref, file_req, offset, (void *)buf, mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_b, 0, NULL ); @@ -77,7 +77,7 @@ void ADIOI_PVFS2_WriteContig(ADIO_File fd, void *buf, int count, #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); #endif - ret = PVFS_sys_write(pvfs_fs->object_ref, file_req, fd->fp_ind, buf, + ret = PVFS_sys_write(pvfs_fs->object_ref, file_req, fd->fp_ind, (void *)buf, mem_req, &(pvfs_fs->credentials), &resp_io); #ifdef ADIOI_MPE_LOGGING MPE_Log_event( ADIOI_MPE_write_b, 0, NULL ); @@ -105,30 +105,30 @@ fn_exit: return; } -int ADIOI_PVFS2_WriteStridedListIO(ADIO_File fd, void *buf, int count, +int ADIOI_PVFS2_WriteStridedListIO(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) { - return ADIOI_PVFS2_StridedListIO(fd, buf, count, + return ADIOI_PVFS2_StridedListIO(fd, (void *)buf, count, datatype, file_ptr_type, offset, status, error_code, WRITE); } -int ADIOI_PVFS2_WriteStridedDtypeIO(ADIO_File fd, void *buf, int count, +int ADIOI_PVFS2_WriteStridedDtypeIO(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) { - return ADIOI_PVFS2_StridedDtypeIO(fd, buf, count, + return ADIOI_PVFS2_StridedDtypeIO(fd, (void *)buf, count, datatype, file_ptr_type, offset, status, error_code, WRITE); } -void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS2_WriteStrided(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c index 353546f..954d32c 100644 --- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c +++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c @@ -11,7 +11,7 @@ #include "ad_pvfs2_common.h" -void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, void *buf, int count, +void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) http://git.mpich.org/mpich.git/commitdiff/5d727bbf5fee0cde239015fc537e7179bf... commit 5d727bbf5fee0cde239015fc537e7179bf84d312 Author: Rob Latham <[email protected]> Date: Wed Mar 26 15:14:29 2014 -0500 romio pvfs2: bad use of memcpy I was taking the size of a pointer, not the size of the actual object. Thanks, clang! Signed-off-by: none diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_aio.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_aio.c index 56d0a9f..14e7144 100644 --- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_aio.c +++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_aio.c @@ -130,7 +130,7 @@ void ADIOI_PVFS2_AIO_contig(ADIO_File fd, void *buf, int count, &ADIOI_PVFS2_greq_class); } MPIX_Grequest_class_allocate(ADIOI_PVFS2_greq_class, aio_req, request); - memcpy(&(aio_req->req), request, sizeof(request)); + memcpy(&(aio_req->req), request, sizeof(*request)); } /* immediate completion */ ----------------------------------------------------------------------- Summary of changes: src/mpi/romio/adio/ad_pvfs2/ad_pvfs2.h | 20 +++++++-- src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_aio.c | 6 +- src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_delete.c | 2 +- src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c | 19 ++++---- src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c | 12 +++--- .../adio/ad_pvfs2/ad_pvfs2_read_list_classic.c | 38 ++++++++-------- src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write.c | 16 ++++---- .../adio/ad_pvfs2/ad_pvfs2_write_list_classic.c | 44 ++++++++++---------- src/mpi/romio/adio/common/system_hints.c | 3 +- 9 files changed, 86 insertions(+), 74 deletions(-) hooks/post-receive -- MPICH primary repository