From c0362b6639a9e4818aedf9fcd0ece0c4b1b982be Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Tue, 2 Nov 2021 12:42:27 +0100 Subject: [PATCH] paraver: add fast version for ordered traces --- bsc/paraver/kernel-fast.nix | 48 ++++++++++++++++++++ bsc/paraver/wxparaver-fast.nix | 75 ++++++++++++++++++++++++++++++++ bsc/paraver/wxparaver-fast.patch | 13 ++++++ overlay.nix | 2 + 4 files changed, 138 insertions(+) create mode 100644 bsc/paraver/kernel-fast.nix create mode 100644 bsc/paraver/wxparaver-fast.nix create mode 100644 bsc/paraver/wxparaver-fast.patch diff --git a/bsc/paraver/kernel-fast.nix b/bsc/paraver/kernel-fast.nix new file mode 100644 index 0000000..d24f60e --- /dev/null +++ b/bsc/paraver/kernel-fast.nix @@ -0,0 +1,48 @@ +{ + stdenv +, autoreconfHook +, boost +, libxml2 +, xml2 +, wxpropgrid +, wxGTK28 +, autoconf +, automake +}: + +let + wx = wxGTK28; +in +stdenv.mkDerivation rec { + pname = "paraverKernelFast"; + version = "${src.shortRev}"; + + src = builtins.fetchGit { + url = "git@bscpm03.bsc.es:rpenacob/paraver-kernel.git"; + rev = "76f508095c35528ad89078473dc70b9600e507ff"; + ref = "fast"; + }; + + hardeningDisable = [ "all" ]; + enableParallelBuilding = true; + + dontStrip = true; + + preConfigure = '' + export CFLAGS="-O3" + export CXXFLAGS="-std=c++17 -O3" + ''; + + configureFlags = [ + "--with-boost=${boost}" + ]; + + buildInputs = [ + autoreconfHook + boost + libxml2.dev + xml2 + autoconf + automake + ]; +} diff --git a/bsc/paraver/wxparaver-fast.nix b/bsc/paraver/wxparaver-fast.nix new file mode 100644 index 0000000..37c84b1 --- /dev/null +++ b/bsc/paraver/wxparaver-fast.nix @@ -0,0 +1,75 @@ +{ + stdenv +, autoreconfHook +, boost +, libxml2 +, xml2 +, wxpropgrid +, wxGTK28 +, autoconf +, automake +, paraverKernelFast +, openssl +}: + +let + wx = wxGTK28; +in +stdenv.mkDerivation rec { + pname = "paraverFast"; + version = "${src.shortRev}"; + + src = builtins.fetchGit { + url = "https://github.com/bsc-performance-tools/wxparaver.git"; + rev = "9fc61decb6d8d9b1cacb50639c3b2c85788b2292"; + ref = "master"; + }; + + hardeningDisable = [ "all" ]; + + patches = [ ./wxparaver-fast.patch ]; + + # Fix the PARAVER_HOME variable + postPatch = '' + sed -i 's@^PARAVER_HOME=.*$@PARAVER_HOME='$out'@g' docs/wxparaver + ''; + + dontStrip = true; + enableParallelBuilding = true; + + preConfigure = '' + export CFLAGS="-O3" + export CXXFLAGS="-std=c++17 -O3" + ''; + + configureFlags = [ + "--with-boost=${boost}" + "--with-wx-config=${wx}/bin/wx-config" + "--with-wxpropgrid-dir=${wxpropgrid}" + "--with-paraver=${paraverKernelFast}" + "--with-openssl=${openssl.dev}" + ]; + + buildInputs = [ + autoreconfHook + boost + libxml2.dev + xml2 + wxpropgrid + wx + autoconf + automake + paraverKernelFast + openssl.dev + ]; + + postInstall = '' + mkdir -p $out/include + mkdir -p $out/lib/paraver-kernel + mkdir -p $out/share/filters-config + cp -p ${paraverKernelFast}/bin/* $out/bin + # cp -p ${paraverKernelFast}/include/* $out/include + cp -a ${paraverKernelFast}/lib/paraver-kernel $out/lib/paraver-kernel + cp -p ${paraverKernelFast}/share/filters-config/* $out/share/filters-config + ''; +} diff --git a/bsc/paraver/wxparaver-fast.patch b/bsc/paraver/wxparaver-fast.patch new file mode 100644 index 0000000..ae41cc7 --- /dev/null +++ b/bsc/paraver/wxparaver-fast.patch @@ -0,0 +1,13 @@ +--- a/docs/wxparaver 1970-01-01 01:00:01.000000000 +0100 ++++ b/docs/wxparaver 2021-11-02 12:08:54.670700017 +0100 +@@ -31,5 +31,10 @@ + + @inst_LOGIN_NODE_DETECTION@ + ++echo "WARNING: Using paraver fast, the trace must be ordered!" >&2 ++export PARAVER_FAST=1 ++ ++export LANG=C ++ + LD_LIBRARY_PATH="@inst_BOOST_LIBDIR@${PARAVER_HOME}/${LIB_DIR}/paraver-kernel:@inst_WXWIDGETS_LIBDIR@@inst_WXPROPGRID_LIB_PATH@@inst_LIBSSL_LIBDIR@${PARAVER_HOME}/${LIB_DIR}/wxparaver:$LD_LIBRARY_PATH" "${PARAVER_HOME}/bin/wxparaver.bin" "$@" + diff --git a/overlay.nix b/overlay.nix index 4c38a7f..dc990c9 100644 --- a/overlay.nix +++ b/overlay.nix @@ -140,6 +140,8 @@ let wxpropgrid = callPackage ./bsc/wxpropgrid/default.nix { }; paraver = callPackage ./bsc/paraver/default.nix { }; + paraverKernelFast = callPackage ./bsc/paraver/kernel-fast.nix { }; + paraverFast = callPackage ./bsc/paraver/wxparaver-fast.nix { }; paraverExtra = bsc.paraver.override { enableMouseLabel = true; }; paraverDebug = bsc.paraver.overrideAttrs (old: { dontStrip = true;