[Mpi-forum] MPI - write to same binary file. Each process shows huge difference in time intervals to complete
Catherine Jenifer Rajam Rajendran
catrajen at iu.edu
Tue Jul 10 13:01:25 CDT 2018
I am trying to write in the same binary file using MPI. I set the offset
for each process in the beginning as per the rank. Then the following code
snippet in C runs. All MPI process executes and computes the value and it
writes to the exact offset as set.
The problem I am facing is, say, out of 32 Process, one process is executed
in 2 hours. Rest of the process keeps running for more than 24 hours, The
thing is, it computes the values as expected but it takes so much time. It
seems like a deadlock situation, each process waits for some resource. But,
I am not sharing/communicating between the processes. I am just using
MPI_File_write_at to write at a specific location in the binary file.
I need to mention that each process computes huge amount of data so storing
it temporarily seemed inappropriate. I want to write the output in single
file as number of processes is increased depending on input data. Number of
computations are evenly distributed to all process. So, why does process
takes different time interval to finish its job?!
if(my_rank == step%num_cpus)
Calc = Calculation();
buf = (double)Calc;
MPI_File_write_at(outFile, OUT_ofst, buf, 1, MPI_DOUBLE,
Calc = 0.0;
OUT_ofst += num_cpus*MPI_File_write_at(sizeof(double));
I am new to MPI and I guess people must have had similar issues while
executing in MPI. Can anyone help me out please! I can provide more details
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mpi-forum