Improvements in iterative solver and preconditioner usage

56 views
Skip to first unread message

Steven Lanier

unread,
Jan 24, 2025, 2:47:17 PMJan 24
to ADDA questions and answers
Hello, I am on the tail end of my PhD and am coming out with a paper soon. I made my own model of DDA in python using ADDA as a reference for quite a bit and made a large amount of improvements to solve time.

Basing the core of my work on   [1903.09802] Preconditioning the discrete dipole approximation   I implemented their 2 level preconditioner, succeeded in implementing the 3 level and was able to make enhancements to the process to grant both significant stability.

I use GPBi-CGSTAB for my solver, and slightly modified it in a manner that greatly increases the stability of the preconditioners.

For some examples (my paper will have a lot more) A sphere of radius 1600 and refractive index 1.8, I solve in ~2000 iterations. I run this on the gpu using a combination of cupy and pytorch with some optimized kernels and it took ~100 seconds to run, as opposed to 4.5 hours on qmr2 using adda on my home computer.

To match the above paper, I copied their hexagonal plate. for a size parameter of 100 and refractive index of 1.8, I solved in 445 iterations in ~19 seconds. For reference on their machine, they could not solve that and the size parameter of 80 took them 13,000 seconds. Though hardware and cpu vs gpu does make the time comparison a bit iffy.

In general for single objects my enhanced preconditioners could see updwards of 25-30x reduction in iteration count.

In addition to handling a variety of geometries, I also developed a partition system for multiple object scattering with varying refractive indices that enables multiple preconditioners to work, especially effective when the refractive indices differ by large amounts. Although not as much reduction for single objects.

I would be happy to talk with someone on the ADDA team about this, especially for how much I referenced your code when building my own little project.

Steven Lanier

Maxim Yurkin

unread,
Jan 24, 2025, 4:11:43 PMJan 24
to adda-d...@googlegroups.com, Steven Lanier
Dear Steven,

These results look really great! As far as I know, nobody before had significant success of using preconditioners for an object like a sphere (neither significantly prolate or oblate) in free space.

I am also interested in how fast is the matrix-vector multiplication on GPU compared with the CPU - this was discussed last year in this group, e.g. https://groups.google.com/g/adda-discuss/c/7QJgukAv_Ho .

I would be glad to discuss the details.

Maxim.

P.S. This answer has been forwarded to your e-mail address for your convenience. However, if you want to continue the discussion please reply to the group's e-mail. You are also advised to check the corresponding discussion thread at http://groups.google.com/group/adda-discuss and/or subscribe to it to receive automatic notifications, since other answers/comments will not be necessarily forwarded to your e-mail.
--
You received this message because you are subscribed to the Google Groups "ADDA questions and answers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adda-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/adda-discuss/9fa6aec1-dc38-4e67-9e63-3deb919aa303n%40googlegroups.com.


Reply all
Reply to author
Forward
0 new messages