The pvm_xstar software tool fosters concurrent execution of the XSTAR
command line application on independent sets of parameters. XSTAR is
a computer code for calculating the physical conditions and emission
spectra of photoionized gases (Kallman & Bautista 2001); the science
it facilitates may be described most concisely by paraphrasing its
documentation: a spherical gas shell surrounding a central source of
ionizing radiation absorbs some of this radiation and reradiates it in
other portions of the spectrum. XSTAR computes the effects on the gas
of absorbing this energy, and the spectrum of reradiated light, while
allowing for consideration of other sources (or sinks) of heat, such
as mechanical compression & expansion, or cosmic ray scattering.
pvm_xstar can be used to perform large-scale XSTAR simulations, consisting
of thousands or more individual XSTAR jobs, in the time formerly required
to compute only a handful of such tasks. In the past this batch execution
of XSTAR has been managed by xstar2xspec, as follows:
The XSTAR application is repeatedly invoked over sets of unique input parameter tuples; one spectrum is generated per XSTAR run and saved as a FITS file, and these are collated into a single FITS table model that can be incorporated into an analytic model for fitting. However, since each XSTAR job executes completely independent of any other the entire set of jobs may be executed on multiple processors as follows:
This is exactly what pvm_xstar does, using the (P)arallel (V)irtual (M)achine
toolkit to distribute tasks across multiple workstations on a network,
or multiple CPUs within a Beowulf cluster, or even multiple cores within
a single desktop machine. It is effectively a parallel replacement for
the serial xstar2xspec script, and in fact pvm_xstar has exactly the
same flow:
For example, consider a representative simulation
of 600 XSTAR jobs, generating power law spectra of Hercules X1, which consumed
26.4 hours of wallclock time on a
single 2.6Ghz AMD Opteron processor with 2GB RAM; a linear scaling of this
workload to 4200 jobs would consume 7.5 days on the same machine. In
contrast, a similar physical simulation of 4200 XSTAR jobs completed in 110
minutes when executed via pvm_xstar on our Beowulf cluster of 52 2.4Ghz
Opteron (4GB RAM) processors. This represents a substantial enlargement of
the problem space to which XSTAR may be applied within practical timeframes.
It should kept in mind that pvm_xstar is merely a dispatch program: it
launches instances of XSTAR & manages their execution, but does not
parallelize the internals of XSTAR itself. This means that any single
XSTAR task that takes, for example, 3 hours on a single CPU will still
take 3 hours with pvm_xstar. The implication is that pvm_xstar cannot
reduce the runtime of your entire suite of XSTAR tasks below the time
required to compute the longest-running individual task. This is commonly
referred to as Amdahl's Law, and can be shown pictorially as
Kallman, T. & Bautista, M. 2001, Photoionization and High-Density Gas, Astrophysical Journal Supplements, 133, 221-253
Noble, M.S., Young, A., Ji, L., Lee, J. 2009, Parallelizing the XSTAR Photoionization Code, ASP. Conf. Ser. Proc. of Astronomical Data Analysis Software and Systems XVIII (In press. arXiv e-print at http://arxiv.org/abs/0901.1582)