The problem is to search a password into a big file of size about 10GB using MPI. I divided the file between different processes of chunk size of (Total number of bytes in file / P)
where p is the number of processes to create and applying my searching logic in each process through a loop parallely. I want to stop other processes when one process find a solution.
So to abort all other processes i am using following two approaches.
- first approach is to call MPI_Abort() function from a process whenever its find solution.
- second approach is to use a flag and set it whenever any process find its solution. After setting this flag send it to all the other processes using non-blocking send/recv/Iprobe function. Then check this flag by each process using
if(flag == 1) break
; and do so..
My first question is which of the above two approach is better and why?
and second one is when i used the second approach i got following msg after completing their execution successfully...
* An error occurred in MPI_Finalize * after MPI was finalized*** MPI_ERRORS_ARE_FATAL (goodbye) [abc:19150] Abort before MPI_INIT completed successfully; not able to guarantee that all other processes were killed!
* An error occurred in MPI_Finalize * after MPI was finalized * MPI_ERRORS_ARE_FATAL (goodbye) [abc:19151] Abort before MPI_INIT completed successfully; not able to guarantee that all other processes were killed!