Changes between Version 17 and Version 18 of CombiningOperations


Ignore:
Timestamp:
01/04/15 14:32:20 (5 years ago)
Author:
wkliao
Comment:

rearrange bullets

Legend:

Unmodified
Added
Removed
Modified
  • CombiningOperations

    v17 v18  
    11 
    2 = Combining multiple requests and nonblocking I/O = 
     2= I/O aggregation: implicit method (nonblocking APIs) and explicit method (multi-variable APIs) = 
    33 
    44---- 
     
    77Array variables comprise the bulk of the data in a netCDF dataset, and for 
    88accesses to large regions of single array variables, PnetCDF attains very high 
    9 performance. However, the current PnetCDF interface only allows access to one 
     9performance. However, most of the PnetCDF APIs that mimic netCDF's only allow access to one 
    1010array variable per call. If an application instead accesses a large number of 
    1111small-sized array variables, this interface limitation can cause significant 
     
    1313much higher performance with larger request sizes. Moreover, the data for record 
    1414variables are stored interleaved by record, and the contiguity information 
    15 is lost, so the existing MPI-IO collective I/O optimization cannot help. 
     15is lost. 
    1616 
    17 We provided a new mechanism for PnetCDF to combine multiple I/O operations 
    18 for better I/O performance.  This mechanism can be used in a new function that 
    19 takes arguments for reading/writing multiple array variables, allowing 
    20 application programmers to explicitly access multiple array variables in a 
    21 single call. It can also be used in the implementation of nonblocking 
    22 I/O functions, so that the combination is carried out implicitly, without changes 
    23 to the application. Our performance evaluations, published in IASDS 2009, demonstrate significant 
     17We provided a new mechanism for PnetCDF to aggregate/combine multiple I/O requests for better I/O performance. 
     18This mechanism is presented in two new sets of APIs: nonblocking APIs and multi-variable APIs. 
     19The former is used to implicitly to aggregate requests by posting multiple requests, each can be 
     20accessing to the same or a different variable, and then a single wait subroutine is used to combine 
     21the requests and commit to the file system. 
     22The latter is a new API family that takes arguments for reading/writing multiple array variables, allowing 
     23application programmers to explicitly access multiple array variables in a single call. 
     24Our performance evaluations, published in IASDS 2009 (reference below), demonstrate significant 
    2425improvement using well-known application benchmarks. 
    2526 
    2627== Usage ==  
    2728 
    28 There are two ways to use this feature: 
     29'''Nonblocking APIs''' (Implicit Method) -- The library accesses multiple variables implicitly. 
     30Several variable accesses can be "scheduled" with the nonblocking routines. 
     31Then, when the application waits for completion of those accesses, the library will service them all in a single call. 
    2932 
    30 '''Explicit Method:''' The caller explicitly accesses multiple variables at once. 
    31 New routines added to the library (e.g. ncmpi_mput_vara_all, indicating multiple puts)  
    32 take a list of variables to access.   
    33  
    34 The function calls for the explicit method look like this: 
    35  
    36 {{{ 
    37 int 
    38 ncmpi_mput_vara_all(int               ncid,         /* in:  dataset ID */ 
    39                     int               nvars,        /* in:  number of variables */ 
    40                     int               varids[],     /* in:  [nvars] list of variable IDs */ 
    41                     MPI_Offset* const starts[],     /* in:  [nvars][ndims] list of start offsets */ 
    42                     MPI_Offset* const counts[],     /* in:  [nvars][ndims] list of access counts */ 
    43                     void*       const bufs[],       /* in:  [nvars] list of buffer pointers */ 
    44                     MPI_Offset        bufcounts[],  /* in:  [nvars] list of buffer counts */ 
    45                     MPI_Datatype      datatypes[]); /* in:  [nvars] MPI derived datatype describing bufs */ 
    46  
    47 int 
    48 ncmpi_mget_vara_all(int               ncid,         /* in:  dataset ID */ 
    49                     int               nvars,        /* in:  number of variables */ 
    50                     int               varids[],     /* in:  [nvars] list of variable IDs */ 
    51                     MPI_Offset* const starts[],     /* in:  [nvars][ndims] list of start offsets */ 
    52                     MPI_Offset* const counts[],     /* in:  [nvars][ndims] list of access counts */ 
    53                     void*             bufs[],       /* out: [nvars] list of buffer pointers */ 
    54                     MPI_Offset        bufcounts[],  /* in:  [nvars] list of buffer counts */ 
    55                     MPI_Datatype      datatypes[]); /* in:  [nvars] MPI derived datatype describing bufs */ 
    56 }}} 
    57  
    58 Do note that we do not have Fortran bindings for these new routines in 
    59 parallel-netcdf-1.1.0, but want very much to introduce Fortran bindings for 
    60 this feature in a future release.  In the meantime, Fortran codes can use the 
    61 implicit method (below). 
    62  
    63 '''Implicit Method'''  The library accesses multiple variables implicitly. 
    64 Several variable accesses can be "scheduled" with the 
    65 nonblocking routines.   Then, when the application waits for completion of 
    66 those accesses, the library will service them all in a single call. 
    67  
    68 Parallel-netcdf has had nonblocking routines in the C interface for some time. 
    69 With this release we extend those routines to the Fortran interface. 
     33The term "nonblocking" here means the posting APIs are not blocked for waiting their I/O requests to complete. 
     34PnetCDF simply registers the nonblocking requests internally and immediately return the control to user program. 
     35There is no inter-process communication or I/O operation occurred in the posting call. 
     36The request aggregation and real I/O operation is carried out at the wait subroutines. 
    7037 
    7138In C: 
     
    133100 
    134101 
    135 The request posting calls, e.g. nfmpi_iput_vara_float, can be called either 
     102The request posting calls, e.g. ncmpi_iput_vara_float() or nfmpi_iput_vara_real(), can be called either 
    136103collective or independent data mode. 
    137104In the 'wait' and 'wait_all' methods, the library actually batches up all 
    138105outstanding nonblocking operations.  In this way, we can carry out this 
    139 optimization without needing a thread. Note that 'wait' must be called in 
    140 independent data mode, while 'wait_all' in collective.  
     106optimization without needing a thread. Note that 'ncmpi_wait_all()' must be called in 
     107collective data mode, while 'ncmpi_wait()' in independent mode.  
     108 
     109'''Multi-variable APIs''' (Explicit Method) -- The caller explicitly accesses multiple variables at once. 
     110New routines added to the library (e.g. ncmpi_mput_vara_all, indicating multiple puts)  
     111take a list of variables to access.   
     112 
     113The function calls for the explicit method look like this: 
     114 
     115{{{ 
     116int 
     117ncmpi_mput_vara_all(int               ncid,         /* in:  dataset ID */ 
     118                    int               nvars,        /* in:  number of variables */ 
     119                    int               varids[],     /* in:  [nvars] list of variable IDs */ 
     120                    MPI_Offset* const starts[],     /* in:  [nvars][ndims] list of start offsets */ 
     121                    MPI_Offset* const counts[],     /* in:  [nvars][ndims] list of access counts */ 
     122                    void*       const bufs[],       /* in:  [nvars] list of buffer pointers */ 
     123                    MPI_Offset        bufcounts[],  /* in:  [nvars] list of buffer counts */ 
     124                    MPI_Datatype      datatypes[]); /* in:  [nvars] MPI derived datatype describing bufs */ 
     125 
     126int 
     127ncmpi_mget_vara_all(int               ncid,         /* in:  dataset ID */ 
     128                    int               nvars,        /* in:  number of variables */ 
     129                    int               varids[],     /* in:  [nvars] list of variable IDs */ 
     130                    MPI_Offset* const starts[],     /* in:  [nvars][ndims] list of start offsets */ 
     131                    MPI_Offset* const counts[],     /* in:  [nvars][ndims] list of access counts */ 
     132                    void*             bufs[],       /* out: [nvars] list of buffer pointers */ 
     133                    MPI_Offset        bufcounts[],  /* in:  [nvars] list of buffer counts */ 
     134                    MPI_Datatype      datatypes[]); /* in:  [nvars] MPI derived datatype describing bufs */ 
     135}}} 
     136 
     137Do note that we do not have Fortran bindings for these new routines in 
     138PnetCDF. Fortran codes should use the implicit method. 
    141139 
    142140== Example programs == 
    143  
    144  * Explicit Method 
    145    [source:trunk/examples/C/mput.c mput.c] 
    146141 
    147142 * Implicit Method 
     
    164159    [source:trunk/examples/tutorial/pnetcdf-write-bufferedf.f90 pnetcdf-write-bufferedf.f90] 
    165160 
     161 * Explicit Method 
     162   [source:trunk/examples/C/mput.c mput.c] 
     163 
    166164== References == 
    167165