Since Fortran-77 does not allow for dynamic memory allocation,
the executable has compiled into it the dimensions for a number of arrays;
these array dimensions limit the size of the dipole array which the code can
handle.
The source code supplied to you (which can be used to run the sample
calculation with 192 dipoles) is restricted to problems with targets which
are maximum extent of 8 lattice spacings along the x-, y-, and
z-directions (MXNX=8,MXNY=8,MXNZ=8; i.e, the target must fit within
an 8
8
8=512 cube) and involve at most 9 different dielectric
functions (MXCOMP=9).
With this dimensioning, the executable requires about 1.3 MB of memory to run on an
Ultrasparc system;
memory requirements on other hardware and with other compilers
should be similar.
To run larger problems, you will need to edit the code to
change PARAMETER values and recompile.
All of the dimensioning takes place in the main program DDSCAT - this should be the only routine which it is necessary to recompile. All of the dimensional parameters are set in PARAMETER statements appearing before the array declarations. You need simply edit the parameter statements. Remember, of course, that the amount of memory allocated by the code when it runs will depend upon these dimensioning parameters, so do not set them to ridiculously large values! The parameters MXNX, MXNY, MXNZ specify the maximum extent of the target in the x-, y-, or z-directions. Set the parameter MXMEM=0 or 1 depending on whether workspace required by Temperton's FFT algorithm is to be reserved. The parameter MXCOMP specifies the maximum number of different dielectric functions which the code can handle at one time. The comment statements in the code supply all the information you should need to change these parameters.
The memory requirement for DDSCAT.5a (with the netCDF option disabled) is
approximately
kbytes
when compiled with MXMEM=0, or
kbytes
when compiled with MXMEM=1.
Thus with MXMEM=0 a 32
32
32 calculation requires
21.0 MBytes,
while a 48
48
48 calculation requires 68.4 MBytes.
These values are for an Ultrasparc system using the Sun FORTRAN compiler.