<div dir="ltr"><div>Hi All,</div><div><br></div><div>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.</div><div><br></div><div>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. </div><div><br></div><div>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?!</div><div><br></div><div>for(i=1;i<=limit;i++)</div><div>{</div><div>    for(j=i+1;j<=limit;j++)</div><div>    {</div><div>        if(my_rank == step%num_cpus)</div><div>        {</div><div>            Calc = Calculation();</div><div>            buf[0] = (double)Calc;</div><div>            MPI_File_write_at(outFile, OUT_ofst, buf, 1, MPI_DOUBLE, &status);</div><div>            Calc = 0.0;</div><div>            OUT_ofst += num_cpus*MPI_File_write_at(sizeof(double));</div><div>            count++;</div><div>        }</div><div>        step++;</div><div>    }</div><div>}</div><div><br></div><div>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 if needed.</div><div><br></div><div>Thanks,</div><div>Catherine</div></div>