sys-cluster/mcxx: initial import

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2021-08-21 02:47:09 +02:00
parent 2575fc5f58
commit e378530982
3 changed files with 189 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST mcxx-2021.06.tar.gz 6363578 BLAKE2B 235dc2794814088d011b8c23031cd4e4727e2a76e98b099786501746912724b9ead20ee9653e732b60ae130df9eabff265763d2eb45e704f069385aca385931e SHA512 acf33bca00837687a8ad99163afbc6547341c3202148a79f766914ee22766aec7483d12e19f4d52c508898765ef24047f7c924ceda02a7efa32e270c3323bafb

View File

@@ -0,0 +1,153 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DOCS_BUILDER="doxygen"
DOCS_DIR="doc"
DOCS_CONFIG_NAME="doxygen_tl.in"
MYPV="github-release-${PV}"
PYTHON_COMPAT=( python3_{8..10} pypy3 )
inherit autotools flag-o-matic fortran-2 python-any-r1 docs
DESCRIPTION="C/C++/Fortran source-to-source compilation infrastructure aimed at fast prototyping"
HOMEPAGE="https://github.com/bsc-pm/mcxx"
SRC_URI="https://github.com/bsc-pm/mcxx/archive/refs/tags/${MYPV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${MYPV}"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+analysis array-descriptors bison-reporting examples extrae +mpi +nanox ompss ompss2 +opencl openmp +quad tcl test tl-openmp-gomp tl-openmp-profile vectorization"
CDEPEND="
dev-db/sqlite
extrae? ( sys-cluster/extrae )
mpi? ( virtual/mpi )
nanox? ( sys-cluster/nanox )
ompss2? ( sys-cluster/nanos6 )
tcl? ( sys-cluster/TCL )
"
DEPEND="
${CDEPEND}
${PYTHON_DEPS}
opencl? ( dev-util/opencl-headers )
"
RDEPEND="
${CDEPEND}
opencl? ( virtual/opencl )
"
BDEPEND="
dev-util/gperf
sys-devel/flex
virtual/pkgconfig
virtual/yacc
"
RESTRICT="!test? ( test )"
REQUIRED_USE="
mpi? ( nanox )
ompss? ( nanox )
opencl? ( nanox )
openmp? ( nanox )
!analysis? ( !vectorization )
"
pkg_setup() {
fortran-2_pkg_setup
}
src_prepare() {
default
eautoreconf
}
src_configure() {
# https://github.com/bsc-pm/mcxx/issues/36
filter-ldflags -Wl,--as-needed
local myconf=(
--disable-cray-compilers
--disable-distcheck-processing
--disable-ibm-compilers
--disable-intel-compilers
--disable-pgi-compilers
--disable-mic
--disable-mic-testing
--disable-nanox-cuda-device
--disable-nanox-fpga-device
--enable-bison-regeneration
--enable-file-regeneration
--enable-flex-regeneration
--enable-gperf-regeneration
--enable-shared
--without-intel-omp
--without-nanox-mic
--without-svml
$(use_enable analysis)
$(use_enable array-descriptors gfortran-8-or-greater-array-descriptors )
$(use_enable bison-reporting)
$(use_enable examples tl-examples)
$(use_enable extrae)
$(use_enable mpi nanox-mpi-device)
$(use_enable ompss)
$(use_enable ompss2 ompss-2)
$(use_enable opencl nanox-opencl-device)
$(use_enable openmp)
$(use_enable quad float128)
$(use_enable quad int128)
$(use_enable test fortran-tests)
$(use_enable tl-openmp-gomp)
$(use_enable tl-openmp-profile)
$(use_enable vectorization)
)
if use extrae; then
myconf+=( "--with-extrae=${EPREFIX}/usr" )
myconf+=( "--with-extrae-lib=${EPREFIX}/usr/$(get_libdir)" )
else
myconf+=( "--without-extrae" )
fi
if use mpi; then
myconf+=( "--with-mpi=${EPREFIX}/usr" )
else
myconf+=( "--without-mpi" )
fi
if use nanox; then
myconf+=( "--with-nanox=${EPREFIX}/usr" )
else
myconf+=( "--without-nanox" )
fi
if use ompss2; then
myconf+=( "--with-nanos6=${EPREFIX}/usr" )
myconf+=( "--with-nanos6-lib=${EPREFIX}/usr/$(get_libdir)" )
else
myconf+=( "--without-nanos6" )
fi
if use tcl; then
myconf+=( "--with-tcl=${EPREFIX}/usr" )
myconf+=( "--with-tcl-lib=${EPREFIX}/usr/$(get_libdir)" )
else
myconf+=( "--without-tcl" )
fi
use tl-openmp-gomp && myconf+=( "--with-gomp=${EPREFIX}/usr" )
econf "${myconf[@]}"
}
src_compile() {
default
docs_compile
}
src_install() {
default
einstalldocs
find "${D}" -name '*.la' -delete || die
}

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>lssndrbarbieri@gmail.com</email>
<name>Alessandro Barbieri</name>
</maintainer>
<longdescription lang="en">
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 used, together with the Nanos++ Runtime Library, to implement the OmpSs programming model. Both tools provide also an implementation of OpenMP 3.1. More recently, Mercurium has been also used to implement the OmpSs-2 programming model together with the Nanos6 Runtime Library.
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).
</longdescription>
<upstream>
<remote-id type="github">bsc-pm/mcxx</remote-id>
</upstream>
<use>
<flag name="analysis">Enables analysis phase</flag>
<flag name="array-descriptors">Enable GNU Fortran compiler &gt; 8 array descriptors</flag>
<flag name="bison-reporting">Use this when debugging bison grammars</flag>
<flag name="examples">Build and install TL example phases</flag>
<flag name="extrae">Enables Extrae instrumentation of Mercurium itself</flag>
<flag name="mpi">Enables the MPI Nanos++ Lowering phase in Mercurium</flag>
<flag name="nanox">Enables support for Nanos++</flag>
<flag name="ompss">Enables support of OmpSs Programming Model using Nanos++</flag>
<flag name="ompss2">Enables support of OmpSs-2 using Nanos6</flag>
<flag name="opencl">Enables the OpenCL Nanos++ Lowering phase in Mercurium</flag>
<flag name="openmp">Enables support of OpenMP using Nanos++</flag>
<flag name="quad">Enables support for __float128 and __int128. It also enables REAL(KIND=16) and INTEGER(KIND=16) in Fortran</flag>
<flag name="tcl">Enable support for Transparent Checkpoint Library</flag>
<flag name="tl-openmp-gomp">Enables support of OpenMP TL for GOMP (EXPERIMENTAL and UNSUPPORTED)</flag>
<flag name="tl-openmp-profile">Enables support of OpenMP profile mode</flag>
<flag name="vectorization">Enables Vectorization phase</flag>
</use>
</pkgmetadata>