11.07.2015 Views

MPI - IO - Prace Training Portal

MPI - IO - Prace Training Portal

MPI - IO - Prace Training Portal

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<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!

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!