Skip to main content

An OpenCL Implementation of Ellipsoidal Harmonics

  • Conference paper
VIII Hotine-Marussi Symposium on Mathematical Geodesy

Part of the book series: International Association of Geodesy Symposia ((IAG SYMPOSIA,volume 142))

Abstract

The technology progress today makes it possible to treat most of the problems of physical geodesy by means of numerical arrangements hardly imaginable earlier. Nevertheless, considering an evaluation of spheroidal (spherical and ellipsoidal) harmonic functions in our typical tasks, we still observe a huge performance gap between our demands and capabilities of common CPUs. Methods used for calculating associated Legendre functions are mostly recursive and thus sequential. Therefore, it is challenging, but feasible, to arrange the processing of Legendre functions in a way that reduces memory utilisation and admits massive parallelism. Following this aim, we developed a streaming-parallel algorithm for computing oblate spheroidal harmonic functions and their derivatives. The algorithm is free of assumptions concerning the function arguments, maximal degree/order or number of computation points and can be utilised on any data type, like a vector or scalar float, double or even integer numbers. Besides, it solves floating-point issues in the numerical treatment of Legendre functions. We demonstrate its Open Computing Language (OpenCL) implementation on a general-purpose graphics processing unit (GPGPU), which is ideal for its inexpensive computational power of some TFlops. Added performance benchmarks lead to the conclusion that our implementation on a single GPGPU device substantially outperforms recent multi-core CPUs, free of any precision penalty. Furthermore, thanks to the OpenCL standard, we can benefit from an excellent portability and scalability over heterogeneous parallel platforms. Let us note finally, that the topic presented is a matter of importance in many other application fields, not only in physical geodesy.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 169.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    In this study we are considering GRS 80 (or WGS 84) parameters E = 521 854. 0097 m, a = 6378137 m, \(b^{2} = a^{2} - E^{2}\) as in Moritz (1984).

  2. 2.

    Usually we suppose \(H_{n,m} = \sqrt{(2 -\delta _{0,m } )(2n + 1)\frac{(n-m)!} {(n+m)!}}\).

  3. 3.

    For instance j max < 100 for ρ 2 e 2 < 0. 007 and n < 22, 000.

  4. 4.

    Typical cost of a global memory access is equal to the cost of 200–600 Flops (Floating-point operations) on our GPGPU device, cf. Advanced Micro Devices (2011).

  5. 5.

    For instance, double precision FP numbers with χ = 256 provide the “operational band” 2±256 ≈ 10±77, still allowing to track the numbers as small as \(2^{-549755814000} \approx 10^{-165492990300}\) (for z = 32).

  6. 6.

    Array addressing becomes clear from the source code. Note that the index formula at lines 14 and 25 is used just for a better code readability; the production version of the kernel utilises memory pointers.

  7. 7.

    An inactive workgroup (all the work items in the workgroup do not issue instructions) releases allocated compute resources, enabling an immediate execution of another job waiting in a device queue.

  8. 8.

    The cspqnm_block kernel occupancy factor reaches 69% on our GPGPU, constrained mainly with the local memory size per CU.

  9. 9.

    As Eq. (27) should be applied on \(C_{n,m} \in \mathbb{C}\) in the spheroidal harmonics applications, we substitute it by two separate S m calculations.

  10. 10.

    Run-time criterion ζ N, m ≠ 0 (or resulting ζ m, m ≠ 0 in Clenshaw summation) based on the extended exponent approach is used for a decision about the maximal m relevant in particular synthesis. A little slowdown in enhanced LFRF caused by the exponent extension processing completely diminish with the higher orders cancellation.

References

  • Abramowitz M, Stegun IA (1964) Handbook of mathematical functions with formulas, graphs, and mathematical tables. Dover, New York

    Google Scholar 

  • Advanced Micro Devices I (2011) HD 6900 series instruction set architecture reference guide, revision 1.1

    Google Scholar 

  • Bateman H, Erdélyi A (1953) Higher transcendental functions, vol 1. McGraw-Hill Book Company, New York/Toronto/London

    Google Scholar 

  • Clenshaw CW (1955) A note on the summation of the Chebyshev series. Math Tab Autom Comp 9:118–120

    Google Scholar 

  • Fukushima T (2012) Numerical computation of spherical harmonics of arbitrary degree and order by extending exponent of floating point numbers. J Geod 86:271–285

    Article  Google Scholar 

  • Fukushima T (2013) Recursive computation of oblate spheroidal harmonics of the second kind and their first-, second-, and third-order derivatives. J Geod 87:303–309

    Article  Google Scholar 

  • Gil A, Segura J (1998) A code to evaluate prolate and oblate spheroidal harmonics. Comput Phys Commun 108(2–3):267–278

    Article  Google Scholar 

  • Goldberg D (1991) What every computer scientist should know about floating-point arithmetic. Assoc Comput Mach Comput Surv 23(1):5–48

    Google Scholar 

  • Hobson EW (1931) The theory of spherical and ellipsoidal harmonics, vol 1. Cambridge University Press, Cambridge

    Google Scholar 

  • Holmes SA, Featherstone WE (2002) A unified approach to the Clenshaw summation and the recursive computation of very high degree and order normalised associated Legendre functions. J Geod 76:279–299

    Article  Google Scholar 

  • Holota P (2001) Variational methods in the recovery of the gravity field – Galerkin’s matrix for an ellipsoidal domain. IAG Symposia 123:277–283

    Google Scholar 

  • Jekeli C, Lee JK, Kwon JH (2007) On the computation and approximation of ultra-high-degree spherical harmonic series. J Geod 81:603–615

    Article  Google Scholar 

  • Khronos Group KOWG (2012) The OpenCL specification version: 1.2, revision: 19

    Google Scholar 

  • Lozier DW, Smith JM (1981) Algorithm 567 extended-range arithmetic and normalized Legendre polynomials. ACM Trans Math Softw 7:141–146

    Article  Google Scholar 

  • Moritz H (1984) Geodetic reference system 1980. Bull Geod 58(10):388–398

    Article  Google Scholar 

  • Nesvadba O (2011) Nothing to fear from ellipsoidal harmonics. EGU General Assembly, Copernicus.org. http://presentations.copernicus.org/EGU2011-13386_presentation.pdf

  • Sebera J, Bouman J, Bosch W (2012) On computing ellipsoidal harmonics using Jekeli’s renormalization. J Geod 86(9):713–726

    Article  Google Scholar 

  • Sona G (1995) Numerical problems in the computation of ellipsoidal harmonics. J Geod 70:117–126

    Article  Google Scholar 

  • Thong NC, Grafarend EW (1989) A spheroidal harmonic model of the terrestrial gravitational field. Manuscr Geodaet 14:285–304

    Google Scholar 

  • Torge W (2001) Geodesy, 3rd edn. de Gruyter, Berlin

    Book  Google Scholar 

  • Tscherning CC, Poder K (1982) Some geodetic applications of Clenshaw summation. Bollettino di geodesia e scienze affini XLI(4):350–375

    Google Scholar 

  • Wittwer T, Klees R, Seitz K, Heck B (2008) Ultra-high degree spherical harmonic analysis and synthesis using extended-range arithmetic. J Geod 82:223–229

    Article  Google Scholar 

Download references

Acknowledgements

The work on this paper was partly supported by the European Regional Development Fund (ERDF), project “NTIS – New Technologies for Information Society”, European Centre of Excellence, CZ.1.05/1.1.00/02.0090 and also by the Czech Science Foundation through Project No. 14-34595S. All this support is gratefully acknowledged.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Otakar Nesvadba .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Nesvadba, O., Holota, P. (2015). An OpenCL Implementation of Ellipsoidal Harmonics. In: Sneeuw, N., Novák, P., Crespi, M., Sansò, F. (eds) VIII Hotine-Marussi Symposium on Mathematical Geodesy. International Association of Geodesy Symposia, vol 142. Springer, Cham. https://doi.org/10.1007/1345_2015_59

Download citation

Publish with us

Policies and ethics