diff --git a/easybuild/easyconfigs/l/LLVM/LLVM-21.1.8-GCCcore-15.2.0.eb b/easybuild/easyconfigs/l/LLVM/LLVM-21.1.8-GCCcore-15.2.0.eb new file mode 100644 index 000000000000..0561de16e711 --- /dev/null +++ b/easybuild/easyconfigs/l/LLVM/LLVM-21.1.8-GCCcore-15.2.0.eb @@ -0,0 +1,94 @@ +name = 'LLVM' +version = '21.1.8' + + +homepage = "https://llvm.org/" +description = """ +The LLVM Core libraries provide a modern source- and target-independent +optimizer, along with code generation support for many popular CPUs +(as well as some less common ones!) These libraries are built around a well +specified code representation known as the LLVM intermediate representation +("LLVM IR"). The LLVM Core libraries are well documented, and it is +particularly easy to invent your own language (or port an existing compiler) +to use LLVM as an optimizer and code generator. +""" + +toolchain = {'name': 'GCCcore', 'version': '15.2.0'} +toolchainopts = { + 'pic': True +} + +source_urls = ['https://github.com/llvm/llvm-project/releases/download/llvmorg-%(version)s/'] +sources = [ + 'llvm-project-%(version)s.src.tar.xz', +] +patches = [ + 'LLVM-18.1.8_envintest.patch', + 'LLVM-19.1.7_libomptarget_tests.patch', + 'LLVM-19.1.7_clang_rpathwrap_test.patch', + 'LLVM-21.1.x_fix-ompt-end-critical-race.patch', +] +checksums = [ + {'llvm-project-21.1.8.src.tar.xz': '4633a23617fa31a3ea51242586ea7fb1da7140e426bd62fc164261fe036aa142'}, + {'LLVM-18.1.8_envintest.patch': '8e25dfab8a29a860717b4bd2d8cdd0e795433766d7fffbda32d06a2bde47058d'}, + {'LLVM-19.1.7_libomptarget_tests.patch': '79a67c118d034cfb74e255696369150c73432d2b422f4834efacb26f7904edbf'}, + {'LLVM-19.1.7_clang_rpathwrap_test.patch': '5ee6a87ec8ff1c8b736ffe0513aa2098bd2b83a1ffc647a1ad2cf966f567e8a1'}, + {'LLVM-21.1.x_fix-ompt-end-critical-race.patch': + '9dc675f0a53a2308a22c36892eddeeab9c3c736219c04192fc5bb1348f110838'}, +] + +builddependencies = [ + ('binutils', '2.45'), + ('Python', '3.14.2'), + ('CMake', '4.2.1'), + ('psutil', '7.2.1'), # Needed to enable test timeout in lit + ('lit', '18.1.8'), + ('git', '2.52.0'), +] + +dependencies = [ + ('libffi', '3.5.2'), + ('libxml2', '2.15.1'), + ('ncurses', '6.6'), + ('zlib', '2.3.2'), + ('Z3', '4.15.4'), + ('zstd', '1.5.7'), +] + + +build_shared_libs = True + +bootstrap = True +full_llvm = False +build_clang_extras = True +build_runtimes = True +build_lld = True +build_lldb = True +build_bolt = True +build_openmp = True +build_openmp_tools = True +build_openmp_offload = True +use_polly = True + +python_bindings = True + +build_targets = ['all'] +# disable_werror = True + +skip_all_tests = False +skip_sanitizer_tests = True +test_suite_max_failed = 10 +test_suite_timeout_single = 5 * 60 +test_suite_ignore_patterns = [ + "X86/register-fragments-bolt-symbols.s", + "modularize/ProblemsCoverage.modularize", + "Driver/atomic.f90", + "Driver/gcc-toolchain-install-dir.f90", + "api_tests/test_ompd_get_icv_from_scope.c", + "std/time/time.syn/formatter", + # Those 2 might fail with "tzdb: the path '/etc/localtime' is not a symlink" + "std/time/time.zone/time.zone.db/time.zone.db.tzdb", + "std/time/time.zone/time.zone.db/time.zone.db.access", +] + +moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/l/LLVM/LLVM-21.1.x_fix-ompt-end-critical-race.patch b/easybuild/easyconfigs/l/LLVM/LLVM-21.1.x_fix-ompt-end-critical-race.patch new file mode 100644 index 000000000000..4e2fe2b23d03 --- /dev/null +++ b/easybuild/easyconfigs/l/LLVM/LLVM-21.1.x_fix-ompt-end-critical-race.patch @@ -0,0 +1,49 @@ +From 4693659e3a911360b3798a9bc50e94dad8fe7f71 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20Andr=C3=A9=20Reuter?= +Date: Thu, 27 Nov 2025 16:42:05 +0100 +Subject: [PATCH] [OMPT] Use global thread id for `codeptr_ra` in + `end_critical` +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When a critical construct has finished, it will trigger a critical-released +event. If a tool is attached, and the `mutex_released` callback was +registered, the tool with receive an event containing the `codeptr_ra`, the +return address of the callback invocation. + +All the way back in 82e94a593433f36734e2d34898d353a2ecb65b8b, this +`codeptr_ra` was implemented by calling `__ompt_load_return_address` +with a fixed global thread id of `0`. However, this approach results in a +race-condition, and can yield incorrect results to the tool. + +`__ompt_load_return_address(0)` points to the current return address of +the thread 0 in `__kmp_threads`. This thread may already execute some +other construct. A tool might therefore receive the return address of +e.g. some `libomp` internals, or other parts of the user code. +Additionally, a call to `__ompt_load_return_address` resets the +`th.ompt_thread_info.return_address` to `NULL`, therefore also affecting +the return address of thread 0. Another dispatched event, e.g. +parallel-begin might therefore not transfer any `codeptr_ra`. + +To fix this, replace the fixed thread id by the `global_tid`, which is +stored just before dispatching the `mutex_released` callback. + +Signed-off-by: Jan André Reuter +--- + openmp/runtime/src/kmp_csupport.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/openmp/runtime/src/kmp_csupport.cpp b/openmp/runtime/src/kmp_csupport.cpp +index 3ca32ba583fe2..a92fc46374c27 100644 +--- a/openmp/runtime/src/kmp_csupport.cpp ++++ b/openmp/runtime/src/kmp_csupport.cpp +@@ -1780,7 +1780,7 @@ void __kmpc_end_critical(ident_t *loc, kmp_int32 global_tid, + if (ompt_enabled.ompt_callback_mutex_released) { + ompt_callbacks.ompt_callback(ompt_callback_mutex_released)( + ompt_mutex_critical, (ompt_wait_id_t)(uintptr_t)lck, +- OMPT_LOAD_RETURN_ADDRESS(0)); ++ OMPT_LOAD_RETURN_ADDRESS(global_tid)); + } + #endif + diff --git a/easybuild/easyconfigs/l/lit/lit-18.1.8-GCCcore-15.2.0.eb b/easybuild/easyconfigs/l/lit/lit-18.1.8-GCCcore-15.2.0.eb new file mode 100644 index 000000000000..37c0eac10ba5 --- /dev/null +++ b/easybuild/easyconfigs/l/lit/lit-18.1.8-GCCcore-15.2.0.eb @@ -0,0 +1,35 @@ +easyblock = 'PythonBundle' + +name = 'lit' +version = '18.1.8' + +homepage = 'https://llvm.org/docs/CommandGuide/lit.html' +description = """lit is a portable tool for executing LLVM and Clang style test suites, summarizing their results, and +providing indication of failures.""" + +toolchain = {'name': 'GCCcore', 'version': '15.2.0'} + +builddependencies = [ + ('binutils', '2.45'), +] + +dependencies = [ + ('Python', '3.14.2'), +] + +exts_list = [ + ('ptyprocess', '0.7.0', { + 'source_tmpl': '%(name)s-%(version)s-py2.py3-none-any.whl', + 'checksums': ['4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35'], + }), + ('pexpect', '4.9.0', { + 'checksums': ['ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f'], + }), + (name, version, { + 'checksums': ['47c174a186941ae830f04ded76a3444600be67d5e5fb8282c3783fba671c4edb'], + }), +] + +sanity_check_commands = ['lit -h'] + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/p/psutil/psutil-7.2.1-GCCcore-15.2.0.eb b/easybuild/easyconfigs/p/psutil/psutil-7.2.1-GCCcore-15.2.0.eb new file mode 100644 index 000000000000..797176652a7e --- /dev/null +++ b/easybuild/easyconfigs/p/psutil/psutil-7.2.1-GCCcore-15.2.0.eb @@ -0,0 +1,23 @@ +easyblock = 'PythonBundle' + +name = 'psutil' +version = '7.2.1' + +homepage = 'https://github.com/giampaolo/psutil' +description = """A cross-platform process and system utilities module for Python""" + +toolchain = {'name': 'GCCcore', 'version': '15.2.0'} + +builddependencies = [('binutils', '2.45')] + +dependencies = [('Python', '3.14.2')] + +exts_list = [ + (name, version, { + 'source_urls': ['https://github.com/giampaolo/psutil/archive'], + 'sources': ['release-%(version)s.tar.gz'], + 'checksums': ['221eca326a94fc0c6aff9cfe7b9e053b54bd72678f5006c6d930e8cb26f04b25'], + }), +] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/z/Z3/Z3-4.15.4-GCCcore-15.2.0.eb b/easybuild/easyconfigs/z/Z3/Z3-4.15.4-GCCcore-15.2.0.eb new file mode 100644 index 000000000000..9215b7ba955d --- /dev/null +++ b/easybuild/easyconfigs/z/Z3/Z3-4.15.4-GCCcore-15.2.0.eb @@ -0,0 +1,48 @@ +easyblock = 'PythonBundle' + +name = 'Z3' +version = '4.15.4' + +homepage = 'https://github.com/Z3Prover/z3' +description = """Z3 is a theorem prover from Microsoft Research with support for bitvectors, +booleans, arrays, floating point numbers, strings, and other data types. This +module includes z3-solver, the Python interface of Z3. +""" + +toolchain = {'name': 'GCCcore', 'version': '15.2.0'} + +builddependencies = [ + ('binutils', '2.45'), + ('CMake', '4.2.1'), +] + +dependencies = [ + ('Python', '3.14.2'), + ('GMP', '6.3.0'), +] + + +_fix_parallelism = """sed -i 's/str(multiprocessing.cpu_count())/"%(parallel)s"/' setup.py && """ +_enable_gmp = """sed -i "s/Z3_USE_LIB_GMP.*/Z3_USE_LIB_GMP' : True,/" setup.py && """ + +exts_list = [ + ('z3_solver', version + '.0', { + 'modulename': 'z3', + 'preinstallopts': _fix_parallelism + _enable_gmp, + 'checksums': ['928c29b58c4eb62106da51c1914f6a4a55d0441f8f48a81b9da07950434a8946'], + }), +] + +# make Z3 headers and libraries accessible in their usual location +local_z3_site_path = "lib/python%(pyshortver)s/site-packages/%(namelower)s" +postinstallcmds = [ + 'ln -s %s/include "%%(installdir)s/include"' % local_z3_site_path, + 'cd "%%(installdir)s"; for lib in %s/lib/*; do ln -s ../$lib lib/$(basename $lib); done' % local_z3_site_path +] + +sanity_check_paths = { + 'files': ['bin/z3', 'include/z3_api.h', 'lib/libz3.' + SHLIB_EXT], + 'dirs': ['include', 'lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'tools'