[gmx-developers] move_x and move_f

David van der Spoel spoel at xray.bmc.uu.se
Fri Jun 24 10:26:02 CEST 2005


On Thu, 23 Jun 2005, Nathan Moore wrote:

>I've been looking into the parallelization of GROMACS - specifically the
>way messages are passed in the functions move_f and move_x (defined in
>src/gmxlib/mvxvf.c)
>
>In the source file I see,
>
>void move_f(FILE *log,
>            int left,int right,rvec f[],rvec fadd[],
>            t_nsborder *nsb,t_nrnb *nrnb)
>{
>  move_rvecs(log,TRUE, TRUE,left,right,f,fadd,nsb->shift,nsb,nrnb);
>  move_rvecs(log,FALSE,TRUE,left,right,f,fadd,nsb->bshift,nsb,nrnb);
>
>  where();
>}
>
>I don't understand why the move_rvecs function is called twice.  What's
>the difference between nsb->shift and nsb->bshift?  Do I understand
>correctly that move_f broadcasts, by way of the ring, each node's updated
>f array to all of the other nodes?  I feel like something else is going on
>in the function that I don't understand yet.
Normally the forces are distributed over half the ring (as described in 
the manual) but in some cases we need to send them to slightly more than 
halt the processors. Thus, we send first to nsb->shift CPUs clockwise and 
then to nsb->bshift CPUs counter clockwise. Usually nsb->bshift = 0 as you 
can see in the md.log file.

If you want you can replace these two call's by another MPI call which 
distributes over all processors. As berk said, he has tested this before 
(don't know which platform) and it was slower.


>
>regards,
>
>Nathan Moore
>_______________________________________________
>gmx-developers mailing list
>gmx-developers at gromacs.org
>http://www.gromacs.org/mailman/listinfo/gmx-developers
>Please don't post (un)subscribe requests to the list. Use the
>www interface or send it to gmx-developers-request at gromacs.org.
>

-- 
David.
________________________________________________________________________
David van der Spoel, PhD, Assoc. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,  	75124 Uppsala, Sweden
phone:	46 18 471 4205		fax: 46 18 511 755
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://xray.bmc.uu.se/~spoel
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




More information about the gromacs.org_gmx-developers mailing list