Skip to content
Snippets Groups Projects
Commit fa2d9dc0 authored by Marc Jordà's avatar Marc Jordà
Browse files

Easyconfig files for ecoHMEM and some dependencies

parent bed918c3
No related branches found
No related tags found
No related merge requests found
Showing with 362 additions and 0 deletions
easyblock = 'ConfigureMake'
name = "Extrae"
version = "4.0.3.ecoHMEM"
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': 'gompi', 'version': '2022a'}
toolchainopts = {"usempi": True}
source_urls = ['https://ftp.tools.bsc.es/extrae/']
sources = ['extrae-4.0.3-src.tar.bz2']
patches = [
'file_offset_fix.patch',
'merger_segfault_workaround.patch',
'random_deadlock_workaround.patch',
'change_libdwarf_path.patch',
]
checksums = [
'0d87509ec03584a629a879dccea10cf334f8243004077f6af3745aabb31e7250',
# file_offset_fix.patch
'bf67a2fe1af1eb5f068c776c6b665a53040c0979e129d1647ae68333168abc7f',
# merger_segfault_workaround.patch
'162f38c7bc6513b06f19527a62bdaab888568cb4cfe8bc0ce69a58133bfb13b5',
# random_deadlock_workaround.patch
'f7f876efdaeaa36f37b9a92844e53056fa66875e0ed1f197589538216b7dc8a6',
# change_libdwarf_path.patch
'74759b956246671a323acc3b267f9943bc2e190bb231259ad0c62784ec233a52',
]
builddependencies = [
('Autotools', '20220317'),
]
dependencies = [
('libunwind', '1.6.2'),
('libxml2', '2.9.13'),
('PAPI', '7.0.0'),
('Boost', '1.79.0'),
('libdwarf', '0.4.1'),
('zlib', '1.2.12'),
('CUDA', '11.7', '', SYSTEM)
]
preconfigopts = 'autoreconf -vif && '
configopts = '--enable-posix-clock --enable-openmp --enable-sampling'
configopts += ' --with-binutils="$EBROOTBINUTILS" --with-boost="$EBROOTBOOST" --with-dwarf="$EBROOTLIBDWARF"'
configopts += ' --with-mpi="$EBROOTOPENMPI" --with-papi="$EBROOTPAPI" --with-unwind="$EBROOTLIBUNWIND"'
configopts += ' --with-libz="$EBROOTZLIB" --without-dyninst'
moduleclass = 'perf'
# Change path to the libdwarf headers and adjust the aclocal version, since we change the *.m4 file too
# Author: maxim-masterov
diff -Nru extrae-4.0.4.orig/config/macros.m4 extrae-4.0.4/config/macros.m4
--- extrae-4.0.4.orig/config/macros.m4 2023-06-05 11:16:01.296643000 +0200
+++ extrae-4.0.4/config/macros.m4 2023-06-05 11:21:10.535531000 +0200
@@ -1666,8 +1666,8 @@
if test -f "${DWARF_HOME}/include/libdwarf.h" -a \
-f "${DWARF_HOME}/include/dwarf.h" ; then
libdwarf_found="yes"
- elif test -f "${DWARF_HOME}/include/libdwarf/libdwarf.h" -a \
- -f "${DWARF_HOME}/include/libdwarf/dwarf.h" ; then
+ elif test -f "${DWARF_HOME}/include/libdwarf-0/libdwarf.h" -a \
+ -f "${DWARF_HOME}/include/libdwarf-0/dwarf.h" ; then
libdwarf_found="yes"
else
AC_MSG_ERROR([Cannot find DWARF header files in ${dwarf_paths}/include])
@@ -1678,8 +1678,8 @@
-f "${DWARF_HOME}/include/dwarf.h" ; then
libdwarf_found="yes"
DWARF_LIBSDIR="${DWARF_LIBSDIR_MULTIARCH}"
- elif test -f "${DWARF_HOME}/include/libdwarf/libdwarf.h" -a \
- -f "${DWARF_HOME}/include/libdwarf/dwarf.h" ; then
+ elif test -f "${DWARF_HOME}/include/libdwarf-0/libdwarf.h" -a \
+ -f "${DWARF_HOME}/include/libdwarf-0/dwarf.h" ; then
libdwarf_found="yes"
DWARF_LIBSDIR="${DWARF_LIBSDIR_MULTIARCH}"
else
diff -Nru extrae-4.0.4.orig/configure extrae-4.0.4/configure
--- extrae-4.0.4.orig/configure 2023-06-05 11:16:01.298502695 +0200
+++ extrae-4.0.4/configure 2023-06-05 11:32:55.962736435 +0200
@@ -4683,7 +4683,7 @@
fi
# Initialize automake
-am__api_version='1.13'
+am__api_version='1.16'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -30469,8 +30469,8 @@
if test -f "${DWARF_HOME}/include/libdwarf.h" -a \
-f "${DWARF_HOME}/include/dwarf.h" ; then
libdwarf_found="yes"
- elif test -f "${DWARF_HOME}/include/libdwarf/libdwarf.h" -a \
- -f "${DWARF_HOME}/include/libdwarf/dwarf.h" ; then
+ elif test -f "${DWARF_HOME}/include/libdwarf-0/libdwarf.h" -a \
+ -f "${DWARF_HOME}/include/libdwarf-0/dwarf.h" ; then
libdwarf_found="yes"
else
as_fn_error $? "Cannot find DWARF header files in ${dwarf_paths}/include" "$LINENO" 5
@@ -30481,8 +30481,8 @@
-f "${DWARF_HOME}/include/dwarf.h" ; then
libdwarf_found="yes"
DWARF_LIBSDIR="${DWARF_LIBSDIR_MULTIARCH}"
- elif test -f "${DWARF_HOME}/include/libdwarf/libdwarf.h" -a \
- -f "${DWARF_HOME}/include/libdwarf/dwarf.h" ; then
+ elif test -f "${DWARF_HOME}/include/libdwarf-0/libdwarf.h" -a \
+ -f "${DWARF_HOME}/include/libdwarf-0/dwarf.h" ; then
libdwarf_found="yes"
DWARF_LIBSDIR="${DWARF_LIBSDIR_MULTIARCH}"
else
--- extrae-4.0.3-orig/src/merger/paraver/addr2info.c 2023-03-03 11:58:15.000000000 +0100
+++ extrae-4.0.3-mod/src/merger/paraver/addr2info.c 2023-03-23 14:37:30.467657000 +0100
@@ -362,7 +362,6 @@
// (even if ASLR is disabled) because LD_PRELOADing alters the addresses from the libs
// Main binary addresses are given with absolute references
const char * mainbinary = ObjectTable_GetBinaryObjectName (ptask, task);
- UINT64 base_address;
buffer[0] = (char)0;
for (i = 0; i < MAX_CALLERS; i++)
{
@@ -371,23 +370,25 @@
binary_object_t * obj = ObjectTable_GetBinaryObjectAt (ptask, task, calleraddresses[i]);
const char * module;
+ UINT64 base_address = 0;
+ UINT64 offset = 0;
if (obj != NULL)
{
module = obj->module;
- base_address = (strcmp (mainbinary, module) != 0) ? obj->start_address : 0;
+ if (strcmp (mainbinary, module) != 0)
+ {
+ base_address = obj->start_address;
+ offset = obj->offset;
+ }
}
else
{
if (getenv("EXTRAE_DEBUG"))
fprintf (stderr, "DEBUG: cannot translate address %08lx \n", calleraddresses[i]);
module = "Unknown";
- base_address = 0;
}
- if (strlen(buffer) > 0)
- snprintf (tmp, sizeof(tmp), " > %s!%08lx", module, calleraddresses[i] - base_address);
- else
- snprintf (tmp, sizeof(tmp), "%s!%08lx", module, calleraddresses[i] - base_address);
+ snprintf (tmp, sizeof(tmp), "%s%s!%08lx", strlen(buffer) > 0 ? " > " : "", module, (calleraddresses[i] - base_address) + offset);
strncat (buffer, tmp, sizeof(buffer));
}
}
--- extrae-4.0.3-orig/src/merger/paraver/file_set.c 2023-03-06 11:38:13.000000000 +0100
+++ extrae-4.0.3-mod/src/merger/paraver/file_set.c 2023-03-14 14:03:47.755695000 +0100
@@ -1032,7 +1032,7 @@
for (file = 0; file < fset->nfiles; file++)
{
current = Current_FS (&(fset->files[file]));
- while ((current != NULL) && ((current->event == CPU_BURST_EV) || (current->event == MPI_STATS_EV)))
+ while ((current != NULL) && ((current->event == CPU_BURST_EV) || (current->event == MPI_STATS_EV) || (current->event == 0 && current->time == 0)))
{
StepOne_FS (&(fset->files[file]));
current = Current_FS (&(fset->files[file]));
--- extrae-4.0.3-orig/src/tracer/sampling/timer/sampling-timer.c 2022-03-25 17:12:51.000000000 +0100
+++ extrae-4.0.3-mod/src/tracer/sampling/timer/sampling-timer.c 2023-03-14 14:03:47.802827000 +0100
@@ -106,10 +106,27 @@
static void PrepareNextAlarm (void)
{
+#define STATE_LEN 128 // TODO what size should we use? docs say powers of 2 from 8 to 256, no idea what random() uses
+ static int inited = 0;
+ static char statebuf[STATE_LEN];
+ static struct random_data rd;
+
+ if (! inited) {
+ int err = initstate_r(666, statebuf, STATE_LEN, &rd);
+ if (err != 0) fprintf (stderr, PACKAGE_NAME": Error! initstate_r failed: %d\n", errno);
+ inited = 1;
+ }
+#undef STATE_LEN
+
/* Set next timer! */
if (Sampling_variability > 0)
{
- long int r = random();
+ //long int r = random();
+ int random_value;
+ int err = random_r(&rd, &random_value);
+ if (err != 0) fprintf (stderr, PACKAGE_NAME": Error! random_r failed: %d\n", errno);
+ long int r = random_value;
+
unsigned long long v = r%(Sampling_variability);
unsigned long long s, us;
easyblock = 'MakeCp'
name = "ecoHMEM"
version = "1.0.5"
homepage = ''
description = """
"""
toolchain = {'name': 'GCCcore', 'version': '11.3.0'}
sources = [{
'filename': 'ecoHMEM.tar.gz',
'git_config': {
'url': 'https://github.com/accelcom-bsc',
'repo_name': 'ecoHMEM',
'tag': 'v{}'.format(version),
},
}]
dependencies = [
('Boost', '1.79.0'),
]
build_cmd = 'make -C src BOOST_HOME=$EBROOTBOOST'
sanity_check_paths = {
'files': ['bin/hmem_advisor', 'bin/allocs_info'],
'dirs': ['bin/scripts', 'share']
}
files_to_copy = [
(['bin/hmem_advisor', 'bin/cfg_gen', 'bin/src'], 'bin'),
(['src/allocs_info'], 'bin'),
(['scripts'], 'bin'),
(['mem_confs'], 'share'),
(['extrae_confs'], 'share'),
(['example_conf.src'], 'share'),
(['readme.md', 'LICENSE', 'ChangeLog'], 'doc'),
]
name = 'Flexmalloc'
version = '16Jan24.ecoHMEM'
homepage = 'https://github.com/mjbsc/flexmalloc/tree/mpc_pmem_allocator'
description = 'Flexible Memory Allocation Tool for multi-tiered memory systems'
toolchain = {'name': 'GCCcore', 'version': '11.3.0'}
easyblock = 'ConfigureMake'
sources = [{
'filename': 'flexmalloc.tar.gz',
'git_config': {
'url': 'https://github.com/mjbsc',
'repo_name': 'flexmalloc',
'commit': '45a3749f6ea3d639b9749c2dbb24453ed20f73f4'
},
}]
checksums = [
'ff108e32e2f292e094ba2921e4d97cede3b15d88f12d9893af388d9ec8406b65',
]
dependencies = [
('memkind', '1.14.0', '', ('GCCcore', '11.3.0')),
('binutils', '2.38'),
('mpc-allocator', '0.2.ecoHMEM'),
]
configure_cmd_prefix = './autogen.sh && '
configopts = '--with-memkind=$EBROOTMEMKIND --with-binutils=$EBROOTBINUTILS --without-pmdk'
configopts += ' --with-mpc=$EBROOTMPCMINALLOCATOR'
easyblock = 'ConfigureMake'
name = "mpc-allocator"
version = "0.2.ecoHMEM"
homepage = 'https://github.com/cea-hpc/mpc-allocator/tree/cea/deepsea/het_memory'
description = 'MPC allocator with PMem allocation API.'
toolchain = {'name': 'GCCcore', 'version': '11.3.0'}
sources = [{
'filename': 'mpc-allocator.tar.gz',
'git_config': {
'url': 'https://github.com/cea-hpc',
'repo_name': 'mpc-allocator',
'commit': '72e3ced3454c6a9e3fbf8934b3cf369631a90958'
},
}]
patches = [
'mpc_allocator_fix.patch',
]
checksums = [
'b694e6337d817a0c7078b0bf9ce1d26f98402f184f251031cc403b3f4e7350a7',
# mpc_allocator_fix.patch
'7489f3bd0e2e0b3cee99a4f5c6466f5383bd369bd960f6edc38b1e4d335774ed',
]
dependencies = [
('OpenPA', '1.0.4'),
('hwloc', '2.7.1'),
]
configure_without_installdir = True
args_list = '-DOPENPA_PREFIX=$EBROOTOPENPA,-DHWLOC_PREFIX=$EBROOTHWLOC,-DCMAKE_INSTALL_PREFIX=%(installdir)s'
configure_cmd = './independant_build.sh --mode=Release --cmake'
configure_cmd += ' --args="' + args_list + '"'
build_cmd = 'make -C build'
install_cmd = 'make -C build install'
--- a/src/sctk_alloc_pmem.c 2024-02-05 17:01:16.064250355 +0100
+++ b/src/sctk_alloc_pmem.c 2023-05-08 16:23:11.561693117 +0200
@@ -213,7 +213,7 @@
return ret;
}
-SCTK_PUBLIC void sctk_pmem_free(sctk_pmem_desc_t*, size_t size, void* ptr)
+SCTK_PUBLIC void sctk_pmem_free(sctk_pmem_desc_t* desc, size_t size, void* ptr)
{
memset(ptr, 0x0, size);
}
easyblock = 'ConfigureMake'
name = "OpenPA"
version = "1.0.4"
homepage = 'https://github.com/pmodels/openpa'
description = """The goal of this project is to provide an open source, highly-portable
library that provides atomic primitives (and related constructs) for
high performance, concurrent software. This project is a collaboration
between the Mathematics and Computer Science (MCS) division at Argonne
National Laboratory (ANL) and the HDF Group. The code was originally
derived from work on the MPICH2 project.
"""
toolchain = {'name': 'GCCcore', 'version': '11.3.0'}
source_urls = ['https://github.com/pmodels/openpa/']
sources = ['releases/download/v%(version)s/openpa-%(version)s.tar.gz']
checksums = [
'9e5904b3bbdcb24e8429c12d613422e716a3479f3e0aeefbd9ce546852899e3a',
]
builddependencies = [
('Autotools', '20220317'),
]
sanity_check_paths = {
'dirs': ['lib', 'include'],
'files': ['lib/libopa.a', 'include/opa_primitives.h'],
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment