Giter Site home page Giter Site logo

rofirrim / mcxx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bsc-pm/mcxx

0.0 1.0 0.0 39.04 MB

Mercurium C/C++/Fortran source-to-source compiler

Home Page: http://pm.bsc.es/mcxx

License: GNU Lesser General Public License v3.0

Makefile 0.61% Shell 0.33% M4 0.64% C 55.74% Python 0.37% C++ 37.40% Lex 0.32% Yacc 0.22% Fortran 4.35% Cuda 0.01%

mcxx's Introduction

Mercurium C/C++/Fortran source-to-source compiler

Build Status

Mercurium is a C/C++/Fortran source-to-source compilation infrastructure aimed at fast prototyping developed by the Programming Models group at the Barcelona Supercomputing Center.

Mercurium is mainly used together with the Nanos++ Runtime Library to implement the OmpSs programming model. Both tools also implement OpenMP 3.1. Apart from that, since Mercurium is quite extensible it has been used to implement other programming models or compiler transformations, examples include Cell Superscalar, Software Transactional Memory, Distributed Shared Memory or the ACOTES project, just to name a few.

Extending Mercurium is achieved using a plugin architecture, where plugins represent several phases of the compiler. These plugins are written in C++ and dynamically loaded by the compiler according to the chosen profile configuration. Code transformations can be implemented in terms of source code (there is no need to modify or know the internal syntactic representation of the compiler).

Installation

  1. Make sure you fulfill the build requirements

  2. Download Mercurium's code

    1. From our repo
      • Clone Mercurium's repository

        • From GitHub:

            $ git clone https://github.com/bsc-pm/mcxx.git
          
        • From our internal GitLab repository (BSC users only):

            $ git clone https://pm.bsc.es/gitlab/mercurium/mcxx.git
          
      • Run autoreconf in the newly created mcxx directory

          $ cd mcxx
          $ autoreconf -fiv
          <<<autoreconf output>>>
        
    2. From a distributed tarball
      • Go to OmpSs downloads and grab the latest version of the compiler. Unpack the file and enter in the directory

          $ tar xvzf mcxx-<<version>>.tar.gz
          $ cd mcxx-<<version>>
        
  3. Run configure. Check the configure flags to enable more or less features in the compiler. By default the compiler does not have anything enabled. Set the environment variable MERCURIUM to the directory where you want to install Mercurium

     $ export MERCURIUM=/path/to/install/mercurium
     $ ./configure --prefix=$MERCURIUM <<configure-flags>>
    
  4. Build and install

     $ make
     <<<compilation output>>>
     $ make install
    
  5. Add the installed binaries to your PATH

     $ export PATH=$MERCURIUM:$PATH
    

And that's all!

Mercurium profiles

Depending on the configure flags used to configure Mercurium, you may have some Mercurium profiles or others. A Mercurium profile is basically a binary with a predefined configuration that specifies the behavior of Mercurium. For example, a profile specifies which phases of Mercurium have to be executed or which backend compiler will be used.

Any installation of Mercurium has, at least, the plain profiles (plaincc, plaincxx and plainfc for C, C++ and Fortran languages respectively). These profiles do not transform any OpenMP/OmpSs pragma, they basically process your code and generate it again. They may seem useless, but they are really useful when debugging our compiler frontend.

For more information check our list of Mercurium's profiles.

Contact Information

For questions, suggestions and bug reports, you can contact us through the [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.