Skip to content

Commit 5934e41

Browse files
author
shanedsnyder
authored
Merge pull request #805 from darshan-hpc/snyder/dev-hdf5-logutils-shift
BUG: logutils up-conversin of partial_flags is broken for darshan versions prior to 3.2.0
2 parents 7d72488 + 98ce381 commit 5934e41

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

darshan-util/darshan-logutils.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,15 @@ static int darshan_log_get_header(darshan_fd fd)
11731173
(DARSHAN_MAX_MODS-DARSHAN_H5D_MOD-1) * sizeof(uint32_t));
11741174
fd->mod_map[DARSHAN_H5D_MOD].len = fd->mod_map[DARSHAN_H5D_MOD].off = 0;
11751175
fd->mod_ver[DARSHAN_H5D_MOD] = 0;
1176+
1177+
uint64_t partial_flag_shift = fd->partial_flag << 1;
1178+
// zero out bits up to (and including) H5D in shifted flags
1179+
partial_flag_shift = (partial_flag_shift >> (DARSHAN_H5D_MOD+1)) <<
1180+
(DARSHAN_H5D_MOD+1);
1181+
// zero out H5D and all bits higher than it in original flags
1182+
fd->partial_flag = fd->partial_flag & ((1 << DARSHAN_H5D_MOD) - 1);
1183+
// combine original flags and shifted flags
1184+
fd->partial_flag = fd->partial_flag | partial_flag_shift;
11761185
}
11771186

11781187
/* there may be nothing following the job data, so safety check map */

0 commit comments

Comments
 (0)