Skip to content

Commit

Permalink
Reduce n_compute_elements and n_io_elements to avoid OpenMPI bug
Browse files Browse the repository at this point in the history
The OpenMPI library has a bug on macOS in which large messages
cause the code to hang; see, e.g.,
open-mpi/ompi#6568

This commit reduces the size of some arrays used in unit tests
for SMIOL_create_decomp to work around this issue.
  • Loading branch information
mgduda committed Mar 23, 2020
1 parent 70d1073 commit e6eee8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions smiol_runner.F90
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,8 @@ function test_decomp(test_log) result(ierrcount)

! Large number of Compute and IO Elements
write(test_log,'(a)',advance='no') 'Everything OK for SMIOLf_create_decomp large number of elements: '
n_compute_elements = 10000000
n_io_elements = 10000000
n_compute_elements = 1000000
n_io_elements = 1000000
allocate(compute_elements(n_compute_elements))
allocate(io_elements(n_io_elements))
ierr = SMIOLf_create_decomp(context, n_compute_elements, compute_elements, n_io_elements, io_elements, decomp)
Expand Down
4 changes: 2 additions & 2 deletions smiol_runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,8 @@ int test_decomp(FILE *test_log)

/* Create and Free Decomp with large amount of elements */
fprintf(test_log, "Everything OK (SMIOL_create_decomp) with large amount of elements: ");
n_compute_elements = 100000000;
n_io_elements = 100000000;
n_compute_elements = 1000000;
n_io_elements = 1000000;
compute_elements = malloc(sizeof(SMIOL_Offset) * n_compute_elements);
io_elements = malloc(sizeof(SMIOL_Offset) * n_io_elements);
ierr = SMIOL_create_decomp(context, n_compute_elements, compute_elements, n_io_elements, io_elements, &decomp);
Expand Down

0 comments on commit e6eee8c

Please sign in to comment.