Skip to content

Commit

Permalink
Fix an off-by-one error in PIOc_InitDecomp_bc()
Browse files Browse the repository at this point in the history
`PIOc_InitDecomp_bc()` computes a zero-based `compmap` and passes it to
`PIOc_InitDecomp()`, which expects a one-based `compmap`.
  • Loading branch information
ckhroulev committed Oct 29, 2019
1 parent b1b1fa7 commit 648109a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clib/pioc.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ PIOc_InitDecomp_bc(int iosysid, int pio_type, int ndims, const int *gdimlen,
}
for (i = 0; i < maplen; i++)
{
compmap[i] = 0;
compmap[i] = 1;
for (n = ndims - 1; n >= 0; n--)
compmap[i] += (start[n] + loc[n]) * prod[n];

Expand Down

0 comments on commit 648109a

Please sign in to comment.