problem: sorting


pangyatou
01-24-2007, 01:10 PM
My code use mpi fortran90.

My problem is:
The whole domain has 64^3 points. I divide them into 8 processors so each processor hold (64,64,8) points. I want to find the value corresponding to the 125th biggest one of the whole domain. How can I do this select in parallel processors?

If I collect all 64^3 points in one processor, I could use numerical recipe's subroutine(such as select) to do it. But in my future case, the whole domain is so big that one processor can not handle it. I must do it in parallel processors. Is there any subroutine could do this?

Any help on this is highly appreciated.

Thanks