diff --git a/.travis.yml b/.travis.yml index a85b170aab1..c775591bda1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,9 +42,9 @@ env: script: - autoreconf -i - export CFLAGS='-std=c99 -fsanitize=address -fno-omit-frame-pointer' + - export FFLAGS='-std=c99 -fsanitize=address -fno-omit-frame-pointer' - ./configure - make -j distcheck - - export CFLAGS='-std=c99' - rm -rf build - mkdir build - cd build diff --git a/src/clib/pio_darray_int.c b/src/clib/pio_darray_int.c index 24b45302078..cf43617eedf 100644 --- a/src/clib/pio_darray_int.c +++ b/src/clib/pio_darray_int.c @@ -640,8 +640,6 @@ int write_darray_multi_par(file_desc_t *file, int nvars, int fndims, const int * /* Write, in non-blocking fashion, a list of subarrays. */ LOG((3, "about to call ncmpi_iput_varn() varids[%d] = %d rrcnt = %d, llen = %d", nv, varids[nv], rrcnt, llen)); - for (int i=0; i< rrcnt; i++) - LOG((3, "i %d start %ld count %ld start %ld count %ld\n",i,startlist[i][0], countlist[i][0],startlist[i][1], countlist[i][1])); ierr = ncmpi_iput_varn(file->fh, varids[nv], rrcnt, startlist, countlist, bufptr, llen, iodesc->mpitype, &vdesc->request[vdesc->nreqs]); diff --git a/src/clib/pioc.c b/src/clib/pioc.c index 3575a33a64a..50b119375d1 100644 --- a/src/clib/pioc.c +++ b/src/clib/pioc.c @@ -526,7 +526,8 @@ int PIOc_InitDecomp(int iosysid, int pio_type, int ndims, const int *gdimlen, in break; } } - if (iodesc->needssort){ + if (iodesc->needssort) + { struct sort_map *tmpsort; if (!(tmpsort = malloc(sizeof(struct sort_map) * maplen))) diff --git a/src/clib/pioc_support.c b/src/clib/pioc_support.c index 646f3867dc2..9c8372f682d 100644 --- a/src/clib/pioc_support.c +++ b/src/clib/pioc_support.c @@ -789,6 +789,9 @@ int PIOc_freedecomp(int iosysid, int ioid) /* Free the dimlens. */ free(iodesc->dimlen); + if (iodesc->remap) + free(iodesc->remap); + LOG((3, "freeing rfrom, rtype")); if (iodesc->rfrom) free(iodesc->rfrom); diff --git a/tests/cunit/test_darray_multi.c b/tests/cunit/test_darray_multi.c index 5827c6760c2..5f8f93c5163 100644 --- a/tests/cunit/test_darray_multi.c +++ b/tests/cunit/test_darray_multi.c @@ -84,7 +84,6 @@ int test_darray(int iosysid, int ioid, int num_flavors, int *flavor, int my_rank int ncid2; /* The ncid of the re-opened netCDF file. */ int varid[NVAR]; /* The IDs of the netCDF varables. */ int other_varid; /* The IDs of a var of different type. */ - int wrong_varid[NVAR]; /* These will not work. */ PIO_Offset arraylen = 4; /* Amount of data from each task. */ void *fillvalue; /* Pointer to fill value. */ void *test_data; /* Pointer to test data we will write. */ @@ -279,14 +278,6 @@ int test_darray(int iosysid, int ioid, int num_flavors, int *flavor, int my_rank int frame[NVAR] = {0, 0, 0}; int flushtodisk = test_multi; - /* This will not work, because we mix var types. */ - wrong_varid[0] = varid[0]; - wrong_varid[1] = varid[1]; - wrong_varid[0] = other_varid; -// if (PIOc_write_darray_multi(ncid, wrong_varid, ioid, NVAR, arraylen, test_data, frame, -// fillvalue, flushtodisk) != PIO_EINVAL) -// ERR(ERR_WRONG); - /* Write the data with the _multi function. */ if ((ret = PIOc_write_darray_multi(ncid, varid, ioid, NVAR, arraylen, test_data, frame, fillvalue, flushtodisk))) diff --git a/tests/cunit/test_darray_multivar3.c b/tests/cunit/test_darray_multivar3.c index 35c932f6afd..dc12b9e0c20 100644 --- a/tests/cunit/test_darray_multivar3.c +++ b/tests/cunit/test_darray_multivar3.c @@ -133,11 +133,11 @@ int test_multivar_darray(int iosysid, int ioid, int num_flavors, int *flavor, ERR(ret); int *fvp_int = NULL; - float *fvp_float = NULL; + /* float *fvp_float = NULL; */ if (use_fv) { fvp_int = &custom_fillvalue_int; - fvp_float = &custom_fillvalue_float; + /* fvp_float = &custom_fillvalue_float; */ } /* Write the data. */ @@ -148,13 +148,16 @@ int test_multivar_darray(int iosysid, int ioid, int num_flavors, int *flavor, fvp_int))) ERR(ret); - /* This should not work since we cannot mix record and not record vars */ + /* This should not work since we cannot mix record and not + * record vars. */ int frame[NUM_VAR] = {0, 0, 0}; if (PIOc_write_darray_multi(ncid, varid, ioid, NUM_VAR, arraylen * NUM_VAR, test_data_float, frame, NULL, 0) != PIO_EVARDIMMISMATCH) ERR(ERR_WRONG); - /* This should work since int and float are the same size and both are record vars */ + + /* This should work since int and float are the same size + * and both are record vars. */ if ((ret = PIOc_write_darray_multi(ncid, varid+1, ioid, NUM_VAR-1, arraylen * (NUM_VAR-1), test_data_float, frame, NULL, 0))) ERR(ret);