On Feb 2, 2013, at 3:52 AM, Andreas Bok Andersen <bok.chan_at_[hidden]> wrote:
> I am using Open-MPI in a parallelization of matrix multiplication for large matrices.
> My question is:
> - Is MPI_File_read using mmapping under the hood when reading a binary file.
Sorry for the delay in replying; my INBOX is a disaster.
It depends on what driver you compiled; I'm guessing it's the standard NFS file I/O driver. In this case, OMPI is just using open(), which may use mmap() under the covers.
> - Or is the better/most efficient solution to read the input files using the native mmap in C++
You'll have to play with this yourself to see which works best in your environment. Unfortunately, in at least this case, there's no "method X always works better than method Y" kind of advice available -- there's far too much variation in individual execution environments, connection to storage, and application access patterns.
A third variation to try might be to read in the file in a single MPI process and MPI_Scatter (or Broadcast?) the data out to all other processes.
--
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
|