comparison of ADDA, DDSCAT, and IFDDA

10 views
Skip to first unread message

Maxim Yurkin

unread,
Mar 5, 2026, 1:02:31 PMMar 5
to ADDA questions and answers

Dear colleagues,

Comparison of the DDA codes has been discussed a lot of times in this group. So let me bring your attention to our recent preprint, where we systematically compare three most widely used ones: ADDA, DDSCAT, and IFDDA. https://doi.org/10.48550/arXiv.2603.02871 .

While it has been generally assumed that all these codes can produce the same results, this has rarely been tested in practice. And even when done, the agreement within 1% was typically considered good enough.
Instead, we demonstrated that these three codes can achieve agreement up to machine precision and provide practical equivalence tables and reproducible command-line configurations for that. At the same time,
we uncovered and carefully discussed intricate differences in certain aspects of simulations between the codes. Thus, the paper contains a lot of technical details including ideas for further development of the codes.

Once the results agree to roughly ten significant digits, we compared the performance of the three codes across different hardware platforms (both CPU and GPU). A key advantage of this setup is the absence of the usual ambiguity where one code is faster but also less accurate. The performance numbers naturally depend on the hardware, although several systems were tested. Still, the most striking outcome (see Fig.1 in the paper) is that the MPI parallelization in ADDA achieves higher parallel efficiency than the OpenMP strategy in IFDDA, even on a shared-memory machine (with 192 processor cores), where the opposite might normally be expected. It was also unknown to us that FFT routines are not parallelized in DDSCAT (even with OpenMP), making this code inferior when multiple cores are used for a single DDA simulation. The results for GPU versions of ADDA and IFDDA are also interesting (contrasting, e.g., OpenCL to CUDA), but they are already a bit outdated due to further code developments (as also evidenced by recent discussions in this group).

The paper is accompanied by three (!) github repos, thanks to Clément's tireless efforts:

1)  https://github.com/Argencle/dda-bench/ - general framework for testing the agreement (how many significant digits match for given command lines). 
If you develop another DDA code, it should be easy to adapt the framework to incorporate it. Any fork of ADDA, DDSCAT, or IFDDA can be tested as well (probably with no changes, if API stays compatible).

2) https://github.com/Argencle/ddscatcli - general-purpose command-line interface for DDSCAT. If you ever wanted one, here it is.

3) https://github.com/Argencle/data-dda-benchmark-paper - scripts to reproduce all data and figures from scratch. This is becoming a standard for open and reproducible science, but not yet used as often as desirable.

Finally, do not hesitate to comment on, criticize or suggest any improvements for this preprint. We have just submitted it to the journal and will be able to update it during the revision stage.

Maxim.

P.S. If you like formulas and are interested in the classic LDR formulation of the DDA (still the default one in many codes), take a look at Appendix B, which appeared spontaneously, but was instrumental in achieving double-precision agreement.

Reply all
Reply to author
Forward
0 new messages