Skip to content

Commit 52e424c

Browse files
committed
Merge pull request open-mpi#943 from jsquyres/pr/v2.x/usnic-num-blocks-calc-fix
v2.0.0: usnic: fix calculation for number of blocks
2 parents 7acf499 + 3b13ec8 commit 52e424c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

opal/mca/btl/usnic/btl_usnic_module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ static int add_procs_create_endpoints(struct opal_btl_usnic_module_t* module,
412412
size_t block_len = eq_size;
413413
size_t num_av_inserts = nprocs * USNIC_NUM_CHANNELS;
414414
size_t num_blocks = num_av_inserts / block_len;
415-
if (eq_size % num_av_inserts != 0) {
415+
if (num_av_inserts % block_len != 0) {
416416
++num_blocks;
417417
}
418418

0 commit comments

Comments
 (0)