Subject: Re: Optimization hinders evolution

From: Andrew Dalke <[email-masked]>
Date: Wed, 23 Jul 1997 14:19:15 -0500

Hello,

  I agree with your statement that emphasis on optimization of
current methods without exploration of alternate approaches
can cause "very well engineered dinosaurs."  What I like about
current advances in C++ (templates) is you get the ability
to organize your data in more complicated ways (with classes
and better data hiding) without the effort it would take to
achieve the same in Fortran and without appreciable performance
loss.
  This yields the chance to develop newer and often more
complicated methods with less effort; aiding just the sort
of exploration into new methods you want.  Adding a well-designed
scripting language (like Python) makes trying new concepts even
easier.

  Now for a real-life example of where C++ is more useful than
Fortran ...

  I was involved in the development of NAMD, a molecular          
mechanics program written at UIUC.  It has two main goals:
 * to run well in distributed memory parallel architectures (like
workstation clusters)
 * to be a viable testbed for new methods in molecular modeling,
both for us and other groups

  We made a deliberate decision to use C++ instead of Fortran
because the problems we want to address are not only those
of computation, but of data management.  We need to shuttle
computations between, say, 32 processors w/o shared memory and
ensure that each processor has the data it needs.  It is a
tricky job, but by turning the computations into objects
and allowing the compute objects to migrate from machine to
machine we can simplify the problem.
  Load balancing can then be achieved by forcing specific
compute objects to migrate to specific machines.  New algorithms,
like fast multipole methods, can be (are!) implemented as new
compute objects while methods like multiple time stepping turn
into a scheduling problem (ie, "when are the different compute
objects called?").
  That's not to say this couldn't be done in Fortran, but
it would be much more complicated implementation, and less
likely that others would use NAMD to develop their own new
algorithms.

  BTW, as another reason for choosing C++; no one in the group
knew enough Fortran to develop a large project.

						Andrew Dalke
						[email-masked]