pyuvsim icon indicating copy to clipboard operation
pyuvsim copied to clipboard

Enable logging via MPI's file I/O tools

Open aelanman opened this issue 6 years ago • 0 comments

MPI has tools to write to files from separate processes. For tracking down errors in intermediate calculations, it would be convenient to have a logging tool that lets you choose certain checkpoints to print out to a log file.

Example of mpi4py being used for file i/o, from their tutorials:

amode = MPI.MODE_WRONLY|MPI.MODE_CREATE
comm = MPI.COMM_WORLD
fh = MPI.File.Open(comm, "./datafile.contig", amode)

buffer = np.empty(10, dtype=np.int)
buffer[:] = comm.Get_rank()

offset = comm.Get_rank()*buffer.nbytes
fh.Write_at_all(offset, buffer)

fh.Close()

aelanman avatar May 30 '18 19:05 aelanman