MPI - IO - Prace Training Portal
MPI - IO - Prace Training Portal MPI - IO - Prace Training Portal
MPI - IO
- Page 2 and 3: File AccessApproaches
- Page 4 and 5: Parallel I/O to separate filesproce
- Page 6 and 7: MPI-IO interfaceBased on MPI :Data
- Page 8 and 9: MPI-I/OFile Access
- Page 10 and 11: File Views
- Page 12 and 13: File view example (non-contiguous)e
- Page 14 and 15: Collective MPI-IO functionsWRITEREA
- Page 16 and 17: Data sieving• Multiple small I/O
- Page 18: Thank you for watching!
<strong>MPI</strong> - <strong>IO</strong>
File AccessApproaches
Sequential I/Oprocess 0 process 1 process 2 process 3Serial Data LibrarySingle FileBecomes a bottleneck!
Parallel I/O to separate filesprocess 0 process 1 process 2 process 3Serial Data LibraryFile 0 File 1 File 2 File 3Lots of small files to manage
Parallel I/O to a single shared fileprocess 0 process 1 process 2 process 3Parallel Data LibrarySingle FileDisk 1Disk 2Disk 3Disk 4Disk 5
<strong>MPI</strong>-<strong>IO</strong> interfaceBased on <strong>MPI</strong> :Data layoutBasicDeriveddatatypesOperationsCollective / non-CollectiveBlocking / non-BlockingPortable parallel I/O interface
Simple Execution Order<strong>MPI</strong>_Info_create/<strong>MPI</strong>_Info_set<strong>MPI</strong>_File_open<strong>MPI</strong>_File_set_view/<strong>MPI</strong>_File_seek<strong>MPI</strong>_File_read/<strong>MPI</strong>_File_write<strong>MPI</strong>_File_close<strong>MPI</strong>_Info_free
<strong>MPI</strong>-I/OFile Access
PositioningCoordinationSynchronizationexplicitimplicitcollectivenon-collectiveblockingIndividualpointersSharedpointersnon-blocking
File Views
Contiguous – Non Contiguous I/OProcess 0Process 0FileContiguousFileNon –Contiguous in fileProcess 0Process 0FileNon –Contiguous in memoryFileNon –Contiguous in both
File view example (non-contiguous)etype <strong>MPI</strong>_INTfiletype two <strong>MPI</strong>_INTs followedby a gap of one <strong>MPI</strong>_INTFILEfiletype filetype filetype
Collective - Independent I/0p0p1 p2 p3p0 p1 p2 p3Disk 1 Disk 2 Disk 3 Disk 4 Disk 1 Disk 2 Disk 3 Disk 4Collective I/OIndependent I/O
Collective <strong>MPI</strong>-<strong>IO</strong> functionsWRITEREAD<strong>MPI</strong>_File_write_all<strong>MPI</strong>_File_read_all<strong>MPI</strong>_File_write_at_all<strong>MPI</strong>_File_read_at_allPotentially better performance
Non-Blocking <strong>MPI</strong>-<strong>IO</strong> functionsWRITEREAD<strong>MPI</strong>_File_iwrite<strong>MPI</strong>_File_iread<strong>MPI</strong>_File_iwrite_at<strong>MPI</strong>_File_iread_atOverlap between I/O and computations
Data sieving• Multiple small I/O requests are satisfiedwith a single larger contiguous callrelative ROM<strong>IO</strong> hints:romio_ds_writeromio_ds_readind_rd_buffer_sizeind_wr_buffer_sizedetermine whether data sieving will beperformed for writes and reads(values: enable, disable, auto)control the size of intermediate buffer of datasieving for read and write operations in bytes
Two phase collective buffering• First phase: Access is performed by a group of processes (aggregators)• Second phase: Data is moved to final destinationsrelative ROM<strong>IO</strong> hints:romio_cb_writeromio_cb_readcb_buffer_sizecb_nodesdetermine whether collective buffering will beperformed for writes and reads(values: enable, disable, auto)controls the size of the intermediate buffer usedin two phase collective I/O in bytescontrols the maximum number of aggregators tobe used
Thank you for watching!