Changeset 687
- Timestamp:
- 10/27/09 12:59:41 (4 weeks ago)
- Location:
- trunk/src
- Files:
-
- 7 modified
-
lib/header.c (modified) (1 diff)
-
lib/mpinetcdf.c (modified) (15 diffs)
-
lib/nc.c (modified) (1 diff)
-
lib/nc.h (modified) (2 diffs)
-
lib/validator.c (modified) (2 diffs)
-
utils/ncdump/ncdump.c (modified) (1 diff)
-
utils/ncdump/vardata.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/header.c
r668 r687 1120 1120 NCtype type = NC_UNSPECIFIED; 1121 1121 NC_var **vpp, **end; 1122 int i;1123 1122 1124 1123 assert(gbp != NULL && gbp->pos != NULL); -
trunk/src/lib/mpinetcdf.c
r682 r687 63 63 static int check_recsize_too_big(NC *ncp); 64 64 65 static int ncmpi_coll_wait(NCMPI_Request request); 66 static int ncmpi_coll_waitall(int count, NCMPI_Request array_of_requests[]); 67 65 68 /* Begin Of Dataset Functions */ 66 69 … … 303 306 ncmpi_enddef(int ncid) { 304 307 int status = NC_NOERR; 305 int errcheck = 0;306 int errflag = 0;307 308 NC *ncp; 308 309 … … 310 311 if(status != NC_NOERR) 311 312 return status; 312 313 313 314 314 if(!NC_indef(ncp)) … … 834 834 static int check_recsize_too_big(NC *ncp) 835 835 { 836 int ret = NC_NOERR; 836 837 /* assertion: because recsize will be used to set up the file 837 838 * view, we must ensure there is no overflow when specifying … … 843 844 if (ncp->recsize != (MPI_Aint)ncp->recsize) { 844 845 fprintf(stderr, "Type overflow: unable to read/write multiple records in this dataset\non this platform. Please either access records of this record variable\none-at-a-time or run on a 64 bit platform\n"); 846 ret = NC_ESMALL; 845 847 } 846 848 /* the assert here might harsh, but without it, users will get corrupt 847 849 * data. */ 848 850 assert (ncp->recsize == (MPI_Aint)ncp->recsize); 851 return ret; 849 852 } 850 853 … … 8303 8306 } 8304 8307 } else { 8305 ncmpi_coll_wait(request);8308 return (ncmpi_coll_wait(*request)); 8306 8309 } 8307 8310 } … … 8333 8336 } 8334 8337 } else { 8335 ncmpi_coll_waitall(count, array_of_requests);8338 return (ncmpi_coll_waitall(count, array_of_requests)); 8336 8339 } 8337 8340 } … … 12480 12483 return NC_NOERR; 12481 12484 } 12482 int 12485 12486 static int 12483 12487 ncmpi_put_mvara_all_nonrecord(int ncid, int nvars, int varid[], 12484 12488 MPI_Offset *start[], MPI_Offset *count[], … … 12489 12493 NC *ncp; 12490 12494 void **xbuf = NULL, **cbuf = NULL; 12491 char *temp_xbuf = NULL;12492 void *t_xbuf = NULL;12493 12495 int status = NC_NOERR, warning = NC_NOERR; 12494 12496 int dim; … … 12909 12911 return ((warning != NC_NOERR) ? warning : status); 12910 12912 } 12911 int 12913 12914 static int 12912 12915 ncmpi_put_mvara_all_record(int ncid, int nvars, int varid[], 12913 12916 MPI_Offset *start[], MPI_Offset *count[], … … 12918 12921 NC *ncp; 12919 12922 void **xbuf = NULL, **cbuf = NULL; 12920 char *temp_xbuf = NULL;12921 void *t_xbuf = NULL;12922 12923 int status = NC_NOERR, warning = NC_NOERR; 12923 12924 int dim; … … 13162 13163 NC_var *varp; 13163 13164 NC *ncp; 13164 void **xbuf = NULL, **cbuf = NULL; 13165 char *temp_xbuf = NULL; 13166 void *t_xbuf = NULL; 13167 int status = NC_NOERR, warning = NC_NOERR; 13168 int dim; 13169 int *nelems, *cnelems, *el_size, *nbytes; 13170 int total_nbytes; 13171 MPI_Status mpistatus; 13172 MPI_Comm comm; 13173 int mpireturn; 13174 MPI_Datatype *ptype; 13175 MPI_Datatype buf_type; 13176 int isderived, *iscontig_of_ptypes; 13177 int i; 13178 MPI_Aint *displacement, a0, ai; 13179 int size; 13165 int status = NC_NOERR; 13180 13166 13181 13167 status = ncmpii_NC_check_id(ncid, &ncp); … … 13187 13173 13188 13174 if (IS_RECVAR(varp)) 13189 ncmpi_put_mvara_all_record(ncid, nvars, varid, start, count, buf, bufcount, datatype);13175 status = ncmpi_put_mvara_all_record(ncid, nvars, varid, start, count, buf, bufcount, datatype); 13190 13176 else 13191 ncmpi_put_mvara_all_nonrecord(ncid, nvars, varid, start, count, buf, bufcount, datatype); 13177 status = ncmpi_put_mvara_all_nonrecord(ncid, nvars, varid, start, count, buf, bufcount, datatype); 13178 return (status); 13192 13179 } 13193 13180 … … 13202 13189 int status = NC_NOERR; 13203 13190 int dim; 13204 int nelems;13205 MPI_Status mpistatus;13206 MPI_Comm comm;13207 int mpireturn;13208 MPI_Datatype ptype;13209 int isderived, iscontig_of_ptypes;13210 13191 13211 13192 status = ncmpii_NC_check_id(ncid, &ncp); … … 13239 13220 13240 13221 13241 int13222 static int 13242 13223 ncmpi_coll_wait(NCMPI_Request request) { 13243 ncmpi_put_vara_all(request->ncid, request->varid,13224 return (ncmpi_put_vara_all(request->ncid, request->varid, 13244 13225 request->start, request->count, 13245 13226 request->buf, request->bufcount, 13246 request->vartype) ;13227 request->vartype)); 13247 13228 13248 13229 } -
trunk/src/lib/nc.c
r671 r687 144 144 } 145 145 146 147 /* 'defined but not used': seems like a useful function though. why did we 148 * write it? should we be using it? */ 146 149 147 150 static int -
trunk/src/lib/nc.h
r663 r687 554 554 ncmpii_NC_computeshapes(NC *ncp); 555 555 556 extern int 557 ncmpii_hdr_check_NC(bufferinfo *getbuf, NC *ncp); 556 558 /* end defined in header.c */ 557 559 … … 569 571 extern int 570 572 ncmpiio_move(ncio *const nciop, MPI_Offset to, MPI_Offset from, MPI_Offset nbytes); 573 574 extern int 575 ncmpiio_get_hint(NC *ncp, char *key, char *value, int flag); 571 576 572 577 extern int -
trunk/src/lib/validator.c
r669 r687 447 447 NC_string *strp; 448 448 int status; 449 MPI_Offset ndims, tmp_dim;449 MPI_Offset ndims, *tmp_dim; 450 450 size_t dim; 451 451 NC_var *varp; … … 475 475 return status; 476 476 } 477 tmp_dim = (MPI_Offset ) varp->dimids + dim;477 tmp_dim = (MPI_Offset*) (varp->dimids + dim); 478 478 status = ncmpix_getn_long_long((const void **)(&gbp->pos), 479 1, &tmp_dim);479 1, tmp_dim); 480 480 if(status != ENOERR) { 481 481 ncmpii_free_NC_var(varp); -
trunk/src/utils/ncdump/ncdump.c
r673 r687 360 360 int ncmpi_status; /* return from netcdf calls */ 361 361 int NC_mode; 362 int NC_version;363 362 364 363 ncmpi_status = ncmpi_open(MPI_COMM_WORLD, path, NC_NOWRITE, MPI_INFO_NULL, &ncid); -
trunk/src/utils/ncdump/vardata.c
r632 r687 457 457 printbval(sout, fmt, vp, *vals++); 458 458 if (fsp->full_data_cmnts) { 459 Printf( sout);459 Printf("%s", sout); 460 460 Printf(","); 461 461 annotate (vp, fsp, cor, iel); … … 467 467 printbval(sout, fmt, vp, *vals++); 468 468 if (fsp->full_data_cmnts) { 469 Printf( sout);469 Printf("%s", sout); 470 470 lastdelim (more, lastrow); 471 471 annotate (vp, fsp, cor, iel); … … 505 505 printsval(sout, fmt, vp, *vals++); 506 506 if (fsp->full_data_cmnts) { 507 Printf( sout);507 Printf("%s", sout); 508 508 Printf(","); 509 509 annotate (vp, fsp, cor, iel); … … 515 515 printsval(sout, fmt, vp, *vals++); 516 516 if (fsp->full_data_cmnts) { 517 Printf( sout);517 Printf("%s", sout); 518 518 lastdelim (more, lastrow); 519 519 annotate (vp, fsp, cor, iel); … … 555 555 printival(sout, fmt, vp, *vals++); 556 556 if (fsp->full_data_cmnts) { 557 Printf( sout);557 Printf("%s", sout); 558 558 Printf(","); 559 559 annotate (vp, fsp, cor, iel); … … 565 565 printival(sout, fmt, vp, *vals++); 566 566 if (fsp->full_data_cmnts) { 567 Printf( sout);567 Printf("%s", sout); 568 568 lastdelim (more, lastrow); 569 569 annotate (vp, fsp, cor, iel); … … 603 603 printfval(sout, fmt, vp, *vals++); 604 604 if (fsp->full_data_cmnts) { 605 Printf( sout);605 Printf("%s", sout); 606 606 Printf(","); 607 607 annotate (vp, fsp, cor, iel); … … 613 613 printfval(sout, fmt, vp, *vals++); 614 614 if (fsp->full_data_cmnts) { 615 Printf( sout);615 Printf("%s", sout); 616 616 lastdelim (more, lastrow); 617 617 annotate (vp, fsp, cor, iel); … … 651 651 printdval(sout, fmt, vp, *vals++); 652 652 if (fsp->full_data_cmnts) { 653 Printf( sout);653 Printf("%s", sout); 654 654 Printf(","); 655 655 annotate (vp, fsp, cor, iel); … … 661 661 printdval(sout, fmt, vp, *vals++); 662 662 if (fsp->full_data_cmnts) { 663 Printf( sout);663 Printf("%s", sout); 664 664 lastdelim (more, lastrow); 665 665 annotate (vp, fsp, cor, iel);
![(please configure the [header_logo] section in trac.ini)](/projects/parallel-netcdf/chrome/common/trac_banner.png)