diff --git a/utils/dat2decomp.cpp b/utils/dat2decomp.cpp index e43b426e..2e3993e4 100644 --- a/utils/dat2decomp.cpp +++ b/utils/dat2decomp.cpp @@ -150,7 +150,7 @@ int add_decomp(int ncid, else if (ndims == 3) printf("label D%d: dims = %lld x %lld x %lld (in C order)\n", label, dims[2], dims[1], dims[0]); } - dimX = dims[0]; /* the least significant dimension */ + dimX = (int)dims[0]; /* the least significant dimension */ /* gsize is total number of elements in the global array */ gsize = dims[0]; diff --git a/utils/dat2nc.c b/utils/dat2nc.c index 9d394809..878d8cef 100644 --- a/utils/dat2nc.c +++ b/utils/dat2nc.c @@ -147,7 +147,7 @@ int add_decomp(int ncid, const char *infname, int label) { else if (ndims == 3) printf("label D%d: dims = %lld x %lld x %lld (in C order)\n", label, dims[2], dims[1], dims[0]); } - dimX = dims[0]; /* the least significant dimension */ + dimX = (int)dims[0]; /* the least significant dimension */ /* gsize is total number of elements in the global array */ gsize = dims[0]; diff --git a/utils/pnetcdf_blob_replay.c b/utils/pnetcdf_blob_replay.c index 2d2c7868..f04b9e1d 100644 --- a/utils/pnetcdf_blob_replay.c +++ b/utils/pnetcdf_blob_replay.c @@ -199,7 +199,7 @@ int set_decomp(int ncid, /* number of dimensions, dimension IDs, and dimension sizes */ err = ncmpi_inq_attlen(ncid, varid, "global_dimids", &tmp); CHECK_VAR_ERR(ncid, varid) - dp->ndims = tmp; + dp->ndims = (int)tmp; int dimids[3]; /* number of fix-sized dimensions is <= 3 */ err = ncmpi_get_att(ncid, varid, "global_dimids", dimids); CHECK_VAR_ERR(ncid, varid) @@ -349,7 +349,7 @@ int copy_dims(int in_ncid, err = ncmpi_inq_dim(in_ncid, i, name, dims+i); CHECK_NC_ERR - int name_len = strlen(name); + size_t name_len = strlen(name); if (strcmp(name, "nblobs") == 0 || (name[0] == 'D' && strcmp(name+name_len-7, ".nelems") == 0) || (name[0] == 'D' && strcmp(name+name_len-10, ".max_nreqs") == 0)) @@ -453,7 +453,7 @@ int set_vars(int in_ncid, #ifndef NUM_DECOMP_AUX_VARS /* skip copying decomposition variables */ - int name_len = strlen(name); + size_t name_len = strlen(name); if ((name[0] == 'D' && name_len > 6 && strcmp(name+name_len-6, ".nreqs" ) == 0) || (name[0] == 'D' && name_len > 11 && strcmp(name+name_len-11,".blob_start") == 0) || (name[0] == 'D' && name_len > 11 && strcmp(name+name_len-11,".blob_count") == 0) || @@ -491,7 +491,7 @@ int set_vars(int in_ncid, } else if (err == NC_NOERR) { /* define variable using the global dimensions */ - var[i].ndims = tmp; + var[i].ndims = (int)tmp; err = ncmpi_get_att_int(in_ncid, i, "global_dimids", dimids); CHECK_VAR_ERR(in_ncid, i) err = ncmpi_def_var(out_ncid, name, xtype, var[i].ndims, dimids,