"Kirk, Benjamin (JSC-EG311)" <benjamin.k...@nasa.gov> writes:
> MPI_Win_create (&recv_buf[0], recv_buf.size()*sizeof(unsigned int), > sizeof(unsigned int), > MPI_INFO_NULL, MPI_COMM_WORLD, > &win); In practice, this is implemented using something like an MPI_Allreduce with 3*int*comm_size data. > for (unsigned int proc=0; proc<numprocs; proc++) > MPI_Put (&procid, 1, MPI_UNSIGNED, > proc, procid, 1, MPI_UNSIGNED, > win); > > MPI_Win_fence (0, win); If you don't send to all the comms, how will the receiver know which slots have been written to? Or is your idea to initialize with known-invalid data and then scan through it to find the now-valid data? Given the quite high cost of creating the window, I think you're definitely better off using MPI_Reduce_scatter from MPI-2 (or the MPI-3 nonblocking consensus algorithm implemented in PetscCommBuildTwoSided) to determine who you need to receive from, then using point-to-point. If you have the window and rendezvous worked out, one-sided can be faster on some hardware, but point-to-point is still very good and it's not going to be your bottleneck if it's used well.
pgpj_rSJiKuLs.pgp
Description: PGP signature
------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel