Sponsor:

Advanced Scientific Computing Research (ASCR) under the U.S. Department of Energy Office of Science (Office of Science)

Project Team Members:

Northwestern University

The HDF Group

Argonne National Laboratory

North Carolina State University






Northwestern University - EECS Dept.



Damsel API Usecase - parallel write

test-nwrite.c is a illustrative example that writes data values of 10 vertex entities from two ranks in parallel. Each rank defines 5 vertex entities, a tag named SolData, and tags it to the 5 vertex entities. In this example, data values written by rank 0 are {0, 11, 22, 33, 44} and rank 1 {1, 12, 23, 34, 45}, each value corresponding to a vertex entity. The steps used to write data on each rank are as follows.

  1. Initialize Damsel environment - DMSLlib_init
  2. Create a Damsel model - DMSLmodel_create
  3. Create a container with 5 Damsel handles in it - DMSLcontainer_create_vector or DMSLcontainer_create_sequence
  4. Use this container to define 5 vertex entities - DMSLentity_define
  5. Create a tag named SolData of short integer type - DMSLtag_define
  6. Map the tag and the I/O buffer of 5 integers to the container - DMSL_model_map_tag
  7. Create a file using the model created in Step 2 - DMSLmodel_attach
  8. Invent the file-side handle for the container - DMSLmodel_map_handles_inventing_file_handles
  9. Invent the file-side handle for the tag - DMSLmodel_map_single_handle_inventing_file_handle
  10. Execute write - DMSLmodel_transfer_async and DMSLmodel_wait
  11. Close all the handles and model - DMSLmodel_close
  12. Exit Damsel environment - DMSLlib_finalize

The result in the h5 file after both rank 0 and rank 1 execute the above steps looks like

GROUP "/" {

DATASET SolData-200001395 {

DATATYPE H5T_STD_I16LE DATASPACE SIMPLE { ( 5 ) / ( 5 ) } DATA { (0): 0, 11, 22, 33, 44 }

} DATASET SolData-300001395 {

DATATYPE H5T_STD_I16LE DATASPACE SIMPLE { ( 5 ) / ( 5 ) } DATA { (0): 1, 12, 23, 34, 45 }

}

.....

Note that none of the vertex handles, tag handles, or data is shared among the ranks. However, the tag name used by the two ranks is the same.

Northwestern University EECS Home | McCormick Home | Northwestern Home | Calendar: Plan-It Purple
© 2011 Robert R. McCormick School of Engineering and Applied Science, Northwestern University
"Tech": 2145 Sheridan Rd, Tech L359, Evanston IL 60208-3118  |  Phone: (847) 491-5410  |  Fax: (847) 491-4455
"Ford": 2133 Sheridan Rd, Ford Building, Rm 3-320, Evanston, IL 60208  |  Fax: (847) 491-5258
Email Director

Last Updated: $LastChangedDate: 2016-11-06 13:53:06 -0600 (Sun, 06 Nov 2016) $