The Fortran 77 code XSTAR (Kallman & Bautista, 2001; Kallman et al., 2004; Kallman et al., 2009; Kallman et al., 1996) is a photoionization program used to model the X-ray spectra from astrophysical plasmas. XSTAR was developed to calculate ionization structures, thermal structures, and emissivities of a spherical gaseous cloud with given physical conditions and elemental abundances being ionized by a central source of ionizing radiation that is specified by its luminosity and spectral continuum. It uses an atomic database (Bautista & Kallman, 2001) that includes energy levels, recombination rate coefficients, transition probabilities, and cross sections of most of the lines seen in the UV and X-ray bands. To facilitate model fitting for various physical parameters, a Perl script, called XSTAR2XSPEC, was developed and is included in XSTAR that executes multiple serial runs of XSTAR, and utilizes the results of these XSTAR computations to generate multiplicative tabulated models for spectroscopic analysis tools. These tabulated models are the absorption spectrum table (xout_mtable.fits), the reflected emission spectrum table (xout_ain.fits), and the transmitted emission spectrum table in the absorption direction (xout_aout.fits), which are used for the photoionization model fitting in X-ray spectral modeling tools such as XSPEC (Arnaud, 1996) and ISIS (Houck & Denicola, 2000).
XSTAR is widely used to obtain physical conditions of X-ray ionized emitters and/or absorbers in active galactic nuclei (AGNs; e.g. Brenneman et al., 2011; Tombesi et al., 2014; Lee et al., 2013; Tombesi et al., 2011b; Laha et al., 2014; Tombesi et al., 2011a) and non-equilibrium ionized gaseous clouds surrounding X-ray binaries (XRBs; e.g. Miller et al., 2015; Neilsen et al., 2009; Neilsen et al., 2011; Miller et al., 2012). Fundamental physical parameters in typical models are the gas number density , the hydrogen column density , and the ionization parameter (Tarter et al., 1969), where is the luminosity (1-1000 Ryd) of the ionizing source, is the volume filling factor of the gaseous cloud, is the distance from the central source of ionizing radiation and is the thickness of the gaseous cloud. In most cases, the gas number density and chemical abundances are fixed, while the variations of the hydrogen column density () and the ionization parameter () are used to constrain the physical properties of an ionized gas. Hence, multiplicative tabulated models are generated on the two-dimensional - plane, sampling the column density with intervals and the ionization parameter with intervals, which require times XSTAR runs. Taking our typical one-hour XSTAR run (for our specified model settings), XSTAR2XSPEC takes 600 hours (25 days) for and to produce tabulated models.
To facilitate parallel executions of multiple XSTAR runs, a Unix shell script together with some S-Lang codes, so-called PVM_XSTAR1 (Noble et al., 2009), were developed based on the Parallel Virtual Machine (PVM) library2 (Geist et al., 1994) and the S-Lang PVM module3 (Noble et al., 2006; Davis et al., 2005). PVM_XSTAR loads the S-Lang PVM module, spawns multiple slave processes for XSTAR runs using the job list created by XSTINITABLE, and invokes XSTAR2TABLE on the results of these XSTAR runs to create table models. The program XSTINITABLE is a code written in the C language, and is included in the FTOOLS package4 which is used in the initialization step of the Perl script XSTAR2XSPEC to generate the job list file (xstinitable.lis), containing XSTAR calling commands for the variation of the physical parameters used in photoionization modeling, and to create an initial FITS file (xstinitable.fits) required for producing multiplicative tabulated models. The program XSTAR2TABLE is also written in the C language, and included in the FTOOLS package which is invoked by the Perl script XSTAR2XSPEC to generate tabulated models from multiple serial runs of XSTAR. PVM_XSTAR, similar to XSTAR2XSPEC, invokes XSTINITABLE and XSTAR2TABLE from the FTOOLS package, but executes those XSTAR calling commands in parallel. However, the PVM software package is not employed by modern supercomputers. The two most common protocols of parallel computing used by recent supercomputers are Message Passing Interface (MPI) and OpenMP. The MPI protocol is for clusters with distributed memory, while OpenMP supports shared memory systems. Since it may not be possible to use PVM_XSTAR on a given computer cluster, it was necessary to develop a code that permits parallel executions of multiple XSTAR runs using either MPI or OpenMP. As the MPI protocol is used by all modern clusters with distributed memory, we attempted to implement an MPI-based interface for parallelizing the XSTAR program.
This paper presents a parallelization implementation for multiple runs of the XSTAR program, so called MPI_XSTAR, developed using the MPI library in the C++ language. Section 2 describes the design of the mpi_xstar program. Section 3 evaluates the parallelization speedup and the computing resource efficiency of mpi_xstar, followed by a conclusion in Section 4.
Ashkbiz Danehkar