RE: [AMBER] NTT=3 or NTT=1

From: Ross Walker <ross.rosswalker.co.uk>
Date: Tue, 11 May 2010 21:19:32 -0700

> This occurs in a loop over all atoms. If the atom belongs to a
> specific
> processor, then that processor needs to shell out 3 random numbers,
> presumably to provide a random hit in each cartesian direction (though
> I may
> be misunderstanding something here). If it does not own that atom, it
> has
> to simply create 3 unused random numbers for the sake of remaining in-
> sync
> with the rest of the threads. This seems like it can add up to a LOT
> of
> extra calls to gauss for some threads in a highly-multithreaded
> situation.

Exactly. It is a serial block of code. ALL threads execute the loop natom
times meaning the work is constant regardless of the number of threads used.
Hence if this loop takes 0.1% of the total time in serial this means when
you run on 2 threads it takes 0.2% of the total time (assuming everything
else scales perfectly). By the time you get to 256 threads then it is taking
> 25% of the total time. This is of course very bad since it means the
scaling gets worse as you go to higher processor counts. Avoiding this
synchronization by only doing the call over atoms that are owned by this
processor so the time spent calling gauss decreases as a function of the
number of threads. This is absolutely required for any program to scale well
in parallel.

The downside is you lose the reproducibility which is why it was coded this
way in the first place. It also assumes that the random number streams,
since each thread now gets ig+thread_count as the random seed are truly
independent. That is for our random number generator is:

x[ig](i=1 to natom) is completely uncorrelated with x[ig+y](i=1 to natom)
for all values of y where ig is the seed used on the master thread?

I have NO idea if this is true hence why the 'feature' is undocumented. If
it is true then all is good. If someone can prove this analytically for the
random number generator we use then all is good.

If someone wants to replace our random number generator with a real parallel
random number generator then even better!

All the best
Ross

/\
\/
|\oss Walker

| Assistant Research Professor |
| San Diego Supercomputer Center |
| Tel: +1 858 822 0854 | EMail:- ross.rosswalker.co.uk |
| http://www.rosswalker.co.uk | http://www.wmd-lab.org/ |

Note: Electronic Mail is not secure, has no guarantee of delivery, may not
be read every day, and should not be used for urgent or sensitive issues.






_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue May 11 2010 - 21:30:04 PDT
Custom Search