Only in parallel-netcdf-1.1.0: macros.make diff -r -c parallel-netcdf-1.1.0-orig/src/lib/mpinetcdf.c parallel-netcdf-1.1.0/src/lib/mpinetcdf.c *** parallel-netcdf-1.1.0-orig/src/lib/mpinetcdf.c 2009-11-02 09:17:52.000000000 -0800 --- parallel-netcdf-1.1.0/src/lib/mpinetcdf.c 2009-11-25 15:06:16.000000000 -0800 *************** *** 24,30 **** ncmpi_inq_libvers(void) { return "version = 1.1.0 of 02 November 2009"; } ! /* Prototypes for functions used only in this file */ static int echar(nc_type nctype,MPI_Datatype mpitype); static int need_convert(nc_type nctype,MPI_Datatype mpitype); --- 24,31 ---- ncmpi_inq_libvers(void) { return "version = 1.1.0 of 02 November 2009"; } ! static nc_type convertMtoN(MPI_Datatype mpitype); ! static MPI_Datatype convertNtoM(nc_type type); /* Prototypes for functions used only in this file */ static int echar(nc_type nctype,MPI_Datatype mpitype); static int need_convert(nc_type nctype,MPI_Datatype mpitype); *************** *** 495,500 **** --- 496,531 ---- #endif } + static nc_type convertMtoN(MPI_Datatype mpitype) + { + nc_type nctype; + if ( mpitype == MPI_CHAR ) nctype = NC_CHAR; + else if (mpitype == MPI_BYTE) nctype = NC_BYTE; + else if (mpitype == MPI_UNSIGNED_CHAR) nctype = NC_BYTE; + else if (mpitype == MPI_SHORT) nctype = NC_SHORT; + else if (mpitype == MPI_INT) nctype = NC_INT; + else if (mpitype == MPI_LONG && X_SIZEOF_INT == SIZEOF_LONG) nctype = NC_INT; + else if (mpitype == MPI_FLOAT) nctype = NC_FLOAT; + else if (mpitype == MPI_DOUBLE) nctype = NC_DOUBLE; + + return nctype; + } + static MPI_Datatype convertNtoM(nc_type nctype) + { + MPI_Datatype mpitype; + + if ( nctype == NC_CHAR) mpitype = MPI_CHAR; + else if (nctype == NC_BYTE) mpitype = MPI_BYTE; + else if (nctype == NC_SHORT) mpitype = MPI_SHORT; + else if (nctype == NC_INT && X_SIZEOF_INT == SIZEOF_LONG) mpitype = MPI_LONG; + else if (nctype == NC_INT) mpitype = MPI_INT; + else if (nctype == NC_FLOAT) mpitype = MPI_FLOAT; + else if (nctype == NC_DOUBLE) mpitype = MPI_DOUBLE; + + return mpitype; + } + + static void swapn(void *dst, const void *src, MPI_Offset nn, int xsize) { *************** *** 13213,13219 **** (*request)->count = (MPI_Offset *)malloc(varp->ndims*sizeof(MPI_Offset)); (*request)->buf = (void *)buf; (*request)->bufcount = bufcount; ! (*request)->vartype = datatype; (*request)->next_req = NULL; for (dim = 0; dim < varp->ndims; dim++){ (*request)->start[dim]=start[dim]; --- 13244,13250 ---- (*request)->count = (MPI_Offset *)malloc(varp->ndims*sizeof(MPI_Offset)); (*request)->buf = (void *)buf; (*request)->bufcount = bufcount; ! (*request)->vartype = convertMtoN(datatype); (*request)->next_req = NULL; for (dim = 0; dim < varp->ndims; dim++){ (*request)->start[dim]=start[dim]; *************** *** 13253,13259 **** (*request)->count = (MPI_Offset *)malloc(varp->ndims*sizeof(MPI_Offset)); (*request)->buf = (void *)buf; (*request)->bufcount = bufcount; ! (*request)->vartype = datatype; (*request)->next_req = NULL; for (dim = 0; dim < varp->ndims; dim++){ (*request)->start[dim]=start[dim]; --- 13284,13290 ---- (*request)->count = (MPI_Offset *)malloc(varp->ndims*sizeof(MPI_Offset)); (*request)->buf = (void *)buf; (*request)->bufcount = bufcount; ! (*request)->vartype = convertMtoN(datatype); (*request)->next_req = NULL; for (dim = 0; dim < varp->ndims; dim++){ (*request)->start[dim]=start[dim]; *************** *** 13269,13282 **** int ret; if (request->rw_flag == 1) { ret = ncmpi_put_vara_all(request->ncid, request->varid, ! request->start, request->count, ! request->buf, request->bufcount, ! request->vartype); } else if ( request->rw_flag == 0) { ret = (ncmpi_get_vara_all(request->ncid, request->varid, ! request->start, request->count, ! request->buf, request->bufcount, ! request->vartype)); } else { ret = NC_EFILE; } --- 13300,13313 ---- int ret; if (request->rw_flag == 1) { ret = ncmpi_put_vara_all(request->ncid, request->varid, ! request->start, request->count, ! request->buf, request->bufcount, ! convertNtoM(request->vartype)); } else if ( request->rw_flag == 0) { ret = (ncmpi_get_vara_all(request->ncid, request->varid, ! request->start, request->count, ! request->buf, request->bufcount, ! convertNtoM(request->vartype))); } else { ret = NC_EFILE; } *************** *** 13317,13323 **** } buf[i] = array_of_requests[i]->buf; bufcount[i] = array_of_requests[i]->bufcount; ! datatype[i] = array_of_requests[i]->vartype; } if (array_of_requests[0]->rw_flag == 1) ncmpi_put_mvara_all(ncid, count, varids, --- 13348,13354 ---- } buf[i] = array_of_requests[i]->buf; bufcount[i] = array_of_requests[i]->bufcount; ! datatype[i] = convertNtoM(array_of_requests[i]->vartype); } if (array_of_requests[0]->rw_flag == 1) ncmpi_put_mvara_all(ncid, count, varids, Only in parallel-netcdf-1.1.0/src/lib: ncconfig.h Only in parallel-netcdf-1.1.0/src/lib: ncvalid diff -r -c parallel-netcdf-1.1.0-orig/src/lib/pnetcdf.h parallel-netcdf-1.1.0/src/lib/pnetcdf.h *** parallel-netcdf-1.1.0-orig/src/lib/pnetcdf.h 2009-10-30 13:30:26.000000000 -0700 --- parallel-netcdf-1.1.0/src/lib/pnetcdf.h 2009-11-25 15:21:11.000000000 -0800 *************** *** 258,265 **** # define EXTERNL extern MSC_EXTRA - #include - /* Begin Prototypes */ --- 258,263 ---- *************** *** 2129,2135 **** /* End {put,get}_varm */ /* End non-blocking data access functions */ - #endif /* End: more prototypes to be included for fortran binding conversion */ /* ################################################################## */ --- 2127,2132 ---- *************** *** 2180,2182 **** --- 2177,2181 ---- #if defined(__cplusplus) } #endif + + #endif diff -r -c parallel-netcdf-1.1.0-orig/src/libf/iput_vara_allf.c parallel-netcdf-1.1.0/src/libf/iput_vara_allf.c *** parallel-netcdf-1.1.0-orig/src/libf/iput_vara_allf.c 2009-10-30 03:50:53.000000000 -0700 --- parallel-netcdf-1.1.0/src/libf/iput_vara_allf.c 2009-11-25 15:09:09.000000000 -0800 *************** *** 57,63 **** return ierr; } } ! ierr = ncmpi_iput_vara_all( *v1, l2, l3, l4, v5, *v6, (nc_type)(*v7), &l8_req ); if (req_head==NULL) { req_head=(lnc_req *)malloc(sizeof(lnc_req)); req_head->next = NULL; --- 57,63 ---- return ierr; } } ! ierr = ncmpi_iput_vara_all( *v1, l2, l3, l4, v5, *v6, (MPI_Datatype)(*v7), &l8_req ); if (req_head==NULL) { req_head=(lnc_req *)malloc(sizeof(lnc_req)); req_head->next = NULL;