OPserver: interactive online-computations of opacities and radiative
  accelerations
Mon. Not. R. Astron. Soc. 000, 1–5 (2006) Printed 11 November 2021 (MN LATEX style file v2.2)
OPserver: interactive online-computations of opacities and
radiative accelerations
C. Mendoza,1,2⋆ M. J. Seaton,3 P. Buerger,4 A. Belloŕın,5
M. Meléndez,6† J. González,1,7 L. S. Rodŕıguez,8 F. Delahaye,9
E. Palacios,7 A. K. Pradhan10 and C. J. Zeippen9
1Centro de F́ısica, Instituto Venezolano de Investigaciones Cient́ıficas (IVIC), PO Box 21827, Caracas 1020A, Venezuela
2Centro Nacional de Cálculo Cient́ıfico Universidad de Los Andes (CeCalCULA), Mérida 5101, Venezuela
3Department of Physics and Astronomy, University College London, London WC1E 6BT, UK
4Ohio Supercomputer Center, Columbus, Ohio 43212, USA
5Escuela de F́ısica, Facultad de Ciencias, Universidad Central de Venezuela, PO Box 20513, Caracas 1020-A, Venezuela
6Departamento de F́ısica, Universidad Simón Boĺıvar, PO Box 89000, Caracas 1080-A, Venezuela
7Escuela de Computación, Facultad de Ciencia y Tecnoloǵıa, Universidad de Carabobo, Valencia, Venezuela
8Centro de Qúımica, Instituto Venezolano de Investigaciones Cient́ıficas (IVIC), P.O. Box 21827, Caracas 1020A, Venezuela
9LUTH, Observatoire de Paris, F-92195 Meudon, France
10Department of Astronomy, The Ohio State University, Columbus, Ohio 43210, USA
Accepted. Received; in original form
ABSTRACT
Codes to compute mean opacities and radiative accelerations for arbitrary chemical
mixtures using the Opacity Project recently revised data have been restructured in a
client–server architecture and transcribed as a subroutine library. This implementation
increases efficiency in stellar modelling where element stratification due to diffusion
processes is depth dependent, and thus requires repeated fast opacity reestimates.
Three user modes are provided to fit different computing environments, namely a web
browser, a local workstation and a distributed grid.
Key words: atomic processes – radiative transfer – stars: interior.
1 INTRODUCTION
Astrophysical opacities from the Opacity Project (OP) have
been updated by Badnell et al. (2005) to include inner-
shell contributions and an improved frequency mesh. The
complete data set of monochromatic opacities and a suite
of codes to compute mean opacities and radiative accel-
erations (OPCD 2.11) have also been publicly released by
Seaton (2005) to make in-house calculations for arbitrary
mixtures more versatile and expedient. Regarding data ac-
curacy, there is excellent overall agreement between the
OPAL (Iglesias & Rogers 1996) and OP results as dis-
cussed by Seaton & Badnell (2004), Badnell et al. (2005)
and Delahaye & Pinsonneault (2005).
Rosseland mean opacities are sensitive to both the
⋆ E-mail: claudio@ivic.ve.
† Present address: Institute for Astrophysics and Computational
Sciences, Department of Physics, The Catholic University of
America, Washington, DC 20064, and Exploration of the Uni-
verse Division, Code 667, NASA Goddard Space Flight Center,
Greenbelt, MD 20771, USA.
1 http://cdsweb.u-strasbg.fr/topbase/op.html
basic atomic data used and the assumed abundances of
the chemical elements. What had been a good agree-
ment between theory and the helioseismological data was
found to be less good using revised solar abundances from
Asplund et al. (2005). The revised OP opacities have been
instrumental in discussions of that problem (Antia & Basu
2005; Bahcall et al. 2005a,b,c; Bahcall & Serenelli 2005;
Delahaye & Pinsonneault 2006).
The modelling of stellar interiors, on the other hand, is
being renewed with the solar experience. Present (WIRE,
MOST, CoRoT) and future (Kepler) space probes and
the well established solar methods are giving the field
of asteroseismology remarkable growth and the guaran-
tee of invaluable data (Metcalfe et al. 2004; Kurtz 2005;
Christensen-Dalsgaard 2006). In future work on stellar mod-
els it may be desirable to take account of revisions in abun-
dances similar to those performed for the Sun.
For some types of stars, models must take into ac-
count microscopic diffusion processes, e.g. radiative levita-
tion, gravitational settling and thermal diffusion, as they can
affect the internal and thermal structures, the depth of the
convection zone, pulsations and give rise to surface abun-
dance anomalies (Seaton 1999; Delahaye & Pinsonneault
c© 2006 RAS
http://arxiv.org/abs/0704.1583v1
http://cdsweb.u-strasbg.fr/topbase/op.html
2 C. Mendoza et al.
2005; Bourge & Alecian 2006). As reviewed by Michaud
(2004), such processes are relevant in the description of
chemically peculiar stars, horizontal-branch stars, white
dwarfs and neutron stars, and in globular cluster age de-
terminations from Population II turnoff stars. Furthermore,
in order to solve the outstanding discrepancy of the at-
mospheric Li abundance in old stars with that predicted
in big-bang nucleosynthesis, Richard et al. (2005) have pro-
posed Li sinking deep into the star due to diffusion. This
hypothesis has been recently confirmed in the observations
by Korn et al. (2006).
The OPCD 2.1 release includes data and codes to com-
pute the radiative accelerations required for studies of dif-
fusion processes. It should be noted that the radiative ac-
celerations are summed over ionization stages and that data
for the calculation of diffusion coefficients are calculated as-
suming that the distribution over ionization stages of the
diffusing ions is the same as that in the ambient plasma. The
validity of this approximation is discussed by Gonzalez et al.
(1995).
In some cases, particularly when element stratification
depends on stellar depth, calculations of mean opacities and
radiative accelerations must be repeated at each depth point
of the model and at each time step of the evolution, and
thus the use of codes more efficient than those in OPCD 2.1
may be necessary. This becomes critical in the new dis-
tributed computing grid environments where the network
transfer of large volumes of data is a key issue. In the present
work we have looked into these problems, and, as a solu-
tion, report on the implementation of a general purpose,
interactive server for astrophysical opacities referred to as
OPserver. It has been installed at the Ohio Supercomputer
Center, Columbus, Ohio, USA, from where it can be ac-
cessed through a web page2 or a linkable subroutine library.
It can also be downloaded locally to be run on a stand-alone
basis but it will demand greater computational facilities. In
Section 2 we discuss the computational strategy of the codes
in OPCD 2.1 followed by a description of OPserver in Sec-
tion 3. In Section 4 we include some tests as an indication
of its performance with a final summary in Section 5.
2 OPCD CODES
We highlight here some of the key features of the codes in
OPCD 2.1. For a chemical mixture specified by abundance
fractions fk, they essentially compute two types of data:
Rosseland mean opacities (RMO) and radiative accelera-
tions (RA).
2.1 Rosseland mean opacities
For the frequency variable
u = hν/kBT (1)
where kB is the Boltzmann constant, RMO are given by
the harmonic mean of the opacity cross section σ(u) of the
mixture
2 http://opacities.osc.edu
dv (2)
where µ is the mean atomic weight. The σ(u) is a weighted
sum of the monochromatic opacity cross sections for each of
the chemical constituents
σ(u) =
fkσk(u) , (3)
and is conveniently tabulated on the v-mesh
v(u) =
F (u)
1− exp(−u)
du (4)
where
F (u) =
15u4 exp(−u)
4π4[1− exp(−u)]2
and v∞ = v(u → ∞). The rationale behind the v-mesh is
that it enhances frequency resolution where F (u) is large
(Badnell et al. 2005).
2.2 Radiative accelerations
Similarly, the RA for a selected k element can be expressed
grad =
µκRγk
F (6)
where µk is its atomic weight and c the speed of light. The
function F is given in terms of the effective temperature Teff
and fractional depth r/R⋆ of the star by
F = πB(Teff)(R⋆/r)
B(T ) =
2(πkBT )
15c2h3
. (8)
The dimensionless parameter
σmtak
dv (9)
depends on the cross section for momentum transfer to the
k element
k = σk(u)[1− exp(−u)]− ak(u) (10)
where ak(u) is a correction to remove the contributions of
electron scattering and momentum transfer to the electrons.
Both σk(u) and ak(u), which are hereafter referred to as the
mono data set (∼1 GB), are tabulated in equally spaced v
intervals to facilitate accurate interpolation schemes.
2.3 Computational strategy
The computational strategy adopted in the OPCD 2.1 re-
lease is depicted in the flowcharts of Figure 1 where it may
be seen that calculations of RMO and RA are carried in
two stages. In a time consuming Stage 1, RMO and RA
are computed with the mixv and accv codes, respectively,
on a representative tabulation of the complete temperature–
electron-density (T,Ne) plane. In mixv the chemical mixture
is specified in the input file mixv.in as
{X,Z,N,Zk, fk} (11)
c© 2006 RAS, MNRAS 000, 1–5
http://opacities.osc.edu
OPserver 3
http://vizier.u-strasbg.fr/topbase/opserver/fig1.eps
Figure 1. Flowcharts for the computations of Rosseland mean opacities (RMO) and radiative accelerations (RA) with the codes in the
OPCD 2.1 release. They are carried out in two stages: in a time consuming Stage 1, data are computed for the whole (T,Ne) plane
followed by fast bicubic interpolations in Stage 2. The intermediate files mixv.xx and acc.xx enable communication between these two
steps.
where X and Z are the hydrogen and metal mass-fractions,
N the number of elements, and Zk and fk are the metal nu-
clear charges and fractional abundances. In accv, the input
data (accv.in) are
{N,Zk, fk, Zi, Nχ, χj} (12)
where now k runs over the N elements of the mixture, and
Zi and χj are respectively the nuclear charge and Nχ abun-
dance multipliers of the test i element. Input data formats
in either mixv.in or accv.in give the user flexible control
over chemical mixture specifications.
As shown in Figure 1, the intermediate output files
mixv.xx (∼85 KB) containing
{ρ, κR}(T,Ne) , (13)
where ρ is the mass-density, and acc.xx (∼470 KB) with
(T,Ne, χj) (14)
are written to disk. They are then respectively read by
the codes opfit and accfit in Stage 2 for fast bicubic
interpolations of RMO and RA on stellar depth profiles
{T, ρ, r/R⋆}(i) specified by the user in the opfit.in and
accfit.in input files. The final output files are opfit.xx
containing
log κR,
∂ log κR
∂ log T
∂ log κR
∂ log ρ
(i) (15)
and accfit.xx with
{log κR, log γ, log grad}(i, χj) . (16)
In this computational approach, performance is mainly
limited by the summation in equation (3) which implies disk
reading the mono data set; for instance, in mixv it takes
up to ∼90% of the total elapsed time. OPCD 2.1 also in-
cludes other codes such as mx and ax which respectively
compute RMO and RA for a star depth profile. The chemi-
cal mixture can be fully varied at each depth point using the
specifications in equations (11–12), the RMO and RA being
obtained in a one-step process using bicubic interpolations
without splines. These methods are thus suitable for cases
with multi-mixture depth profiles (Seaton 2005). Further de-
tails of all the OPCD codes are contained in the reference
manual3.
3 OPSERVER
In OPserver the computational capabilities of the codes in
OPCD 2.1 are greatly enhanced by the following innovative
adaptations.
3 http://opacities.osc.edu/publi/OPCD.pdf
(i) The codes are restructured within a client–server net-
work architecture whereby the time consuming Stage 1 is
performed on a powerful processor while the fast Stage 2 is
moved to the client, e.g. a web server or a user workstation.
In this arrangement performance could be affected by the
client–server transfer of the mixv.xx and acc.xx intermedi-
ate files, but since they are never larger than 0.5 MB, it is
not expected to be a deterrent with present-day bandwidths.
In a local installation where both the client and server reside
on the same machine, communication is managed through
shared buffers in main memory; i.e. the corresponding data
in mixv.xx and acc.xx are not written to disk.
(ii) The codes are transcribed as a subroutine library—
to be referred to hereafter as the OPlibrary—which can be
linked by the user stellar modelling code for recurrent sub-
routine calls that avoid data writing on disk. That is, the in-
put data in the mixv.in, accv.in, opfit.in and accfit.in
files and the output tables in the opfit.xx and accfit.xx
files (see Figure 1) are now handled as subroutine param-
eters while the intermediate mixv.xx and acc.xx files are
passed via shared main-memory buffers. Chemical mixtures
are again specified with the formats of equations (11–12)
which allow full variation at each depth point in a single
subroutine call.
(iii) RMO/RA are computed with the complete mono data
set always loaded in main memory thus avoiding lengthy and
repeated disk readings. This is achieved by implementing
OPserver on a dedicated server where mono is permanently
resident in RAM, or in the case of a local installation, by
disk-reading it once at the outset of a modelling calculation.
(iv) When accessing the remote server, client data re-
quests are addressed through the HTTP protocol, i.e. in
terms of a Uniform Resource Locator (URL). This allows
data fetching from the central facility through an interactive
web page or a network access subroutine, the latter being
particularly suitable for a stellar model code that is to be
run in a distributed grid environment.
(v) The do-loop that computes the summation of equa-
tion (3) has been parallelized in OpenMP which provides
a simple, scalable and portable scheme for shared-memory
platforms.
As shown in Figure 2, the current OPserver enterprise is
implemented as a client–server model at the Ohio Supercom-
puter Center (OSC). The web server communicates with the
supercomputer via a socket interface. Earlier versions were
developed on an SGI Origin2000 server with the PowerFor-
tran parallelizing compiler. The current version runs on a
Linux system with Fortran OpenMP directives. OPserver
offers three user modes with full functionality except when
otherwise indicated in the following description.
Mode A In this mode OPserver is set up locally on a
stand-alone basis (see Figure 2). The facilities of the OSC are
c© 2006 RAS, MNRAS 000, 1–5
http://vizier.u-strasbg.fr/topbase/opserver/fig1.eps
http://opacities.osc.edu/publi/OPCD.pdf
4 C. Mendoza et al.
http://vizier.u-strasbg.fr/topbase/opserver/fig2.eps
Figure 2. OPserver enterprise showing the web-server–supercomputer tandem at the Ohio Supercomputer Center (OSC) and the three
available user modes. (A) The OPlibrary and monochromatic opacities (mono) are downloaded locally and linked to the user modelling
code such that RMO/RA are computed locally. (B) The OPlibrary is downloaded locally and linked to the modelling code but RMO/RA
are computed remotely at the OSC. (C) RMO/RA computations at the OSC through a web client.
not used. A new OPCD release (OPCD 3.34) is downloaded,
followed by (i) installation of both the OPlibrary and the
mono data set and (ii) linking of the OPlibrary to the user
modelling code. Computations of RMO/RA are preceded
by the reading of the complete mono data set from disk and
therefore requires at least 1 GB of RAM.
Mode B In this mode, the OPlibrary is downloaded, in-
stalled and linked to the user code, but Stage 1 is performed
remotely at the OSC (see Figure 2). This option has been
customized for stellar modelling in a distributed grid envi-
ronment that would otherwise imply (i.e. Mode A) the net-
work transfer, installation and disk-reading of the mono data
set at runtime. It is also practical when local computer capa-
bilities (RAM and/or disk space) are limited. The functions
provided by the mx and ax codes have not been implemented.
Mode C In this mode RMO/RA computations at the
OSC are requested through an interactive web page5 which
allows both Stage 1 and Stage 2 to be carried out re-
motely or, alternatively, Stage 2 locally by downloading the
mixv.xx/acc.xx intermediate files (see Figure. 1) with the
browser for further processing with local opfit/accfit ex-
ecutables.
4 TESTS
OPserver benchmarks were initially carried out on an SGI
Origin2000 multiprocessor at the OSC with an earlier re-
lease of OPCD. For the standard S92 mixture (Seaton et al.
1994), the mixv code took up to 140 s to compute the
mixv.xx file, of which 126 s were dedicated to disk-reading
and 14 s to the actual computing of the mean opacities.
OPserver took on average 12.0 ± 0.5 s to compute mixv.xx
which was not written to disk unless requested. In Fig-
ure 3 we show the acceleration obtained on the Origin2000
through parallelization where the calculation of mean opac-
ities is reduced to 2 s with 8 processors. Further significant
acceleration is prevented by data transfer overheads.
On more recent workstations, the local performances of
the codes in OPCD 2.1 and OPserver depend on processor
speed and RAM and cache sizes. For instance, on a Pow-
erMac G5 (PowerPC 970fx processor at 2.0 GHz, 1GB of
RAM and L2 cache of 512 KB) the first time mixv is run it
takes for a single S92 mixture 103.8 s to compute the RMO,
but on subsequent runs the elapsed time is reduced to an av-
erage of 28.2±0.2 s. Similarly, OPserver takes 103.3 s which
is then reduced to 31.4 ± 0.4 s on subsequent runs. Once
the mono data set is loaded in RAM by OPserver (Mode
A), calculations of RMO for a single S92 mixture only take
5.29 ± 0.02 s and 6.13 ± 0.01 s for RA for the test element
Ar. In Mode B, where Stage 1 is carried out remotely at the
OSC and the mixv.xx and accv.xx files are transferred at
4 http://cdsweb.u-strasbg.fr/topbase/op.html
5 http://opacities.osc.edu
the relatively low rate of 1.88 KB/s, computations of RMO
and RA take 5.9±0.1 s and 9.3±0.3 s, respectively. The no-
ticeable longer time taken for the latter is due to the transfer
time taken for the larger accv.xx file.
5 SUMMARY
Rosseland mean opacities and radiative accelerations can be
computed from OP data in any one of the following ways.
(i) Download the original OPCD 2.1 package as described
by Seaton (2005) and perform all calculations locally.
(ii) Mode A, download the upgraded OPCD 3.3 package, in-
stall OPserver and perform all calculations locally by link-
ing the subroutines in the OPlibrary. Calculations with
OPserver are more efficient but require large local computer
memory.
(iii) Mode B, as Mode A but with Stage 1 performed re-
motely at the OSC. Mode B is convenient if fast calculations
are required but local computer memory is limited or when
stellar modelling is to be carried out in a grid environment.
(iv) Mode C, perform all calculations remotely at the OSC
through an interactive web page whereby files are down-
loaded locally with the browser.
ACKNOWLEDGMENTS
We acknowledge the invaluable assistance of Juan Luis
Chaves and Gilberto Dı́az of CeCalCULA during the ini-
tial stages of OPserver. We are also much indebted to the
Ohio Supercomputer Center, Columbus, Ohio, USA, for
hosting OPserver and for technical assistance; to the Centre
de Données astronomiques de Strasbourg, France, for host-
ing the OPCD releases; and to Drs Josslen Aray, Manuel
Bautista, Juan Murgich and Fernando Ruette of IVIC for
allowing us to test the OPserver installation on different
platforms. FD would like to thank S. Rouchy for techni-
cal support. AKP and FD have been partly supported by a
grant from the US National Science Foundation.
REFERENCES
Antia H. M., Basu S., 2005, ApJ, 620, L129
Asplund M., Grevesse N., Sauval A. J., 2005, in Barnes
T. G., Bash F. N., eds, ASP Conference Series Vol. 336,
Cosmic Abundances as Records of Stellar Evolution and
Nucleosynthesis. Astronomical Society of the Pacific, San
Francisco, p.25
Badnell N. R., Bautista, M. A., Butler, K., Delahaye F.,
Mendoza C., Palmeri P., Zeippen C. J., Seaton, M. J.,
2005, MNRAS, 360, 458
Bahcall J. N., Basu, S., Pinsonneault M., Serenelli A. M.,
2005a, ApJ, 618, 1049
c© 2006 RAS, MNRAS 000, 1–5
http://vizier.u-strasbg.fr/topbase/opserver/fig2.eps
http://cdsweb.u-strasbg.fr/topbase/op.html
http://opacities.osc.edu
OPserver 5
0 2 4 6 8
Number of Processors
Figure 3. Average elapsed time for the computation of RMO
(Stage 1) in OPserver as a function of the number of processors
on a SGI Origin2000 showing the acceleration obtained through
parallelism. The corresponding time taken by the mixv code for
this calculation is 140 s where 126 s are taken by data reading
from disk.
Bahcall J. N., Basu S., Serenelli A. M., 2005b, ApJ, 631,
Bahcall J. N., Serenelli A. M., 2005, ApJ, 626, 530
Bahcall J. N., Serenelli A. M., Basu S., 2005c, ApJ, 621,
Bourge P.-O., Alecian G., 2006, in Sterken C., Aerts C., eds,
ASP Conference Series Vol. 349, Astrophysics of Variable
Stars. Astronomical Society of the Pacific, San Francisco,
p.201
Christensen-Dalsgaard J., 2006, in Fletcher K., ed, Proc.
SOHO 18/GONG 2006/HELAS I Workshop, Beyond the
spherical Sun. ESA SP-624, p. 41.1
Delahaye F., Pinsonneault M., 2005, ApJ, 625, 563
Delahaye F., Pinsonneault M. H., 2006, ApJ, 649, 529
Gonzalez J.-F., LeBlanc F., Artru M.-C., Michaud G.,
1995, A&A, 297, 223
Iglesias C. A., Rogers F. J., 1996, ApJ, 464, 943
Korn A. J., Grundahl F., Richard O., Barklem P. S.,
Mashonkina L., Collet R., Piskunov N., Gustafsson B.,
2006, Nature, 442, 657
Kurtz D. W., 2005, JApA, 26, 123
Metcalfe T. S., Brown T. M., Christensen-Dalsgaard J.,
2004, in Danesy D., ed, Proc. SOHO 14/GONG 2004
Workshop, Helio- and asteroseismology: towards a golden
future. ESA SP-559, p. 567
Michaud G., 2004, in Zverko J., Ziznovsky J., Adelman S.
J., Weiss W. W., eds, Proc. IAU Symp. 224, The A-star
puzzle. Cambridge University Press, Cambridge, p. 173
Richard O., Michaud G., Richer J., 2005, ApJ, 619, 538
Seaton M. J., 1999, MNRAS, 307, 1008
Seaton M. J., 2005, MNRAS, 362, L1
Seaton M. J., Badnell N. R., 2004, MNRAS, 354, 457
Seaton M. J., Yu Y., Mihalas D., Pradhan A. K., 1994,
MNRAS, 266, 805
This paper has been typeset from a TEX/ L
ATEX file prepared
by the author.
c© 2006 RAS, MNRAS 000, 1–5
	Introduction
	OPCD codes
	Rosseland mean opacities
	Radiative accelerations
	Computational strategy
	OPserver
	Tests
	Summary
