From 3bb3b3951656a31df4f97c8e3433e5c7a8691b7d Mon Sep 17 00:00:00 2001
From: Dimitrios Chasapis <dchasapi@bsc.es>
Date: Fri, 15 Dec 2023 15:31:04 +0100
Subject: [PATCH] added gpsmpi-2022a toolchain recipes for MUSA

---
 .../Dimemas-5.2.12-musa-gpsmpi-2022a.eb       | 42 ++++++++++++
 .../DynamoRIO/DynamoRIO-9.0.1-gpsmpi-2022a.eb | 29 +++++++++
 .../Extrae/Extrae-4.0.6-musa-gpsmpi-2022a.eb  | 64 +++++++++++++++++++
 Golden_Repo/m/MUSA/MUSA-3.1-gpsmpi-2022a.eb   | 20 ++++++
 Golden_Repo/m/mcxx/mcxx-2.3.0-gpsmpi-2022a.eb | 35 ++++++++++
 .../nanox-tasksim-nov2020-gpsmpi-2022a.eb     | 48 ++++++++++++++
 .../o/OmpSs/OmpSs-19.0.6-gpsmpi-2022a.eb      | 21 ++++++
 .../t/TaskSim/TaskSim-3.1-gpsmpi-2022a.eb     | 51 +++++++++++++++
 .../TaskSim_SRC-3.1-gpsmpi-2022a.eb           | 31 +++++++++
 9 files changed, 341 insertions(+)
 create mode 100644 Golden_Repo/d/Dimemas/Dimemas-5.2.12-musa-gpsmpi-2022a.eb
 create mode 100644 Golden_Repo/d/DynamoRIO/DynamoRIO-9.0.1-gpsmpi-2022a.eb
 create mode 100644 Golden_Repo/e/Extrae/Extrae-4.0.6-musa-gpsmpi-2022a.eb
 create mode 100644 Golden_Repo/m/MUSA/MUSA-3.1-gpsmpi-2022a.eb
 create mode 100644 Golden_Repo/m/mcxx/mcxx-2.3.0-gpsmpi-2022a.eb
 create mode 100644 Golden_Repo/n/nanox/nanox-tasksim-nov2020-gpsmpi-2022a.eb
 create mode 100644 Golden_Repo/o/OmpSs/OmpSs-19.0.6-gpsmpi-2022a.eb
 create mode 100644 Golden_Repo/t/TaskSim/TaskSim-3.1-gpsmpi-2022a.eb
 create mode 100644 Golden_Repo/t/TaskSim_SRC/TaskSim_SRC-3.1-gpsmpi-2022a.eb

diff --git a/Golden_Repo/d/Dimemas/Dimemas-5.2.12-musa-gpsmpi-2022a.eb b/Golden_Repo/d/Dimemas/Dimemas-5.2.12-musa-gpsmpi-2022a.eb
new file mode 100644
index 00000000..6b5e634b
--- /dev/null
+++ b/Golden_Repo/d/Dimemas/Dimemas-5.2.12-musa-gpsmpi-2022a.eb
@@ -0,0 +1,42 @@
+
+easyblock = 'ConfigureMake'
+
+name = 'Dimemas'
+version = '5.2.12-musa'
+
+homepage = 'https://tools.bsc.es/dimemas'
+
+description = """Dimemas is a performance analysis tool for message-passing programs. It enables the 
+user to develop and tune parallel applications on a workstation, while providing an accurate 
+prediction of their performance on the parallel target machine. The Dimemas simulator reconstructs 
+the time behavior of a parallel application on a machine modeled by a set of performance parameters. 
+Thus, performance experiments can be done easily. The supported target architecture classes include 
+networks of workstations, single and clustered SMPs, distributed memory parallel computers, and even 
+heterogeneous systems."""
+
+source_urls = ['https://github.com/dchasap/MUSA/releases/download/deepsea']
+sources = ['dimemas-5.2.12_musa.tar.gz']
+checksums = ['2cce45ed5a20c98a37d55c15cbd2ec8d6854922af0fc59717aed3c8637296ed0']
+
+toolchain = {'name': 'gpsmpi', 'version': '2022a'}
+
+builddependencies = [
+    ('Autotools', '20220317'),
+]
+
+dependencies = [
+    ('flex', '2.5.37'),
+    ('Boost', '1.79.0')
+]
+
+preconfigopts = 'autoreconf -fiv && '
+
+sanity_check_paths = {
+    'files': [],
+    'dirs': ['bin'],
+}
+
+
+modextravars = {'DIMEMAS_HOME': '%(installdir)s'}
+
+moduleclass = 'tools'
diff --git a/Golden_Repo/d/DynamoRIO/DynamoRIO-9.0.1-gpsmpi-2022a.eb b/Golden_Repo/d/DynamoRIO/DynamoRIO-9.0.1-gpsmpi-2022a.eb
new file mode 100644
index 00000000..e4b5b965
--- /dev/null
+++ b/Golden_Repo/d/DynamoRIO/DynamoRIO-9.0.1-gpsmpi-2022a.eb
@@ -0,0 +1,29 @@
+
+easyblock = 'Tarball'
+
+name = 'DynamoRIO'
+version = '9.0.1'
+
+homepage = 'https://dynamorio.org/'
+description = """DynamoRIO is a runtime code manipulation system that supports code transformations 
+on any part of a program, while it executes. DynamoRIO exports an interface for building dynamic 
+tools for a wide variety of uses: program analysis and understanding, profiling, instrumentation, 
+optimization, translation, etc. Unlike many dynamic tool systems, DynamoRIO is not limited to 
+insertion of callouts/trampolines and allows arbitrary modifications to application instructions 
+via a powerful IA-32/AMD64/ARM/AArch64 instruction manipulation library. DynamoRIO provides efficient, 
+transparent, and comprehensive manipulation of unmodified applications running on stock operating 
+systems (Windows, Linux, or Android, with experimental Mac support) and commodity IA-32, AMD64, ARM, 
+and AArch64 hardware."""
+
+source_urls = ['https://github.com/dchasap/MUSA/releases/download/deepsea']
+sources = ['DynamoRIO-Linux-9.0.1.tar.gz']
+checksums = ['52adbef5e22371f48e22bc980566bc9c3df1ffbe83276b1e3526316b52710817']
+
+toolchain = {'name': 'gpsmpi', 'version': '2022a'}
+
+sanity_check_paths = {
+    'files': [],
+    'dirs': ["lib64"],
+}
+
+modextravars = {'DR_PATH': '%(installdir)s/bin64/drrun'}
diff --git a/Golden_Repo/e/Extrae/Extrae-4.0.6-musa-gpsmpi-2022a.eb b/Golden_Repo/e/Extrae/Extrae-4.0.6-musa-gpsmpi-2022a.eb
new file mode 100644
index 00000000..251c1cb7
--- /dev/null
+++ b/Golden_Repo/e/Extrae/Extrae-4.0.6-musa-gpsmpi-2022a.eb
@@ -0,0 +1,64 @@
+# Built with EasyBuild version 4.8.0 on 2023-09-13_12-17-50
+# Built with EasyBuild version 4.5.1 on 2022-08-09_13-37-33
+# Built with EasyBuild version 4.5.1 on 2022-08-05_17-12-40
+# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild
+# Copyright:: Copyright 2013-2016 Juelich Supercomputing Centre, Germany
+# Authors::   Bernd Mohr <b.mohr@fz-juelich.de>
+# Authors::   Damian Alvarez <d.alvarez@fz-juelich.de>
+# License::   New BSD
+#
+# This work is based from experiences from the UNITE project
+# http://apps.fz-juelich.de/unite/
+##
+
+easyblock = 'ConfigureMake'
+
+name = "Extrae"
+version = "4.0.6-musa"
+
+homepage = 'http://www.bsc.es/computer-sciences/performance-tools'
+description = """Extrae is the core instrumentation package developed by the Performance Tools
+ group at BSC. Extrae is capable of instrumenting applications based on MPI, OpenMP, pthreads,
+ CUDA1, OpenCL1, and StarSs1 using different instrumentation approaches. The information gathered
+ by Extrae typically includes timestamped events of runtime calls, performance counters and source
+
+ code references. Besides, Extrae provides its own API to allow the user to manually instrument his
+ or her application.
+"""
+
+toolchain = {'name': 'gpsmpi', 'version': '2022a'}
+
+sources = [{
+    'source_urls': ['https://ftp.tools.bsc.es/extrae'],
+    'filename': 'extrae-4.0.6-src.tar.bz2'
+}]
+
+checksums = [
+    'b5060336cac57f1345faa09009b1940edf1e6991aae05cc10d0b714d31360a92',  # extrae-4.0.6-src.tar.bz2
+]
+
+builddependencies = [
+    ('Autotools', '20220317'),
+]
+
+dependencies = [
+    ('libunwind', '1.6.2'),
+    ('libxml2', '2.9.13'),
+    ('PAPI', '7.0.0'),
+    ('zlib', '1.2.12'),
+    ('CUDA', '11.7', '', SYSTEM)
+]
+
+preconfigopts = 'autoreconf -vif && '
+
+# Without Dyninst and without SIONlib
+configopts = '--enable-posix-clock --enable-openmp --enable-sampling '
+configopts += '--with-binutils=$EBROOTBINUTILS '
+configopts += '--with-mpi=$EBROOTPSMPI --with-papi=$EBROOTPAPI '
+configopts += '--with-unwind=$EBROOTLIBUNWIND --with-libz=$EBROOTZLIB '
+configopts += '--without-dyninst '
+configopts += '--with-cuda=$EBROOTCUDA --with-cupti=$EBROOTCUDA/extras/CUPTI '
+configopts += '--with-xml=$EBROOTLIBXML2 '
+configopts += 'MPICC=$EBROOTPSMPI/bin/mpicc'
+
+moduleclass = 'perf'
diff --git a/Golden_Repo/m/MUSA/MUSA-3.1-gpsmpi-2022a.eb b/Golden_Repo/m/MUSA/MUSA-3.1-gpsmpi-2022a.eb
new file mode 100644
index 00000000..4949c48e
--- /dev/null
+++ b/Golden_Repo/m/MUSA/MUSA-3.1-gpsmpi-2022a.eb
@@ -0,0 +1,20 @@
+# Built with EasyBuild version 4.5.1 on 2022-08-13_02-11-25
+
+easyblock = 'Bundle'
+
+name = 'MUSA'
+version = '3.1'
+
+homepage = 'https://github.com/dchasap/MUSA/releases/download/deepsea'
+
+description = "MUSA EasyBuild packages"
+
+toolchain = {'name': 'gpsmpi', 'version': '2022a'}
+
+dependencies = [
+    ('Dimemas', '5.2.12-musa'),
+    ('OmpSs', '19.0.6'),
+    ('TaskSim', '3.1')
+]
+
+modextravars = {'MUSA_HOME': '%(installdir)s'}
diff --git a/Golden_Repo/m/mcxx/mcxx-2.3.0-gpsmpi-2022a.eb b/Golden_Repo/m/mcxx/mcxx-2.3.0-gpsmpi-2022a.eb
new file mode 100644
index 00000000..7e80b206
--- /dev/null
+++ b/Golden_Repo/m/mcxx/mcxx-2.3.0-gpsmpi-2022a.eb
@@ -0,0 +1,35 @@
+
+easyblock = 'ConfigureMake'
+
+name = 'mcxx'
+version = '2.3.0'
+
+homepage = 'https://pm.bsc.es/mcxx'
+description = """Mercurium is a source-to-source compilation infrastructure aimed at fast prototyping. 
+Current supported languages are C, C++ and Fortran. Mercurium is mainly used in Nanos environment to 
+implement OpenMP but since it 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."""
+
+source_urls = ['https://github.com/dchasap/MUSA/releases/download/deepsea']
+sources = ['mcxx-2.3.0.tar.gz']
+checksums = ['49caed5566e0d15b2b5b26b05a5e9c7471363736422cb66f4510780f4b497234']
+
+toolchain = {'name': 'gpsmpi', 'version': '2022a'}
+
+builddependencies = [
+    ('Autotools', '20220317'),
+]
+
+dependencies = [
+    ('Python', '2.7.18', '-bare'),
+    ('SQLite', '3.38.3'),
+    ('nanox', 'tasksim-nov2020')
+]
+
+preconfigopts = 'autoreconf -vif && '
+
+configopts = '--enable-ompss '
+configopts += '--with-nanox=$EBROOTNANOX'
+
+moduleclass = 'compiler'
diff --git a/Golden_Repo/n/nanox/nanox-tasksim-nov2020-gpsmpi-2022a.eb b/Golden_Repo/n/nanox/nanox-tasksim-nov2020-gpsmpi-2022a.eb
new file mode 100644
index 00000000..b102d609
--- /dev/null
+++ b/Golden_Repo/n/nanox/nanox-tasksim-nov2020-gpsmpi-2022a.eb
@@ -0,0 +1,48 @@
+easyblock = 'ConfigureMake'
+
+name = 'nanox'
+version = 'tasksim-nov2020'
+
+homepage = 'https://pm.bsc.es/nanox'
+
+description = """Nanox/Nanos++ is a runtime designed to serve as runtime support in parallel 
+environments. It is mainly used to support OmpSs, a extension to OpenMP developed at BSC. It 
+also has modules to support OpenMP."""
+
+source_urls = ['https://github.com/dchasap/MUSA/releases/download/deepsea']
+sources = ['nanox-tasksim-nov2020.tar.gz']
+checksums = ['0af76fe7cbe5678dbaddd705b89ce9b2f815d596b05d064b05e053adc5ce886f']
+
+toolchain = {'name': 'gpsmpi', 'version': '2022a'}
+
+builddependencies = [
+    ('Autotools', '20220317'),
+]
+
+dependencies = [
+    ('PAPI', '7.0.0'),
+    ('TaskSim_SRC', '3.1'),
+    ('Extrae', '4.0.6-musa')
+]
+
+preconfigopts = 'autoreconf -vif && '
+
+configopts = '--with-papi=$EBROOTPAPI'
+configopts += ' --with-mpi=$EBROOTPSMPI'
+configopts += ' --with-mpi-include-path=$EBROOTPSMPI/include'
+configopts += ' --with-mpi-lib-path=$EBROOTPSMPI/lib'
+configopts += ' --with-nextsim=$EBROOTTASKSIM_SRC'
+configopts += ' --with-extrae=$EBROOTEXTRAE'
+configopts += ' --disable-allocator'
+configopts += ' --disable-debug'
+
+install_cmd = "make install && cp -rf ./src %(installdir)s/"
+
+sanity_check_paths = {
+    'files': [],
+    'dirs': ['src', 'lib'],
+}
+
+hidden = True
+
+moduleclass = 'perf'
diff --git a/Golden_Repo/o/OmpSs/OmpSs-19.0.6-gpsmpi-2022a.eb b/Golden_Repo/o/OmpSs/OmpSs-19.0.6-gpsmpi-2022a.eb
new file mode 100644
index 00000000..6dcc7858
--- /dev/null
+++ b/Golden_Repo/o/OmpSs/OmpSs-19.0.6-gpsmpi-2022a.eb
@@ -0,0 +1,21 @@
+
+easyblock = 'Bundle'
+
+name = 'OmpSs'
+version = '19.0.6'
+
+homepage = 'https://pm.bsc.es/ompss'
+description = """OmpSs is an effort to integrate features from the StarSs programming model developed 
+at BSC into a single programming model. In particular, our objective is to extend OpenMP with new 
+directives to support asynchronous parallelism and heterogeneity (devices like GPUs, FPGAs). However, 
+it can also be understood as new directives extending other accelerator-based APIs like CUDA or OpenCL.
+Our OmpSs environment is built on top of our Mercurium compiler and Nanos++ runtime system."""
+
+toolchain = {'name': 'gpsmpi', 'version': '2022a'}
+
+dependencies = [
+    ('nanox', 'tasksim-nov2020'),
+    ('mcxx', '2.3.0'),
+]
+
+moduleclass = 'perf'
diff --git a/Golden_Repo/t/TaskSim/TaskSim-3.1-gpsmpi-2022a.eb b/Golden_Repo/t/TaskSim/TaskSim-3.1-gpsmpi-2022a.eb
new file mode 100644
index 00000000..5f23a153
--- /dev/null
+++ b/Golden_Repo/t/TaskSim/TaskSim-3.1-gpsmpi-2022a.eb
@@ -0,0 +1,51 @@
+
+easyblock = 'ConfigureMake'
+
+name = 'TaskSim'
+version = '3.1'
+
+homepage = 'https://github.com/dchasap/MUSA/releases/download/deepsea'
+
+description = """TaskSim is a trace driven architectural simulator that can simulate high level 
+OpenMP/OmpSs runtime events as well as low level instructions (This only install the source files 
+required by Nanos++ for instrumentation)."""
+
+source_urls = ['https://github.com/dchasap/MUSA/releases/download/deepsea']
+sources = ['tasksim-3.1_profet.tar.gz']
+checksums = ['b9ad629b5c709571547595a205583696746c30c24d1189f222596e761a55038f']
+
+toolchain = {'name': 'gpsmpi', 'version': '2022a'}
+
+builddependencies = [
+    ('Autotools', '20220317')
+]
+
+dependencies = [
+    ('OmpSs', '19.0.6'),
+    ('DynamoRIO', '9.0.1'),
+    ('Ramulator', '0.0')
+]
+
+preconfigopts = 'autoreconf -vif && '
+
+configopts = '--enable-nanox '
+configopts += '--with-nanox-src-path=$EBROOTNANOX '
+configopts += '--with-nanox-install-path=$EBROOTNANOX '
+configopts += '--enable-paraver '
+configopts += '--enable-mpi '
+configopts += '--with-mpi-install-path=$EBROOTPSMPI '
+configopts += '--with-dr-path=$EBROOTDYNAMORIO '
+configopts += '--enable-ramulator '
+configopts += '--with-ramulator-src-path=$EBROOTRAMULATOR '
+configopts += '--with-ramulator-lib-path=$EBROOTRAMULATOR '
+configopts += '--enable-compressed-traces '
+configopts += '--with-only-tasksim '
+configopts += '--enable-timestats traceformat=rle'
+
+modextravars = {'TS_PHASE_WRAPPER': '%(installdir)s/lib/libtsmpi.so',
+                'TS_MPI_LIB': '%(installdir)s/lib/libtsmpi.so',
+                'EXTRAE_CONFIG_FILE':  '%(installdir)s/etc/examples/step1_tracing/extrae.xml',
+                'DRTOOL_PATH': '%(installdir)s/lib/libompss-drtrace.so'}
+
+
+moduleclass = 'tools'
diff --git a/Golden_Repo/t/TaskSim_SRC/TaskSim_SRC-3.1-gpsmpi-2022a.eb b/Golden_Repo/t/TaskSim_SRC/TaskSim_SRC-3.1-gpsmpi-2022a.eb
new file mode 100644
index 00000000..37ce392c
--- /dev/null
+++ b/Golden_Repo/t/TaskSim_SRC/TaskSim_SRC-3.1-gpsmpi-2022a.eb
@@ -0,0 +1,31 @@
+easyblock = 'CmdCp'
+
+name = 'TaskSim_SRC'
+version = '3.1'
+
+homepage = 'https://github.com/dchasap/MUSA/releases/download/deepsea'
+
+description = """TaskSim is a trace driven architectural simulator that can simulate high level 
+OpenMP/OmpSs runtime events as well as low level instructions (This only install the source 
+files required by Nanos++ for instrumentation)."""
+
+source_urls = ['https://github.com/dchasap/MUSA/releases/download/deepsea']
+sources = ['tasksim-3.1_profet.tar.gz']
+checksums = ['0e3fc16814e11787397df84702d473dc15f3252c4d2f954217100d7d0e04231a']
+
+toolchain = {'name': 'gpsmpi', 'version': '2022a'}
+
+cmds_map = [
+    ('tasksim-3.1_profet.tar.gz', "mkdir -p %(installdir)s/include/nextsim"),
+]
+
+files_to_copy = [
+    (['%(builddir)s/tasksim-musa-3.1_profet/src/*'], '%(installdir)s/include/nextsim/'),
+]
+
+sanity_check_paths = {
+    'files': ['include/nextsim/core/trace/Trace.h'],
+    'dirs': ['include/nextsim']
+}
+
+moduleclass = 'tools'
-- 
GitLab