Skip to content

Commit

Permalink
Committing clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 20, 2023
1 parent dffd1ba commit f20ddf9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 30 deletions.
6 changes: 3 additions & 3 deletions src/H5FDsubfiling/H5FDsubfiling.c
Original file line number Diff line number Diff line change
Expand Up @@ -3170,8 +3170,7 @@ translate_io_req_to_iovec(subfiling_context_t *sf_context, size_t iovec_idx, siz
* |___________|___________|___________|___________|
* (thin) (thin)
*/
thin_uniform_section = (subfile_idx > last_subfile_idx) ||
(subfile_idx < first_subfile_idx);
thin_uniform_section = (subfile_idx > last_subfile_idx) || (subfile_idx < first_subfile_idx);
}
else { /* last_subfile_idx < first_subfile_idx */
/*
Expand All @@ -3180,7 +3179,8 @@ translate_io_req_to_iovec(subfiling_context_t *sf_context, size_t iovec_idx, siz
* subfile with the first data segment and the current
* subfile index falls between the two.
*/
thin_uniform_section = ((last_subfile_idx < subfile_idx) && (subfile_idx < first_subfile_idx));
thin_uniform_section =
((last_subfile_idx < subfile_idx) && (subfile_idx < first_subfile_idx));
}

if (thin_uniform_section) {
Expand Down
41 changes: 14 additions & 27 deletions testpar/t_subfiling_vfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,7 @@ test_iovec_translation(void)
* environment variables have been set since we
* want to use fixed configurations for testing.
*/
if (getenv(H5FD_SUBFILING_STRIPE_SIZE) ||
getenv(H5FD_SUBFILING_IOC_PER_NODE))
if (getenv(H5FD_SUBFILING_STRIPE_SIZE) || getenv(H5FD_SUBFILING_IOC_PER_NODE))
skip = true;

/* I/O only needs to be done from a single rank */
Expand All @@ -940,7 +939,7 @@ test_iovec_translation(void)
num_digits = (int)(log10(num_subfiles) + 1);

/* Allocate enough buffer space for up to 2 "subfile blocks" of I/O */
buf_size = (size_t)(2 * stripe_size * num_subfiles);
buf_size = (size_t)(2 * stripe_size * num_subfiles);
write_buf = malloc(buf_size);
VRFY(write_buf, "malloc succeeded");
read_buf = malloc(buf_size);
Expand Down Expand Up @@ -1008,8 +1007,7 @@ test_iovec_translation(void)
write_addr = 0;

/* Set EOA for following write call */
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0),
"H5FDset_eoa succeeded");
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0), "H5FDset_eoa succeeded");

/* Write according to the above pattern */
status = H5FDwrite(file_ptr, H5FD_MEM_DRAW, dxpl_id, write_addr, nbytes, c_write_buf);
Expand All @@ -1024,8 +1022,7 @@ test_iovec_translation(void)
* Set EOA for following read call (since we wrote over any
* superblock information in the file)
*/
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0),
"H5FDset_eoa succeeded");
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0), "H5FDset_eoa succeeded");

/* Read the written bytes and verify */
status = H5FDread(file_ptr, H5FD_MEM_DRAW, dxpl_id, write_addr, nbytes, read_buf);
Expand Down Expand Up @@ -1116,8 +1113,7 @@ test_iovec_translation(void)
write_addr = (haddr_t)stripe_size;

/* Set EOA for following write call */
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0),
"H5FDset_eoa succeeded");
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0), "H5FDset_eoa succeeded");

/* Write according to the above pattern */
status = H5FDwrite(file_ptr, H5FD_MEM_DRAW, dxpl_id, write_addr, nbytes, c_write_buf);
Expand All @@ -1132,8 +1128,7 @@ test_iovec_translation(void)
* Set EOA for following read call (since we wrote over any
* superblock information in the file)
*/
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0),
"H5FDset_eoa succeeded");
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0), "H5FDset_eoa succeeded");

/* Read the written bytes and verify */
status = H5FDread(file_ptr, H5FD_MEM_DRAW, dxpl_id, write_addr, nbytes, read_buf);
Expand Down Expand Up @@ -1214,8 +1209,7 @@ test_iovec_translation(void)
write_addr = (haddr_t)(2 * stripe_size);

/* Set EOA for following write call */
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0),
"H5FDset_eoa succeeded");
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0), "H5FDset_eoa succeeded");

/* Write according to the above pattern */
status = H5FDwrite(file_ptr, H5FD_MEM_DRAW, dxpl_id, write_addr, nbytes, c_write_buf);
Expand All @@ -1230,8 +1224,7 @@ test_iovec_translation(void)
* Set EOA for following read call (since we wrote over any
* superblock information in the file)
*/
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0),
"H5FDset_eoa succeeded");
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0), "H5FDset_eoa succeeded");

/* Read the written bytes and verify */
status = H5FDread(file_ptr, H5FD_MEM_DRAW, dxpl_id, write_addr, nbytes, read_buf);
Expand Down Expand Up @@ -1304,8 +1297,7 @@ test_iovec_translation(void)
write_addr = (haddr_t)1;

/* Set EOA for following write call */
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0),
"H5FDset_eoa succeeded");
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0), "H5FDset_eoa succeeded");

/* Write according to the above pattern */
status = H5FDwrite(file_ptr, H5FD_MEM_DRAW, dxpl_id, write_addr, nbytes, c_write_buf);
Expand All @@ -1320,8 +1312,7 @@ test_iovec_translation(void)
* Set EOA for following read call (since we wrote over any
* superblock information in the file)
*/
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0),
"H5FDset_eoa succeeded");
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0), "H5FDset_eoa succeeded");

/* Read the written bytes and verify */
status = H5FDread(file_ptr, H5FD_MEM_DRAW, dxpl_id, write_addr, nbytes, read_buf);
Expand Down Expand Up @@ -1400,8 +1391,7 @@ test_iovec_translation(void)
write_addr = (haddr_t)(stripe_size - 1);

/* Set EOA for following write call */
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0),
"H5FDset_eoa succeeded");
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0), "H5FDset_eoa succeeded");

/* Write according to the above pattern */
status = H5FDwrite(file_ptr, H5FD_MEM_DRAW, dxpl_id, write_addr, nbytes, c_write_buf);
Expand All @@ -1416,8 +1406,7 @@ test_iovec_translation(void)
* Set EOA for following read call (since we wrote over any
* superblock information in the file)
*/
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0),
"H5FDset_eoa succeeded");
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0), "H5FDset_eoa succeeded");

/* Read the written bytes and verify */
status = H5FDread(file_ptr, H5FD_MEM_DRAW, dxpl_id, write_addr, nbytes, read_buf);
Expand Down Expand Up @@ -1495,8 +1484,7 @@ test_iovec_translation(void)
write_addr = (haddr_t)0;

/* Set EOA for following write call */
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0),
"H5FDset_eoa succeeded");
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0), "H5FDset_eoa succeeded");

/* Write according to the above pattern */
status = H5FDwrite(file_ptr, H5FD_MEM_DRAW, dxpl_id, write_addr, nbytes, c_write_buf);
Expand All @@ -1511,8 +1499,7 @@ test_iovec_translation(void)
* Set EOA for following read call (since we wrote over any
* superblock information in the file)
*/
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0),
"H5FDset_eoa succeeded");
VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, write_addr + nbytes) >= 0), "H5FDset_eoa succeeded");

/* Read the written bytes and verify */
status = H5FDread(file_ptr, H5FD_MEM_DRAW, dxpl_id, write_addr, nbytes, read_buf);
Expand Down

0 comments on commit f20ddf9

Please sign in to comment.