EarlyHistory - adda-team/adda GitHub Wiki

The development of ADDA started in 1990 when the original author, Alfons Hoekstra, started with his PhD research. His assignment was to implement the coupled dipole method (as we called it back then) on a recently acquired computer at the University of Amsterdam. This was a distributed memory parallel computer. The research question was two-fold:

  • demonstrate parallel computing performance of a production code on a parallel computer,
  • use it for investigation of elastic light scattering from biological particles.

So, ADDA was a parallel program from the start. The computer in question was a Meiko CS1, containing a whopping 64 T800 Transputers. At that time this was a revolutionary machine based on a revolutionary processor. However, there was a price to be paid. When the first version of ADDA was implemented, there were no compilers available on the Meiko CS1 for the standard programming languages such as C or Fortran. A bit later they arrived, but we decided not to wait and have a first implementation in a language that was co-developed with the Transputer, and this language was Occam (INMOS Ltd. 1988). Moreover, the Meiko was hardly equipped with modern communication libraries (like we now have in MPI), so all the routing needed to be hard coded on the machine. Below are some short code snippets to get a feeling how the first ADDA code looked like. Unfortunately, the Occam source codes are no longer really accessible, as the Occam editor/compiler used the concept of a folding editor (a bit like Mathematica notebooks), and this editor/compiler does not run on current versions of Unix. Below is some code to create a ring of Transputers:

VAL m IS (nTransputers-1):
CHAN OF ANY toHost, fromHost:
[nTransputers+1] CHAN OF ringChannel linkClockWise, linkNotClockWise :
-- linkClockWise[0] is the link, talking clockwise between the transputers 0-1
-- linkNotClockWise[3] is the link between the transputers 3-4, talking in
-- not ClockWise direction
PLACED PAR PROCESSOR 0 T8
PLACE toHost AT toL2:
PLACE fromHost AT fromL2:
PLACE linkClockWise[0] AT toL0:
PLACE linkNotClockWise[0] AT fromL0:
...

Next, some Occam compute code:

--     This procedure calculates the operator F (see     --;
--     internal report "The Radiating Dipole", by        --;
--     A.G. Hoekstra) which couples the dipole moment    --;
--     located at rdip with the electric field observed  --;
--     at robs. The result is stored in f.r and f.i,     --;
--     the real and imaginary part of the complex        --;
--     interaction tensor.                               --;
--                                                       --;
___________________________________________________________;
--                                                       --;
--                          A.G. Hoekstra, spring 1991   --;
--                                                       --;

  #USE maths64.lib
  #USE cmplx.lib
  -- calls to the complex lib could be omitted          
  -- this will improve the performance
  [3]REAL64 r:  -- vector from dipole to observer2
  REAL64 rabs, a.r, a.i, b.r, b.i, eikr.r, eikr.i:
  SEQ
    r[0],r[1],r[2] := (robs[0]-rdip[0]),(robs[1]-rdip[1]), (robs[2]-rdip[2]):
    rabs := DSQRT(((r[0]*r[0]) + (r[1]*r[1])) + (r[2]*r[2])):
    r[0], r[1], r[2] := r[0]/rabs, r[1]/rabs, r[2]/rabs
...

Note the use of the SEQ call. In Occam we were forced to specify if a computation should be done sequentially (SEQ) or in parallel (PAR). Anyway, a beautiful language, and we got good parallel performance, see e.g. (Hoekstra et al. 1991; Sloot and Hoekstra 1992), but of course the code was absolutely not portable. We proved that the coupled dipole method could reach very high efficiencies on a parallel computer, but then we needed a more portable and maintainable code.

Around 1992 a next parallel computer arrived at the University of Amsterdam, the Parsytec CGel, equipped with 512 T805 Transputers. It had C-compilers, and a decent library for Single Program Multiple Data (SPMD) type parallel computing (the Parix library). So, end of 1992 ADDA was ported to C and Parix and was running on 512 transputers, see e.g. (Sloot and Hoekstra 1993). This was the time that the parallel computing community was working hard on developing SPMD libraries, and a number of competing environments were available. We used ADDA to compare Parix, Express and PVM (Hoekstra et al. 1996; Sloot et al. 1994). The PVM emerged as the de-facto standard, and as ADDA was ported to PVM, we kept that line of development and ported the code to some other parallel computers, as well as to clusters of workstations (for which PVM was originally developed).

The PVM-ADDA code of around 1994 was very powerful in terms of computational speed and parallel performance (Hoekstra and Sloot 1995). However, it missed one very important feature to make it a true production code. It did not include the FFT to do the matrix–vector products in the iterative solver. So, albeit parallel, the code had an unacceptable O(N2) computational complexity. The point was, at that time there were not highly portable, tailored parallel FFTs available. Fortunately, a gifted student, Michiel Grimminck, developed a parallel FFT for ADDA, reaching impressive performances at that time (Hoekstra et al. 1998). ADDA was also ported to MPI which is up until now, the standard for SPMD style parallel programming.

That version of ADDA was used for a long time. We used it to report DDA simulation of a sphere with size parameter 40 in the year 1997 (Hoekstra et al. 1997). This was hardly believed by the audience, as it was commonly believed that size parameters much larger than say 15 or 20 were not possible. Indeed, on single processor workstations that was more or less the limit, but on a parallel supercomputer we could move to much larger particles.

ADDA was used for many different light scattering studies, but its implementation was hardly changed. The number of pre-defined particles were slowly increased, new observables were added (e.g. the option to compute radiative forces (Hoekstra et al. 2001)) and the code was constantly ported to new parallel machines. The later was an easy job, as the combination of a C code with MPI was easily portable.

With the arrival of Maxim Yurkin in Amsterdam in 2004 a next wave of ADDA development started. The code was completely redone, an optimized parallel FFT package (FFTW3) was included, a Windows version was created, finally reaching its current state. ADDA was then put into the public domain, and can now be used by the community at large. The history of the latter stage is documented in releases.

References

  • Hoekstra A.G., Brinkhorst P.J.H., and Sloot P.M.A. First results of DDA simulations of elastic light scattering by red blood cell, Proceedings of Workshop on Light Scattering by Non-spherical Particles, pp. 39–40 (1997).
  • Hoekstra A.G., Frijlink M., Waters L.B.F.M., and Sloot P.M.A. Radiation forces in the discrete-dipole approximation, J. Opt. Soc. Am. A 18, 1944–1953 (2001).
  • Hoekstra A.G., Grimminck M.D., and Sloot P.M.A. Large scale simulations of elastic light scattering by a fast discrete dipole approximation, Int. J. Mod. Phys. C 9, 87–102 (1998).
  • Hoekstra A.G., Hertzberger L.O., and Sloot P.M.A. Simulation of elastic light scattering on distributed memory machines, Bull. Am. Phys. Soc. 36, 1798 (1991).
  • Hoekstra A.G. and Sloot P.M.A. Coupled dipole simulations of elastic light scattering on parallel systems, Int. J. Mod. Phys. C 6, 663–679 (1995).
  • Hoekstra A.G., Sloot P.M.A., van der Linden F., van Muiswinkel M., Vesseur J.J.J., and Hertzberger L.O. Native and generic parallel programming environments on a transputer and a PowerPC platform, Concurrency Pract. Ex. 8, 19–46 (1996).
  • INMOS Ltd. Occam 2 Reference Manual, Prentice Hall (1988).
  • Sloot P.M.A. and Hoekstra A.G. Light scattering simulations on a massively parallel computer at the IC3A, Transput. Applic. 1, 42–49 (1993).
  • Sloot P.M.A. and Hoekstra A.G. Implementation of a parallel conjugate gradient method for simulation of elastic light scattering, Comput. Phys. 6, 323 (1992).
  • Sloot P.M.A., Hoekstra A.G., and Hertzberger L.O. A comparison of the Iserver–Occam, Parix, Express, and PVM programming environments on a Parsytec GCel, Lecture Notes Comput. Sci. 797, 253–259 (1994).
⚠️ **GitHub.com Fallback** ⚠️