From 648109a52248eea6dbef84ce043816ff450d3589 Mon Sep 17 00:00:00 2001 From: Constantine Khrulev Date: Mon, 28 Oct 2019 21:31:03 -0800 Subject: [PATCH] Fix an off-by-one error in PIOc_InitDecomp_bc() `PIOc_InitDecomp_bc()` computes a zero-based `compmap` and passes it to `PIOc_InitDecomp()`, which expects a one-based `compmap`. --- src/clib/pioc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clib/pioc.c b/src/clib/pioc.c index f944d92c4ff..f52d7a50e21 100644 --- a/src/clib/pioc.c +++ b/src/clib/pioc.c @@ -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];