Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/2660193.2660218acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

MIX10: compiling MATLAB to X10 for high performance

Published: 15 October 2014 Publication History

Abstract

MATLAB is a popular dynamic array-based language commonly used by students, scientists and engineers who appreciate the interactive development style, the rich set of array operators, the extensive builtin library, and the fact that they do not have to declare static types. Even though these users like to program in MATLAB, their computations are often very compute-intensive and are better suited for emerging high performance computing systems. This paper reports on MIX10, a source-to-source compiler that automatically translates MATLAB programs to X10, a language designed for "Performance and Productivity at Scale"; thus, helping scientific programmers make better use of high performance computing systems.
There is a large semantic gap between the array-based dynamically-typed nature of MATLAB and the object-oriented, statically-typed, and high-level array abstractions of X10. This paper addresses the major challenges that must be overcome to produce sequential X10 code that is competitive with state-of-the-art static compilers for MATLAB which target more conventional imperative languages such as C and Fortran. Given that efficient basis, the paper then provides a translation for the MATLAB parfor construct that leverages the powerful concurrency constructs in X10.
The MIX10 compiler has been implemented using the McLab compiler tools, is open source, and is available both for compiler researchers and end-user MATLAB programmers. We have used the implementation to perform many empirical measurements on a set of 17 MATLAB benchmarks. We show that our best MIX10-generated code is significantly faster than the de facto Mathworks' MATLAB system, and that our results are competitive with state-of-the-art static compilers that target C and Fortran. We also show the importance of finding the correct approach to representing the arrays in the generated X10 code, and the necessity of an IntegerOkay' analysis that determines which double variables can be safely represented as integers. Finally, we show that our X10-based handling of the MATLAB parfor greatly outperforms the de facto MATLAB implementation.

Supplementary Material

ZIP File (oopsla086.zip)
This is the artifact accompanying the paper titled "MiX10: Compiling MATLAB to X10 for High performance". It contains the following files and directories: 1. artifact_guide.pdf, 2. MiX10.jar, 3. library, 4. examples, 5. output, 6. languages

References

[1]
GNU Octave. http://www.gnu.org/software/octave/index.html.
[2]
J. Bezanson, S. Karpinski, V. B. Shah, and A. Edelman. Julia: A Fast Dynamic Language for Technical Computing. CoRR, abs/1209.5145, 2012.
[3]
J. Doherty. McSAF: An Extensible Static Analysis Framework for the MATLAB Language. Master's thesis, McGill University, December 2011.
[4]
J. Doherty and L. Hendren. McSAF: A static analysis framework for MATLAB. In Proceedings of ECOOP 2012, pages 132--155, 2012.
[5]
J. Doherty, L. Hendren, and S. Radpour. Kind analysis for MATLAB. In In Proceedings of OOPSLA 2011, pages 99--118, 2011.
[6]
A. Dubrau and L. Hendren. Taming MATLAB. In Proceedings of OOPSLA 2012, pages 503--522, 2012.
[7]
IBM. X10 programming language. http://x10-lang.org, Feb. 2012.
[8]
IBM. APGAS programming in X10 2.4, 2013. http://x10-lang.org/documentation/tutorials/apgas-programming-in-x10-24.html.
[9]
IBM. An introduction to X10, 2013. http://x10.sourceforge.net/documentation/intro/latest/html/node4.html.
[10]
INRIA. Scilab, 2009. http://www.scilab.org/platform/.
[11]
V. Kumar and L. Hendren. First steps to compiling Matlab to X10. In Proceedings of the third ACM SIGPLAN X10 Workshop, X10 '13, pages 2--11, New York, NY, USA, 2013. ACM.
[12]
J. Li. McFor: A MATLAB to FORTRAN 95 Compiler. Master's thesis, McGill University, August 2009.
[13]
X. Li and L. Hendren. Mc2for: A tool for automatically translating matlab to fortran 95. In In Proceedings of CSMR-WCRE 2014, pages 234--243, 2014.
[14]
MathWorks. MATLAB Coder. http://www.mathworks.com/products/matlab-coder/.
[15]
Mathworks. Reduction variables. http://www.mathworks.com/help/distcomp/advanced-topics.html#bq_of7_-3.
[16]
MathWorks. Parallel computing toolbox, 2013. http://www.mathworks.com/products/parallel-computing/.
[17]
A. Prasad, J. Anantpur, and R. Govindarajan. Automatic compilation of MATLAB programs for synergistic execution on heterogeneous processors. In Proceedings of the 32nd ACM SIGPLAN conference on Programming language design and implementation, PLDI '11, pages 152--163, New York, NY, USA, 2011. ACM.
[18]
M. J. Quinn, A. Malishevsky, N. Seelam, and Y. Zhao. Preliminary Results from a Parallel MATLAB Compiler. In Proceedings of Int. Parallel Processing Symp., IPPS, pages 81--87, 1998.
[19]
L. D. Rose and D. Padua. Techniques for the translation of MATLAB programs into Fortran 90. ACM Trans. Program. Lang. Syst., 21(2):286--323, 1999.
[20]
Scipy.org. Numpy. http://www.numpy.org/.
[21]
T. Soh. Design and implementation of a DSL based on Ruby for parallel programming. Technical report, The University of Tokyo, Jan. 2011.
[22]
H. Wei, H. Tan, X. Liu, and J. Yu. StreamX10: a stream programming framework on X10. In Proceedings of the 2012 ACM SIGPLAN X10 Workshop, X10 '12, pages 1:1--1:6, New York, NY, USA, 2012. ACM.

Cited By

View all
  • (2020)HorseIR: bringing array programming languages together with database query processingACM SIGPLAN Notices10.1145/3393673.327695153:8(37-49)Online publication date: 6-Apr-2020
  • (2020)Compilation of MATLAB computations to CPU/GPU via C/OpenCL generationConcurrency and Computation: Practice and Experience10.1002/cpe.585432:22Online publication date: Jun-2020
  • (2019)A stage-polymorphic IR for compiling MATLAB-style dynamic tensor expressionsProceedings of the 18th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences10.1145/3357765.3359514(34-47)Online publication date: 21-Oct-2019
  • Show More Cited By

Index Terms

  1. MIX10: compiling MATLAB to X10 for high performance

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    OOPSLA '14: Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications
    October 2014
    946 pages
    ISBN:9781450325851
    DOI:10.1145/2660193
    • cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 49, Issue 10
      OOPSLA '14
      October 2014
      907 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2714064
      • Editor:
      • Andy Gill
      Issue’s Table of Contents
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    In-Cooperation

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 15 October 2014

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. matlab
    2. source-to-source compiler
    3. x10

    Qualifiers

    • Research-article

    Funding Sources

    Conference

    SPLASH '14
    Sponsor:

    Acceptance Rates

    OOPSLA '14 Paper Acceptance Rate 52 of 186 submissions, 28%;
    Overall Acceptance Rate 268 of 1,244 submissions, 22%

    Upcoming Conference

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)5
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 25 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2020)HorseIR: bringing array programming languages together with database query processingACM SIGPLAN Notices10.1145/3393673.327695153:8(37-49)Online publication date: 6-Apr-2020
    • (2020)Compilation of MATLAB computations to CPU/GPU via C/OpenCL generationConcurrency and Computation: Practice and Experience10.1002/cpe.585432:22Online publication date: Jun-2020
    • (2019)A stage-polymorphic IR for compiling MATLAB-style dynamic tensor expressionsProceedings of the 18th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences10.1145/3357765.3359514(34-47)Online publication date: 21-Oct-2019
    • (2018)HorseIR: bringing array programming languages together with database query processingProceedings of the 14th ACM SIGPLAN International Symposium on Dynamic Languages10.1145/3276945.3276951(37-49)Online publication date: 24-Oct-2018
    • (2017)A MATLAB subset to C compiler targeting embedded systemsSoftware—Practice & Experience10.1002/spe.240847:2(249-272)Online publication date: 1-Feb-2017
    • (2016)Efficiently implementing the copy semantics of MATLAB's arrays in JavaScriptACM SIGPLAN Notices10.1145/3093334.298923552:2(72-83)Online publication date: 1-Nov-2016
    • (2015)Techniques for efficient MATLAB-to-C compilationProceedings of the 2nd ACM SIGPLAN International Workshop on Libraries, Languages, and Compilers for Array Programming10.1145/2774959.2774961(7-12)Online publication date: 13-Jun-2015
    • (2020)Compilation of MATLAB computations to CPU/GPU via C/OpenCL generationConcurrency and Computation: Practice and Experience10.1002/cpe.585432:22Online publication date: Jun-2020
    • (2019)Characterization of a Wearable System for Automatic Supervision of Fitness ExercisesMeasurement10.1016/j.measurement.2019.07.038Online publication date: Jul-2019
    • (2018)Numerical predictions of laminar and turbulent forced convection: Lattice Boltzmann simulations using parallel librariesInternational Journal of Heat and Mass Transfer10.1016/j.ijheatmasstransfer.2017.09.072116(715-724)Online publication date: Jan-2018
    • Show More Cited By

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media