Skip to content

Instantly share code, notes, and snippets.

View paulgessinger's full-sized avatar

Paul Gessinger paulgessinger

  • CERN
  • Geneva, Switzerland
View GitHub Profile
@paulgessinger
paulgessinger / README.md
Last active April 16, 2025 09:03
ACTS Development setup

ACTS Development setup

Native spack

Warning

Spack builds packages from source. We have a so-called buildcache which has a number of packages in binary form. However, this does not always work 100% reliably, largely due to ROOT shenanigans, but sometimes also due to compiler/os/library incompatibilities, and the build recipes not having been updated (yet).

#!/usr/bin/env python3
# /// script
# dependencies = [
# "rich",
# "typer",
# ]
# ///
from pathlib import Path
#!/usr/bin/env python3
# /// script
# dependencies = [
# "rich",
# "typer",
# ]
# ///
from typing import Annotated
@paulgessinger
paulgessinger / run_stats.py
Created February 5, 2025 12:34
Python script to run a process a number of times and report status
#!/usr/bin/env python3
# /// script
# dependencies = [
# "rich",
# "typer",
# ]
# ///
import rich
@paulgessinger
paulgessinger / CMakeLists.txt
Last active November 29, 2024 17:14
Clang typeinfo / dynamic_cast issue
cmake_minimum_required(VERSION 3.14)
project(DowncastRepro LANGUAGES CXX)
add_library(Foo SHARED class.cpp)
target_include_directories(Foo PUBLIC .)
target_compile_features(Foo PUBLIC cxx_std_20)
add_executable(DowncastRepro main.cpp)
target_link_libraries(DowncastRepro PRIVATE Foo)
From f5635ce86b5cb83ee14727cd2dc71faee6046641 Mon Sep 17 00:00:00 2001
From: Paul Gessinger <hello@paulgessinger.com>
Date: Tue, 26 Nov 2024 15:01:40 +0100
Subject: [PATCH] apply install_name_tool to copy of file
---
lib/spack/spack/relocate.py | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/lib/spack/spack/relocate.py b/lib/spack/spack/relocate.py
@paulgessinger
paulgessinger / README.md
Last active November 21, 2024 15:48
ACTS profiling cookbook

ACTS Profiling Cookbook

Instructions can be found on this CodiMD.

We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 5 columns, instead of 4 in line 8.
commit,date,utc,metric,value
928faa16,2023-06-18T14:31:42+00:00,1687098702.0,max_rss_Tests/UnitTests/Core/TrackFitting/Chi2FitterTests.cpp,3.1715660095214844
928faa16,2023-06-18T14:31:42+00:00,1687098702.0,max_rss_Examples/Algorithms/TrackFittingChi2/src/TrackFittingChi2AlgorithmFunction.cpp,2.5635108947753906
928faa16,2023-06-18T14:31:42+00:00,1687098702.0,max_rss_Tests/UnitTests/Alignment/Kernel/AlignmentTests.cpp,2.400848388671875
928faa16,2023-06-18T14:31:42+00:00,1687098702.0,max_rss_Tests/UnitTests/Core/Vertexing/AdaptiveMultiVertexFinderTests.cpp,2.3143539428710938
928faa16,2023-06-18T14:31:42+00:00,1687098702.0,max_rss_Tests/UnitTests/Core/TrackFitting/GsfTests.cpp,2.2905616760253906
928faa16,2023-06-18T14:31:42+00:00,1687098702.0,max_rss_Examples/Algorithms/Alignment/src/AlignmentAlgorithmFunction.cpp,2.252971649169922
928faa16,2023-06-18T14:31:42+00:00,1687098702.0,max_rss_Examples/Algorithms/TrackFitting/src/GsfFitterFunction.cpp,2.1289138793945312
928faa16,2023-06-18T14:31:42+00:00,1687098702.0,ma
@paulgessinger
paulgessinger / pythia8307_cpp20.patch
Created March 22, 2023 18:13
Pythia 8307+ compatibility with C++20
From 09ef584f1ca797d84c1c0af18ec06b33d6c0d2d0 Mon Sep 17 00:00:00 2001
From: Paul Gessinger <paul.gessinger@cern.ch>
Date: Thu, 24 Mar 2022 16:08:26 +0100
Subject: [PATCH] fixes for C++20 build
---
include/Pythia8/SusyLesHouches.h | 6 +++---
src/HadronWidths.cc | 8 ++++----
src/NucleonExcitations.cc | 8 ++++----
src/PythiaParallel.cc | 2 +-
#include <vector>
#include <iostream>
#include <string_view>
#include <memory>
struct A{
static constexpr auto name() { return std::string_view{"A"};}
};
struct B{