I have number of processors and one array, and each processor fills their work into, one dimensional array like:
- dense_process_array for process 1: |process1|0000000000000|
- dense_process_array for process 2: |000000|process2|000000|
each process fills their interval, then I want to all processors have others results into same array.
- Process 1 => dense_process_array |process1|process2|.....|processN|
- Process 2 ... Process N
(like all2all bcast) Therefore, Every process calls this function:
void doCommunication(int id, int numprocs, int start_point, int end_point) {
int size_of_length = end_point - start_point + 1;
MPI_Scatter(dense_process_array+start_point, size_of_length, MPI_DOUBLE, dense _process_array +start_point, size_of_length, MPI_DOUBLE, id, MPI_COMM_WORLD;
}
But, in the end when I looked my array from any process, I seen that it can not get results of other processes, can you suggest anything?
not: I'm new in MPI, and basicly I want to all2all bcast.