{"id":19297254,"url":"https://github.com/bsc-pm/mcxx","last_synced_at":"2025-04-22T09:30:30.991Z","repository":{"id":47048868,"uuid":"60191570","full_name":"bsc-pm/mcxx","owner":"bsc-pm","description":"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","archived":false,"fork":false,"pushed_at":"2023-11-21T11:57:12.000Z","size":42200,"stargazers_count":70,"open_issues_count":11,"forks_count":23,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-09T23:02:24.890Z","etag":null,"topics":["compiler","ompss","openmp","source-to-source"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bsc-pm.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support/gomp_omp/gomp-omp.h","governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-01T16:02:42.000Z","updated_at":"2024-10-11T15:46:16.000Z","dependencies_parsed_at":"2024-11-09T23:02:10.625Z","dependency_job_id":"d00393a8-1637-4926-a597-79afbd217fb2","html_url":"https://github.com/bsc-pm/mcxx","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsc-pm%2Fmcxx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsc-pm%2Fmcxx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsc-pm%2Fmcxx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsc-pm%2Fmcxx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsc-pm","download_url":"https://codeload.github.com/bsc-pm/mcxx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250214918,"owners_count":21393697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","ompss","openmp","source-to-source"],"created_at":"2024-11-09T23:01:49.491Z","updated_at":"2025-04-22T09:30:27.469Z","avatar_url":"https://github.com/bsc-pm.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# Mercurium C/C++/Fortran source-to-source compiler\n\nMercurium is a C/C++/Fortran source-to-source compilation infrastructure aimed at fast\nprototyping developed by the [*Programming Models group*](https://pm.bsc.es/)\nat the [**Barcelona Supercomputing Center**](http://www.bsc.es/).\n\nMercurium is used, together with the [Nanos++ Runtime Library](https://github.com/bsc-pm/nanox),\nto implement the [**OmpSs programming model**](https://pm.bsc.es/ompss). Both\ntools provide also an implementation of [**OpenMP 3.1**](https://pm.bsc.es/openmp).\nMore recently, Mercurium has been also used to implement the\n[**OmpSs-2 programming model**](https://pm.bsc.es/ompss-2) together with the\n[Nanos6 Runtime Library](https://github.com/bsc-pm/nanos6).\n\nApart from that, since Mercurium is quite extensible it has been used to\nimplement other programming models or compiler transformations, examples\ninclude Cell Superscalar, Software Transactional Memory, Distributed Shared\nMemory or the ACOTES project, just to name a few.\n\nExtending Mercurium is achieved using a plugin architecture, where plugins\nrepresent several phases of the compiler. These plugins are written in C++ and\ndynamically loaded by the compiler according to the chosen profile\nconfiguration. Code transformations can be implemented in terms of source code\n(there is no need to modify or know the internal syntactic representation of\nthe compiler).\n\n## Installation\n\n1. Make sure you fulfill the [build requirements](doc/md_pages/build_requirements.md)\n2. Download Mercurium's code\n    1. From our repo\n        * Clone Mercurium's repository\n\n            - From GitHub:\n\n                    $ git clone https://github.com/bsc-pm/mcxx.git\n            - From our internal GitLab repository (BSC users only):\n\n                    $ git clone https://pm.bsc.es/gitlab/mercurium/mcxx.git\n        * Run `autoreconf` in the newly created `mcxx` directory\n\n                $ cd mcxx\n                $ autoreconf -fiv\n                \u003c\u003c\u003cautoreconf output\u003e\u003e\u003e\n    2. From a distributed tarball\n        * Go to [OmpSs downloads](https://pm.bsc.es/ompss-downloads) and grab the\n          latest version of the compiler. Unpack the file and enter in the directory\n\n                $ tar xvzf mcxx-\u003c\u003cversion\u003e\u003e.tar.gz\n                $ cd mcxx-\u003c\u003cversion\u003e\u003e\n3. Run `configure`. Check the [configure flags](doc/md_pages/configure_flags.md) to\n    enable more or less features in the compiler. By default the compiler does\n    not have anything enabled. Set the environment variable `MERCURIUM` to the\n    directory where you want to install Mercurium\n\n        $ export MERCURIUM=/path/to/install/mercurium\n        $ ./configure --prefix=$MERCURIUM \u003c\u003cconfigure-flags\u003e\u003e\n4. Build and install\n\n        $ make\n        \u003c\u003c\u003ccompilation output\u003e\u003e\u003e\n        $ make install\n5. Add the installed binaries to your `PATH`\n\n        $ export PATH=$MERCURIUM:$PATH\n\nAnd that's all!\n\n## Mercurium profiles\n\nDepending on the [configure flags](doc/md_pages/configure_flags.md) used to configure\nMercurium, you may have some Mercurium profiles or others. A Mercurium profile\nis basically a file with a predefined configuration that specifies the\nbehavior of Mercurium. For example, a profile specifies which phases of\nMercurium have to be executed or which backend compiler should be used.\n\nAny installation of Mercurium has, at least, the `plain` profiles (`plaincc`,\n`plaincxx` and `plainfc` for C, C++ and Fortran languages respectively). These\nprofiles do not transform any OpenMP/OmpSs pragma, they basically process your\ncode and generate it again.\n\nFor more information check our list of [Mercurium's profiles](doc/md_pages/profiles.md).\n\n## Contact Information\n\nFor questions, suggestions and bug reports, you can contact us through the pm-tools@bsc.es\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsc-pm%2Fmcxx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsc-pm%2Fmcxx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsc-pm%2Fmcxx/lists"}