The original question was answered by Baptiste and Antti, I only have a few comments for general information.
1) Concerning parallel efficiency of ADDA. Indeed, using number of CPU cores larger than n_z (144) will not help (See
section 5 "System Requirements" of the manual). However, total required resources (measured as, e.g., wall time times
number of cores) somewhat decrease with decreasing number of cores. In other words, the latter improves parallel
efficiency (see Section 11.3 "Parallel performance" of the manual). So if you can divide orientation average into many
parts, so that wall time of a single run is no more an issue, it is overall more efficiently to use as small number of
cores per single run as possible. The limit is usually determined by the required memory.
Another way to improve parallel efficiency is to generate your particle so, that its largest dimension is along z-axis.
Unfortunately, this is not possible for predefined shape, but is perfectly possible for shapes read from file. It is
just a matter of modifying your shape generator a little bit.
2) Concerning the averaging. General rule is that all intensity-based quantities should be averaged (with weights
specified by a particular cubature if needed). So this applies to the Mueller matrix and cross sections (Cext, etc.). If
the efficiencies (Qext, etc.) are defined by dividing by the cross section of the volume-equivalent sphere (as is done
in ADDA), then they can also be directly averaged. The alternative definition is to divide by the area of geometrical
shadow, which depends on orientation. Then one should first average Cext, etc. and divide it by average area of
geometrical shadow. Finally, the asymmetry parameter can not be averaged, but it should be computed from the averaged
Mueller matrix. Moreover, computing asymmetry parameter for each single orientation can be time consuming and, hence, is
not recommended.
When you need to average only cross section, it is more convenient to use the single orientation runs (with "-orient
...", as described by Baptiste). Then the mean of Cext (or Cabs) from files CrossSec-X and CrossSec-Y will be equal to
the result averaged over the angle alpha (see the method of Antti). Although the method of Antti can be also used
efficiently in this case (by adding "-scat_matr none", which will effectively cancel the averaging over alpha inside
ADDA), it is probably more difficult to automate.
If you need to average the Mueller matrix (in particular, to compute g) the method of Antti, which includes fast
averaging over alpha, should be more appropriate.
3) Concerning the orientation averaging scheme - Romberg integration - that is used in ADDA. It's main advantage is
adaptability (using internal error estimate) and potentially rapid convergence with increasing number of orientations
(when it is already large enough) - see Section 11.5 "Romberg integration" of the manual. The main drawback is lack of
flexibility, which comes partly from the high-order integration methods and partly from deep rooting of the averaging
inside the ADDA code. The latter may potentially allow additional optimization - see
http://code.google.com/p/a-dda/issues/detail?id=54 , but it is far from being implemented.
The structure of the file avg_params.dat is also not completely flexible. So combining results from two ADDA runs with
different sets of orientation angles is problematic. One can separate angular intervals (given by min=... and max=...)
between the runs and decrease Jmax correspondingly (by 1 for 2 runs, by 2 for 4 runs, etc.). However, these scheme will
lose all the benefits of Romberg integration, and will be similar to a simple averaging on a regular grid.
For now using an external averaging (e.g., by a script), as discussed by Baptiste and Antti, is definitely a good option
for many applications. Hopefully, some of this functionality will be implemented in ADDA as well, see
http://code.google.com/p/a-dda/issues/detail?id=40 .
Finally, the problem of limited wall time available on computer clusters can be potentially solved with the checkpoint
system, implemented in ADDA - see Section 11.4 "Checkpoints" of the manual. Unfortunately, this system currently works
only for single orientation and single incident polarization - see http://code.google.com/p/a-dda/issues/detail?id=9 .
The latter link also provides possible workarounds.
Maxim.
Originally, ADDA used completely uniform grid, but then we removed considering redundant gamma values for polar values
of beta. This just saves some simulation time without any effect on the result.
Maxim.
Maxim.
--
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 on the web visit https://groups.google.com/d/msgid/adda-discuss/4c6d236a-c174-419b-aefa-d75f9f42300dn%40googlegroups.com.