Skip to content

Commit

Permalink
Add some (probably unnecessary) barriers
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF committed Oct 6, 2023
1 parent 84ad842 commit 7844f4a
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions testpar/t_filters_parallel.c
Original file line number Diff line number Diff line change
Expand Up @@ -4396,6 +4396,8 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -4433,6 +4435,8 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");

Expand Down Expand Up @@ -4612,6 +4616,8 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -4649,6 +4655,8 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");

Expand Down Expand Up @@ -4830,6 +4838,8 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -4867,6 +4877,8 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");

Expand Down Expand Up @@ -5071,6 +5083,8 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -5109,6 +5123,8 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");

Expand Down Expand Up @@ -5299,6 +5315,8 @@ test_read_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filter
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -5337,6 +5355,8 @@ test_read_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filter
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");

Expand Down Expand Up @@ -5485,6 +5505,8 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -5523,6 +5545,8 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");

Expand Down Expand Up @@ -5737,6 +5761,8 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -5774,6 +5800,8 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");

Expand Down Expand Up @@ -5973,6 +6001,8 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -6011,6 +6041,8 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");

Expand Down Expand Up @@ -6219,6 +6251,8 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -6266,6 +6300,8 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");

Expand Down Expand Up @@ -6458,6 +6494,8 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -6496,6 +6534,8 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");

Expand Down Expand Up @@ -6702,6 +6742,8 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -6739,6 +6781,8 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");

Expand Down Expand Up @@ -6967,6 +7011,8 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group,
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -7004,6 +7050,8 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group,
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");

Expand Down Expand Up @@ -7213,6 +7261,8 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -7250,6 +7300,8 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");

Expand Down Expand Up @@ -7462,6 +7514,8 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -7499,6 +7553,8 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");

Expand Down Expand Up @@ -7717,6 +7773,8 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group,
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -7754,6 +7812,8 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group,
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

file_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, fapl_id);
VRFY((file_id >= 0), "Test file open succeeded");

Expand Down Expand Up @@ -7908,6 +7968,8 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

/* Write the file on the MAINPROCESS rank */
if (MAINPROCESS) {
/* Set up file access property list */
Expand Down Expand Up @@ -7964,6 +8026,8 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(C_DATATYPE);

for (size_t dset_idx = 0; dset_idx < num_dsets; dset_idx++) {
Expand Down Expand Up @@ -8129,6 +8193,8 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id
VRFY((H5Gclose(group_id) >= 0), "Group close succeeded");
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");

MPI_Barrier(comm);

if (MAINPROCESS) {
plist_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY((plist_id >= 0), "FAPL creation succeeded");
Expand Down Expand Up @@ -8179,6 +8245,8 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id
VRFY((H5Fclose(file_id) >= 0), "File close succeeded");
}

MPI_Barrier(comm);

return;
}

Expand Down

0 comments on commit 7844f4a

Please sign in to comment.