Commit f88b282a authored by fisaila's avatar fisaila

Corrected a bug: not using 64 bits for file offsets in a function.


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/branches/darshan-florin-extensions-addcounters-datatypes@839 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 0741d8f2
...@@ -39,10 +39,12 @@ void print_flatlist(MPI_Datatype dt) { ...@@ -39,10 +39,12 @@ void print_flatlist(MPI_Datatype dt) {
int b_index; int b_index;
ADIOI_Flatlist_node *flat_buf; ADIOI_Flatlist_node *flat_buf;
flat_buf = get_flatlist(dt); flat_buf = get_flatlist(dt);
if (flat_buf) if (flat_buf) {
printf("FLATLIST with %d elements\n",flat_buf->count);
for (b_index=0; b_index < flat_buf->count; b_index++) { for (b_index=0; b_index < flat_buf->count; b_index++) {
printf ("%3d-th: offset=%8lld len=%8lld \n",b_index, flat_buf->indices[b_index],flat_buf->blocklens[b_index]); printf ("%3d-th: offset=%8lld len=%8lld \n",b_index, flat_buf->indices[b_index],flat_buf->blocklens[b_index]);
} }
}
else else
printf ("NULL flat_buf\n"); printf ("NULL flat_buf\n");
} }
...@@ -112,8 +114,10 @@ int find_bin_search(MPI_Offset x, MPI_Datatype datatype, int leftright){ ...@@ -112,8 +114,10 @@ int find_bin_search(MPI_Offset x, MPI_Datatype datatype, int leftright){
// Finds the file offset within the extent range // Finds the file offset within the extent range
// assumes : x > 0 // assumes : x > 0
int find_size_bin_search(MPI_Offset x, ADIOI_Flatlist_node *flat_buf){ MPI_Offset find_size_bin_search(MPI_Offset x, ADIOI_Flatlist_node *flat_buf){
int l = 0 ,r = flat_buf->count - 1 ,size = -1; int l = 0 ,r = flat_buf->count - 1;
MPI_Offset size;
while (l <= r) { while (l <= r) {
int m = (l + r) / 2; int m = (l + r) / 2;
//printf("\n*** l=%d r=%d\n",l,r); //printf("\n*** l=%d r=%d\n",l,r);
...@@ -258,7 +262,11 @@ int count_contiguous_blocks_file(MPI_File fh, MPI_Offset foff1, MPI_Offset foff2 ...@@ -258,7 +262,11 @@ int count_contiguous_blocks_file(MPI_File fh, MPI_Offset foff1, MPI_Offset foff2
ADIOI_Flatlist_node *flat_buf; ADIOI_Flatlist_node *flat_buf;
flat_buf = get_flatlist(filetype); flat_buf = get_flatlist(filetype);
MPI_Type_get_extent(filetype, &lb, &extent); MPI_Type_get_extent(filetype, &lb, &extent);
if (disp+lb > foff1) {
printf("disp=%lld lb=%lld foff1=%lld foff2=%lld\n", disp, lb, foff1, foff2);
print_flatlist(filetype);
}
assert(disp+lb <= foff1); assert(disp+lb <= foff1);
assert(lb == flat_buf->indices[0]); assert(lb == flat_buf->indices[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment