Merge remote-tracking branch 'bscpkgs/master' into merge-bscpkgs
This commit is contained in:
commit
01986c376b
15
.gitea/workflows/ci.yaml
Normal file
15
.gitea/workflows/ci.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
name: CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:all:
|
||||
runs-on: native
|
||||
steps:
|
||||
- uses: https://gitea.com/ScMi1/checkout@v1.4
|
||||
- run: nix build -L --no-link --print-out-paths .#bsc-ci.all
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,3 @@
|
||||
*.swp
|
||||
**.swp
|
||||
/result
|
||||
/misc
|
||||
|
6
.gitlab-ci.yml
Normal file
6
.gitlab-ci.yml
Normal file
@ -0,0 +1,6 @@
|
||||
build:bsc-ci.all:
|
||||
stage: build
|
||||
tags:
|
||||
- nix
|
||||
script:
|
||||
- nix build -L "jungle#bsc-ci.all" --override-input bscpkgs . -v --show-trace
|
21
COPYING
Normal file
21
COPYING
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright (c) 2020-2021 Barcelona Supercomputing Center
|
||||
Copyright (c) 2003-2020 Eelco Dolstra and the Nixpkgs/NixOS contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
19
default.nix
Normal file
19
default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
let
|
||||
bscOverlay = import ./overlay.nix;
|
||||
|
||||
# read flake.lock and determine revision from there
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
inherit (lock.nodes.nixpkgs.locked) rev narHash;
|
||||
fetchedNixpkgs = builtins.fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
|
||||
sha256 = narHash;
|
||||
};
|
||||
in
|
||||
{ overlays ? [ ]
|
||||
, nixpkgs ? fetchedNixpkgs
|
||||
, ...
|
||||
}@attrs:
|
||||
import nixpkgs (
|
||||
(builtins.removeAttrs attrs [ "overlays" "nixpkgs" ]) //
|
||||
{ overlays = [ bscOverlay ] ++ overlays; }
|
||||
)
|
27
flake.nix
27
flake.nix
@ -36,4 +36,31 @@ in
|
||||
nixpkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: Merge from bscpkgs:
|
||||
#
|
||||
# inputs.nixpkgs.url = "nixpkgs";
|
||||
#
|
||||
# outputs = { self, nixpkgs, ...}:
|
||||
# let
|
||||
# # For now we only support x86
|
||||
# system = "x86_64-linux";
|
||||
# pkgs = import nixpkgs {
|
||||
# inherit system;
|
||||
# overlays = [ self.overlays.default ];
|
||||
# };
|
||||
# in
|
||||
# {
|
||||
# bscOverlay = import ./overlay.nix;
|
||||
# overlays.default = self.bscOverlay;
|
||||
# # full nixpkgs with our overlay applied
|
||||
# legacyPackages.${system} = pkgs;
|
||||
#
|
||||
# hydraJobs = {
|
||||
# inherit (self.legacyPackages.${system}.bsc-ci) tests pkgs cross;
|
||||
# };
|
||||
#
|
||||
# # propagate nixpkgs lib, so we can do bscpkgs.lib
|
||||
# inherit (nixpkgs) lib;
|
||||
# };
|
||||
}
|
||||
|
119
overlay.nix
Normal file
119
overlay.nix
Normal file
@ -0,0 +1,119 @@
|
||||
final: /* Future last stage */
|
||||
prev: /* Previous stage */
|
||||
|
||||
with final.lib;
|
||||
|
||||
let
|
||||
callPackage = final.callPackage;
|
||||
|
||||
bscPkgs = {
|
||||
bench6 = callPackage ./pkgs/bench6/default.nix { };
|
||||
bigotes = callPackage ./pkgs/bigotes/default.nix { };
|
||||
clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { };
|
||||
clangOmpss2Nanos6 = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nanos6; };
|
||||
clangOmpss2Nodes = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmp; };
|
||||
clangOmpss2NodesOmpv = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmpv; };
|
||||
clangOmpss2Unwrapped = callPackage ./pkgs/llvm-ompss2/clang.nix { };
|
||||
#extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated
|
||||
gpi-2 = callPackage ./pkgs/gpi-2/default.nix { };
|
||||
intelPackages_2023 = callPackage ./pkgs/intel-oneapi/2023.nix { };
|
||||
jemallocNanos6 = callPackage ./pkgs/nanos6/jemalloc.nix { };
|
||||
lmbench = callPackage ./pkgs/lmbench/default.nix { };
|
||||
mcxx = callPackage ./pkgs/mcxx/default.nix { };
|
||||
nanos6 = callPackage ./pkgs/nanos6/default.nix { };
|
||||
nanos6Debug = final.nanos6.override { enableDebug = true; };
|
||||
nixtools = callPackage ./pkgs/nixtools/default.nix { };
|
||||
# Broken because of pkgsStatic.libcap
|
||||
# See: https://github.com/NixOS/nixpkgs/pull/268791
|
||||
#nix-wrap = callPackage ./pkgs/nix-wrap/default.nix { };
|
||||
nodes = callPackage ./pkgs/nodes/default.nix { };
|
||||
nosv = callPackage ./pkgs/nosv/default.nix { };
|
||||
openmp = callPackage ./pkgs/llvm-ompss2/openmp.nix { monorepoSrc = final.clangOmpss2Unwrapped.src; version = final.clangOmpss2Unwrapped.version; };
|
||||
openmpv = final.openmp.override { enableNosv = true; enableOvni = true; };
|
||||
osumb = callPackage ./pkgs/osu/default.nix { };
|
||||
ovni = callPackage ./pkgs/ovni/default.nix { };
|
||||
ovniGit = final.ovni.override { useGit = true; };
|
||||
paraverKernel = callPackage ./pkgs/paraver/kernel.nix { };
|
||||
#pscom = callPackage ./pkgs/parastation/pscom.nix { }; # Unmaintaned
|
||||
#psmpi = callPackage ./pkgs/parastation/psmpi.nix { }; # Unmaintaned
|
||||
sonar = callPackage ./pkgs/sonar/default.nix { };
|
||||
stdenvClangOmpss2 = final.stdenv.override { cc = final.clangOmpss2; allowedRequisites = null; };
|
||||
stdenvClangOmpss2Nanos6 = final.stdenv.override { cc = final.clangOmpss2Nanos6; allowedRequisites = null; };
|
||||
stdenvClangOmpss2Nodes = final.stdenv.override { cc = final.clangOmpss2Nodes; allowedRequisites = null; };
|
||||
stdenvClangOmpss2NodesOmpv = final.stdenv.override { cc = final.clangOmpss2NodesOmpv; allowedRequisites = null; };
|
||||
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
||||
tampi = callPackage ./pkgs/tampi/default.nix { };
|
||||
wxparaver = callPackage ./pkgs/paraver/default.nix { };
|
||||
};
|
||||
|
||||
tests = rec {
|
||||
#hwloc = callPackage ./test/bugs/hwloc.nix { }; # Broken, no /sys
|
||||
#sigsegv = callPackage ./test/reproducers/sigsegv.nix { };
|
||||
hello-c = callPackage ./test/compilers/hello-c.nix { };
|
||||
hello-cpp = callPackage ./test/compilers/hello-cpp.nix { };
|
||||
lto = callPackage ./test/compilers/lto.nix { };
|
||||
asan = callPackage ./test/compilers/asan.nix { };
|
||||
intel2023-icx-c = hello-c.override { stdenv = final.intelPackages_2023.stdenv; };
|
||||
intel2023-icc-c = hello-c.override { stdenv = final.intelPackages_2023.stdenv-icc; };
|
||||
intel2023-icx-cpp = hello-cpp.override { stdenv = final.intelPackages_2023.stdenv; };
|
||||
intel2023-icc-cpp = hello-cpp.override { stdenv = final.intelPackages_2023.stdenv-icc; };
|
||||
intel2023-ifort = callPackage ./test/compilers/hello-f.nix {
|
||||
stdenv = final.intelPackages_2023.stdenv-ifort;
|
||||
};
|
||||
clangOmpss2-lto = lto.override { stdenv = final.stdenvClangOmpss2Nanos6; };
|
||||
clangOmpss2-asan = asan.override { stdenv = final.stdenvClangOmpss2Nanos6; };
|
||||
clangOmpss2-task = callPackage ./test/compilers/ompss2.nix {
|
||||
stdenv = final.stdenvClangOmpss2Nanos6;
|
||||
};
|
||||
clangNodes-task = callPackage ./test/compilers/ompss2.nix {
|
||||
stdenv = final.stdenvClangOmpss2Nodes;
|
||||
};
|
||||
clangNosvOpenmp-task = callPackage ./test/compilers/clang-openmp.nix {
|
||||
stdenv = final.stdenvClangOmpss2Nodes;
|
||||
};
|
||||
clangNosvOmpv-nosv = callPackage ./test/compilers/clang-openmp-nosv.nix {
|
||||
stdenv = final.stdenvClangOmpss2NodesOmpv;
|
||||
};
|
||||
clangNosvOmpv-ld = callPackage ./test/compilers/clang-openmp-ld.nix {
|
||||
stdenv = final.stdenvClangOmpss2NodesOmpv;
|
||||
};
|
||||
};
|
||||
|
||||
pkgs = filterAttrs (_: isDerivation) bscPkgs;
|
||||
|
||||
crossTargets = [ "riscv64" ];
|
||||
cross = prev.lib.genAttrs crossTargets (target:
|
||||
final.pkgsCross.${target}.bsc-ci.pkgs
|
||||
);
|
||||
|
||||
buildList = name: paths:
|
||||
final.runCommandLocal name { } ''
|
||||
printf '%s\n' ${toString paths} | tee $out
|
||||
'';
|
||||
|
||||
buildList' = name: paths:
|
||||
final.runCommandLocal name { } ''
|
||||
deps="${toString paths}"
|
||||
cat $deps
|
||||
printf '%s\n' $deps >$out
|
||||
'';
|
||||
|
||||
crossList = builtins.mapAttrs (t: v: buildList t (builtins.attrValues v)) cross;
|
||||
|
||||
pkgsList = buildList "ci-pkgs" (builtins.attrValues pkgs);
|
||||
testList = buildList "ci-tests" (collect isDerivation tests);
|
||||
|
||||
all = buildList' "ci-all" [ pkgsList testList ];
|
||||
|
||||
in bscPkgs // {
|
||||
# Prevent accidental usage of bsc attribute
|
||||
bsc = throw "the bsc attribute is deprecated, packages are now in the root";
|
||||
|
||||
# Internal for our CI tests
|
||||
bsc-ci = {
|
||||
inherit pkgs pkgsList;
|
||||
inherit tests testList;
|
||||
inherit cross crossList;
|
||||
inherit all;
|
||||
};
|
||||
}
|
25
pkgs/babeltrace/default.nix
Normal file
25
pkgs/babeltrace/default.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{ stdenv, lib, fetchurl, pkg-config, glib, libuuid, popt, elfutils, swig4, python3 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "babeltrace-1.5.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.efficios.com/files/babeltrace/${name}.tar.bz2";
|
||||
sha256 = "1hkg3phnamxfrhwzmiiirbhdgckzfkqwhajl0lmr1wfps7j47wcz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ glib libuuid popt elfutils swig4 python3 ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command-line tool and library to read and convert LTTng tracefiles";
|
||||
homepage = "https://www.efficios.com/babeltrace";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.bjornfor ];
|
||||
};
|
||||
|
||||
configureFlags = [
|
||||
"--enable-python-bindings"
|
||||
];
|
||||
}
|
34
pkgs/babeltrace2/default.nix
Normal file
34
pkgs/babeltrace2/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
stdenv
|
||||
, fetchurl
|
||||
, pkg-config
|
||||
, glib
|
||||
, libuuid
|
||||
, popt
|
||||
, elfutils
|
||||
, python3
|
||||
, swig4
|
||||
, ncurses
|
||||
, breakpointHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "babeltrace2";
|
||||
version = "2.0.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.efficios.com/files/babeltrace/${pname}-${version}.tar.bz2";
|
||||
sha256 = "1804pyq7fz6rkcz4r1abkkn0pfnss13m6fd8if32s42l4lajadm5";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ glib libuuid popt elfutils python3 swig4 ncurses breakpointHook ];
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
configureFlags = [
|
||||
"--enable-python-plugins"
|
||||
"--enable-python-bindings"
|
||||
];
|
||||
|
||||
}
|
61
pkgs/bench6/default.nix
Normal file
61
pkgs/bench6/default.nix
Normal file
@ -0,0 +1,61 @@
|
||||
{
|
||||
stdenv
|
||||
, bigotes
|
||||
, cmake
|
||||
, clangOmpss2
|
||||
, openmp
|
||||
, openmpv
|
||||
, nanos6
|
||||
, nodes
|
||||
, nosv
|
||||
, mpi
|
||||
, tampi
|
||||
, openblas
|
||||
, ovni
|
||||
, gitBranch ? "master"
|
||||
, gitURL ? "ssh://git@bscpm04.bsc.es/rarias/bench6.git"
|
||||
, gitCommit ? "bf29a53113737c3aa74d2fe3d55f59868faea7b4"
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bench6";
|
||||
version = "${src.shortRev}";
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = gitURL;
|
||||
ref = gitBranch;
|
||||
rev = gitCommit;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
clangOmpss2
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
bigotes
|
||||
openmp
|
||||
openmpv
|
||||
nanos6
|
||||
nodes
|
||||
nosv
|
||||
mpi
|
||||
tampi
|
||||
openblas
|
||||
openblas.dev
|
||||
ovni
|
||||
];
|
||||
|
||||
env = {
|
||||
NANOS6_HOME = nanos6;
|
||||
NODES_HOME = nodes;
|
||||
NOSV_HOME = nosv;
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_C_COMPILER=clang"
|
||||
"-DCMAKE_CXX_COMPILER=clang++"
|
||||
];
|
||||
hardeningDisable = [ "all" ];
|
||||
dontStrip = true;
|
||||
}
|
17
pkgs/bigotes/default.nix
Normal file
17
pkgs/bigotes/default.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "bigotes";
|
||||
version = "9dce13";
|
||||
src = fetchFromGitHub {
|
||||
owner = "rodarima";
|
||||
repo = "bigotes";
|
||||
rev = "9dce13446a8da30bea552d569d260d54e0188518";
|
||||
sha256 = "sha256-ktxM3pXiL8YXSK+/IKWYadijhYXqGoLY6adLk36iigE=";
|
||||
};
|
||||
nativeBuildInputs = [ cmake ];
|
||||
}
|
54
pkgs/clsync/default.nix
Normal file
54
pkgs/clsync/default.nix
Normal file
@ -0,0 +1,54 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, libcap
|
||||
, libcgroup
|
||||
, libmhash
|
||||
, doxygen
|
||||
, graphviz
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, glib
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.4.4";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "clsync";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "clsync";
|
||||
owner = "clsync";
|
||||
rev = "v${version}";
|
||||
sha256 = "0sdiyfwp0iqr6l1sirm51pirzmhi4jzgky5pzfj24nn71q3fwqgz";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
buildInputs = [
|
||||
autoreconfHook
|
||||
libcap
|
||||
libcgroup
|
||||
libmhash
|
||||
doxygen
|
||||
graphviz
|
||||
pkg-config
|
||||
glib
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
./configure --help
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "File live sync daemon based on inotify/kqueue/bsm (Linux, FreeBSD), written in GNU C";
|
||||
homepage = "https://github.com/clsync/clsync";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = [ ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
51
pkgs/cn6/default.nix
Normal file
51
pkgs/cn6/default.nix
Normal file
@ -0,0 +1,51 @@
|
||||
{
|
||||
stdenv
|
||||
, lib
|
||||
, babeltrace2
|
||||
, pkg-config
|
||||
, uthash
|
||||
, enableTest ? false
|
||||
, mpi ? null
|
||||
, clangOmpss2 ? null
|
||||
, tampi ? null
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
assert (enableTest -> (mpi != null));
|
||||
assert (enableTest -> (clangOmpss2 != null));
|
||||
assert (enableTest -> (tampi != null));
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cn6";
|
||||
version = "${src.shortRev}";
|
||||
|
||||
buildInputs = [
|
||||
babeltrace2
|
||||
pkg-config
|
||||
uthash
|
||||
mpi
|
||||
] ++ optionals (enableTest) [ mpi clangOmpss2 tampi ];
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm04.bsc.es/rarias/cn6.git";
|
||||
ref = "master";
|
||||
rev = "c72c3b66b720c2a33950f536fc819051c8f20a69";
|
||||
};
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
postBuild = optionalString (enableTest) ''
|
||||
(
|
||||
cd test
|
||||
make timediff timediff_mpi
|
||||
)
|
||||
'';
|
||||
|
||||
postInstall = optionalString (enableTest) ''
|
||||
(
|
||||
cd test
|
||||
cp timediff timediff_mpi sync-err.sh $out/bin/
|
||||
)
|
||||
'';
|
||||
}
|
21
pkgs/cpuid/default.nix
Normal file
21
pkgs/cpuid/default.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
stdenv
|
||||
, perl # For the pod2man command
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "20201006";
|
||||
pname = "cpuid";
|
||||
|
||||
buildInputs = [ perl ];
|
||||
|
||||
# Replace /usr install directory for $out
|
||||
postPatch = ''
|
||||
sed -i "s@/usr@$out@g" Makefile
|
||||
'';
|
||||
|
||||
src = builtins.fetchTarball {
|
||||
url = "http://www.etallen.com/cpuid/${pname}-${version}.src.tar.gz";
|
||||
sha256 = "04qhs938gs1kjxpsrnfy6lbsircsprfyh4db62s5cf83a1nrwn9w";
|
||||
};
|
||||
}
|
25
pkgs/dummy/default.nix
Normal file
25
pkgs/dummy/default.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
stdenv
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dummy";
|
||||
|
||||
src = null;
|
||||
dontUnpack = true;
|
||||
dontBuild = true;
|
||||
|
||||
programPath = "/bin/dummy";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
cat > $out/bin/dummy <<EOF
|
||||
#!/bin/sh
|
||||
echo Hello worlda!
|
||||
|
||||
EOF
|
||||
|
||||
chmod +x $out/bin/dummy
|
||||
'';
|
||||
}
|
13
pkgs/extrae/PTR.patch
Normal file
13
pkgs/extrae/PTR.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/merger/common/bfd_manager.c b/src/merger/common/bfd_manager.c
|
||||
index 5f9dacf9..5231e3eb 100644
|
||||
--- a/src/merger/common/bfd_manager.c
|
||||
+++ b/src/merger/common/bfd_manager.c
|
||||
@@ -225,7 +225,7 @@ asymbol **BFDmanager_getDefaultSymbols (void)
|
||||
*
|
||||
* @return No return value.
|
||||
*/
|
||||
-static void BFDmanager_findAddressInSection (bfd * abfd, asection * section, PTR data)
|
||||
+static void BFDmanager_findAddressInSection (bfd * abfd, asection * section, void * data)
|
||||
{
|
||||
#if HAVE_BFD_GET_SECTION_SIZE || HAVE_BFD_SECTION_SIZE || HAVE_BFD_GET_SECTION_SIZE_BEFORE_RELOC
|
||||
bfd_size_type size;
|
113
pkgs/extrae/default.nix
Normal file
113
pkgs/extrae/default.nix
Normal file
@ -0,0 +1,113 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, boost
|
||||
, libdwarf
|
||||
, libelf
|
||||
, libxml2
|
||||
, libunwind
|
||||
, papi
|
||||
, binutils-unwrapped
|
||||
, libiberty
|
||||
, gfortran
|
||||
, xml2
|
||||
, which
|
||||
, libbfd
|
||||
, mpi ? null
|
||||
, cuda ? null
|
||||
, llvmPackages
|
||||
, autoreconfHook
|
||||
#, python3Packages
|
||||
, installShellFiles
|
||||
, symlinkJoin
|
||||
}:
|
||||
|
||||
let
|
||||
libdwarfBundle = symlinkJoin {
|
||||
name = "libdwarfBundle";
|
||||
paths = [ libdwarf.dev libdwarf.lib libdwarf.out ];
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "extrae";
|
||||
version = "4.0.1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-performance-tools";
|
||||
repo = "extrae";
|
||||
rev = "${version}";
|
||||
sha256 = "SlMYxNQXJ0Xg90HmpnotUR3tEPVVBXhk1NtEBJwGBR4=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# FIXME: Waiting for German to merge this patch. Still not in master, merged
|
||||
# on 2023-03-01 in devel branch (after 3 years), see:
|
||||
# https://github.com/bsc-performance-tools/extrae/pull/45
|
||||
./use-command.patch
|
||||
# https://github.com/bsc-performance-tools/extrae/issues/71
|
||||
./PTR.patch
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
buildInputs = [
|
||||
autoreconfHook
|
||||
gfortran
|
||||
libunwind
|
||||
binutils-unwrapped
|
||||
boost
|
||||
boost.dev
|
||||
libiberty
|
||||
mpi
|
||||
xml2
|
||||
which
|
||||
libxml2.dev
|
||||
libbfd
|
||||
#python3Packages.sphinx
|
||||
]
|
||||
++ lib.optional stdenv.cc.isClang llvmPackages.openmp;
|
||||
|
||||
preConfigure = ''
|
||||
configureFlagsArray=(
|
||||
--enable-posix-clock
|
||||
--with-binutils="${binutils-unwrapped} ${libiberty}"
|
||||
--with-dwarf=${libdwarfBundle}
|
||||
--with-elf=${libelf}
|
||||
--with-boost=${boost.dev}
|
||||
--enable-instrument-io
|
||||
--enable-instrument-dynamic-memory
|
||||
--without-memkind
|
||||
--enable-merge-in-trace
|
||||
--disable-online
|
||||
--without-opencl
|
||||
--enable-pebs-sampling
|
||||
--enable-sampling
|
||||
--with-unwind=${libunwind.dev}
|
||||
--with-xml-prefix=${libxml2.dev}
|
||||
--with-papi=${papi}
|
||||
${if (mpi != null) then ''--with-mpi=${mpi}''
|
||||
else ''--without-mpi''}
|
||||
--without-dyninst)
|
||||
'';
|
||||
|
||||
# Install the manuals only by hand, as we don't want to pull the complete
|
||||
# LaTeX world
|
||||
|
||||
# FIXME: sphinx is broken
|
||||
#postBuild = ''
|
||||
# make -C docs man
|
||||
#'';
|
||||
#
|
||||
#postInstall = ''
|
||||
# installManPage docs/builds/man/*/*
|
||||
#'';
|
||||
|
||||
# ++ (
|
||||
# if (openmp)
|
||||
# then [ "--enable-openmp" ]
|
||||
# else []
|
||||
# );
|
||||
}
|
24
pkgs/extrae/use-command.patch
Normal file
24
pkgs/extrae/use-command.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff --git a/substitute b/substitute
|
||||
index d5615606..82ca91a5 100755
|
||||
--- a/substitute
|
||||
+++ b/substitute
|
||||
@@ -16,7 +16,7 @@ UNAME=`uname`
|
||||
if [ "${UNAME}" = "Darwin" -o "${UNAME}" = "AIX" ] ; then
|
||||
TMPFILE=substitute-$$
|
||||
${SED} "s|${KEY}|${VALUE}|g" < ${FILE} >${TMPFILE}
|
||||
- /bin/mv -f ${TMPFILE} ${FILE}
|
||||
+ command mv -f ${TMPFILE} ${FILE}
|
||||
else
|
||||
${SED} "s|${KEY}|${VALUE}|g" -i ${FILE}
|
||||
fi
|
||||
diff --git a/substitute-all b/substitute-all
|
||||
index 48c6b76a..eda7a0f2 100755
|
||||
--- a/substitute-all
|
||||
+++ b/substitute-all
|
||||
@@ -23,5 +23,5 @@ fi
|
||||
|
||||
echo "Applying modification in ${PATHTOCHANGE} - Key = ${KEY} for value = ${VALUE}"
|
||||
|
||||
-/usr/bin/find ${PATHTOCHANGE} -type f -exec ${SCRIPT_LOCATION} "${SED}" "${KEY}" "${VALUE}" {} \;
|
||||
+command find ${PATHTOCHANGE} -type f -exec ${SCRIPT_LOCATION} "${SED}" "${KEY}" "${VALUE}" {} \;
|
||||
|
58
pkgs/fftw/default.nix
Normal file
58
pkgs/fftw/default.nix
Normal file
@ -0,0 +1,58 @@
|
||||
{ fetchurl, stdenv, lib, llvmPackages ? null, precision ? "double", perl, mpi }:
|
||||
|
||||
with lib;
|
||||
|
||||
assert stdenv.cc.isClang -> llvmPackages != null;
|
||||
assert elem precision [ "single" "double" "long-double" "quad-precision" ];
|
||||
|
||||
let
|
||||
version = "3.3.8";
|
||||
withDoc = stdenv.cc.isGNU;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "fftw-${precision}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"http://fftw.org/fftw-${version}.tar.gz"
|
||||
"ftp://ftp.fftw.org/pub/fftw/fftw-${version}.tar.gz"
|
||||
];
|
||||
sha256 = "00z3k8fq561wq2khssqg0kallk0504dzlx989x3vvicjdqpjc4v1";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "man" ]
|
||||
++ optional withDoc "info"; # it's dev-doc only
|
||||
outputBin = "dev"; # fftw-wisdom
|
||||
|
||||
buildInputs = [ mpi ]
|
||||
++ lib.optionals stdenv.cc.isClang [
|
||||
# TODO: This may mismatch the LLVM version sin the stdenv, see #79818.
|
||||
llvmPackages.openmp
|
||||
];
|
||||
|
||||
configureFlags =
|
||||
[ "--enable-shared"
|
||||
"--enable-threads"
|
||||
"--enable-mpi"
|
||||
"--disable-openmp"
|
||||
]
|
||||
++ optional (precision != "double") "--enable-${precision}"
|
||||
# all x86_64 have sse2
|
||||
# however, not all float sizes fit
|
||||
++ optional (stdenv.isx86_64 && (precision == "single" || precision == "double") ) "--enable-sse2"
|
||||
# doc generation causes Fortran wrapper generation which hard-codes gcc
|
||||
++ optional (!withDoc) "--disable-doc";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
checkInputs = [ perl ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fastest Fourier Transform in the West library";
|
||||
homepage = "http://www.fftw.org/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = [ maintainers.spwhitt ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
55
pkgs/gpi-2/default.nix
Normal file
55
pkgs/gpi-2/default.nix
Normal file
@ -0,0 +1,55 @@
|
||||
{
|
||||
stdenv
|
||||
, fetchurl
|
||||
, symlinkJoin
|
||||
, slurm
|
||||
, rdma-core
|
||||
, autoconf
|
||||
, automake
|
||||
, libtool
|
||||
, mpi
|
||||
, rsync
|
||||
, gfortran
|
||||
}:
|
||||
|
||||
let
|
||||
rdma-core-all = symlinkJoin {
|
||||
name ="rdma-core-all";
|
||||
paths = [ rdma-core.dev rdma-core.out ];
|
||||
};
|
||||
mpiAll = symlinkJoin {
|
||||
name = "mpi-all";
|
||||
paths = [ mpi.all ];
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "GPI-2";
|
||||
version = "tagaspi-2021.11";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://pm.bsc.es/gitlab/interoperability/extern/GPI-2/-/archive/${version}/GPI-2-${version}.tar.gz";
|
||||
hash = "sha256-eY2wpyTpnOXRoAcYoAP82Jq9Q7p5WwDpMj+f1vEX5zw=";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patches = [ ./rdma-core.patch ./max-mem.patch ];
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs autogen.sh
|
||||
./autogen.sh
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-infiniband=${rdma-core-all}"
|
||||
"--with-mpi=${mpiAll}"
|
||||
"--with-slurm"
|
||||
"CFLAGS=-fPIC"
|
||||
"CXXFLAGS=-fPIC"
|
||||
];
|
||||
|
||||
buildInputs = [ slurm mpiAll rdma-core-all autoconf automake libtool rsync gfortran ];
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
}
|
10
pkgs/gpi-2/max-mem.patch
Normal file
10
pkgs/gpi-2/max-mem.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/tests/tests/segments/max_mem.c 2025-09-12 13:30:53.449353591 +0200
|
||||
+++ b/tests/tests/segments/max_mem.c 2025-09-12 13:33:49.750352401 +0200
|
||||
@@ -1,5 +1,7 @@
|
||||
#include <test_utils.h>
|
||||
|
||||
+gaspi_size_t gaspi_get_system_mem (void);
|
||||
+
|
||||
/* Test allocates 45% of system memory and creates a segment that
|
||||
large or if several ranks per node exist, divided among that
|
||||
number */
|
12
pkgs/gpi-2/rdma-core.patch
Normal file
12
pkgs/gpi-2/rdma-core.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- a/src/devices/ib/GPI2_IB.h 2025-09-12 13:25:31.564181121 +0200
|
||||
+++ b/src/devices/ib/GPI2_IB.h 2025-09-12 13:24:49.105422150 +0200
|
||||
@@ -26,6 +26,9 @@ along with GPI-2. If not, see <http://ww
|
||||
|
||||
#include "GPI2_Dev.h"
|
||||
|
||||
+/* Missing prototype as driver.h is now private */
|
||||
+int ibv_read_sysfs_file(const char *dir, const char *file, char *buf, size_t size);
|
||||
+
|
||||
#define GASPI_GID_INDEX (0)
|
||||
#define PORT_LINK_UP (5)
|
||||
#define MAX_INLINE_BYTES (128)
|
@ -0,0 +1,46 @@
|
||||
From 1454525f70b43a6957b7c9e1870e997368787da3 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
|
||||
Date: Fri, 8 Nov 2019 21:59:21 -0500
|
||||
Subject: [PATCH] Fix cross-compilation by looking for `ar`.
|
||||
|
||||
---
|
||||
Makefile.am | 2 +-
|
||||
configure.ac | 2 ++
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index d18c49b8..b1b53338 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -494,7 +494,7 @@ CCC=@CXX@
|
||||
# INSTALL_INFO
|
||||
# LN_S
|
||||
|
||||
-AR=ar
|
||||
+AR=@AR@
|
||||
ETAGS=etags
|
||||
ETAGSFLAGS=
|
||||
# Flag that tells etags to assume C++.
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 28e75f17..2449b9f5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -37,6 +37,7 @@ AC_CONFIG_AUX_DIR([build-aux])
|
||||
|
||||
AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin])
|
||||
AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp])
|
||||
+AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
@@ -72,6 +73,7 @@ GROFF_DOC_CHECK
|
||||
GROFF_MAKEINFO
|
||||
GROFF_TEXI2DVI
|
||||
AC_PROG_RANLIB
|
||||
+AC_CHECK_TOOL([AR], [ar], [ar])
|
||||
GROFF_INSTALL_SH
|
||||
GROFF_INSTALL_INFO
|
||||
AC_PROG_INSTALL
|
||||
--
|
||||
2.23.0
|
||||
|
127
pkgs/groff/default.nix
Normal file
127
pkgs/groff/default.nix
Normal file
@ -0,0 +1,127 @@
|
||||
{ stdenv, lib, fetchurl, perl
|
||||
, ghostscript #for postscript and html output
|
||||
, psutils, netpbm #for html output
|
||||
, buildPackages
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, texinfo
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "groff";
|
||||
version = "1.22.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/groff/${pname}-${version}.tar.gz";
|
||||
sha256 = "14q2mldnr1vx0l9lqp9v2f6iww24gj28iyh4j2211hyynx67p3p7";
|
||||
};
|
||||
|
||||
enableParallelBuilding = false;
|
||||
|
||||
patches = [
|
||||
./0001-Fix-cross-compilation-by-looking-for-ar.patch
|
||||
];
|
||||
|
||||
postPatch = lib.optionalString (psutils != null) ''
|
||||
substituteInPlace src/preproc/html/pre-html.cpp \
|
||||
--replace "psselect" "${psutils}/bin/psselect"
|
||||
'' + lib.optionalString (netpbm != null) ''
|
||||
substituteInPlace src/preproc/html/pre-html.cpp \
|
||||
--replace "pnmcut" "${lib.getBin netpbm}/bin/pnmcut" \
|
||||
--replace "pnmcrop" "${lib.getBin netpbm}/bin/pnmcrop" \
|
||||
--replace "pnmtopng" "${lib.getBin netpbm}/bin/pnmtopng"
|
||||
substituteInPlace tmac/www.tmac.in \
|
||||
--replace "pnmcrop" "${lib.getBin netpbm}/bin/pnmcrop" \
|
||||
--replace "pngtopnm" "${lib.getBin netpbm}/bin/pngtopnm" \
|
||||
--replace "@PNMTOPS_NOSETPAGE@" "${lib.getBin netpbm}/bin/pnmtops -nosetpage"
|
||||
'';
|
||||
|
||||
buildInputs = [ ghostscript psutils netpbm perl ];
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config texinfo ];
|
||||
|
||||
# Builds running without a chroot environment may detect the presence
|
||||
# of /usr/X11 in the host system, leading to an impure build of the
|
||||
# package. To avoid this issue, X11 support is explicitly disabled.
|
||||
# Note: If we ever want to *enable* X11 support, then we'll probably
|
||||
# have to pass "--with-appresdir", too.
|
||||
configureFlags = [
|
||||
"--without-x"
|
||||
] ++ lib.optionals (ghostscript != null) [
|
||||
"--with-gs=${ghostscript}/bin/gs"
|
||||
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
||||
"ac_cv_path_PERL=${buildPackages.perl}/bin/perl"
|
||||
];
|
||||
|
||||
makeFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
||||
# Trick to get the build system find the proper 'native' groff
|
||||
# http://www.mail-archive.com/bug-groff@gnu.org/msg01335.html
|
||||
"GROFF_BIN_PATH=${buildPackages.groff}/bin"
|
||||
"GROFFBIN=${buildPackages.groff}/bin/groff"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postInstall = ''
|
||||
for f in 'man.local' 'mdoc.local'; do
|
||||
cat '${./site.tmac}' >>"$out/share/groff/site-tmac/$f"
|
||||
done
|
||||
|
||||
moveToOutput bin/gropdf $out
|
||||
moveToOutput bin/pdfmom $out
|
||||
moveToOutput bin/roff2text $out
|
||||
moveToOutput bin/roff2pdf $out
|
||||
moveToOutput bin/roff2ps $out
|
||||
moveToOutput bin/roff2dvi $out
|
||||
moveToOutput bin/roff2ps $out
|
||||
moveToOutput bin/roff2html $out
|
||||
moveToOutput bin/glilypond $out
|
||||
moveToOutput bin/mmroff $out
|
||||
moveToOutput bin/roff2x $out
|
||||
moveToOutput bin/afmtodit $out
|
||||
moveToOutput bin/gperl $out
|
||||
moveToOutput bin/chem $out
|
||||
moveToOutput share/groff/${version}/font/devpdf $out
|
||||
|
||||
# idk if this is needed, but Fedora does it
|
||||
moveToOutput share/groff/${version}/tmac/pdf.tmac $out
|
||||
|
||||
moveToOutput bin/gpinyin $out
|
||||
moveToOutput lib/groff/gpinyin $out
|
||||
substituteInPlace $out/bin/gpinyin \
|
||||
--replace $out/lib/groff/gpinyin $out/lib/groff/gpinyin
|
||||
|
||||
moveToOutput bin/groffer $out
|
||||
moveToOutput lib/groff/groffer $out
|
||||
substituteInPlace $out/bin/groffer \
|
||||
--replace $out/lib/groff/groffer $out/lib/groff/groffer
|
||||
|
||||
moveToOutput bin/grog $out
|
||||
moveToOutput lib/groff/grog $out
|
||||
substituteInPlace $out/bin/grog \
|
||||
--replace $out/lib/groff/grog $out/lib/groff/grog
|
||||
|
||||
'' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
find $out/ -type f -print0 | xargs --null sed -i 's|${buildPackages.perl}|${perl}|'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.gnu.org/software/groff/";
|
||||
description = "GNU Troff, a typesetting package that reads plain text and produces formatted output";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ pSub ];
|
||||
|
||||
longDescription = ''
|
||||
groff is the GNU implementation of troff, a document formatting
|
||||
system. Included in this release are implementations of troff,
|
||||
pic, eqn, tbl, grn, refer, -man, -mdoc, -mom, and -ms macros,
|
||||
and drivers for PostScript, TeX dvi format, HP LaserJet 4
|
||||
printers, Canon CAPSL printers, HTML and XHTML format (beta
|
||||
status), and typewriter-like devices. Also included is a
|
||||
modified version of the Berkeley -me macros, the enhanced
|
||||
version gxditview of the X11 xditview previewer, and an
|
||||
implementation of the -mm macros.
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
16
pkgs/groff/site.tmac
Normal file
16
pkgs/groff/site.tmac
Normal file
@ -0,0 +1,16 @@
|
||||
.
|
||||
.if n \{\
|
||||
. \" Character translations for non-keyboard
|
||||
. \" characters - to make them searchable
|
||||
. if '\*[.T]'utf8' \{\
|
||||
. char \- \N'45'
|
||||
. char - \N'45'
|
||||
. char ' \N'39'
|
||||
. char \' \N'39'
|
||||
. \}
|
||||
.
|
||||
. \" Shut off SGR by default (groff colors)
|
||||
. \" Require GROFF_SGR envvar defined to turn it on
|
||||
. if '\V[GROFF_SGR]'' \
|
||||
. output x X tty: sgr 0
|
||||
.\}
|
70
pkgs/hwloc/1.11.6/default.nix
Normal file
70
pkgs/hwloc/1.11.6/default.nix
Normal file
@ -0,0 +1,70 @@
|
||||
{ stdenv, lib, fetchurl, pkg-config, expat, ncurses
|
||||
, pciutils, numactl }:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "hwloc-1.11.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.open-mpi.org/software/hwloc/v1.11/downloads/${name}.tar.bz2";
|
||||
sha256 = "1yl7dm2qplwmnidd712zy12qfvxk28k8ccs694n42ybwdjwzg1bn";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
# Filter out `null' inputs. This allows users to `.override' the
|
||||
# derivation and set optional dependencies to `null'.
|
||||
buildInputs = filter (x: x != null)
|
||||
([ expat ncurses ]
|
||||
++ (optionals stdenv.isLinux [ numactl ]));
|
||||
|
||||
propagatedBuildInputs =
|
||||
# Since `libpci' appears in `hwloc.pc', it must be propagated.
|
||||
optional stdenv.isLinux pciutils;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall =
|
||||
optionalString (stdenv.isLinux && numactl != null)
|
||||
'' if [ -d "${numactl}/lib64" ]
|
||||
then
|
||||
numalibdir="${numactl}/lib64"
|
||||
else
|
||||
numalibdir="${numactl}/lib"
|
||||
test -d "$numalibdir"
|
||||
fi
|
||||
|
||||
sed -i "$out/lib/libhwloc.la" \
|
||||
-e "s|-lnuma|-L$numalibdir -lnuma|g"
|
||||
'';
|
||||
|
||||
# Checks disabled because they're impure (hardware dependent) and
|
||||
# fail on some build machines.
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Portable abstraction of hierarchical architectures for high-performance computing";
|
||||
longDescription = ''
|
||||
hwloc provides a portable abstraction (across OS,
|
||||
versions, architectures, ...) of the hierarchical topology of
|
||||
modern architectures, including NUMA memory nodes, sockets,
|
||||
shared caches, cores and simultaneous multithreading. It also
|
||||
gathers various attributes such as cache and memory
|
||||
information. It primarily aims at helping high-performance
|
||||
computing applications with gathering information about the
|
||||
hardware so as to exploit it accordingly and efficiently.
|
||||
|
||||
hwloc may display the topology in multiple convenient
|
||||
formats. It also offers a powerful programming interface to
|
||||
gather information about the hardware, bind processes, and much
|
||||
more.
|
||||
'';
|
||||
|
||||
# http://www.open-mpi.org/projects/hwloc/license.php
|
||||
license = licenses.bsd3;
|
||||
homepage = http://www.open-mpi.org/projects/hwloc/;
|
||||
maintainers = [ ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
40
pkgs/intel-compiler/default.nix
Normal file
40
pkgs/intel-compiler/default.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
stdenv
|
||||
, gcc
|
||||
, iccUnwrapped
|
||||
, wrapCCWith
|
||||
, intelLicense
|
||||
}:
|
||||
|
||||
let
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
inherit gcc;
|
||||
in wrapCCWith rec {
|
||||
cc = iccUnwrapped;
|
||||
extraBuildCommands = ''
|
||||
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${iccUnwrapped}/include" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${iccUnwrapped}/include/intel64" >> $out/nix-support/cc-cflags
|
||||
echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags
|
||||
|
||||
cat "${iccUnwrapped}/nix-support/propagated-build-inputs" >> \
|
||||
$out/nix-support/propagated-build-inputs
|
||||
|
||||
echo "export INTEL_LICENSE_FILE=${intelLicense}" \
|
||||
>> $out/nix-support/setup-hook
|
||||
|
||||
# Create the wrappers for icc and icpc
|
||||
if [ -e $ccPath/icc ]; then
|
||||
wrap icc $wrapper $ccPath/icc
|
||||
fi
|
||||
|
||||
if [ -e $ccPath/icpc ]; then
|
||||
wrap icpc $wrapper $ccPath/icpc
|
||||
fi
|
||||
|
||||
if [ -e $ccPath/ifort ]; then
|
||||
wrap ifort $wrapper $ccPath/ifort
|
||||
fi
|
||||
'';
|
||||
}
|
62
pkgs/intel-compiler/icc2020.nix
Normal file
62
pkgs/intel-compiler/icc2020.nix
Normal file
@ -0,0 +1,62 @@
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, rpmextract
|
||||
, autoPatchelfHook
|
||||
, gcc
|
||||
, intel-mpi
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "${year}.${v_a}.${v_b}";
|
||||
name = "intel-compiler-${version}";
|
||||
|
||||
passthru = {
|
||||
CC = "icc";
|
||||
CXX = "icpc";
|
||||
};
|
||||
|
||||
# From Arch Linux PKGBUILD
|
||||
dir_nr="17114";
|
||||
year="2020";
|
||||
v_a="4";
|
||||
v_b="304";
|
||||
update="4";
|
||||
composer_xe_dir="compilers_and_libraries_${year}.${v_a}.${v_b}";
|
||||
tgz="parallel_studio_xe_2020_update${update}_professional_edition.tgz";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/${dir_nr}/${tgz}";
|
||||
sha256 = "1rn9kk5bjj0jfv853b09dxrx7kzvv8dlyzw3hl9ijx9mqr09lrzr";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
rpmextract
|
||||
autoPatchelfHook
|
||||
gcc.cc.lib
|
||||
gcc
|
||||
intel-mpi
|
||||
];
|
||||
|
||||
# The gcc package is required for building other programs
|
||||
propagatedBuildInputs = [ gcc ];
|
||||
|
||||
installPhase = ''
|
||||
pwd
|
||||
ls -l rpm
|
||||
rpmextract rpm/intel-icc-*.rpm
|
||||
rpmextract rpm/intel-comp-*.rpm
|
||||
rpmextract rpm/intel-c-comp-*.rpm
|
||||
rpmextract rpm/intel-openmp*.rpm
|
||||
rpmextract rpm/intel-ifort*.rpm
|
||||
|
||||
mkdir -p $out/{bin,lib,include}
|
||||
|
||||
pushd ./opt/intel/${composer_xe_dir}/linux/
|
||||
cp -a bin/intel64/* $out/bin/
|
||||
cp -a compiler/include/* $out/include/
|
||||
cp -a compiler/lib/intel64_lin/* $out/lib/
|
||||
ln -s lib $out/lib_lin
|
||||
rm $out/lib/*.dbg
|
||||
popd
|
||||
'';
|
||||
}
|
148
pkgs/intel-compiler/icc2021.nix
Normal file
148
pkgs/intel-compiler/icc2021.nix
Normal file
@ -0,0 +1,148 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, dpkg
|
||||
, rsync
|
||||
, libffi
|
||||
, libelf
|
||||
, libxml2
|
||||
, hwloc
|
||||
, autoPatchelfHook
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
getsrc = url: sha256: fetchurl { inherit url sha256; };
|
||||
|
||||
version = "2021.2.0";
|
||||
_debpkgrel = "610";
|
||||
tbbrel = "357";
|
||||
|
||||
# Shorhands
|
||||
main = "intel-oneapi-dpcpp-cpp";
|
||||
compiler = "intel-oneapi-compiler-dpcpp-cpp";
|
||||
shared = "intel-oneapi-compiler-shared";
|
||||
openmp = "intel-oneapi-openmp";
|
||||
tbb = "intel-oneapi-tbb";
|
||||
|
||||
# From Arch Linux PKGBUILD:
|
||||
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=intel-oneapi-compiler-dpcpp-cpp
|
||||
debs = [
|
||||
# From intel-oneapi-compiler-dpcpp-cpp
|
||||
"${main}-${version}-${version}-${_debpkgrel}_amd64.deb"
|
||||
"${compiler}-common-${version}-${version}-${_debpkgrel}_all.deb"
|
||||
"${compiler}-runtime-${version}-${version}-${_debpkgrel}_amd64.deb"
|
||||
|
||||
# From intel-oneapi-compiler-shared
|
||||
"${shared}-${version}-${version}-${_debpkgrel}_amd64.deb"
|
||||
"${shared}-runtime-${version}-${version}-${_debpkgrel}_amd64.deb"
|
||||
"${shared}-common-${version}-${version}-${_debpkgrel}_all.deb"
|
||||
"${shared}-common-runtime-${version}-${version}-${_debpkgrel}_all.deb"
|
||||
"${compiler}-classic-fortran-shared-runtime-${version}-${version}-${_debpkgrel}_amd64.deb"
|
||||
|
||||
# From intel-oneapi-openmp
|
||||
"${openmp}-${version}-${version}-${_debpkgrel}_amd64.deb"
|
||||
"${openmp}-common-${version}-${version}-${_debpkgrel}_all.deb"
|
||||
|
||||
# From intel-oneapi-tbb
|
||||
"${tbb}-${version}-${version}-${tbbrel}_amd64.deb"
|
||||
"${tbb}-devel-${version}-${version}-${tbbrel}_amd64.deb"
|
||||
"${tbb}-common-${version}-${version}-${tbbrel}_all.deb"
|
||||
"${tbb}-common-devel-${version}-${version}-${tbbrel}_all.deb"
|
||||
];
|
||||
|
||||
apthost = "https://apt.repos.intel.com/oneapi/pool/main/";
|
||||
urls = map (x: apthost + x) debs;
|
||||
|
||||
sums = [
|
||||
# From intel-oneapi-compiler-dpcpp-cpp
|
||||
"0pwsfzkazr9yf6v6lgwb3p2in6ch3rlcc9qcfarkyqn052p760kk"
|
||||
"0vzsanldhs4ym4gsfn0zjqm03x53ma1zjkj24hpkhpsvlr2r069w"
|
||||
"0nx62v6g0wl70lqdh7sh7gfgxbynhrrips9gpj9if60ngz6fm21m"
|
||||
|
||||
# From intel-oneapi-compiler-shared
|
||||
"1al80pcy2r3q2r2pm04sva7rd3z6y287mkdv5jq4p5bfd8yi14d4"
|
||||
"07rp0cjmbgj48wly9dm6ibxzbsanmgrsjjqr7mx688ms6qbhv314"
|
||||
"1pf4xckyyhssjknhs6hwampjsz2qjlg81jw2fc441zaccwf25yf3"
|
||||
"0hk0x4wq60g9wnn9j051v25zcmbasjdzp34xfvrihmcvyws0s69g"
|
||||
"0dhbw8kshw4abqc9zf891z5ic0x13x3kvhk56nrqkqgcfwps9w8a"
|
||||
|
||||
# From intel-oneapi-openmp
|
||||
"1wqy2sjwlqdh72zhfrxl9pm106hjzfdbbm98cxigbg20fb5lbv5a"
|
||||
"19nbqypvqcf8c3mwriaqrmp5igjpwvwrb9mq2fxa5i40w7bhlxjl"
|
||||
|
||||
# From intel-oneapi-tbb
|
||||
"1dpii3g861kimky0x7dqcj6hg7zb6i5kw1wgwrxdc5yxhi5slbm9"
|
||||
"0bl1flm6w0w9nzrh34ig4p9qz2gbdgw9q14as2pwp8flicd8p899"
|
||||
"0w3kip6q713v1xlfc10ai4v15cbwmbqrv8r1f5x6pfqdbb0bpmbv"
|
||||
"0v95nmddyi0mjjdvm07w9fm3vq4a0wkx7zxlyzn2f4xg38qc5j73"
|
||||
];
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit version;
|
||||
name = "intel-compiler-${version}";
|
||||
|
||||
passthru = {
|
||||
CC = "icc";
|
||||
CXX = "icpc";
|
||||
};
|
||||
|
||||
srcs = zipListsWith getsrc urls sums;
|
||||
|
||||
buildInputs = [
|
||||
dpkg
|
||||
rsync
|
||||
libffi
|
||||
libelf
|
||||
libxml2
|
||||
hwloc
|
||||
autoPatchelfHook
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
dontStrip = true;
|
||||
|
||||
# The gcc package is required for building other programs
|
||||
#propagatedBuildInputs = [ gcc ];
|
||||
|
||||
unpackCmd = ''
|
||||
dpkg -x $curSrc .
|
||||
'';
|
||||
|
||||
# FIXME: Some dependencies are missing
|
||||
autoPatchelfIgnoreMissingDeps = true;
|
||||
#autoPatchelfIgnoreMissingDeps = [ "*" ];
|
||||
|
||||
# Compiler
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,lib,include}
|
||||
|
||||
pushd intel/oneapi/compiler/${version}/linux
|
||||
# Binaries
|
||||
rsync -a bin/ $out/bin/
|
||||
rsync -a bin/intel64/ $out/bin/
|
||||
|
||||
# Libraries
|
||||
rsync -a --exclude=oclfpga lib/ $out/lib/
|
||||
rsync -a compiler/lib/intel64_lin/ $out/lib/
|
||||
|
||||
# Headers
|
||||
rsync -a include/ $out/include/
|
||||
rsync -a compiler/include/ $out/include/
|
||||
popd
|
||||
|
||||
# TBB
|
||||
pushd intel/oneapi/tbb/${version}
|
||||
# Libraries
|
||||
rsync -a lib/intel64/gcc4.8/ $out/lib/
|
||||
|
||||
# Headers
|
||||
rsync -a include/ $out/include/
|
||||
popd
|
||||
'';
|
||||
|
||||
}
|
39
pkgs/intel-compiler/license.nix
Normal file
39
pkgs/intel-compiler/license.nix
Normal file
@ -0,0 +1,39 @@
|
||||
{ stdenv
|
||||
, requireFile
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "intel-compiler-license";
|
||||
version = "2019.7.217";
|
||||
|
||||
src = requireFile {
|
||||
name = "license.lic";
|
||||
sha256 = "0rgmsqkhpqcfny8j7msa4sgz3prhh248ylh69gjh12dkra77prsj";
|
||||
message = ''
|
||||
The Intel Compiler requires a license. You can get one (free of charge) if
|
||||
you meet the requeriments at the website:
|
||||
|
||||
https://software.intel.com/content/www/us/en/develop/articles/qualify-for-free-software.html#opensourcecontributor
|
||||
|
||||
Or you can use your own license. Add it to the store with:
|
||||
|
||||
$ nix-store --add-fixed sha256 license.lic
|
||||
/nix/store/2p9v0nvsl3scshjx348z6j32rh7ac0db-license.lic
|
||||
|
||||
Notice that the name must match exactly "license.lic".
|
||||
|
||||
Then update the hash in the bsc/intel-compiler/license.nix file using the
|
||||
nix-hash command with:
|
||||
|
||||
$ nix-hash --type sha256 --base32 --flat /nix/store/2p9v0nvsl3scshjx348z6j32rh7ac0db-license.lic
|
||||
06g2xgm1lch6zqfkhb768wacdx46kf61mfvj5wfpyssw0anr0x9q
|
||||
'';
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp $src $out/
|
||||
'';
|
||||
}
|
29
pkgs/intel-compiler/wrapper2021.nix
Normal file
29
pkgs/intel-compiler/wrapper2021.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
stdenv
|
||||
, gcc
|
||||
, iccUnwrapped
|
||||
, wrapCCWith
|
||||
}:
|
||||
|
||||
let
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
inherit gcc;
|
||||
in wrapCCWith rec {
|
||||
cc = iccUnwrapped;
|
||||
extraBuildCommands = ''
|
||||
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${iccUnwrapped}/include" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${iccUnwrapped}/include/icc" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${gcc.cc}/include/c++/${gcc.version}" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${gcc.cc}/include/c++/${gcc.version}/${targetConfig}" >> $out/nix-support/cc-cflags
|
||||
|
||||
echo "-L${iccUnwrapped}/lib" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags
|
||||
|
||||
# Create the wrappers for icx*
|
||||
wrap lld $wrapper $ccPath/lld
|
||||
wrap icx $wrapper $ccPath/icx
|
||||
wrap icpx $wrapper $ccPath/icpx
|
||||
'';
|
||||
}
|
104
pkgs/intel-mpi/default.nix
Normal file
104
pkgs/intel-mpi/default.nix
Normal file
@ -0,0 +1,104 @@
|
||||
{ stdenv
|
||||
, rpmextract
|
||||
, gcc
|
||||
, zlib
|
||||
, ucx
|
||||
, numactl
|
||||
, rdma-core
|
||||
, libpsm2
|
||||
, patchelf
|
||||
, autoPatchelfHook
|
||||
, enableDebug ? false
|
||||
# The _mt version seems to cause seg-faults and deadlocks with the libpsm2
|
||||
# provider library with programs that call the MPI library without any locking
|
||||
# mechanism. See https://pm.bsc.es/gitlab/rarias/bscpkgs/-/issues/28. By
|
||||
# default, we use the non-mt variant, which provides a big lock. If you want to
|
||||
# use it, take a look at the I_MPI_THREAD_SPLIT env-var as well.
|
||||
, enableMt ? false
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
lib_variant = (if enableDebug then "debug" else "release");
|
||||
|
||||
# See https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-reference-linux/top/environment-variable-reference/other-environment-variables.html
|
||||
lib_mt = (if enableMt then "_mt" else "");
|
||||
lib_name = "${lib_variant}${lib_mt}";
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "intel-mpi-${version}";
|
||||
version = "2019.10.317";
|
||||
dir_nr = "17534";
|
||||
|
||||
src = builtins.fetchTarball {
|
||||
url = "http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/${dir_nr}/l_mpi_${version}.tgz";
|
||||
sha256 = "00nimgqywr20dv1ns5kg4r8539gvharn0xfj48i7mhbg8kwf8s08";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
rpmextract
|
||||
autoPatchelfHook
|
||||
gcc.cc.lib
|
||||
zlib
|
||||
ucx
|
||||
numactl
|
||||
rdma-core
|
||||
libpsm2
|
||||
patchelf
|
||||
];
|
||||
|
||||
postUnpack = ''
|
||||
pushd $sourceRoot
|
||||
rpmextract rpm/intel-mpi-*.rpm
|
||||
# Predictable name
|
||||
mv opt/intel/compilers_and_libraries_* opt/intel/compilers_and_libraries
|
||||
popd
|
||||
sourceRoot="$sourceRoot/opt/intel/compilers_and_libraries/linux/mpi/intel64"
|
||||
'';
|
||||
|
||||
patches = [
|
||||
./mpicc.patch
|
||||
./mpicxx.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
for i in bin/mpi* ; do
|
||||
echo "Fixing paths in $i"
|
||||
sed -i "s:I_MPI_SUBSTITUTE_INSTALLDIR:$out:g" "$i"
|
||||
done
|
||||
'';
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
mv etc $out
|
||||
mv bin $out
|
||||
mv include $out
|
||||
mkdir $out/lib
|
||||
cp -a lib/lib* $out/lib
|
||||
cp -a lib/${lib_name}/lib* $out/lib
|
||||
cp -a libfabric/lib/* $out/lib
|
||||
cp -a libfabric/lib/prov/* $out/lib
|
||||
cp -a libfabric/bin/* $out/bin
|
||||
ln -s . $out/intel64
|
||||
rm $out/lib/libmpi.dbg
|
||||
|
||||
# Fixup Intel PSM2 library missing (now located at PSMX2)
|
||||
ln -s $out/lib/libpsmx2-fi.so $out/lib/libpsm2-fi.so
|
||||
'';
|
||||
|
||||
dontAutoPatchelf = true;
|
||||
|
||||
# The rpath of libfabric.so bundled with Intel MPI is patched to include the
|
||||
# rdma-core lib path, as is required for dlopen to find the rdma components.
|
||||
# TODO: Try the upstream libfabric library with rdma support, so we can avoid
|
||||
# this hack.
|
||||
postFixup = ''
|
||||
autoPatchelf -- $out
|
||||
patchelf --set-rpath "$out/lib:${rdma-core}/lib:${libpsm2}/lib" $out/lib/libfabric.so
|
||||
echo "Patched RPATH in libfabric.so to: $(patchelf --print-rpath $out/lib/libfabric.so)"
|
||||
'';
|
||||
}
|
20
pkgs/intel-mpi/mpicc.patch
Normal file
20
pkgs/intel-mpi/mpicc.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- a/bin/mpicc 2021-02-04 18:15:11.233632360 +0100
|
||||
+++ b/bin/mpicc 2021-02-05 09:33:49.493598479 +0100
|
||||
@@ -50,7 +50,7 @@
|
||||
if [ x"$opt_args" == x"" ]; then
|
||||
case "${compiler_short_name}" in
|
||||
icc|icx) "$dir"/mpiicc -cc=$compiler_name "$@" ;;
|
||||
- cc|*gcc*|clang*) "$dir"/mpigcc -cc=$compiler_name "$@" ;;
|
||||
+ cc|*gcc*|clang*|mcc|echo) "$dir"/mpigcc -cc=$compiler_name "$@" ;;
|
||||
mpicc) "$dir"/mpigcc "$@" ;;
|
||||
*)
|
||||
echo "Error: unsupported compiler name '$compiler_name'."
|
||||
@@ -60,7 +60,7 @@
|
||||
else
|
||||
case "${compiler_short_name}" in
|
||||
icc|icx) "$dir"/mpiicc -cc=$compiler_name "$@" $opt_args ;;
|
||||
- cc|*gcc*|clang*) "$dir"/mpigcc -cc=$compiler_name "$@" $opt_args ;;
|
||||
+ cc|*gcc*|clang*|mcc|echo) "$dir"/mpigcc -cc=$compiler_name "$@" $opt_args ;;
|
||||
mpicc) "$dir"/mpigcc "$@" $opt_args ;;
|
||||
*)
|
||||
echo "Error: unsupported compiler name '$compiler_name'."
|
20
pkgs/intel-mpi/mpicxx.patch
Normal file
20
pkgs/intel-mpi/mpicxx.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- a/bin/mpicxx 2021-02-04 18:15:11.233632360 +0100
|
||||
+++ b/bin/mpicxx 2021-02-05 09:36:21.396922569 +0100
|
||||
@@ -50,7 +50,7 @@
|
||||
if [ x"$opt_args" == x"" ]; then
|
||||
case "${compiler_short_name}" in
|
||||
icc|icpc|dpcpp) "$dir"/mpiicpc -cxx=$compiler_name "$@" ;;
|
||||
- *g++*) "$dir"/mpigxx -cxx=$compiler_name "$@" ;;
|
||||
+ *g++*|clang*++|mcxx|echo) "$dir"/mpigxx -cxx=$compiler_name "$@" ;;
|
||||
mpicxx) "$dir"/mpigxx "$@" ;;
|
||||
*)
|
||||
echo "Error: unsupported compiler name '$compiler_name'."
|
||||
@@ -60,7 +60,7 @@
|
||||
else
|
||||
case "${compiler_short_name}" in
|
||||
icc|icpc|dpcpp) "$dir"/mpiicpc -cxx=$compiler_name "$@" $opt_args ;;
|
||||
- *g++*) "$dir"/mpigxx -cxx=$compiler_name "$@" $opt_args ;;
|
||||
+ *g++*|clang*++|mcxx|echo) "$dir"/mpigxx -cxx=$compiler_name "$@" $opt_args ;;
|
||||
mpicxx) "$dir"/mpigxx "$@" $opt_args ;;
|
||||
*)
|
||||
echo "Error: unsupported compiler name '$compiler_name'."
|
492
pkgs/intel-oneapi/2023.nix
Normal file
492
pkgs/intel-oneapi/2023.nix
Normal file
@ -0,0 +1,492 @@
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, lib
|
||||
, dpkg
|
||||
, rsync
|
||||
, libffi_3_3
|
||||
, libelf
|
||||
, libxml2
|
||||
, hwloc
|
||||
, zlib
|
||||
, autoPatchelfHook
|
||||
, libfabric
|
||||
, gcc13
|
||||
, wrapCCWith
|
||||
}:
|
||||
|
||||
# The distribution of intel packages is a mess. We are doing the installation
|
||||
# based on the .deb metapackage "intel-hpckit", and follow de dependencies,
|
||||
# which have mismatching versions.
|
||||
|
||||
# Bruno Bzeznik (bzizou) went through the madness of using their .sh installer,
|
||||
# pulling all the X dependencies here:
|
||||
# https://github.com/Gricad/nur-packages/blob/4b67c8ad0ce1baa1d2f53ba41ae5bca8e00a9a63/pkgs/intel/oneapi.nix
|
||||
|
||||
# But this is an attempt to install the packages from the APT repo
|
||||
|
||||
let
|
||||
|
||||
gcc = gcc13;
|
||||
|
||||
v = {
|
||||
hpckit = "2023.1.0";
|
||||
compiler = "2023.1.0";
|
||||
tbb = "2021.9.0";
|
||||
mpi = "2021.9.0";
|
||||
};
|
||||
|
||||
aptPackageIndex = stdenv.mkDerivation {
|
||||
name = "intel-oneapi-packages";
|
||||
srcs = [
|
||||
# Run update.sh to update the package lists
|
||||
./amd64-packages ./all-packages
|
||||
];
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
awk -F': ' '\
|
||||
BEGIN { print "[ {" } \
|
||||
NR>1 && /^Package: / { print "} {"; } \
|
||||
/: / { printf "%s = \"%s\";\n", $1, $2 } \
|
||||
END { print "} ]" }' $srcs > $out
|
||||
'';
|
||||
};
|
||||
|
||||
aptPackages = import aptPackageIndex;
|
||||
|
||||
apthost = "https://apt.repos.intel.com/oneapi/";
|
||||
|
||||
getSum = pkgList: name:
|
||||
let
|
||||
matches = lib.filter (x: name == x.Package) pkgList;
|
||||
#n = lib.length matches;
|
||||
#match = builtins.trace (name + " -- ${builtins.toString n}") (lib.elemAt matches 0);
|
||||
match = lib.elemAt matches 0;
|
||||
in
|
||||
match.SHA256;
|
||||
|
||||
getUrl = pkgList: name:
|
||||
let
|
||||
matches = lib.filter (x: name == x.Package) pkgList;
|
||||
#match = assert lib.length matches == 1; lib.elemAt matches 0;
|
||||
n = lib.length matches;
|
||||
match =
|
||||
#builtins.trace (name + " -- n=${builtins.toString n}")
|
||||
(lib.elemAt matches 0);
|
||||
in
|
||||
apthost + match.Filename;
|
||||
|
||||
uncompressDebs = debs: name: stdenv.mkDerivation {
|
||||
name = name;
|
||||
srcs = debs;
|
||||
nativeBuildInputs = [ dpkg ];
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
for src in $srcs; do
|
||||
echo "unpacking $src"
|
||||
dpkg -x $src $out
|
||||
done
|
||||
'';
|
||||
};
|
||||
|
||||
joinDebs = name: names:
|
||||
let
|
||||
urls = builtins.map (x: getUrl aptPackages x) names;
|
||||
sums = builtins.map (x: getSum aptPackages x) names;
|
||||
getsrc = url: sha256: builtins.fetchurl { inherit url sha256; };
|
||||
debs = lib.zipListsWith getsrc urls sums;
|
||||
in
|
||||
uncompressDebs debs "${name}-source";
|
||||
|
||||
|
||||
intel-mpi = stdenv.mkDerivation rec {
|
||||
version = v.mpi;
|
||||
pname = "intel-mpi";
|
||||
|
||||
src = joinDebs pname [
|
||||
"intel-oneapi-mpi-devel-${version}"
|
||||
"intel-oneapi-mpi-${version}"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
rsync
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libfabric
|
||||
zlib
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
dontStrip = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,etc,lib,include}
|
||||
mkdir -p $out/share/man
|
||||
|
||||
cd $src
|
||||
|
||||
# MPI
|
||||
pushd opt/intel/oneapi/mpi/${version}
|
||||
rsync -a man/ $out/share/man/
|
||||
rsync -a etc/ $out/etc/
|
||||
rsync -a include/ $out/include/
|
||||
cp -a lib/lib* $out/lib/
|
||||
# Copy the actual libmpi.so from release
|
||||
cp -a lib/release/lib* $out/lib
|
||||
# Broken due missing libze_loader.so.1
|
||||
rsync -a --exclude IMB-MPI1-GPU bin/ $out/bin/
|
||||
popd
|
||||
'';
|
||||
preFixup = ''
|
||||
for i in $out/bin/mpi* ; do
|
||||
echo "Fixing paths in $i"
|
||||
sed -i "s:I_MPI_SUBSTITUTE_INSTALLDIR:$out:g" "$i"
|
||||
done
|
||||
'';
|
||||
};
|
||||
|
||||
intel-tbb = stdenv.mkDerivation rec {
|
||||
version = v.tbb;
|
||||
pname = "intel-tbb";
|
||||
src = joinDebs pname [
|
||||
"intel-oneapi-tbb-${version}"
|
||||
"intel-oneapi-tbb-common-${version}"
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
intel-mpi
|
||||
libffi_3_3
|
||||
libelf
|
||||
libxml2
|
||||
hwloc
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
rsync
|
||||
];
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
dontStrip = true;
|
||||
|
||||
autoPatchelfIgnoreMissingDeps = [ "libhwloc.so.5" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
|
||||
cd $src
|
||||
|
||||
pushd opt/intel/oneapi/tbb/${version}
|
||||
# Libraries
|
||||
rsync -a lib/intel64/gcc4.8/ $out/lib/
|
||||
popd
|
||||
'';
|
||||
};
|
||||
|
||||
intel-compiler-shared = stdenv.mkDerivation rec {
|
||||
version = v.compiler;
|
||||
pname = "intel-compiler-shared";
|
||||
src = joinDebs pname [
|
||||
"intel-oneapi-compiler-shared-${version}"
|
||||
"intel-oneapi-compiler-shared-common-${version}"
|
||||
"intel-oneapi-compiler-shared-runtime-${version}"
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
intel-mpi
|
||||
intel-tbb
|
||||
libffi_3_3
|
||||
libelf
|
||||
libxml2
|
||||
zlib
|
||||
hwloc
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
rsync
|
||||
];
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
dontStrip = true;
|
||||
|
||||
autoPatchelfIgnoreMissingDeps = [ "libsycl.so.6" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,lib,include}
|
||||
mkdir -p $out/share/man
|
||||
|
||||
cd $src
|
||||
|
||||
# Compiler
|
||||
pushd opt/intel/oneapi/compiler/${version}
|
||||
pushd linux
|
||||
# Binaries
|
||||
rsync -a bin/ $out/bin/
|
||||
rsync -a --exclude libcilkrts.so.5 bin/intel64/ $out/bin/
|
||||
|
||||
# Libraries
|
||||
rsync -a lib/ $out/lib/
|
||||
rsync -a lib/x64/ $out/lib/
|
||||
rsync -a compiler/lib/intel64_lin/ $out/lib/
|
||||
chmod +w $out/lib
|
||||
cp bin/intel64/libcilkrts.so.5 $out/lib/
|
||||
ln -s $out/lib/libcilkrts.so.5 $out/lib/libcilkrts.so
|
||||
|
||||
# Headers
|
||||
rsync -a compiler/include/ $out/include/
|
||||
popd
|
||||
popd
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
intel-compiler-fortran = stdenv.mkDerivation rec {
|
||||
version = v.compiler;
|
||||
pname = "intel-fortran";
|
||||
src = joinDebs pname [
|
||||
"intel-oneapi-compiler-fortran-${version}"
|
||||
"intel-oneapi-compiler-fortran-common-${version}"
|
||||
"intel-oneapi-compiler-fortran-runtime-${version}"
|
||||
|
||||
"intel-oneapi-compiler-dpcpp-cpp-classic-fortran-shared-runtime-${version}"
|
||||
#"intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-${version}"
|
||||
#"intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-runtime-${version}"
|
||||
];
|
||||
|
||||
langFortran = true;
|
||||
|
||||
buildInputs = [
|
||||
intel-mpi
|
||||
intel-compiler-shared
|
||||
libffi_3_3
|
||||
libelf
|
||||
libxml2
|
||||
hwloc
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
rsync
|
||||
];
|
||||
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,lib,include}
|
||||
mkdir -p $out/share/man
|
||||
|
||||
cd $src
|
||||
|
||||
# Compiler
|
||||
pushd opt/intel/oneapi/compiler/${version}
|
||||
pushd linux
|
||||
# Binaries
|
||||
rsync -a bin/ $out/bin/
|
||||
rsync -a bin/intel64/ $out/bin/
|
||||
|
||||
# Libraries
|
||||
rsync -a lib/ $out/lib/
|
||||
rsync -a compiler/lib/intel64_lin/ $out/lib/
|
||||
|
||||
# Headers
|
||||
rsync -a compiler/include/ $out/include/
|
||||
popd
|
||||
|
||||
# Manuals
|
||||
rsync -a documentation/en/man/common/ $out/share/man/
|
||||
|
||||
# Fix lib_lin
|
||||
ln -s $out/lib $out/lib_lin
|
||||
popd
|
||||
'';
|
||||
};
|
||||
|
||||
intel-compiler = stdenv.mkDerivation rec {
|
||||
version = v.compiler;
|
||||
pname = "intel-compiler";
|
||||
src = joinDebs pname [
|
||||
# C/C++
|
||||
"intel-oneapi-dpcpp-cpp-${version}"
|
||||
"intel-oneapi-compiler-dpcpp-cpp-${version}"
|
||||
"intel-oneapi-compiler-dpcpp-cpp-common-${version}"
|
||||
"intel-oneapi-compiler-dpcpp-cpp-runtime-${version}"
|
||||
"intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-${version}"
|
||||
"intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-common-${version}"
|
||||
"intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-runtime-${version}"
|
||||
"intel-oneapi-compiler-dpcpp-cpp-classic-fortran-shared-runtime-${version}"
|
||||
];
|
||||
dontCheckForBrokenSymlinks = true;
|
||||
# From https://aur.archlinux.org/packages/intel-oneapi-compiler:
|
||||
# - intel-oneapi-compiler-cpp-eclipse-cfg-2023.0.0-25370_all.deb
|
||||
# + intel-oneapi-compiler-dpcpp-cpp-2023.0.0-2023.0.0-25370_amd64.deb
|
||||
# x intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.0.0-2023.0.0-25370_amd64.deb (empty)
|
||||
# + intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.0.0-25370_amd64.deb
|
||||
# + intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-common-2023.0.0-2023.0.0-25370_all.deb
|
||||
# + intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-runtime-2023.0.0-2023.0.0-25370_amd64.deb
|
||||
# + intel-oneapi-compiler-dpcpp-cpp-classic-fortran-shared-runtime-2023.0.0-2023.0.0-25370_amd64.deb
|
||||
# + intel-oneapi-compiler-dpcpp-cpp-common-2023.0.0-2023.0.0-25370_all.deb
|
||||
# + intel-oneapi-compiler-dpcpp-cpp-runtime-2023.0.0-2023.0.0-25370_amd64.deb
|
||||
# - intel-oneapi-compiler-dpcpp-eclipse-cfg-2023.0.0-25370_all.deb
|
||||
# - intel-oneapi-compiler-fortran-2023.0.0-2023.0.0-25370_amd64.deb
|
||||
# - intel-oneapi-compiler-fortran-common-2023.0.0-2023.0.0-25370_all.deb
|
||||
# - intel-oneapi-compiler-fortran-runtime-2023.0.0-2023.0.0-25370_amd64.deb
|
||||
# - intel-oneapi-compiler-fortran-runtime-2023.0.0-25370_amd64.deb
|
||||
# - intel-oneapi-compiler-shared-2023.0.0-2023.0.0-25370_amd64.deb
|
||||
# - intel-oneapi-compiler-shared-common-2023.0.0-2023.0.0-25370_all.deb
|
||||
# - intel-oneapi-compiler-shared-runtime-2023.0.0-2023.0.0-25370_amd64.deb
|
||||
# - intel-oneapi-dpcpp-cpp-2023.0.0-2023.0.0-25370_amd64.deb
|
||||
# - intel-oneapi-openmp-2023.0.0-2023.0.0-25370_amd64.deb
|
||||
# - intel-oneapi-openmp-common-2023.0.0-2023.0.0-25370_all.deb
|
||||
|
||||
buildInputs = [
|
||||
intel-compiler-shared
|
||||
libffi_3_3
|
||||
libelf
|
||||
libxml2
|
||||
hwloc
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
rsync
|
||||
];
|
||||
autoPatchelfIgnoreMissingDeps = [ "libtbb.so.12" "libtbbmalloc.so.2" "libze_loader.so.1" ];
|
||||
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,lib}
|
||||
mkdir -p $out/share/man
|
||||
|
||||
cd $src
|
||||
|
||||
# Compiler
|
||||
pushd opt/intel/oneapi/compiler/${version}
|
||||
pushd linux
|
||||
# Binaries
|
||||
rsync -a bin/ $out/bin/
|
||||
rsync -a bin-llvm/ $out/bin/
|
||||
rsync -a bin/intel64/ $out/bin/
|
||||
|
||||
# Libraries
|
||||
rsync -a --exclude oclfpga lib/ $out/lib/
|
||||
rsync -a compiler/lib/intel64_lin/ $out/lib/
|
||||
|
||||
# Headers
|
||||
rsync -a compiler/include/ $out/include/ # Intrinsics for icc
|
||||
rsync -a include/ $out/include/
|
||||
chmod +w $out/include
|
||||
ln -s $out/lib/clang/16.0.0/include/ $out/include/icx # For icx
|
||||
popd
|
||||
|
||||
# Manuals
|
||||
rsync -a documentation/en/man/common/ $out/share/man/
|
||||
popd
|
||||
'';
|
||||
};
|
||||
|
||||
wrapIntel = { cc, mygcc, extraBuild ? "", extraInstall ? "" }:
|
||||
let
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
in (wrapCCWith {
|
||||
cc = cc;
|
||||
extraBuildCommands = ''
|
||||
echo "-isystem ${cc}/include" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${cc}/include/intel64" >> $out/nix-support/cc-cflags
|
||||
|
||||
echo "-L${mygcc.cc}/lib/gcc/${targetConfig}/${mygcc.version}" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${mygcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${intel-compiler-shared}/lib" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${cc}/lib" >> $out/nix-support/cc-ldflags
|
||||
|
||||
# Need the gcc in the path
|
||||
# FIXME: We should find a better way to modify the PATH instead of using
|
||||
# this ugly hack. See https://jungle.bsc.es/git/rarias/bscpkgs/issues/9
|
||||
echo 'path_backup="${mygcc}/bin:$path_backup"' >> $out/nix-support/cc-wrapper-hook
|
||||
|
||||
# Disable hardening by default
|
||||
echo "" > $out/nix-support/add-hardening.sh
|
||||
'' + extraBuild;
|
||||
}).overrideAttrs (old: {
|
||||
installPhase = old.installPhase + extraInstall;
|
||||
});
|
||||
|
||||
icx-wrapper = wrapIntel rec {
|
||||
cc = intel-compiler;
|
||||
mygcc = gcc;
|
||||
extraBuild = ''
|
||||
wrap icx $wrapper $ccPath/icx
|
||||
wrap icpx $wrapper $ccPath/icpx
|
||||
echo "-isystem ${cc}/include/icx" >> $out/nix-support/cc-cflags
|
||||
echo "--gcc-toolchain=${mygcc.cc}" >> $out/nix-support/cc-cflags
|
||||
'';
|
||||
extraInstall = ''
|
||||
export named_cc="icx"
|
||||
export named_cxx="icpx"
|
||||
'';
|
||||
};
|
||||
|
||||
# Legacy
|
||||
icc-wrapper = wrapIntel rec {
|
||||
cc = intel-compiler;
|
||||
# Intel icc classic compiler tries to behave like the gcc found in $PATH.
|
||||
# EVEN if it doesn't support some of the features. See:
|
||||
# https://community.intel.com/t5/Intel-C-Compiler/builtin-shuffle-GCC-compatibility-and-has-builtin/td-p/1143619
|
||||
mygcc = gcc;
|
||||
extraBuild = ''
|
||||
wrap icc $wrapper $ccPath/icc
|
||||
wrap icpc $wrapper $ccPath/icpc
|
||||
echo "-isystem ${cc}/include/icc" >> $out/nix-support/cc-cflags
|
||||
'';
|
||||
extraInstall = ''
|
||||
export named_cc="icc"
|
||||
export named_cxx="icpc"
|
||||
'';
|
||||
};
|
||||
|
||||
ifort-wrapper = wrapIntel rec {
|
||||
cc = intel-compiler-fortran;
|
||||
mygcc = gcc;
|
||||
extraBuild = ''
|
||||
wrap ifort $wrapper $ccPath/ifort
|
||||
'';
|
||||
extraInstall = ''
|
||||
export named_fc="ifort"
|
||||
'';
|
||||
};
|
||||
|
||||
stdenv-icc = stdenv.override {
|
||||
cc = icc-wrapper;
|
||||
allowedRequisites = null;
|
||||
};
|
||||
|
||||
stdenv-icx = stdenv.override {
|
||||
cc = icx-wrapper;
|
||||
allowedRequisites = null;
|
||||
};
|
||||
|
||||
stdenv-ifort = stdenv.override {
|
||||
cc = ifort-wrapper;
|
||||
allowedRequisites = null;
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
inherit intel-mpi;
|
||||
icx = icx-wrapper;
|
||||
icc = icc-wrapper;
|
||||
ifort = ifort-wrapper;
|
||||
|
||||
stdenv = stdenv-icx;
|
||||
stdenv-icc = stdenv-icc;
|
||||
stdenv-ifort = stdenv-ifort;
|
||||
}
|
8769
pkgs/intel-oneapi/all-packages
Normal file
8769
pkgs/intel-oneapi/all-packages
Normal file
File diff suppressed because it is too large
Load Diff
34075
pkgs/intel-oneapi/amd64-packages
Normal file
34075
pkgs/intel-oneapi/amd64-packages
Normal file
File diff suppressed because it is too large
Load Diff
4
pkgs/intel-oneapi/update.sh
Executable file
4
pkgs/intel-oneapi/update.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
curl https://apt.repos.intel.com/oneapi/dists/all/main/binary-amd64/Packages -o amd64-packages
|
||||
curl https://apt.repos.intel.com/oneapi/dists/all/main/binary-all/Packages -o all-packages
|
44
pkgs/libpsm2/default.nix
Normal file
44
pkgs/libpsm2/default.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ stdenv, lib, fetchFromGitHub, numactl, pkg-config }:
|
||||
|
||||
let
|
||||
version = "11.2.185";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "libpsm2";
|
||||
inherit version;
|
||||
|
||||
preConfigure= ''
|
||||
export UDEVDIR=$out/etc/udev
|
||||
substituteInPlace ./Makefile --replace "udevrulesdir}" "prefix}/etc/udev";
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildInputs = [ numactl pkg-config ];
|
||||
|
||||
installFlags = [
|
||||
"DESTDIR=$(out)"
|
||||
"UDEVDIR=/etc/udev"
|
||||
"LIBPSM2_COMPAT_CONF_DIR=/etc"
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "opa-psm2";
|
||||
rev = "PSM2_${version}";
|
||||
sha256 = "062hg4r6gz7pla9df70nqs5i2a3mp1wszmp4l0g771fykhhrxsjg";
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
mv $out/usr/* $out
|
||||
rmdir $out/usr
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/intel/opa-psm2";
|
||||
description = "The PSM2 library supports a number of fabric media and stacks";
|
||||
license = with licenses; [ gpl2 bsd3 ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = [ maintainers.bzizou ];
|
||||
};
|
||||
}
|
129
pkgs/llvm-ompss2/clang.nix
Normal file
129
pkgs/llvm-ompss2/clang.nix
Normal file
@ -0,0 +1,129 @@
|
||||
{
|
||||
llvmPackages_latest
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, bash
|
||||
, python3
|
||||
, perl
|
||||
, which
|
||||
, elfutils
|
||||
, libffi
|
||||
, zlib
|
||||
, pkg-config
|
||||
, gcc # needed to set the rpath of libstdc++ for clang-tblgen
|
||||
, enableDebug ? false
|
||||
, useGit ? false
|
||||
, gitUrl ? "ssh://git@bscpm04.bsc.es/llvm-ompss/llvm-mono.git"
|
||||
, gitBranch ? "master"
|
||||
, gitCommit ? "880e2341c56bad1dc14e8c369fb3356bec19018e"
|
||||
}:
|
||||
|
||||
let
|
||||
stdenv = llvmPackages_latest.stdenv;
|
||||
|
||||
release = rec {
|
||||
version = "2025.06";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "llvm";
|
||||
rev = "refs/tags/github-release-${version}";
|
||||
hash = "sha256-ww9PpRmtz/M9IyLiZ8rAehx2UW4VpQt+svf4XfKBzKo=";
|
||||
};
|
||||
};
|
||||
|
||||
git = rec {
|
||||
version = src.shortRev;
|
||||
src = builtins.fetchGit {
|
||||
url = gitUrl;
|
||||
ref = gitBranch;
|
||||
rev = gitCommit;
|
||||
};
|
||||
};
|
||||
|
||||
source = if (useGit) then git else release;
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "clang-ompss2";
|
||||
inherit (source) src version;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru = {
|
||||
CC = "clang";
|
||||
CXX = "clang++";
|
||||
|
||||
isClang = true;
|
||||
isClangWithOmpss = true;
|
||||
|
||||
inherit gcc zlib;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
bash
|
||||
cmake
|
||||
elfutils
|
||||
llvmPackages_latest.lld
|
||||
pkg-config
|
||||
python3
|
||||
perl
|
||||
which
|
||||
zlib
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libffi
|
||||
zlib
|
||||
gcc.cc.lib # Required for libstdc++.so.6
|
||||
];
|
||||
|
||||
# Error with -D_FORTIFY_SOURCE=2, see https://bugs.gentoo.org/636604:
|
||||
# /build/source/compiler-rt/lib/tsan/dd/dd_interceptors.cpp:225:20:
|
||||
# error: redefinition of 'realpath'
|
||||
# Requires disabling the "fortify" set of flags, however, for performance we
|
||||
# disable all:
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
cmakeBuildType = if enableDebug then "Debug" else "Release";
|
||||
|
||||
dontStrip = enableDebug;
|
||||
|
||||
dontUseCmakeBuildDir = true;
|
||||
|
||||
# Fix the host triple, as it has changed in a newer config.guess:
|
||||
# https://git.savannah.gnu.org/gitweb/?p=config.git;a=commitdiff;h=ca9bfb8cc75a2be1819d89c664a867785c96c9ba
|
||||
preConfigure = ''
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmakeDir="../llvm"
|
||||
cmakeFlagsArray=(
|
||||
"-DLLVM_HOST_TRIPLE=${stdenv.targetPlatform.config}"
|
||||
"-DLLVM_TARGETS_TO_BUILD=host"
|
||||
"-DLLVM_BUILD_LLVM_DYLIB=ON"
|
||||
"-DLLVM_LINK_LLVM_DYLIB=ON"
|
||||
# Required to run clang-ast-dump and clang-tblgen during build
|
||||
"-DCMAKE_BUILD_RPATH=$PWD/lib:${zlib}/lib:${gcc.cc.lib}/lib"
|
||||
"-DLLVM_ENABLE_LLD=ON"
|
||||
"-DCMAKE_CXX_FLAGS_DEBUG=-g -ggnu-pubnames"
|
||||
"-DCMAKE_EXE_LINKER_FLAGS_DEBUG=-Wl,--gdb-index"
|
||||
"-DLLVM_LIT_ARGS=-sv --xunit-xml-output=xunit.xml"
|
||||
"-DLLVM_ENABLE_PROJECTS=clang;compiler-rt;lld"
|
||||
"-DLLVM_ENABLE_ASSERTIONS=ON"
|
||||
"-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON"
|
||||
"-DCMAKE_INSTALL_BINDIR=bin"
|
||||
"-DLLVM_ENABLE_ZLIB=FORCE_ON"
|
||||
"-DLLVM_ENABLE_LIBXML2=OFF"
|
||||
# Set the rpath to include external libraries (zlib) both on build and
|
||||
# install
|
||||
"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON"
|
||||
"-DCMAKE_INSTALL_RPATH=${zlib}/lib:${gcc.cc.lib}/lib"
|
||||
"-DLLVM_APPEND_VC_REV=ON"
|
||||
"-DLLVM_FORCE_VC_REVISION=${source.version}"
|
||||
)
|
||||
'';
|
||||
|
||||
# About "-DCLANG_DEFAULT_NANOS6_HOME=${nanos6}", we could specify a default
|
||||
# nanos6 installation, but this is would require a recompilation of clang each
|
||||
# time nanos6 is changed. Better to use the environment variable NANOS6_HOME,
|
||||
# and specify nanos6 at run time.
|
||||
}
|
70
pkgs/llvm-ompss2/default.nix
Normal file
70
pkgs/llvm-ompss2/default.nix
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
stdenv
|
||||
, lib
|
||||
, gcc
|
||||
, clangOmpss2Unwrapped
|
||||
, openmp ? null
|
||||
, wrapCCWith
|
||||
, llvmPackages_latest
|
||||
, ompss2rt ? null
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
usingNodesAndOmpv = (openmp.pname == "openmp-v" && ompss2rt.pname == "nodes");
|
||||
sameNosv = openmp.nosv == ompss2rt.nosv;
|
||||
in
|
||||
|
||||
assert assertMsg (usingNodesAndOmpv -> sameNosv) "OpenMP-V and NODES must share the same nOS-V";
|
||||
|
||||
let
|
||||
homevar = if ompss2rt.pname == "nanos6" then "NANOS6_HOME" else "NODES_HOME";
|
||||
rtname = if ompss2rt.pname == "nanos6" then "libnanos6" else "libnodes";
|
||||
ompname = if openmp.pname == "openmp-v" then "libompv" else "libomp";
|
||||
|
||||
|
||||
# We need to replace the lld linker from bintools with our linker just built,
|
||||
# otherwise we run into incompatibility issues when mixing compiler and linker
|
||||
# versions.
|
||||
bintools-unwrapped = llvmPackages_latest.tools.bintools-unwrapped.override {
|
||||
lld = clangOmpss2Unwrapped;
|
||||
};
|
||||
bintools = llvmPackages_latest.tools.bintools.override {
|
||||
bintools = bintools-unwrapped;
|
||||
};
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
inherit gcc;
|
||||
cc = clangOmpss2Unwrapped;
|
||||
gccVersion = with versions; let v = gcc.version; in concatStringsSep "." [(major v) (minor v) (patch v)];
|
||||
in wrapCCWith {
|
||||
inherit cc bintools;
|
||||
# extraPackages adds packages to depsTargetTargetPropagated
|
||||
extraPackages = optional (openmp != null) openmp;
|
||||
extraBuildCommands = ''
|
||||
echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
|
||||
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gccVersion}" >> $out/nix-support/cc-cflags
|
||||
echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gccVersion}" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags
|
||||
|
||||
for dir in ${gcc.cc}/include/c++/*; do
|
||||
echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags
|
||||
done
|
||||
for dir in ${gcc.cc}/include/c++/*/${targetConfig}; do
|
||||
echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags
|
||||
done
|
||||
|
||||
echo "--gcc-toolchain=${gcc}" >> $out/nix-support/cc-cflags
|
||||
|
||||
wrap clang++ $wrapper $ccPath/clang++
|
||||
|
||||
'' + optionalString (openmp != null) ''
|
||||
echo "export OPENMP_RUNTIME=${ompname}" >> $out/nix-support/cc-wrapper-hook
|
||||
'' + optionalString (ompss2rt != null) ''
|
||||
echo "export OMPSS2_RUNTIME=${rtname}" >> $out/nix-support/cc-wrapper-hook
|
||||
echo "export ${homevar}=${ompss2rt}" >> $out/nix-support/cc-wrapper-hook
|
||||
'' + optionalString (ompss2rt != null && ompss2rt.pname == "nodes") ''
|
||||
echo "export NOSV_HOME=${ompss2rt.nosv}" >> $out/nix-support/cc-wrapper-hook
|
||||
'';
|
||||
}
|
||||
|
78
pkgs/llvm-ompss2/openmp.nix
Normal file
78
pkgs/llvm-ompss2/openmp.nix
Normal file
@ -0,0 +1,78 @@
|
||||
{ lib
|
||||
, llvmPackages_latest
|
||||
, monorepoSrc
|
||||
, runCommand
|
||||
, cmake
|
||||
, ninja
|
||||
, llvm
|
||||
, perl
|
||||
, pkg-config
|
||||
, version
|
||||
, nosv
|
||||
, ovni
|
||||
, python3
|
||||
, enableNosv ? false
|
||||
, enableDebug ? false
|
||||
, enableOvni ? false
|
||||
}:
|
||||
|
||||
assert enableOvni -> enableNosv;
|
||||
|
||||
let
|
||||
stdenv = llvmPackages_latest.stdenv;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openmp" + (lib.optionalString enableNosv "-v");
|
||||
inherit version;
|
||||
|
||||
src = runCommand "${pname}-src" {} ''
|
||||
mkdir -p "$out"
|
||||
cp -r ${monorepoSrc}/cmake "$out"
|
||||
cp -r ${monorepoSrc}/openmp "$out"
|
||||
'';
|
||||
|
||||
sourceRoot = "${src.name}/openmp";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
perl
|
||||
pkg-config
|
||||
python3
|
||||
] ++ lib.optionals enableNosv [
|
||||
nosv
|
||||
] ++ lib.optionals enableOvni [
|
||||
ovni
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
cmakeBuildType = if enableDebug then "Debug" else "Release";
|
||||
|
||||
dontStrip = enableDebug;
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DLIBOMP_OMPD_SUPPORT=OFF"
|
||||
"-DOPENMP_ENABLE_LIBOMPTARGET=OFF"
|
||||
];
|
||||
|
||||
# Remove support for GNU and Intel Openmp.
|
||||
# Also, remove libomp if building with nosv, as there is no support to build
|
||||
# only one runtime at a time.
|
||||
postInstall = ''
|
||||
rm -f $out/lib/libgomp*
|
||||
rm -f $out/lib/libiomp*
|
||||
'' + lib.optionalString enableNosv ''
|
||||
rm -f $out/lib/libomp.*
|
||||
rm -f $out/libllvmrt/libomp.*
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit nosv;
|
||||
};
|
||||
}
|
||||
|
47
pkgs/lmbench/default.nix
Normal file
47
pkgs/lmbench/default.nix
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
libtirpc,
|
||||
fetchFromGitHub
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lmbench";
|
||||
version = "941a0dcc";
|
||||
|
||||
# We use the intel repo as they have fixed some problems
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = pname;
|
||||
rev = "941a0dcc0e7bdd9bb0dee05d7f620e77da8c43af";
|
||||
sha256 = "sha256-SzwplRBO3V0R3m3p15n71ivYBMGoLsajFK2TapYxdqk=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i "s@/bin/rm@rm@g" $(find . -name Makefile)
|
||||
'';
|
||||
|
||||
buildInputs = [ libtirpc ];
|
||||
patches = [ ./fix-install.patch ./gcc-14.patch ];
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
enableParallelBuilding = false;
|
||||
|
||||
preBuild = ''
|
||||
makeFlagsArray+=(
|
||||
-C src
|
||||
BASE=$out
|
||||
CFLAGS=-Wno-implicit-int
|
||||
CPPFLAGS=-I${libtirpc.dev}/include/tirpc
|
||||
LDFLAGS=-ltirpc
|
||||
)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "lmbench";
|
||||
homepage = "http://www.bitmover.com/lmbench/";
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
10
pkgs/lmbench/fix-install.patch
Normal file
10
pkgs/lmbench/fix-install.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -144,6 +144,7 @@ install-target:
|
||||
if [ ! -d $(BASE)/include ]; then mkdir $(BASE)/include; fi
|
||||
if [ ! -d $(BASE)/lib ]; then mkdir $(BASE)/lib; fi
|
||||
cp $(EXES) $(BASE)/bin
|
||||
+ cp $(OPT_EXES) $(BASE)/bin
|
||||
cp $(INCS) $(BASE)/include
|
||||
cp $O/lmbench.a $(BASE)/lib/libmbench.a
|
||||
cd ../doc; env MAKEFLAGS="$(MAKEFLAGS)" make CC="${CC}" OS="${OS}" BASE="$(BASE)" install
|
77
pkgs/lmbench/gcc-14.patch
Normal file
77
pkgs/lmbench/gcc-14.patch
Normal file
@ -0,0 +1,77 @@
|
||||
From a3c6e7d303cd8368e8d4e35be7cbc1997e801257 Mon Sep 17 00:00:00 2001
|
||||
From: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
|
||||
Date: Mon, 21 Jul 2025 17:38:58 +0200
|
||||
Subject: [PATCH] Misc fixes to build with gcc 14
|
||||
|
||||
---
|
||||
src/bench.h | 2 ++
|
||||
src/lat_select.c | 2 +-
|
||||
src/lib_debug.c | 1 +
|
||||
src/lib_sched.c | 2 +-
|
||||
src/lib_timing.c | 2 +-
|
||||
5 files changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/bench.h b/src/bench.h
|
||||
index 8166408..4da9079 100644
|
||||
--- a/src/bench.h
|
||||
+++ b/src/bench.h
|
||||
@@ -320,4 +320,6 @@ extern int handle_scheduler(int childno, int benchproc, int nbenchprocs);
|
||||
extern char *rpc_xact_1();
|
||||
extern char *client_rpc_xact_1();
|
||||
|
||||
+void lmbench_usage(int argc, char *argv[], char* usage);
|
||||
+
|
||||
#endif /* _BENCH_H */
|
||||
diff --git a/src/lat_select.c b/src/lat_select.c
|
||||
index 583b505..39df369 100644
|
||||
--- a/src/lat_select.c
|
||||
+++ b/src/lat_select.c
|
||||
@@ -164,7 +164,7 @@ doit(iter_t iterations, void * cookie)
|
||||
state_t * state = (state_t *)cookie;
|
||||
fd_set nosave;
|
||||
static struct timeval tv;
|
||||
- static count = 0;
|
||||
+ static int count = 0;
|
||||
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 0;
|
||||
diff --git a/src/lib_debug.c b/src/lib_debug.c
|
||||
index e8347dd..cf65312 100644
|
||||
--- a/src/lib_debug.c
|
||||
+++ b/src/lib_debug.c
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "bench.h"
|
||||
#include "lib_debug.h"
|
||||
+#include <math.h>
|
||||
|
||||
/*
|
||||
* return micro-seconds / iteration at the the fraction point.
|
||||
diff --git a/src/lib_sched.c b/src/lib_sched.c
|
||||
index aa83ae0..4f16bbf 100644
|
||||
--- a/src/lib_sched.c
|
||||
+++ b/src/lib_sched.c
|
||||
@@ -91,7 +91,7 @@ handle_scheduler(int childno, int benchproc, int nbenchprocs)
|
||||
childno * (nbenchprocs + 1) + benchproc);
|
||||
} else {
|
||||
/* default action: do nothing */
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
return sched_pin(cpu % sched_ncpus());
|
||||
diff --git a/src/lib_timing.c b/src/lib_timing.c
|
||||
index af8cf68..7ec9652 100644
|
||||
--- a/src/lib_timing.c
|
||||
+++ b/src/lib_timing.c
|
||||
@@ -1623,7 +1623,7 @@ bread(void* buf, long nbytes)
|
||||
void
|
||||
touch(char *buf, int nbytes)
|
||||
{
|
||||
- static psize;
|
||||
+ static int psize;
|
||||
|
||||
if (!psize) {
|
||||
psize = getpagesize();
|
||||
--
|
||||
2.49.0
|
||||
|
65
pkgs/mcxx/default.nix
Normal file
65
pkgs/mcxx/default.nix
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
stdenv
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, nanos6
|
||||
, gperf
|
||||
, python3
|
||||
, gfortran
|
||||
, pkg-config
|
||||
, sqlite
|
||||
, flex
|
||||
, bison
|
||||
, gcc
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mcxx";
|
||||
version = "2023.11";
|
||||
|
||||
passthru = {
|
||||
CC = "mcc";
|
||||
CXX = "mcxx";
|
||||
};
|
||||
|
||||
# mcxx doesn't use tags, so we pick the same version of the ompss2 release
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = pname;
|
||||
rev = "github-release-${version}";
|
||||
hash = "sha256-GyBvyy/HD3t9rHSXAYZRMhn4o4Nm/HFfjuOS8J0LPu8=";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
bison
|
||||
flex
|
||||
python3
|
||||
gfortran
|
||||
pkg-config
|
||||
gperf
|
||||
gcc
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
nanos6
|
||||
sqlite.dev
|
||||
];
|
||||
|
||||
patches = [ ./intel.patch ];
|
||||
|
||||
preConfigure = ''
|
||||
export ICC=icc
|
||||
export ICPC=icpc
|
||||
export IFORT=ifort
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--enable-ompss-2"
|
||||
"--with-nanos6=${nanos6}"
|
||||
# Fails with "memory exhausted" with bison 3.7.1
|
||||
# "--enable-bison-regeneration"
|
||||
];
|
||||
}
|
60
pkgs/mcxx/git.nix
Normal file
60
pkgs/mcxx/git.nix
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
stdenv
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, nanos6
|
||||
, gperf
|
||||
, python
|
||||
, gfortran
|
||||
, pkg-config
|
||||
, sqlite
|
||||
, flex
|
||||
, bison
|
||||
, gcc
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mcxx";
|
||||
version = src.shortRev;
|
||||
|
||||
passthru = {
|
||||
CC = "mcc";
|
||||
CXX = "mcxx";
|
||||
};
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm04.bsc.es/mercurium/mcxx";
|
||||
ref = "master";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildInputs = [
|
||||
autoreconfHook
|
||||
nanos6
|
||||
gperf
|
||||
python
|
||||
gfortran
|
||||
pkg-config
|
||||
sqlite.dev
|
||||
bison
|
||||
flex
|
||||
gcc
|
||||
];
|
||||
|
||||
# TODO: Not sure if we need this patch anymore (?)
|
||||
#patches = [ ./intel.patch ];
|
||||
|
||||
preConfigure = ''
|
||||
export ICC=icc
|
||||
export ICPC=icpc
|
||||
export IFORT=ifort
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--enable-ompss-2"
|
||||
"--with-nanos6=${nanos6}"
|
||||
# Fails with "memory exhausted" with bison 3.7.1
|
||||
# "--enable-bison-regeneration"
|
||||
];
|
||||
}
|
19
pkgs/mcxx/intel.patch
Normal file
19
pkgs/mcxx/intel.patch
Normal file
@ -0,0 +1,19 @@
|
||||
--- a/configure.ac 2020-07-10 16:15:11.431606455 +0200
|
||||
+++ b/configure.ac 2020-07-10 16:15:24.291586572 +0200
|
||||
@@ -367,16 +367,6 @@
|
||||
[ enable_intel_compilers="yes"])
|
||||
AC_MSG_RESULT([$enable_intel_compilers])
|
||||
|
||||
-
|
||||
-IFORT=
|
||||
-ICC=
|
||||
-ICPC=
|
||||
-if test x"$enable_intel_compilers" = x"yes";
|
||||
-then
|
||||
- AC_CHECK_PROG([IFORT], [ifort], [ifort])
|
||||
- AC_CHECK_PROG([ICC], [icc], [icc])
|
||||
- AC_CHECK_PROG([ICPC], [icpc], [icpc])
|
||||
-fi
|
||||
dnl --------------- END Intel Compilers ---------------------
|
||||
|
||||
mic_compilation="no"
|
59
pkgs/mcxx/rarias.nix
Normal file
59
pkgs/mcxx/rarias.nix
Normal file
@ -0,0 +1,59 @@
|
||||
{ stdenv
|
||||
, fetchgit
|
||||
, autoreconfHook
|
||||
, nanos6
|
||||
, gperf
|
||||
, python
|
||||
, gfortran
|
||||
, pkg-config
|
||||
, sqlite
|
||||
, flex
|
||||
, bison
|
||||
, gcc
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mcxx-rarias";
|
||||
#version attribute ignored when using fetchgit:
|
||||
#version = "2.2.0-70a299cf";
|
||||
|
||||
#src = /home/Computational/rarias/mcxx;
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm04.bsc.es/rarias/mcxx";
|
||||
rev = "44129a6ac05b8f78b06e9e2eff71438b5ca4d29f";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildInputs = [
|
||||
autoreconfHook
|
||||
nanos6
|
||||
gperf
|
||||
python
|
||||
gfortran
|
||||
pkg-config
|
||||
sqlite.dev
|
||||
bison
|
||||
flex
|
||||
gcc
|
||||
];
|
||||
|
||||
patches = [ ./intel.patch ];
|
||||
|
||||
preConfigure = ''
|
||||
export ICC=icc
|
||||
export ICPC=icpc
|
||||
export IFORT=ifort
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--enable-ompss-2"
|
||||
"--with-nanos6=${nanos6}"
|
||||
# "--enable-bison-regeneration"
|
||||
];
|
||||
|
||||
# Regenerate ia32 builtins to add the ones for gcc9
|
||||
#preBuild = ''
|
||||
# make generate_builtins_ia32 GXX_X86_BUILTINS=${gcc}/bin/g++
|
||||
#'';
|
||||
}
|
68
pkgs/mpich/default.nix
Normal file
68
pkgs/mpich/default.nix
Normal file
@ -0,0 +1,68 @@
|
||||
{
|
||||
stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, perl
|
||||
, gfortran
|
||||
, openssh
|
||||
, hwloc
|
||||
, libfabric
|
||||
, enableDebug ? false
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mpich";
|
||||
version = "3.3.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.mpich.org/static/downloads/${version}/mpich-${version}.tar.gz";
|
||||
sha256 = "1farz5zfx4cd0c3a0wb9pgfypzw0xxql1j1294z1sxslga1ziyjb";
|
||||
};
|
||||
|
||||
configureFlags = [
|
||||
"--enable-shared"
|
||||
"--enable-sharedlib"
|
||||
"--with-device=ch4:ofi"
|
||||
"--with-libfabric=${libfabric}"
|
||||
]
|
||||
++ optional enableDebug "--enable-g=dbg,log";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildInputs = [ perl gfortran openssh hwloc libfabric ];
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
# doCheck = true; # Fails
|
||||
|
||||
preFixup = ''
|
||||
# Ensure the default compilers are the ones mpich was built with
|
||||
sed -i 's:CC="gcc":CC=${stdenv.cc}/bin/gcc:' $out/bin/mpicc
|
||||
sed -i 's:CXX="g++":CXX=${stdenv.cc}/bin/g++:' $out/bin/mpicxx
|
||||
sed -i 's:FC="gfortran":FC=${gfortran}/bin/gfortran:' $out/bin/mpifort
|
||||
''
|
||||
+ lib.optionalString (!stdenv.isDarwin) ''
|
||||
# /tmp/nix-build... ends up in the RPATH, fix it manually
|
||||
for entry in $out/bin/mpichversion $out/bin/mpivars; do
|
||||
echo "fix rpath: $entry"
|
||||
patchelf --set-rpath "$out/lib" $entry
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Implementation of the Message Passing Interface (MPI) standard";
|
||||
|
||||
longDescription = ''
|
||||
MPICH is a high-performance and widely portable implementation of
|
||||
the Message Passing Interface (MPI) standard (MPI-1, MPI-2 and MPI-3).
|
||||
'';
|
||||
homepage = "http://www.mpich.org";
|
||||
license = {
|
||||
url = "https://github.com/pmodels/mpich/blob/v${version}/COPYRIGHT";
|
||||
fullName = "MPICH license (permissive)";
|
||||
};
|
||||
maintainers = [ ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
32
pkgs/nanos6/0001-Add-missing-cstdint-include.patch
Normal file
32
pkgs/nanos6/0001-Add-missing-cstdint-include.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 6fc5bef066ac011d6b15a7c090f4498b0b730818 Mon Sep 17 00:00:00 2001
|
||||
From: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
|
||||
Date: Fri, 12 Apr 2024 14:44:43 +0200
|
||||
Subject: [PATCH] Add missing cstdint include
|
||||
|
||||
---
|
||||
src/dependencies/DataTrackingSupport.hpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/dependencies/DataTrackingSupport.hpp b/src/dependencies/DataTrackingSupport.hpp
|
||||
index 56226085..cdfd5e1c 100644
|
||||
--- a/src/dependencies/DataTrackingSupport.hpp
|
||||
+++ b/src/dependencies/DataTrackingSupport.hpp
|
||||
@@ -1,13 +1,14 @@
|
||||
/*
|
||||
This file is part of Nanos6 and is licensed under the terms contained in the COPYING file.
|
||||
|
||||
- Copyright (C) 2020 Barcelona Supercomputing Center (BSC)
|
||||
+ Copyright (C) 2020-2024 Barcelona Supercomputing Center (BSC)
|
||||
*/
|
||||
|
||||
#ifndef DATA_TRACKING_SUPPORT_HPP
|
||||
#define DATA_TRACKING_SUPPORT_HPP
|
||||
|
||||
#include "support/config/ConfigVariable.hpp"
|
||||
+#include <cstdint>
|
||||
|
||||
class Task;
|
||||
|
||||
--
|
||||
2.44.0
|
||||
|
124
pkgs/nanos6/default.nix
Normal file
124
pkgs/nanos6/default.nix
Normal file
@ -0,0 +1,124 @@
|
||||
{
|
||||
stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, automake
|
||||
, autoconf
|
||||
, libtool
|
||||
, pkg-config
|
||||
, numactl
|
||||
, hwloc
|
||||
, papi
|
||||
, boost
|
||||
, ovni
|
||||
, enableDebug ? false
|
||||
, enableJemalloc ? true
|
||||
, jemallocNanos6 ? null
|
||||
, cachelineBytes ? 64
|
||||
, enableGlibcxxDebug ? false
|
||||
, useGit ? false
|
||||
, gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6"
|
||||
, gitBranch ? "master"
|
||||
, gitCommit ? "f82762b66c82b5174a8eaad33f6c2f335ac759b4"
|
||||
}:
|
||||
|
||||
assert enableJemalloc -> (jemallocNanos6 != null);
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
release = rec {
|
||||
version = "4.3";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "nanos6";
|
||||
rev = "version-${version}";
|
||||
hash = "sha256-/c6WiKBsAo/01uvMRmjv0PMucbrgvaGmbxlPE6q+dfE=";
|
||||
};
|
||||
};
|
||||
|
||||
git = rec {
|
||||
version = src.shortRev;
|
||||
src = builtins.fetchGit {
|
||||
url = gitUrl;
|
||||
ref = gitBranch;
|
||||
rev = gitCommit;
|
||||
};
|
||||
};
|
||||
|
||||
source = if (useGit) then git else release;
|
||||
in
|
||||
stdenv.mkDerivation (source // {
|
||||
pname = "nanos6";
|
||||
|
||||
prePatch = ''
|
||||
patchShebangs scripts/generate_config.sh
|
||||
patchShebangs autogen.sh
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preConfigure = ''
|
||||
export CACHELINE_WIDTH=${toString cachelineBytes}
|
||||
./autogen.sh
|
||||
'' + lib.optionalString (useGit) ''
|
||||
export NANOS6_GIT_VERSION=${gitCommit}
|
||||
export NANOS6_GIT_BRANCH=${gitBranch}
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-hwloc=${hwloc}"
|
||||
"--disable-all-instrumentations"
|
||||
"--enable-ovni-instrumentation"
|
||||
"--with-ovni=${ovni}"
|
||||
] ++
|
||||
(optional enableJemalloc "--with-jemalloc=${jemallocNanos6}") ++
|
||||
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
|
||||
|
||||
postConfigure = lib.optionalString (!enableDebug) ''
|
||||
# Disable debug
|
||||
sed -i 's/\([a-zA-Z0-9_]*nanos6_debug[a-zA-Z0-9_]*\)\s*[+]\?=.*/\1 =/g' Makefile.am
|
||||
'';
|
||||
|
||||
# The "bindnow" flags are incompatible with ifunc resolution mechanism. We
|
||||
# disable all by default, which includes bindnow.
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
# Keep debug symbols in the debug variant of the library
|
||||
dontStrip = enableDebug;
|
||||
separateDebugInfo = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
pkg-config
|
||||
|
||||
# TODO: papi_version is needed for configure:
|
||||
# ./configure: line 27378: papi_version: command not found
|
||||
# This probably breaks cross-compilation
|
||||
papi
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
numactl
|
||||
hwloc
|
||||
papi
|
||||
ovni
|
||||
];
|
||||
|
||||
# Create a script that sets NANOS6_HOME
|
||||
postInstall = ''
|
||||
mkdir -p $out/nix-support
|
||||
echo "export NANOS6_HOME=$out" >> $out/nix-support/setup-hook
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/bsc-pm/nanos6";
|
||||
description = "Nanos6 runtime for OmpSs-2" +
|
||||
optionalString (enableDebug) " (with debug symbols)";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
})
|
12
pkgs/nanos6/jemalloc.nix
Normal file
12
pkgs/nanos6/jemalloc.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ jemalloc }:
|
||||
|
||||
jemalloc.overrideAttrs (old: {
|
||||
configureFlags = old.configureFlags ++ [
|
||||
"--with-jemalloc-prefix=nanos6_je_"
|
||||
"--enable-stats"
|
||||
];
|
||||
hardeningDisable = [ "all" ];
|
||||
meta = old.meta // {
|
||||
description = old.meta.description + " (for Nanos6)";
|
||||
};
|
||||
})
|
90
pkgs/nix-wrap/default.nix
Normal file
90
pkgs/nix-wrap/default.nix
Normal file
@ -0,0 +1,90 @@
|
||||
{
|
||||
stdenv
|
||||
, bashInteractive
|
||||
, busybox
|
||||
, nix
|
||||
, writeText
|
||||
, pkgsStatic
|
||||
}:
|
||||
|
||||
let
|
||||
bubblewrap = pkgsStatic.bubblewrap;
|
||||
nixPrefix = "/gpfs/projects/bsc15/nix";
|
||||
nixConfDir = "share";
|
||||
nix_wrap_sh = writeText "nix-wrap.sh" ''
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
busybox_bin="${nixPrefix}${busybox}/bin"
|
||||
bubblewrap_bin="${nixPrefix}/${bubblewrap}/bin"
|
||||
|
||||
bashInteractive_bin="${bashInteractive}/bin"
|
||||
nix_bin="${nix}/bin"
|
||||
|
||||
rootdir=$(mktemp -d)
|
||||
tmpdir=$(mktemp -d)
|
||||
|
||||
args=(
|
||||
--bind "$rootdir/" /
|
||||
--bind "${nixPrefix}/nix" /nix
|
||||
--bind "$busybox_bin" /bin
|
||||
--dev-bind /dev /dev
|
||||
--bind /boot /boot
|
||||
--proc /proc
|
||||
--bind /run /run
|
||||
--bind /sys /sys
|
||||
--bind "$tmpdir" /tmp
|
||||
--bind "$PWD" "$PWD"
|
||||
--bind /etc/host.conf /etc/host.conf
|
||||
--bind /etc/hosts /etc/hosts
|
||||
--bind /etc/networks /etc/networks
|
||||
--bind /etc/passwd /etc/passwd
|
||||
--bind /etc/group /etc/group
|
||||
--bind /etc/nsswitch.conf /etc/nsswitch.conf
|
||||
--bind /etc/resolv.conf /etc/resolv.conf
|
||||
)
|
||||
|
||||
export PATH="/bin:$bashInteractive_bin"
|
||||
export PATH="$nix_bin:$PATH"
|
||||
export TMPDIR=/tmp
|
||||
export PS1="[nix-wrap] \u@\h \W $ "
|
||||
export NIX_CONF_DIR=@out@/share
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
"$bubblewrap_bin/bwrap" ''${args[@]} /bin/sh
|
||||
else
|
||||
"$bubblewrap_bin/bwrap" ''${args[@]} "''${@}"
|
||||
fi
|
||||
|
||||
'';
|
||||
nix_conf = writeText "nix.conf" ''
|
||||
experimental-features = nix-command flakes
|
||||
sandbox-fallback = false
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.0.1";
|
||||
name = "nix-wrap";
|
||||
buildInputs = [
|
||||
bashInteractive
|
||||
busybox
|
||||
nix
|
||||
];
|
||||
src = null;
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
dontPatchShebangs = true;
|
||||
NIX_DEBUG = 0;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
substituteAll ${nix_wrap_sh} $out/bin/nix-wrap
|
||||
chmod +x $out/bin/nix-wrap
|
||||
|
||||
mkdir -p $out/share
|
||||
cp ${nix_conf} $out/share/nix.conf
|
||||
'';
|
||||
}
|
||||
|
219
pkgs/nix/default.nix
Normal file
219
pkgs/nix/default.nix
Normal file
@ -0,0 +1,219 @@
|
||||
{ lib, fetchurl, fetchFromGitHub, callPackage
|
||||
, storeDir ? "/nix/store"
|
||||
, stateDir ? "/nix/var"
|
||||
, confDir ? "/etc"
|
||||
, boehmgc
|
||||
, stdenv, llvmPackages_6
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
common =
|
||||
{ lib, stdenv, fetchpatch, perl, curl, bzip2, sqlite, openssl ? null, xz
|
||||
, bash, coreutils, gzip, gnutar
|
||||
, pkg-config, boehmgc, perlPackages, libsodium, brotli, boost, editline, nlohmann_json
|
||||
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns
|
||||
, jq, libarchive, rustc, cargo
|
||||
# Used by tests
|
||||
, gmock
|
||||
, busybox-sandbox-shell
|
||||
, storeDir
|
||||
, stateDir
|
||||
, confDir
|
||||
, withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms, libseccomp
|
||||
, withAWS ? stdenv.isLinux || stdenv.isDarwin, aws-sdk-cpp
|
||||
|
||||
, name, suffix ? "", src, crates ? null
|
||||
|
||||
}:
|
||||
let
|
||||
sh = busybox-sandbox-shell;
|
||||
nix = stdenv.mkDerivation rec {
|
||||
inherit name src;
|
||||
version = lib.getVersion name;
|
||||
|
||||
is24 = lib.versionAtLeast version "2.4pre";
|
||||
isExactly23 = lib.versionAtLeast version "2.3" && lib.versionOlder version "2.4";
|
||||
|
||||
VERSION_SUFFIX = suffix;
|
||||
|
||||
outputs = [ "out" "dev" "man" "doc" ];
|
||||
|
||||
nativeBuildInputs =
|
||||
[ pkg-config ]
|
||||
++ lib.optionals is24 [ autoreconfHook autoconf-archive bison flex libxml2 libxslt
|
||||
docbook5 docbook_xsl_ns jq gmock ];
|
||||
|
||||
buildInputs =
|
||||
[ curl openssl sqlite xz bzip2 nlohmann_json
|
||||
brotli boost editline
|
||||
]
|
||||
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
|
||||
++ lib.optionals is24 [ libarchive rustc cargo ]
|
||||
++ lib.optional withLibseccomp libseccomp
|
||||
++ lib.optional withAWS
|
||||
((aws-sdk-cpp.override {
|
||||
apis = ["s3" "transfer"];
|
||||
customMemoryManagement = false;
|
||||
}).overrideDerivation (args: {
|
||||
patches = args.patches or [] ++ [(fetchpatch {
|
||||
url = "https://github.com/edolstra/aws-sdk-cpp/commit/7d58e303159b2fb343af9a1ec4512238efa147c7.patch";
|
||||
sha256 = "103phn6kyvs1yc7fibyin3lgxz699qakhw671kl207484im55id1";
|
||||
})];
|
||||
}));
|
||||
|
||||
propagatedBuildInputs = [ boehmgc ];
|
||||
|
||||
# Seems to be required when using std::atomic with 64-bit types
|
||||
NIX_LDFLAGS = lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux" || stdenv.hostPlatform.system == "armv6l-linux") "-latomic";
|
||||
|
||||
preConfigure =
|
||||
# Copy libboost_context so we don't get all of Boost in our closure.
|
||||
# https://github.com/NixOS/nixpkgs/issues/45462
|
||||
''
|
||||
mkdir -p $out/lib
|
||||
cp -pd ${boost}/lib/{libboost_context*,libboost_thread*,libboost_system*} $out/lib
|
||||
rm -f $out/lib/*.a
|
||||
${lib.optionalString stdenv.isLinux ''
|
||||
chmod u+w $out/lib/*.so.*
|
||||
patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib $out/lib/libboost_thread.so.*
|
||||
''}
|
||||
'' +
|
||||
# Unpack the Rust crates.
|
||||
lib.optionalString is24 ''
|
||||
tar xvf ${crates} -C nix-rust/
|
||||
mv nix-rust/nix-vendored-crates* nix-rust/vendor
|
||||
'' +
|
||||
# For Nix-2.3, patch around an issue where the Nix configure step pulls in the
|
||||
# build system's bash and other utilities when cross-compiling
|
||||
lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform && isExactly23) ''
|
||||
mkdir tmp/
|
||||
substitute corepkgs/config.nix.in tmp/config.nix.in \
|
||||
--subst-var-by bash ${bash}/bin/bash \
|
||||
--subst-var-by coreutils ${coreutils}/bin \
|
||||
--subst-var-by bzip2 ${bzip2}/bin/bzip2 \
|
||||
--subst-var-by gzip ${gzip}/bin/gzip \
|
||||
--subst-var-by xz ${xz}/bin/xz \
|
||||
--subst-var-by tar ${gnutar}/bin/tar \
|
||||
--subst-var-by tr ${coreutils}/bin/tr
|
||||
mv tmp/config.nix.in corepkgs/config.nix.in
|
||||
'';
|
||||
|
||||
configureFlags =
|
||||
[ "--with-store-dir=${storeDir}"
|
||||
"--localstatedir=${stateDir}"
|
||||
"--sysconfdir=${confDir}"
|
||||
"--disable-init-state"
|
||||
"--enable-gc"
|
||||
]
|
||||
++ lib.optionals stdenv.isLinux [
|
||||
"--with-sandbox-shell=${sh}/bin/busybox"
|
||||
]
|
||||
++ lib.optional (
|
||||
stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform ? nix && stdenv.hostPlatform.nix ? system
|
||||
) ''--with-system=${stdenv.hostPlatform.nix.system}''
|
||||
# RISC-V support in progress https://github.com/seccomp/libseccomp/pull/50
|
||||
++ lib.optional (!withLibseccomp) "--disable-seccomp-sandboxing";
|
||||
|
||||
makeFlags = [ "profiledir=$(out)/etc/profile.d" ];
|
||||
|
||||
installFlags = [ "sysconfdir=$(out)/etc" ];
|
||||
|
||||
doInstallCheck = false;
|
||||
|
||||
# socket path becomes too long otherwise
|
||||
#preInstallCheck = lib.optional stdenv.isDarwin ''
|
||||
# export TMPDIR=$NIX_BUILD_TOP
|
||||
#'';
|
||||
|
||||
separateDebugInfo = stdenv.isLinux;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "Powerful package manager that makes package management reliable and reproducible";
|
||||
longDescription = ''
|
||||
Nix is a powerful package manager for Linux and other Unix systems that
|
||||
makes package management reliable and reproducible. It provides atomic
|
||||
upgrades and rollbacks, side-by-side installation of multiple versions of
|
||||
a package, multi-user package management and easy setup of build
|
||||
environments.
|
||||
'';
|
||||
homepage = "https://nixos.org/";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
maintainers = [ lib.maintainers.eelco ];
|
||||
platforms = lib.platforms.unix;
|
||||
outputsToInstall = [ "out" "man" ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
perl-bindings = stdenv.mkDerivation {
|
||||
pname = "nix-perl";
|
||||
inherit version;
|
||||
|
||||
inherit src;
|
||||
|
||||
postUnpack = "sourceRoot=$sourceRoot/perl";
|
||||
|
||||
# This is not cross-compile safe, don't have time to fix right now
|
||||
# but noting for future travellers.
|
||||
nativeBuildInputs =
|
||||
[ perl pkg-config curl nix libsodium boost autoreconfHook autoconf-archive ];
|
||||
|
||||
configureFlags =
|
||||
[ "--with-dbi=${perlPackages.DBI}/${perl.libPrefix}"
|
||||
"--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}"
|
||||
];
|
||||
|
||||
preConfigure = "export NIX_STATE_DIR=$TMPDIR";
|
||||
|
||||
preBuild = "unset NIX_INDENT_MAKE";
|
||||
};
|
||||
};
|
||||
};
|
||||
in nix;
|
||||
|
||||
in rec {
|
||||
|
||||
nix = nixUnstable;
|
||||
|
||||
nixUnstable = lib.lowPrio (callPackage common rec {
|
||||
name = "nix-2.4${suffix}";
|
||||
suffix = "pre7534_b92f58f6";
|
||||
|
||||
#src = /home/Computational/rarias/nix/nix-rodarima;
|
||||
src = fetchFromGitHub {
|
||||
owner = "rodarima";
|
||||
repo = "nix";
|
||||
rev = "3a642187c33ed46d952d3a50a83b2576b704fab7";
|
||||
sha256 = "0s8is2czpkcj1x1kcjqgbnsbbl03w3fwjjiclsd44zh1ij3wb90s";
|
||||
};
|
||||
|
||||
crates = fetchurl {
|
||||
url = "https://hydra.nixos.org/build/118797694/download/1/nix-vendored-crates-2.4pre7534_b92f58f6.tar.xz";
|
||||
sha256 = "a4c2612bbd81732bbb899bc0c230e07b16f6b6150ffbb19c4907dedbbc2bf9fc";
|
||||
};
|
||||
|
||||
inherit storeDir stateDir confDir boehmgc;
|
||||
});
|
||||
|
||||
nixFlakes = lib.lowPrio (callPackage common rec {
|
||||
name = "nix-2.4${suffix}";
|
||||
suffix = "pre20200521_00b562c";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "NixOS";
|
||||
repo = "nix";
|
||||
rev = "00b562c87ec4c3bbe514f5dc1f4d1c41f66f66bf";
|
||||
sha256 = "0s8is2czpkcj1x1kcjqgbnsbbl03w3fwjjiclsd44zh1ij3wb90s";
|
||||
};
|
||||
|
||||
crates = fetchurl {
|
||||
url = "https://hydra.nixos.org/build/118093786/download/1/nix-vendored-crates-2.4pre20200501_941f952.tar.xz";
|
||||
sha256 = "060f4n5srdbb8vsj0m14aqch7im79a4h5g3nrs41p1xc602vhcdl";
|
||||
};
|
||||
|
||||
inherit storeDir stateDir confDir boehmgc;
|
||||
});
|
||||
|
||||
}
|
214
pkgs/nix/static.nix
Normal file
214
pkgs/nix/static.nix
Normal file
@ -0,0 +1,214 @@
|
||||
{ lib, fetchurl, fetchFromGitHub, callPackage
|
||||
, storeDir ? "/nix/store"
|
||||
, stateDir ? "/nix/var"
|
||||
, confDir ? "/etc"
|
||||
, boehmgc
|
||||
, stdenv, llvmPackages_6
|
||||
, sandbox-shell ? "/bin/sh"
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
enableStatic = true;
|
||||
|
||||
common =
|
||||
{ lib, stdenv, fetchpatch, perl, curl, bzip2, sqlite, openssl ? null, xz
|
||||
, bash, coreutils, gzip, gnutar
|
||||
, pkg-config, boehmgc, perlPackages, libsodium, brotli, boost, editline, nlohmann_json
|
||||
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns
|
||||
, jq, libarchive
|
||||
# Used by tests
|
||||
, gmock
|
||||
, storeDir
|
||||
, stateDir
|
||||
, confDir
|
||||
, withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms, libseccomp
|
||||
, withAWS ? !enableStatic && (stdenv.isLinux || stdenv.isDarwin), aws-sdk-cpp
|
||||
, enableStatic ? true
|
||||
, name, suffix ? "", src
|
||||
|
||||
}:
|
||||
let
|
||||
nix = stdenv.mkDerivation rec {
|
||||
inherit name src;
|
||||
version = lib.getVersion name;
|
||||
|
||||
is24 = lib.versionAtLeast version "2.4pre";
|
||||
isExactly23 = lib.versionAtLeast version "2.3" && lib.versionOlder version "2.4";
|
||||
|
||||
VERSION_SUFFIX = suffix;
|
||||
|
||||
outputs = [ "out" "dev" "man" "doc" ];
|
||||
|
||||
nativeBuildInputs =
|
||||
[ pkg-config ]
|
||||
++ lib.optionals is24 [ autoreconfHook autoconf-archive bison flex libxml2 libxslt
|
||||
docbook5 docbook_xsl_ns jq ];
|
||||
|
||||
buildInputs =
|
||||
[ curl openssl sqlite xz bzip2 nlohmann_json
|
||||
brotli boost editline boehmgc
|
||||
]
|
||||
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
|
||||
++ lib.optionals is24 [ libarchive gmock ]
|
||||
++ lib.optional withLibseccomp libseccomp
|
||||
++ lib.optional withAWS
|
||||
((aws-sdk-cpp.override {
|
||||
apis = ["s3" "transfer"];
|
||||
customMemoryManagement = false;
|
||||
}).overrideDerivation (args: {
|
||||
patches = args.patches or [] ++ [(fetchpatch {
|
||||
url = "https://github.com/edolstra/aws-sdk-cpp/commit/7d58e303159b2fb343af9a1ec4512238efa147c7.patch";
|
||||
sha256 = "103phn6kyvs1yc7fibyin3lgxz699qakhw671kl207484im55id1";
|
||||
})];
|
||||
}));
|
||||
|
||||
propagatedBuildInputs = [ boehmgc ];
|
||||
|
||||
# Seems to be required when using std::atomic with 64-bit types
|
||||
NIX_LDFLAGS =
|
||||
# need to list libraries individually until
|
||||
# https://github.com/NixOS/nix/commit/3e85c57a6cbf46d5f0fe8a89b368a43abd26daba
|
||||
# is in a release
|
||||
lib.optionalString enableStatic "-lssl -lbrotlicommon -lssh2 -lz -lnghttp2 -lcrypto"
|
||||
|
||||
# need to detect it here until
|
||||
# https://github.com/NixOS/nix/commits/74b4737d8f0e1922ef5314a158271acf81cd79f8
|
||||
# is in a release
|
||||
+ lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux" || stdenv.hostPlatform.system == "armv6l-linux") "-latomic";
|
||||
|
||||
preConfigure =
|
||||
# Copy libboost_context so we don't get all of Boost in our closure.
|
||||
# https://github.com/NixOS/nixpkgs/issues/45462
|
||||
lib.optionalString (!enableStatic) ''
|
||||
mkdir -p $out/lib
|
||||
cp -pd ${boost}/lib/{libboost_context*,libboost_thread*,libboost_system*} $out/lib
|
||||
rm -f $out/lib/*.a
|
||||
${lib.optionalString stdenv.isLinux ''
|
||||
chmod u+w $out/lib/*.so.*
|
||||
patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib $out/lib/libboost_thread.so.*
|
||||
''}
|
||||
'' +
|
||||
# For Nix-2.3, patch around an issue where the Nix configure step pulls in the
|
||||
# build system's bash and other utilities when cross-compiling
|
||||
lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform && isExactly23) ''
|
||||
mkdir tmp/
|
||||
substitute corepkgs/config.nix.in tmp/config.nix.in \
|
||||
--subst-var-by bash ${bash}/bin/bash \
|
||||
--subst-var-by coreutils ${coreutils}/bin \
|
||||
--subst-var-by bzip2 ${bzip2}/bin/bzip2 \
|
||||
--subst-var-by gzip ${gzip}/bin/gzip \
|
||||
--subst-var-by xz ${xz}/bin/xz \
|
||||
--subst-var-by tar ${gnutar}/bin/tar \
|
||||
--subst-var-by tr ${coreutils}/bin/tr
|
||||
mv tmp/config.nix.in corepkgs/config.nix.in
|
||||
'';
|
||||
|
||||
configureFlags =
|
||||
[ "--with-store-dir=${storeDir}"
|
||||
"--localstatedir=${stateDir}"
|
||||
"--sysconfdir=${confDir}"
|
||||
"--disable-init-state"
|
||||
"--enable-gc"
|
||||
]
|
||||
++ lib.optionals stdenv.isLinux [
|
||||
"--with-sandbox-shell=${sandbox-shell}"
|
||||
]
|
||||
++ lib.optional (
|
||||
stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform ? nix && stdenv.hostPlatform.nix ? system
|
||||
) ''--with-system=${stdenv.hostPlatform.nix.system}''
|
||||
# RISC-V support in progress https://github.com/seccomp/libseccomp/pull/50
|
||||
++ lib.optional (!withLibseccomp) "--disable-seccomp-sandboxing";
|
||||
|
||||
makeFlags = [ "profiledir=$(out)/etc/profile.d" ]
|
||||
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "PRECOMPILE_HEADERS=0";
|
||||
|
||||
installFlags = [ "sysconfdir=$(out)/etc" ];
|
||||
|
||||
doInstallCheck = true; # not cross
|
||||
|
||||
# socket path becomes too long otherwise
|
||||
preInstallCheck = lib.optional stdenv.isDarwin ''
|
||||
export TMPDIR=$NIX_BUILD_TOP
|
||||
'';
|
||||
|
||||
separateDebugInfo = stdenv.isLinux;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "Powerful package manager that makes package management reliable and reproducible";
|
||||
longDescription = ''
|
||||
Nix is a powerful package manager for Linux and other Unix systems that
|
||||
makes package management reliable and reproducible. It provides atomic
|
||||
upgrades and rollbacks, side-by-side installation of multiple versions of
|
||||
a package, multi-user package management and easy setup of build
|
||||
environments.
|
||||
'';
|
||||
homepage = "https://nixos.org/";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
maintainers = [ lib.maintainers.eelco ];
|
||||
platforms = lib.platforms.unix;
|
||||
outputsToInstall = [ "out" "man" ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
perl-bindings = stdenv.mkDerivation {
|
||||
pname = "nix-perl";
|
||||
inherit version;
|
||||
|
||||
inherit src;
|
||||
|
||||
postUnpack = "sourceRoot=$sourceRoot/perl";
|
||||
|
||||
# This is not cross-compile safe, don't have time to fix right now
|
||||
# but noting for future travellers.
|
||||
nativeBuildInputs =
|
||||
[ perl pkg-config curl nix libsodium boost autoreconfHook autoconf-archive ];
|
||||
|
||||
configureFlags =
|
||||
[ "--with-dbi=${perlPackages.DBI}/${perl.libPrefix}"
|
||||
"--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}"
|
||||
];
|
||||
|
||||
preConfigure = "export NIX_STATE_DIR=$TMPDIR";
|
||||
|
||||
preBuild = "unset NIX_INDENT_MAKE";
|
||||
};
|
||||
};
|
||||
};
|
||||
in nix;
|
||||
|
||||
in rec {
|
||||
|
||||
nix = nixStable;
|
||||
|
||||
nixStable = callPackage common (rec {
|
||||
name = "nix-2.3.7";
|
||||
src = fetchurl {
|
||||
url = "https://nixos.org/releases/nix/${name}/${name}.tar.xz";
|
||||
sha256 = "dd8f52849414e5a878afe7e797aa4e22bab77c875d9da5a38d5f1bada704e596";
|
||||
};
|
||||
|
||||
inherit storeDir stateDir confDir boehmgc;
|
||||
} // lib.optionalAttrs stdenv.cc.isClang {
|
||||
stdenv = llvmPackages_6.stdenv;
|
||||
});
|
||||
|
||||
nixUnstable = lib.lowPrio (callPackage common rec {
|
||||
name = "nix-2.4${suffix}";
|
||||
suffix = "pre20200721_ff314f1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "NixOS";
|
||||
repo = "nix";
|
||||
rev = "ff314f186e3f91d87af6ad96c0ae3b472494b940";
|
||||
hash = "sha256-QibpLo4/gf2xYGoeQcgjZzH/qy5TBRVH+QCHgqOwur0=";
|
||||
};
|
||||
|
||||
inherit storeDir stateDir confDir boehmgc;
|
||||
});
|
||||
|
||||
nixFlakes = nixUnstable;
|
||||
|
||||
}
|
17
pkgs/nix/upload.sh
Executable file
17
pkgs/nix/upload.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This post build hook sends the closure of the just built derivation to the
|
||||
# target machine. In our case this is the MareNostrum4 cluster.
|
||||
|
||||
# set -e fails as the profile runs some erroring programs
|
||||
# We need the profile to load nix in the $PATH
|
||||
. /etc/profile
|
||||
|
||||
set -eu
|
||||
set -f # disable globbing
|
||||
export IFS=' '
|
||||
nixroot=/gpfs/projects/bsc15/nix
|
||||
store=$nixroot/nix/store
|
||||
target=ssh://mn
|
||||
|
||||
nix copy --to $target $OUT_PATHS
|
18
pkgs/nixtools/default.nix
Normal file
18
pkgs/nixtools/default.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
stdenv
|
||||
, glibc
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nixtools";
|
||||
version = "${src.shortRev}";
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm04.bsc.es/rarias/nixtools";
|
||||
ref = "master";
|
||||
rev = "a103e392048ace3ed88ce74648b32c9e6ed094da";
|
||||
};
|
||||
buildInputs = [ glibc.static ];
|
||||
makeFlags = [ "DESTDIR=$(out)" ];
|
||||
preBuild = "env";
|
||||
dontPatchShebangs = true;
|
||||
}
|
84
pkgs/nodes/default.nix
Normal file
84
pkgs/nodes/default.nix
Normal file
@ -0,0 +1,84 @@
|
||||
{
|
||||
stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, perl
|
||||
, numactl
|
||||
, hwloc
|
||||
, boost
|
||||
, autoreconfHook
|
||||
, ovni
|
||||
, nosv
|
||||
, clangOmpss2
|
||||
, useGit ? false
|
||||
, gitUrl ? "ssh://git@gitlab-internal.bsc.es/nos-v/nodes.git"
|
||||
, gitBranch ? "master"
|
||||
, gitCommit ? "6002ec9ae6eb876d962cc34366952a3b26599ba6"
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
release = rec {
|
||||
version = "1.3";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "nodes";
|
||||
rev = "version-${version}";
|
||||
hash = "sha256-cFb9pxcjtkMmH0CsGgUO9LTdXDNh7MCqicgGWawLrsU=";
|
||||
};
|
||||
};
|
||||
|
||||
git = rec {
|
||||
version = src.shortRev;
|
||||
src = builtins.fetchGit {
|
||||
url = gitUrl;
|
||||
ref = gitBranch;
|
||||
rev = gitCommit;
|
||||
};
|
||||
};
|
||||
|
||||
source = if (useGit) then git else release;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nodes";
|
||||
inherit (source) src version;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
dontStrip = true;
|
||||
separateDebugInfo = true;
|
||||
|
||||
configureFlags = [
|
||||
"--with-nosv=${nosv}"
|
||||
"--with-ovni=${ovni}"
|
||||
] ++ lib.optionals doCheck [
|
||||
"--with-nodes-clang=${clangOmpss2}"
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
nativeCheckInputs = [
|
||||
clangOmpss2
|
||||
];
|
||||
|
||||
# The "bindnow" flags are incompatible with ifunc resolution mechanism. We
|
||||
# disable all by default, which includes bindnow.
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
numactl
|
||||
hwloc
|
||||
nosv
|
||||
ovni
|
||||
];
|
||||
|
||||
passthru = {
|
||||
inherit nosv;
|
||||
};
|
||||
}
|
62
pkgs/nosv/default.nix
Normal file
62
pkgs/nosv/default.nix
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
stdenv
|
||||
, lib
|
||||
, autoreconfHook
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, numactl
|
||||
, hwloc
|
||||
, papi
|
||||
, enablePapi ? true
|
||||
, cacheline ? 64 # bits
|
||||
, ovni ? null
|
||||
, useGit ? false
|
||||
, gitUrl ? "git@gitlab-internal.bsc.es:nos-v/nos-v.git"
|
||||
, gitBranch ? "master"
|
||||
, gitCommit ? "9f47063873c3aa9d6a47482a82c5000a8c813dd8"
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
release = rec {
|
||||
version = "3.2.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "nos-v";
|
||||
rev = "${version}";
|
||||
hash = "sha256-yaz92426EM8trdkBJlISmAoG9KJCDTvoAW/HKrasvOw=";
|
||||
};
|
||||
};
|
||||
|
||||
git = rec {
|
||||
version = src.shortRev;
|
||||
src = builtins.fetchGit {
|
||||
url = gitUrl;
|
||||
ref = gitBranch;
|
||||
rev = gitCommit;
|
||||
};
|
||||
};
|
||||
|
||||
source = if (useGit) then git else release;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nosv";
|
||||
inherit (source) src version;
|
||||
hardeningDisable = [ "all" ];
|
||||
dontStrip = true;
|
||||
separateDebugInfo = true;
|
||||
configureFlags = [
|
||||
"--with-ovni=${ovni}"
|
||||
"CACHELINE_WIDTH=${toString cacheline}"
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
];
|
||||
buildInputs = [
|
||||
numactl
|
||||
hwloc
|
||||
ovni
|
||||
] ++ lib.optionals enablePapi [ papi ];
|
||||
}
|
120
pkgs/openmpi/default.nix
Normal file
120
pkgs/openmpi/default.nix
Normal file
@ -0,0 +1,120 @@
|
||||
{ stdenv, lib, fetchurl, fetchpatch, gfortran, perl, libnl
|
||||
, rdma-core, zlib, numactl, libevent, hwloc, targetPackages, symlinkJoin
|
||||
, libpsm2, libfabric, pmix, pmi2, ucx
|
||||
|
||||
# Enable CUDA support
|
||||
, cudaSupport ? false, cudatoolkit ? null
|
||||
|
||||
# Enable the Sun Grid Engine bindings
|
||||
, enableSGE ? false
|
||||
|
||||
# Pass PATH/LD_LIBRARY_PATH to point to current mpirun by default
|
||||
, enablePrefix ? false
|
||||
|
||||
# Enable libfabric support (necessary for Omnipath networks) on x86_64 linux
|
||||
, fabricSupport ? stdenv.isLinux && stdenv.isx86_64
|
||||
|
||||
# Enable mpi_cxx.so
|
||||
, enableCxx ? false
|
||||
|
||||
}:
|
||||
|
||||
assert !cudaSupport || cudatoolkit != null;
|
||||
|
||||
let
|
||||
version = "4.0.4";
|
||||
|
||||
cudatoolkit_joined = symlinkJoin {
|
||||
name = "${cudatoolkit.name}-unsplit";
|
||||
paths = [ cudatoolkit.out cudatoolkit.lib ];
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "openmpi";
|
||||
inherit version;
|
||||
|
||||
src = with lib.versions; fetchurl {
|
||||
url = "https://www.open-mpi.org/software/ompi/v${major version}.${minor version}/downloads/${pname}-${version}.tar.bz2";
|
||||
sha256 = "1i0slg2dxjdgw513aml1n9dsbdxn2fimi2b5712d5r9z4ar4xqj7";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./
|
||||
|
||||
# Ensure build is reproducible
|
||||
ts=`date -d @$SOURCE_DATE_EPOCH`
|
||||
sed -i 's/OPAL_CONFIGURE_USER=.*/OPAL_CONFIGURE_USER="nixbld"/' configure
|
||||
sed -i 's/OPAL_CONFIGURE_HOST=.*/OPAL_CONFIGURE_HOST="localhost"/' configure
|
||||
sed -i "s/OPAL_CONFIGURE_DATE=.*/OPAL_CONFIGURE_DATE=\"$ts\"/" configure
|
||||
find -name "Makefile.in" -exec sed -i "s/\`date\`/$ts/" \{} \;
|
||||
'';
|
||||
|
||||
buildInputs = with stdenv; [ gfortran zlib ]
|
||||
++ lib.optionals isLinux [ libnl numactl pmix ucx ]
|
||||
++ lib.optionals cudaSupport [ cudatoolkit ]
|
||||
++ [ libevent hwloc ]
|
||||
++ lib.optional (isLinux || isFreeBSD) rdma-core
|
||||
++ lib.optional fabricSupport [ libpsm2 libfabric ];
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
|
||||
configureFlags = with stdenv; lib.optional (!cudaSupport) "--disable-mca-dso"
|
||||
++ lib.optionals isLinux [
|
||||
"--with-libnl=${libnl.dev}"
|
||||
"--with-pmix=${pmix}"
|
||||
"--with-pmix-libdir=${pmix}/lib"
|
||||
"--with-pmi=${pmi2}"
|
||||
"--with-pmi-libdir=${pmi2}/lib"
|
||||
] ++ lib.optional enableSGE "--with-sge"
|
||||
++ lib.optional enablePrefix "--enable-mpirun-prefix-by-default"
|
||||
# TODO: add UCX support, which is recommended to use with cuda for the most robust OpenMPI build
|
||||
# https://github.com/openucx/ucx
|
||||
# https://www.open-mpi.org/faq/?category=buildcuda
|
||||
++ lib.optionals cudaSupport [ "--with-cuda=${cudatoolkit_joined}" "--enable-dlopen" ]
|
||||
++ lib.optionals fabricSupport [ "--with-psm2=${libpsm2}" "--with-libfabric=${libfabric}" ]
|
||||
++ lib.optional enableCxx "--enable-mpi-cxx"
|
||||
;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
postInstall = ''
|
||||
rm -f $out/lib/*.la
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# default compilers should be indentical to the
|
||||
# compilers at build time
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc:' \
|
||||
$out/share/openmpi/mpicc-wrapper-data.txt
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc:' \
|
||||
$out/share/openmpi/ortecc-wrapper-data.txt
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}c++:' \
|
||||
$out/share/openmpi/mpic++-wrapper-data.txt
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${gfortran}/bin/${gfortran.targetPrefix}gfortran:' \
|
||||
$out/share/openmpi/mpifort-wrapper-data.txt
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
passthru = {
|
||||
inherit cudaSupport cudatoolkit;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.open-mpi.org/";
|
||||
description = "Open source MPI-3 implementation";
|
||||
longDescription = "The Open MPI Project is an open source MPI-3 implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers.";
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
# In order to use OpenMPI with Extrae we need to keep the Extrae libraries
|
||||
# rather than the ones from OpenMPI. This happens with libompitrace.so, so
|
||||
# we set to a lower priority (higher value) the OpenMPI package.
|
||||
priority = 10;
|
||||
};
|
||||
}
|
117
pkgs/openmpi/with-slurm.nix
Normal file
117
pkgs/openmpi/with-slurm.nix
Normal file
@ -0,0 +1,117 @@
|
||||
{ stdenv, lib, fetchurl, fetchpatch, gfortran, perl, libnl
|
||||
, rdma-core, zlib, numactl, libevent, hwloc, targetPackages, symlinkJoin
|
||||
, libpsm2, libfabric
|
||||
|
||||
# Enable CUDA support
|
||||
, cudaSupport ? false, cudatoolkit ? null
|
||||
|
||||
# Enable the Sun Grid Engine bindings
|
||||
, enableSGE ? false
|
||||
|
||||
# Pass PATH/LD_LIBRARY_PATH to point to current mpirun by default
|
||||
, enablePrefix ? false
|
||||
|
||||
# Enable libfabric support (necessary for Omnipath networks) on x86_64 linux
|
||||
, fabricSupport ? stdenv.isLinux && stdenv.isx86_64
|
||||
|
||||
# Enable mpi_cxx.so
|
||||
, enableCxx ? false
|
||||
|
||||
, slurm
|
||||
|
||||
}:
|
||||
|
||||
assert !cudaSupport || cudatoolkit != null;
|
||||
|
||||
let
|
||||
version = "4.0.3";
|
||||
|
||||
cudatoolkit_joined = symlinkJoin {
|
||||
name = "${cudatoolkit.name}-unsplit";
|
||||
paths = [ cudatoolkit.out cudatoolkit.lib ];
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "openmpi";
|
||||
inherit version;
|
||||
|
||||
src = with lib.versions; fetchurl {
|
||||
url = "https://www.open-mpi.org/software/ompi/v${major version}.${minor version}/downloads/${pname}-${version}.tar.bz2";
|
||||
sha256 = "00zxcw99gr5n693cmcmn4f6a47vx1ywna895p0x7p163v37gw0hl";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./
|
||||
|
||||
# Ensure build is reproducible
|
||||
ts=`date -d @$SOURCE_DATE_EPOCH`
|
||||
sed -i 's/OPAL_CONFIGURE_USER=.*/OPAL_CONFIGURE_USER="nixbld"/' configure
|
||||
sed -i 's/OPAL_CONFIGURE_HOST=.*/OPAL_CONFIGURE_HOST="localhost"/' configure
|
||||
sed -i "s/OPAL_CONFIGURE_DATE=.*/OPAL_CONFIGURE_DATE=\"$ts\"/" configure
|
||||
find -name "Makefile.in" -exec sed -i "s/\`date\`/$ts/" \{} \;
|
||||
'';
|
||||
|
||||
buildInputs = with stdenv; [ gfortran zlib ]
|
||||
++ lib.optionals isLinux [ libnl numactl ]
|
||||
++ lib.optionals cudaSupport [ cudatoolkit ]
|
||||
++ [ libevent hwloc ]
|
||||
++ lib.optional (isLinux || isFreeBSD) rdma-core
|
||||
++ lib.optional fabricSupport [ libpsm2 libfabric ]
|
||||
++ [ slurm ];
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
|
||||
configureFlags = with stdenv; lib.optional (!cudaSupport) "--disable-mca-dso"
|
||||
++ lib.optional isLinux "--with-libnl=${libnl.dev}"
|
||||
++ lib.optional enableSGE "--with-sge"
|
||||
++ lib.optional enablePrefix "--enable-mpirun-prefix-by-default"
|
||||
# TODO: add UCX support, which is recommended to use with cuda for the most robust OpenMPI build
|
||||
# https://github.com/openucx/ucx
|
||||
# https://www.open-mpi.org/faq/?category=buildcuda
|
||||
++ lib.optionals cudaSupport [ "--with-cuda=${cudatoolkit_joined}" "--enable-dlopen" ]
|
||||
++ lib.optionals fabricSupport [ "--with-psm2=${libpsm2}" "--with-libfabric=${libfabric}" ]
|
||||
++ lib.optional enableCxx "--enable-mpi-cxx"
|
||||
++ [ "--with-slurm=${slurm}" "--with-pmi" "--enable-static" "--disable-dlopen" ]
|
||||
;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
rm -f $out/lib/*.la
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# default compilers should be indentical to the
|
||||
# compilers at build time
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc:' \
|
||||
$out/share/openmpi/mpicc-wrapper-data.txt
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc:' \
|
||||
$out/share/openmpi/ortecc-wrapper-data.txt
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}c++:' \
|
||||
$out/share/openmpi/mpic++-wrapper-data.txt
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${gfortran}/bin/${gfortran.targetPrefix}gfortran:' \
|
||||
$out/share/openmpi/mpifort-wrapper-data.txt
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
passthru = {
|
||||
inherit cudaSupport cudatoolkit;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.open-mpi.org/";
|
||||
description = "Open source MPI-3 implementation";
|
||||
longDescription = "The Open MPI Project is an open source MPI-3 implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers.";
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
# In order to use OpenMPI with Extrae we need to keep the Extrae libraries
|
||||
# rather than the ones from OpenMPI. This happens with libompitrace.so, so
|
||||
# we set to a lower priority (higher value) the OpenMPI package.
|
||||
priority = 10;
|
||||
};
|
||||
}
|
48
pkgs/osu/default.nix
Normal file
48
pkgs/osu/default.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
stdenv
|
||||
, fetchurl
|
||||
, mpi
|
||||
, lib
|
||||
, symlinkJoin
|
||||
}:
|
||||
|
||||
let
|
||||
mpiAll = symlinkJoin {
|
||||
name = "mpi-all";
|
||||
paths = [ mpi.all ];
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "7.1-1";
|
||||
name = "osu-micro-benchmarks-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-${version}.tar.gz";
|
||||
sha256 = "sha256-hfTdi+HfMSVeIyhSdprluC6HpfsUvi+Ouhrp3o/+ORo=";
|
||||
};
|
||||
|
||||
doCheck = true;
|
||||
enableParallelBuilding = true;
|
||||
nativeBuildInputs = [ mpiAll ];
|
||||
buildInputs = [ mpiAll ];
|
||||
hardeningDisable = [ "all" ];
|
||||
configureFlags = [
|
||||
"CC=mpicc"
|
||||
"CXX=mpicxx"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/bin
|
||||
for f in $(find $out -executable -type f); do
|
||||
ln -s "$f" $out/bin/$(basename "$f")
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "OSU Micro-Benchmarks";
|
||||
homepage = "http://mvapich.cse.ohio-state.edu/benchmarks/";
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
17
pkgs/otf/default.nix
Normal file
17
pkgs/otf/default.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
stdenv
|
||||
#, mkDerivation
|
||||
, fetchurl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.2.18";
|
||||
pname = "otf";
|
||||
src = fetchurl {
|
||||
url =
|
||||
"http://paratools01.rrp.net/wp-content/uploads/2016/06/OTF-SRC-${version}.tar.gz";
|
||||
sha256 = "10k1hyyn6w4lf5kbn1krfacaspvn1xg3qgn4027xal3hjf3kkxap";
|
||||
};
|
||||
|
||||
patches = [ ./printf.patch ];
|
||||
}
|
11
pkgs/otf/printf.patch
Normal file
11
pkgs/otf/printf.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/tools/otfconfig/otfconfig.c 2020-11-21 13:55:23.195530435 +0100
|
||||
+++ b/tools/otfconfig/otfconfig.c 2020-11-21 13:55:53.112402154 +0100
|
||||
@@ -75,7 +75,7 @@ int main( int argc, char** argv ) {
|
||||
|
||||
strcat( tmp, "\n" );
|
||||
|
||||
- printf( tmp );
|
||||
+ printf("%s", tmp );
|
||||
}
|
||||
}
|
||||
|
58
pkgs/ovni/default.nix
Normal file
58
pkgs/ovni/default.nix
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
stdenv
|
||||
, lib
|
||||
, cmake
|
||||
, mpi
|
||||
, fetchFromGitHub
|
||||
, useGit ? false
|
||||
, gitBranch ? "master"
|
||||
, gitUrl ? "ssh://git@bscpm04.bsc.es/rarias/ovni.git"
|
||||
, gitCommit ? "e4f62382076f0cf0b1d08175cf57cc0bc51abc61"
|
||||
, enableDebug ? false
|
||||
# Only enable MPI if the build is native (fails on cross-compilation)
|
||||
, useMpi ? (stdenv.buildPlatform.canExecute stdenv.hostPlatform)
|
||||
}:
|
||||
|
||||
let
|
||||
release = rec {
|
||||
version = "1.12.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "ovni";
|
||||
rev = "${version}";
|
||||
hash = "sha256-H04JvsVKrdqr3ON7JhU0g17jjlg/jzQ7eTfx9vUNd3E=";
|
||||
} // { shortRev = "a73afcf"; };
|
||||
};
|
||||
|
||||
git = rec {
|
||||
version = src.shortRev;
|
||||
src = builtins.fetchGit {
|
||||
url = gitUrl;
|
||||
ref = gitBranch;
|
||||
rev = gitCommit;
|
||||
};
|
||||
};
|
||||
|
||||
source = if (useGit) then git else release;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ovni";
|
||||
inherit (source) src version;
|
||||
dontStrip = true;
|
||||
separateDebugInfo = true;
|
||||
postPatch = ''
|
||||
patchShebangs --build test/
|
||||
'';
|
||||
nativeBuildInputs = [ cmake ] ++ lib.optionals (useMpi) [ mpi ];
|
||||
buildInputs = lib.optionals (useMpi) [ mpi ];
|
||||
cmakeBuildType = if (enableDebug) then "Debug" else "Release";
|
||||
cmakeFlags = [
|
||||
"-DOVNI_GIT_COMMIT=${src.shortRev}"
|
||||
] ++ lib.optionals (!useMpi) [ "-DUSE_MPI=OFF" ];
|
||||
preCheck = ''
|
||||
export CTEST_OUTPUT_ON_FAILURE=1
|
||||
'';
|
||||
doCheck = true;
|
||||
checkTarget = "test";
|
||||
hardeningDisable = [ "all" ];
|
||||
}
|
22
pkgs/parastation/pscom.nix
Normal file
22
pkgs/parastation/pscom.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{ stdenv
|
||||
, popt
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pscom";
|
||||
version = "5.4.6-1";
|
||||
|
||||
src = builtins.fetchTarball {
|
||||
url = "https://github.com/ParaStation/${pname}/archive/${version}.tar.gz";
|
||||
sha256 = "1n9ic0j94iy09j287cfpfy0dd2bk17qakf1ml669jkibxbc5fqk8";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./
|
||||
'';
|
||||
|
||||
buildInputs = [ popt ];
|
||||
preferLocalBuild = true;
|
||||
|
||||
enableParallelBuilding = false;
|
||||
}
|
33
pkgs/parastation/psmpi.nix
Normal file
33
pkgs/parastation/psmpi.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{ stdenv
|
||||
, pscom
|
||||
, perl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "psmpi";
|
||||
version = "5.4.6-1";
|
||||
|
||||
src = builtins.fetchTarball {
|
||||
url = "https://github.com/ParaStation/${pname}/archive/${version}.tar.gz";
|
||||
sha256 = "1kr624216fz8pmfgbwdb3ks77pr6zhrssmn16j3pwaq5mkf3i9wc";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./
|
||||
echo "${version}" > VERSION
|
||||
'';
|
||||
|
||||
preferLocalBuild = true;
|
||||
buildInputs = [ pscom ];
|
||||
nativeBuildInputs = [ perl ];
|
||||
#makeFlags = [ "V=1" ];
|
||||
|
||||
configureFlags = [
|
||||
"--with-confset=default"
|
||||
"--with-threading"
|
||||
"--disable-fortran"
|
||||
"MPICH2_LDFLAGS=-lpsco"
|
||||
];
|
||||
|
||||
enableParallelBuilding = false;
|
||||
}
|
91
pkgs/paraver/default.nix
Normal file
91
pkgs/paraver/default.nix
Normal file
@ -0,0 +1,91 @@
|
||||
{
|
||||
stdenv
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, boost
|
||||
, libxml2
|
||||
, xml2
|
||||
, wxGTK32
|
||||
, autoconf
|
||||
, automake
|
||||
, paraverKernel
|
||||
, openssl
|
||||
, glibcLocales
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
let
|
||||
wx = wxGTK32;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wxparaver";
|
||||
version = "4.12.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-performance-tools";
|
||||
repo = "wxparaver";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-YsO5gsuEFQdki3lQudEqgo5WXOt/fPdvNw5OxZQ86Zo=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./do-not-steal-focus-on-redraw.patch
|
||||
|
||||
# Fix for boost >=1.87 (thanks to gamezelda)
|
||||
# https://aur.archlinux.org/cgit/aur.git/commit/?h=wxparaver&id=b0dcd08c472536e0a1a3cc1dfbc4c77d9f5e0d47
|
||||
./fix-boost-87.patch
|
||||
];
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
# Fix the PARAVER_HOME variable
|
||||
postPatch = ''
|
||||
sed -i 's@^PARAVER_HOME=.*$@PARAVER_HOME='$out'@g' docs/wxparaver
|
||||
sed -i '1aexport LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"' docs/wxparaver
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preConfigure = ''
|
||||
export CFLAGS="-O3"
|
||||
export CXXFLAGS="-O3"
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-boost=${boost}"
|
||||
"--with-wx-config=${wx}/bin/wx-config"
|
||||
"--with-paraver=${paraverKernel}"
|
||||
"--with-openssl=${openssl.dev}"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
autoreconfHook
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
libxml2.dev
|
||||
xml2
|
||||
wx
|
||||
paraverKernel
|
||||
openssl.dev
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/include
|
||||
mkdir -p $out/lib/paraver-kernel
|
||||
mkdir -p $out/share/filters-config
|
||||
cp -p ${paraverKernel}/bin/* $out/bin
|
||||
# cp -p ${paraverKernel}/include/* $out/include
|
||||
cp -a ${paraverKernel}/lib/paraver-kernel $out/lib/paraver-kernel
|
||||
cp -p ${paraverKernel}/share/filters-config/* $out/share/filters-config
|
||||
|
||||
# Move man files to proper location
|
||||
mkdir -p $out/share/man
|
||||
mv $out/share/doc/wxparaver_help_contents/man $out/share/man/man1
|
||||
'';
|
||||
}
|
26
pkgs/paraver/do-not-steal-focus-on-redraw.patch
Normal file
26
pkgs/paraver/do-not-steal-focus-on-redraw.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 2b185e1b5ce52808b3026334851dbcd5a640ed4d Mon Sep 17 00:00:00 2001
|
||||
From: aleixbonerib <aleix.boneribo@bsc.es>
|
||||
Date: Mon, 10 Jun 2024 20:59:45 +0200
|
||||
Subject: [PATCH] fix: do not set focus on redraw
|
||||
|
||||
Some wm can change the window size without focusing. Right now, when the
|
||||
plot is resized it takes back focus.
|
||||
---
|
||||
src/gtimeline.cpp | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/src/gtimeline.cpp b/src/gtimeline.cpp
|
||||
index 23ebef2..a896066 100644
|
||||
--- a/src/gtimeline.cpp
|
||||
+++ b/src/gtimeline.cpp
|
||||
@@ -899,7 +899,6 @@ void gTimeline::redraw()
|
||||
|
||||
drawZone->Refresh();
|
||||
|
||||
- SetFocus();
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.44.1
|
||||
|
120
pkgs/paraver/dont-expand-colors.patch
Normal file
120
pkgs/paraver/dont-expand-colors.patch
Normal file
@ -0,0 +1,120 @@
|
||||
commit c2fa29f7f1bbde86f41417b198610253fff93667
|
||||
Author: Rodrigo Arias <rodarima@gmail.com>
|
||||
Date: Thu Mar 2 13:14:56 2023 +0100
|
||||
|
||||
Add the PCF option DONT_EXPAND_COLORS
|
||||
|
||||
Allows the user to specify the complete palette in the PCF, preventing
|
||||
Paraver from expanding the colors.
|
||||
|
||||
diff --git a/api/semanticcolor.cpp b/api/semanticcolor.cpp
|
||||
index 9f86960..22859eb 100644
|
||||
--- a/api/semanticcolor.cpp
|
||||
+++ b/api/semanticcolor.cpp
|
||||
@@ -295,8 +295,9 @@ rgb SemanticColor::getColor( PRV_UINT32 pos ) const
|
||||
{
|
||||
if( pos == 0 && ParaverConfig::getInstance()->getColorsTimelineUseZero() )
|
||||
return ParaverConfig::getInstance()->getColorsTimelineColorZero();
|
||||
- pos = pos % colors.size();
|
||||
- return colors[ pos ];
|
||||
+ // Skip the black at 0
|
||||
+ pos = pos % (colors.size() - 1);
|
||||
+ return colors[ pos + 1 ];
|
||||
}
|
||||
|
||||
void SemanticColor::setColor( PRV_UINT32 whichPos, rgb whichColor )
|
||||
@@ -314,6 +315,12 @@ void SemanticColor::setColor( PRV_UINT32 whichPos, rgb whichColor )
|
||||
colors[ whichPos ] = whichColor;
|
||||
}
|
||||
|
||||
+void SemanticColor::cutAfter( PRV_UINT32 pos )
|
||||
+{
|
||||
+ if ( pos < colors.size() )
|
||||
+ colors.erase( colors.begin() + pos, colors.end() );
|
||||
+}
|
||||
+
|
||||
void SemanticColor::setCustomColor( TSemanticValue whichValue, rgb color )
|
||||
{
|
||||
customPalette[ whichValue ] = color;
|
||||
diff --git a/api/semanticcolor.h b/api/semanticcolor.h
|
||||
index a079556..bddf3d8 100644
|
||||
--- a/api/semanticcolor.h
|
||||
+++ b/api/semanticcolor.h
|
||||
@@ -114,6 +114,7 @@ class SemanticColor
|
||||
// Code Color methods
|
||||
PRV_UINT32 getNumColors() const;
|
||||
void setColor( PRV_UINT32 pos, rgb color );
|
||||
+ void cutAfter( PRV_UINT32 pos );
|
||||
void setCustomColor( TSemanticValue whichValue, rgb color );
|
||||
bool existCustomColors() const;
|
||||
const std::map<TSemanticValue, rgb>& getCustomPalette() const;
|
||||
diff --git a/api/trace.cpp b/api/trace.cpp
|
||||
index b0d2050..ee2ab69 100644
|
||||
--- a/api/trace.cpp
|
||||
+++ b/api/trace.cpp
|
||||
@@ -461,12 +461,21 @@ void TraceProxy::parsePCF( const string& whichFile )
|
||||
|
||||
rgb tmpColor;
|
||||
const std::map< uint32_t, PCFFileParser<>::rgb >& semanticColors = pcfParser.getSemanticColors();
|
||||
+ uint32_t maxValue = 0;
|
||||
+
|
||||
for ( auto it : semanticColors )
|
||||
{
|
||||
std::tie( tmpColor.red, tmpColor.green, tmpColor.blue ) = it.second;
|
||||
mySemanticColor.setColor( it.first, tmpColor );
|
||||
+ if (it.first > maxValue)
|
||||
+ maxValue = it.first;
|
||||
}
|
||||
|
||||
+ // Cut the palette after the highest defined value, so there are no
|
||||
+ // extra expanded values
|
||||
+ if ( !pcfParser.expandColors )
|
||||
+ mySemanticColor.cutAfter(maxValue);
|
||||
+
|
||||
myEventLabels = EventLabels( pcfParser );
|
||||
myStateLabels = StateLabels( pcfParser );
|
||||
|
||||
diff --git a/utils/traceparser/pcffileparser.cpp b/utils/traceparser/pcffileparser.cpp
|
||||
index 9245955..3a1aecb 100644
|
||||
--- a/utils/traceparser/pcffileparser.cpp
|
||||
+++ b/utils/traceparser/pcffileparser.cpp
|
||||
@@ -286,6 +286,7 @@ constexpr char PCF_LABEL_SPEED[] = "SPEED";
|
||||
constexpr char PCF_LABEL_FLAG_ICONS[] = "FLAG_ICONS";
|
||||
constexpr char PCF_LABEL_NUM_OF_STATE_COLORS[] = "NUM_OF_STATE_COLORS";
|
||||
constexpr char PCF_LABEL_YMAX_SCALE[] = "YMAX_SCALE";
|
||||
+constexpr char PCF_LABEL_DONT_EXPAND_COLORS[] = "DONT_EXPAND_COLORS";
|
||||
|
||||
template< typename dummyParser = std::nullptr_t >
|
||||
class DefaultOptionsParser : public PCFFileParser<>::SectionParser<>
|
||||
@@ -293,12 +294,13 @@ class DefaultOptionsParser : public PCFFileParser<>::SectionParser<>
|
||||
public:
|
||||
DefaultOptionsParser( PCFFileParser<> *whichMainParser ) : PCFFileParser<>::SectionParser<>( whichMainParser )
|
||||
{
|
||||
- parameterSetter[ PCF_LABEL_LEVEL ] = [this]( std::string line ) { mainParser->level = line; };
|
||||
- parameterSetter[ PCF_LABEL_UNITS ] = [this]( std::string line ) { mainParser->units = line; };
|
||||
- parameterSetter[ PCF_LABEL_LOOK_BACK ] = [this]( std::string line ) { mainParser->lookBack = line; };
|
||||
- parameterSetter[ PCF_LABEL_SPEED ] = [this]( std::string line ) { mainParser->speed = line; };
|
||||
- parameterSetter[ PCF_LABEL_FLAG_ICONS ] = [this]( std::string line ) { mainParser->flagIcons = line; };
|
||||
- parameterSetter[ PCF_LABEL_YMAX_SCALE ] = [this]( std::string line ) { mainParser->ymaxScale = line; };
|
||||
+ parameterSetter[ PCF_LABEL_LEVEL ] = [this]( std::string line ) { mainParser->level = line; };
|
||||
+ parameterSetter[ PCF_LABEL_UNITS ] = [this]( std::string line ) { mainParser->units = line; };
|
||||
+ parameterSetter[ PCF_LABEL_LOOK_BACK ] = [this]( std::string line ) { mainParser->lookBack = line; };
|
||||
+ parameterSetter[ PCF_LABEL_SPEED ] = [this]( std::string line ) { mainParser->speed = line; };
|
||||
+ parameterSetter[ PCF_LABEL_FLAG_ICONS ] = [this]( std::string line ) { mainParser->flagIcons = line; };
|
||||
+ parameterSetter[ PCF_LABEL_YMAX_SCALE ] = [this]( std::string line ) { mainParser->ymaxScale = line; };
|
||||
+ parameterSetter[ PCF_LABEL_DONT_EXPAND_COLORS ] = [this]( std::string line ) { mainParser->expandColors = false; };
|
||||
}
|
||||
|
||||
virtual ~DefaultOptionsParser() = default;
|
||||
diff --git a/utils/traceparser/pcffileparser.h b/utils/traceparser/pcffileparser.h
|
||||
index 5fe2634..c12ecc8 100644
|
||||
--- a/utils/traceparser/pcffileparser.h
|
||||
+++ b/utils/traceparser/pcffileparser.h
|
||||
@@ -100,6 +100,7 @@ class PCFFileParser
|
||||
void setEventLabel( TEventType eventType, const std::string& label );
|
||||
void setEventValues( TEventType eventType, const std::map< TEventValue, std::string >& values );
|
||||
void setEventValueLabel( TEventType eventType, TEventValue eventValue, const std::string& label );
|
||||
+ bool expandColors = true;
|
||||
|
||||
private:
|
||||
struct EventTypeData
|
87
pkgs/paraver/fix-boost-87.patch
Normal file
87
pkgs/paraver/fix-boost-87.patch
Normal file
@ -0,0 +1,87 @@
|
||||
From 7ecd888e2ebb9e8c5582851d3c50bff61022708e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
|
||||
Date: Sat, 29 Mar 2025 18:14:25 +0000
|
||||
Subject: [PATCH] tutorialsdownload: Fix Boost ASIO 1.87.0 removals
|
||||
|
||||
---
|
||||
src/tutorialsdownload.cpp | 25 ++++++++++++-------------
|
||||
1 file changed, 12 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/tutorialsdownload.cpp b/src/tutorialsdownload.cpp
|
||||
index a1921fd..6ce9dc2 100644
|
||||
--- a/src/tutorialsdownload.cpp
|
||||
+++ b/src/tutorialsdownload.cpp
|
||||
@@ -121,13 +121,13 @@ void TutorialsProgress::updateInstall( int whichValue )
|
||||
class client
|
||||
{
|
||||
public:
|
||||
- client( boost::asio::io_service& io_service,
|
||||
+ client( boost::asio::io_context& io_context,
|
||||
boost::asio::ssl::context& context,
|
||||
const std::string& server, const std::string& path,
|
||||
ofstream& storeFile,
|
||||
TutorialsProgress *progress )
|
||||
- : resolver_( io_service ),
|
||||
- socket_( io_service, context ),
|
||||
+ : resolver_( io_context ),
|
||||
+ socket_( io_context, context ),
|
||||
store_( storeFile ),
|
||||
progress_( progress )
|
||||
{
|
||||
@@ -143,8 +143,7 @@ class client
|
||||
|
||||
// Start an asynchronous resolve to translate the server and service names
|
||||
// into a list of endpoints.
|
||||
- tcp::resolver::query query( server, "https" );
|
||||
- resolver_.async_resolve( query,
|
||||
+ resolver_.async_resolve( server, "https",
|
||||
boost::bind( &client::handle_resolve,
|
||||
this,
|
||||
boost::asio::placeholders::error,
|
||||
@@ -154,7 +153,7 @@ class client
|
||||
private:
|
||||
|
||||
void handle_resolve( const boost::system::error_code& err,
|
||||
- tcp::resolver::iterator endpoint_iterator )
|
||||
+ const tcp::resolver::results_type& endpoints )
|
||||
{
|
||||
if ( !err )
|
||||
{
|
||||
@@ -162,7 +161,7 @@ class client
|
||||
socket_.set_verify_callback( boost::bind( &client::verify_certificate, this, _1, _2 ) );
|
||||
|
||||
boost::asio::async_connect( socket_.lowest_layer(),
|
||||
- endpoint_iterator,
|
||||
+ endpoints,
|
||||
boost::bind( &client::handle_connect,
|
||||
this,
|
||||
boost::asio::placeholders::error ) );
|
||||
@@ -536,9 +535,9 @@ bool TutorialsDownload::downloadTutorialsList() const
|
||||
boost::asio::ssl::context ctx( boost::asio::ssl::context::sslv23 );
|
||||
ctx.set_default_verify_paths();
|
||||
|
||||
- boost::asio::io_service io_service;
|
||||
- client c( io_service, ctx, server, path, storeFile, nullptr );
|
||||
- io_service.run();
|
||||
+ boost::asio::io_context io_context;
|
||||
+ client c( io_context, ctx, server, path, storeFile, nullptr );
|
||||
+ io_context.run();
|
||||
|
||||
doneDownload = true;
|
||||
}
|
||||
@@ -580,9 +579,9 @@ bool TutorialsDownload::download( const TutorialData& whichTutorial, string& tut
|
||||
boost::asio::ssl::context ctx( boost::asio::ssl::context::sslv23 );
|
||||
ctx.set_default_verify_paths();
|
||||
|
||||
- boost::asio::io_service io_service;
|
||||
- client c( io_service, ctx, std::string( server.mb_str() ), std::string( path.mb_str() ), storeFile, &progress );
|
||||
- io_service.run();
|
||||
+ boost::asio::io_context io_context;
|
||||
+ client c( io_context, ctx, std::string( server.mb_str() ), std::string( path.mb_str() ), storeFile, &progress );
|
||||
+ io_context.run();
|
||||
}
|
||||
catch ( ParaverKernelException& e )
|
||||
{
|
||||
--
|
||||
2.49.0
|
||||
|
23
pkgs/paraver/fix-libxml2-deprecation.patch
Normal file
23
pkgs/paraver/fix-libxml2-deprecation.patch
Normal file
@ -0,0 +1,23 @@
|
||||
commit 60aa3ffa05f6b40db191a880e9e622d608744c1f
|
||||
Author: Aleix Boné <aleix.boneribo@bsc.es>
|
||||
Date: Sun Jul 21 12:11:30 2025 +0200
|
||||
|
||||
fix libxml2 deprecated macro
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7fe1876..3ce1091 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -46,7 +46,10 @@ AC_PROG_CPP
|
||||
AC_PROG_CXXCPP
|
||||
AC_PROG_SED
|
||||
|
||||
-AM_PATH_XML2
|
||||
+PKG_PROG_PKG_CONFIG
|
||||
+PKG_CHECK_MODULES([XML], [libxml-2.0])
|
||||
+
|
||||
+AC_SUBST(XML_CPPFLAGS, $XML_CFLAGS)
|
||||
|
||||
AX_BOOST_BASE(1.36)
|
||||
AX_BOOST_SERIALIZATION
|
||||
|
60
pkgs/paraver/kernel.nix
Normal file
60
pkgs/paraver/kernel.nix
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
stdenv
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, boost
|
||||
, libxml2
|
||||
, xml2
|
||||
, autoconf
|
||||
, automake
|
||||
, pkg-config
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "paraver-kernel";
|
||||
version = "4.12.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-performance-tools";
|
||||
repo = "paraver-kernel";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Xs7g8ITZhPt00v7o2WlTddbou8C8Rc9kBMFpl2WsCS4=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://github.com/bsc-performance-tools/paraver-kernel/pull/11
|
||||
# TODO: add this back if it's still relevant
|
||||
# ./dont-expand-colors.patch
|
||||
./fix-libxml2-deprecation.patch
|
||||
];
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
enableParallelBuilding = true;
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
preConfigure = ''
|
||||
export CFLAGS="-O3 -DPARALLEL_ENABLED"
|
||||
export CXXFLAGS="-O3 -DPARALLEL_ENABLED"
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-boost=${boost}"
|
||||
"--enable-openmp"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
autoconf
|
||||
automake
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
libxml2.dev
|
||||
xml2
|
||||
zlib
|
||||
];
|
||||
}
|
286
pkgs/paraver/mouse-label.patch
Normal file
286
pkgs/paraver/mouse-label.patch
Normal file
@ -0,0 +1,286 @@
|
||||
--- a/src/wxparaver/src/gtimeline.cpp 2019-09-13 13:18:03.000000000 +0200
|
||||
+++ b/src/wxparaver/src/gtimeline.cpp 2020-11-30 13:18:50.121429888 +0100
|
||||
@@ -607,8 +607,8 @@
|
||||
// Paint blank image while redrawing
|
||||
wxClientDC dc( drawZone );
|
||||
#ifdef __WXGTK__
|
||||
- dc.DrawBitmap( bufferImage, 0, 0, false );
|
||||
- drawZone->Update();
|
||||
+// dc.DrawBitmap( bufferImage, 0, 0, false );
|
||||
+// drawZone->Update();
|
||||
#endif
|
||||
|
||||
if( !drawAxis( bufferDraw, selectedSet ) )
|
||||
@@ -1365,13 +1365,66 @@
|
||||
|
||||
void gTimeline::drawRowEvents( wxDC& eventdc, wxDC& eventmaskdc, TObjectOrder rowPos, hash_set< PRV_INT32 >& eventsToDraw )
|
||||
{
|
||||
+ int last_x = -100, x, xx;
|
||||
+ int i, neigh, max_x;
|
||||
+
|
||||
+ /* Keep track of other events in nearby pixels */
|
||||
+ max_x = myWindow->getWidth();
|
||||
+ int *table = new int[max_x];
|
||||
+
|
||||
+ for(i=0; i<max_x; i++)
|
||||
+ {
|
||||
+ table[i] = 0;
|
||||
+ }
|
||||
+
|
||||
for( hash_set< PRV_INT32 >::iterator it = eventsToDraw.begin(); it != eventsToDraw.end(); ++it )
|
||||
{
|
||||
+ /* Add a new event in the x position in the table */
|
||||
+ x = *it;
|
||||
+ assert(0 <= x);
|
||||
+ assert(x < max_x);
|
||||
+ table[*it]++;
|
||||
+ }
|
||||
+
|
||||
+ for( hash_set< PRV_INT32 >::iterator it = eventsToDraw.begin(); it != eventsToDraw.end(); ++it )
|
||||
+ {
|
||||
+ /*
|
||||
+ * Draws an event with 4 segments: AE, BF, CG and DH
|
||||
+ *
|
||||
+ * A B C D
|
||||
+ * * * * *
|
||||
+ * * * * *
|
||||
+ * * * * *
|
||||
+ * * F G H
|
||||
+ * *
|
||||
+ * *
|
||||
+ * E
|
||||
+ */
|
||||
+
|
||||
+ /* If the event is very close to another one, we paint it red, so we
|
||||
+ * now that we may need to zoom to see more closely how many events
|
||||
+ * are there. Otherwise we paint it green. */
|
||||
+ x = *it;
|
||||
+
|
||||
+ /* Count neighbour events */
|
||||
+ neigh = 0;
|
||||
+ for(xx=x-5; xx<=x+5; xx++)
|
||||
+ {
|
||||
+ if(0 <= xx && xx < max_x)
|
||||
+ neigh += table[xx];
|
||||
+ }
|
||||
+
|
||||
+ /* Paint the event red if there are more events close */
|
||||
+ if(neigh > 1)
|
||||
+ eventdc.SetPen( *wxRED_PEN );
|
||||
+ else
|
||||
+ eventdc.SetPen( *wxGREEN_PEN );
|
||||
+
|
||||
eventdc.DrawLine( *it, rowPos - 6, *it, rowPos );
|
||||
- eventdc.DrawLine( *it+1, rowPos - 6, *it+1, rowPos-3 );
|
||||
- eventdc.DrawLine( *it+2, rowPos - 6, *it+2, rowPos-3 );
|
||||
- eventdc.DrawLine( *it+3, rowPos - 6, *it+3, rowPos-3 );
|
||||
- eventdc.DrawLine( *it+4, rowPos - 6, *it+4, rowPos-3 );
|
||||
+// eventdc.DrawLine( *it+1, rowPos - 6, *it+1, rowPos-3 );
|
||||
+// eventdc.DrawLine( *it+2, rowPos - 6, *it+2, rowPos-3 );
|
||||
+// eventdc.DrawLine( *it+3, rowPos - 6, *it+3, rowPos-3 );
|
||||
+// eventdc.DrawLine( *it+4, rowPos - 6, *it+4, rowPos-3 );
|
||||
#ifndef __WXMAC__
|
||||
eventmaskdc.DrawLine( *it, rowPos - 6, *it, rowPos );
|
||||
eventmaskdc.DrawLine( *it+1, rowPos - 6, *it+1, rowPos-3 );
|
||||
@@ -1379,8 +1432,12 @@
|
||||
eventmaskdc.DrawLine( *it+3, rowPos - 6, *it+3, rowPos-3 );
|
||||
eventmaskdc.DrawLine( *it+4, rowPos - 6, *it+4, rowPos-3 );
|
||||
#endif
|
||||
+
|
||||
+ last_x = x;
|
||||
}
|
||||
|
||||
+ delete table;
|
||||
+
|
||||
}
|
||||
|
||||
|
||||
@@ -2427,7 +2484,7 @@
|
||||
|
||||
motionEvent = event;
|
||||
if( !event.ShiftDown() )
|
||||
- timerMotion->Start( 20, true );
|
||||
+ timerMotion->Start( 2, true );
|
||||
|
||||
wxMemoryDC dc( bufferImage );
|
||||
// PRV_UINT32 precision = ParaverConfig::getInstance()->getTimelinePrecision();
|
||||
@@ -4651,12 +4708,18 @@
|
||||
|
||||
void gTimeline::OnTimerMotion( wxTimerEvent& event )
|
||||
{
|
||||
+ int mx, my;
|
||||
+
|
||||
+ mx = motionEvent.GetX();
|
||||
+ my = motionEvent.GetY();
|
||||
+
|
||||
if( motionEvent.GetX() < objectAxisPos + 1 || motionEvent.GetX() > bufferImage.GetWidth() - drawBorder ||
|
||||
motionEvent.GetY() < drawBorder || motionEvent.GetY() > timeAxisPos - 1 )
|
||||
return;
|
||||
|
||||
wxMemoryDC dc( bufferImage );
|
||||
wxColour tmpColor;
|
||||
+ wxClientDC paintDC( drawZone );
|
||||
|
||||
wxString label;
|
||||
if( zooming || timing || wxGetApp().GetGlobalTiming() )
|
||||
@@ -4704,7 +4767,11 @@
|
||||
#endif
|
||||
|
||||
if( tmpColor == backgroundColour )
|
||||
+ {
|
||||
+ /* Just clean and exit */
|
||||
+ paintDC.DrawBitmap( drawImage, 0, 0 );
|
||||
return;
|
||||
+ }
|
||||
|
||||
rgb color = { (ParaverColor)tmpColor.Red(), (ParaverColor)tmpColor.Green(), (ParaverColor)tmpColor.Blue() };
|
||||
TSemanticValue firstValue, secondValue;
|
||||
@@ -4762,38 +4829,109 @@
|
||||
}
|
||||
}
|
||||
|
||||
-#ifndef __WXGTK__
|
||||
- wxClientDC paintDC( drawZone );
|
||||
- #ifdef __WXMAC__
|
||||
- drawStackedImages( paintDC );
|
||||
- #else
|
||||
- paintDC.DrawBitmap( drawImage, 0, 0 );
|
||||
- #endif
|
||||
-#else
|
||||
- #if wxMAJOR_VERSION<3
|
||||
- wxPaintDC paintDC( drawZone );
|
||||
- #else
|
||||
- wxClientDC paintDC( drawZone );
|
||||
- #endif
|
||||
- paintDC.DrawBitmap( drawImage, 0, 0 );
|
||||
-#endif
|
||||
-
|
||||
paintDC.SetFont( semanticFont );
|
||||
+ paintDC.SetPen( backgroundColour );
|
||||
+ paintDC.SetBrush( backgroundColour );
|
||||
+ paintDC.SetTextForeground( foregroundColour );
|
||||
+
|
||||
+ /* Draw the label close to the mouse, so it's easier to follow */
|
||||
+ int label_x0, label_y0;
|
||||
+ label_x0 = mx + 20;
|
||||
+ label_y0 = my + 20;
|
||||
+ paintDC.SetPen( *wxBLACK_PEN );
|
||||
+ paintDC.SetBrush( *wxBLACK_BRUSH );
|
||||
+
|
||||
+ /* Draw a filled black rectangle behind the label, so is easy to read
|
||||
+ * when placed over multiple colors from the trace */
|
||||
+ int rect_x0, rect_y0, rect_w, rect_h;
|
||||
+ rect_x0 = label_x0 - 5;
|
||||
+ rect_y0 = label_y0 - 5;
|
||||
+
|
||||
+ TObjectOrder row;
|
||||
+ TTime time;
|
||||
+
|
||||
+ /* Fills "row" and "time" objects if is over a TimeObject (?) */
|
||||
+ bool print_duration = true;
|
||||
+ double tp, tn;
|
||||
+
|
||||
+ /* This whole thing to get the event is completely crap. We may get a
|
||||
+ * pixel here that belong to a different event, probably due to
|
||||
+ * rounding operations when dealing with time.
|
||||
+ *
|
||||
+ * To avoid giving misleading information, we only print the time when
|
||||
+ * both neighbour pixels are also from the same event */
|
||||
+ print_duration &= pixelToTimeObject(mx, my, time, row);
|
||||
+ print_duration &= pixelToTimeObject(mx-2, my, tp, row);
|
||||
+ print_duration &= pixelToTimeObject(mx+2, my, tn, row);
|
||||
+
|
||||
+ if(time <= tp) print_duration = false;
|
||||
+ if(tn <= time) print_duration = false;
|
||||
+
|
||||
+ //computeWhatWhere(time, row, 0.0, false, false);
|
||||
+
|
||||
+ //printf("time = %e\n", time);
|
||||
+ //printf("begin time = %e\n", myWindow->getBeginTime(row));
|
||||
+
|
||||
+ if(print_duration)
|
||||
+ {
|
||||
+ double t0, t1, t, dt;
|
||||
+ t = time;
|
||||
+
|
||||
+ myWindow->init(t, CREATEEVENTS + CREATECOMMS, false );
|
||||
+ myWindow->initRow(row, t, CREATEEVENTS + CREATECOMMS, false );
|
||||
+
|
||||
+ t0 = myWindow->getBeginTime(row);
|
||||
+ t1 = myWindow->getEndTime(row);
|
||||
+
|
||||
+ //printf("t0=%e t=%e t1=%e\n", t0, t, t1);
|
||||
+ while(!(t0 <= t && t <= t1))
|
||||
+ {
|
||||
+ myWindow->calcNext(row);
|
||||
+ t0 = myWindow->getBeginTime(row);
|
||||
+ t1 = myWindow->getEndTime(row);
|
||||
+ //printf("t0=%e t=%e t1=%e\n", t0, t, t1);
|
||||
+ if(t0 > t)
|
||||
+ {
|
||||
+ //printf("we are out\n");
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Only add the duration if we are more than one pixel away from the
|
||||
+ * border */
|
||||
+ if(t0 < tp && tn < t1)
|
||||
+ {
|
||||
+ if(t0 > t)
|
||||
+ dt = 0;
|
||||
+ else
|
||||
+ dt = t1 - t0;
|
||||
+
|
||||
+ assert(t0 <= time);
|
||||
+ assert(time <= t1);
|
||||
+
|
||||
+ wxString duration = wxString::FromAscii( LabelConstructor::timeLabel(
|
||||
+ myWindow->traceUnitsToWindowUnits( dt ),
|
||||
+ myWindow->getTimeUnit(),
|
||||
+ ParaverConfig::getInstance()->getTimelinePrecision() ).c_str() );
|
||||
+
|
||||
+ label << wxT( " (" ) << duration << wxT(")");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
wxSize objectExt = paintDC.GetTextExtent( label );
|
||||
+ rect_w = objectExt.GetWidth() + 10;
|
||||
+ rect_h = objectExt.GetHeight() + 10;
|
||||
+
|
||||
+ /* Erase previous bitmap */
|
||||
+ paintDC.DrawBitmap( drawImage, 0, 0 );
|
||||
+
|
||||
+ /* Draw black rectangle */
|
||||
+ paintDC.DrawRectangle( rect_x0, rect_y0, rect_w, rect_h );
|
||||
|
||||
+ /* Then place the label */
|
||||
+ paintDC.DrawText( label, label_x0, label_y0);
|
||||
paintDC.SetPen( backgroundColour );
|
||||
paintDC.SetBrush( backgroundColour );
|
||||
-// paintDC.DrawRectangle( ( bufferImage.GetWidth() - objectAxisPos ) / 2, timeAxisPos + 1, objectExt.GetWidth() + 30, bufferImage.GetHeight() - timeAxisPos );
|
||||
- if( !( zooming || timing || wxGetApp().GetGlobalTiming() ) )
|
||||
- {
|
||||
- paintDC.SetBrush( tmpColor );
|
||||
- paintDC.DrawRectangle( ( bufferImage.GetWidth() - objectAxisPos ) / 2, timeAxisPos + 2, 10, bufferImage.GetHeight() - timeAxisPos - 3 );
|
||||
- }
|
||||
- paintDC.SetTextForeground( foregroundColour );
|
||||
- if( zooming )
|
||||
- paintDC.DrawText( label, ( bufferImage.GetWidth() - objectAxisPos ) / 2 + objectAxisPos - ( objectExt.GetWidth() / 2 ), timeAxisPos + 3 );
|
||||
- else
|
||||
- paintDC.DrawText( label, ( bufferImage.GetWidth() - objectAxisPos ) / 2 + 12, timeAxisPos + 3 );
|
||||
}
|
||||
|
||||
void gTimeline::OnTimerWheel( wxTimerEvent& event )
|
||||
@@ -5075,7 +5213,11 @@
|
||||
endRow = TObjectOrder( floor( ( y - drawBorder - 1 ) / heightPerRow ) );
|
||||
|
||||
if( endRow >= numObjects )
|
||||
+ {
|
||||
endRow = numObjects - 1;
|
||||
+ printf("endRow exceeds numObjects, capped to %d\n", endRow);
|
||||
+ }
|
||||
+ //printf("endRow = %d\n", endRow);
|
||||
onObject = selected[ endRow ];
|
||||
|
||||
return true;
|
77
pkgs/paraver/release.nix
Normal file
77
pkgs/paraver/release.nix
Normal file
@ -0,0 +1,77 @@
|
||||
{
|
||||
stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, boost
|
||||
, libxml2
|
||||
, xml2
|
||||
, fetchurl
|
||||
, wxGTK32
|
||||
, autoconf
|
||||
, automake
|
||||
, openssl # For boost
|
||||
# Custom patches :)
|
||||
, enableMouseLabel ? false
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
wx = wxGTK32;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wxparaver";
|
||||
version = "4.10.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://ftp.tools.bsc.es/wxparaver/wxparaver-${version}-src.tar.bz2";
|
||||
sha256 = "a7L15viCXtQS9vAsdFzCFlUavUzl4Y0yOYmVSCrdWBU=";
|
||||
};
|
||||
|
||||
patches = []
|
||||
++ optional (enableMouseLabel) ./mouse-label.patch;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# What would we do without the great gamezelda:
|
||||
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=wxparaver
|
||||
postPatch = ''
|
||||
pushd src/wxparaver
|
||||
sed -i \
|
||||
-e 's|-lparaver-api -lparaver-kernel|-L../../paraver-kernel/src/.libs -L../../paraver-kernel/api/.libs -lparaver-api -lparaver-kernel -lssl -lcrypto -ldl|g' \
|
||||
-e '$awxparaver_bin_CXXFLAGS = @CXXFLAGS@ -I../../paraver-kernel -I../../paraver-kernel/api' \
|
||||
src/Makefile.am
|
||||
|
||||
sed -i 's| -L$PARAVER_LIBDIR||g' configure.ac
|
||||
popd
|
||||
|
||||
# Patch shebang as /usr/bin/env is missing in nix
|
||||
sed -i '1c#!/bin/sh' src/paraver-cfgs/install.sh
|
||||
'';
|
||||
#TODO: Move the sed commands to proper patches (and maybe send them upstream?)
|
||||
|
||||
preConfigure = ''
|
||||
pushd src/wxparaver
|
||||
autoreconf -i -f
|
||||
popd
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-boost=${boost}"
|
||||
"--with-wx-config=${wx}/bin/wx-config"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
xml2
|
||||
libxml2.dev
|
||||
wx
|
||||
openssl.dev
|
||||
];
|
||||
|
||||
}
|
47
pkgs/paraver/wxparaver.nix
Normal file
47
pkgs/paraver/wxparaver.nix
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
stdenv
|
||||
, fetchFromGitHub
|
||||
, boost
|
||||
, libxml2
|
||||
, xml2
|
||||
, fetchurl
|
||||
, wxGTK30-gtk3
|
||||
, paraver-kernel
|
||||
}:
|
||||
|
||||
let
|
||||
wx = wxGTK30-gtk3;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wxparaver";
|
||||
version = "4.8.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://ftp.tools.bsc.es/wxparaver/wxparaver-${version}-src.tar.bz2";
|
||||
sha256 = "0b8rrhnf7h8j72pj6nrxkrbskgg9b5w60nxi47nxg6275qvfq8hd";
|
||||
};
|
||||
|
||||
postUnpack = "sourceRoot=$sourceRoot/src/wxparaver";
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preConfigure = ''
|
||||
configureFlagsArray=(
|
||||
"--with-boost=${boost}"
|
||||
"--with-wx-config=${wx}/bin/wx-config"
|
||||
--with-wxpropgrid-dir=
|
||||
"--with-paraver=${paraver-kernel}"
|
||||
"--enable-debug=yes"
|
||||
"CXXFLAGS=-g"
|
||||
"CFLAGS=-g"
|
||||
)
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
xml2
|
||||
libxml2.dev
|
||||
wx
|
||||
paraver-kernel
|
||||
];
|
||||
|
||||
}
|
84
pkgs/perf/default.nix
Normal file
84
pkgs/perf/default.nix
Normal file
@ -0,0 +1,84 @@
|
||||
{ lib, stdenv, kernel, elfutils, python2, python3, perl, newt, slang, asciidoc, xmlto, makeWrapper
|
||||
, docbook_xsl, docbook_xml_dtd_45, libxslt, flex, bison, pkg-config, libunwind, binutils
|
||||
, libiberty, audit, libbfd, libopcodes, openssl, systemtap, numactl
|
||||
, zlib, withGtk ? false, gtk2 ? null
|
||||
, babeltrace
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
assert withGtk -> gtk2 != null;
|
||||
assert versionAtLeast kernel.version "3.12";
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "perf-linux-${kernel.version}";
|
||||
|
||||
inherit (kernel) src;
|
||||
|
||||
preConfigure = ''
|
||||
cd tools/perf
|
||||
|
||||
substituteInPlace Makefile \
|
||||
--replace /usr/include/elfutils $elfutils/include/elfutils
|
||||
|
||||
for x in util/build-id.c util/dso.c; do
|
||||
substituteInPlace $x --replace /usr/lib/debug /run/current-system/sw/lib/debug
|
||||
done
|
||||
|
||||
if [ -f bash_completion ]; then
|
||||
sed -i 's,^have perf,_have perf,' bash_completion
|
||||
fi
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"prefix=$(out)"
|
||||
"WERROR=0"
|
||||
"LIBBABELTRACE=1"
|
||||
"LIBBABELTRACE_DIR=${babeltrace}"
|
||||
] ++ kernel.makeFlags;
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
# perf refers both to newt and slang
|
||||
nativeBuildInputs = [
|
||||
asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt
|
||||
flex bison libiberty audit makeWrapper pkg-config python3
|
||||
];
|
||||
buildInputs = [
|
||||
elfutils newt slang libunwind libbfd zlib openssl systemtap.stapBuild numactl
|
||||
libopcodes python3 perl babeltrace
|
||||
] ++ lib.optional withGtk gtk2
|
||||
++ (if (versionAtLeast kernel.version "4.19") then [ python3 ] else [ python2 ]);
|
||||
|
||||
# Note: we don't add elfutils to buildInputs, since it provides a
|
||||
# bad `ld' and other stuff.
|
||||
NIX_CFLAGS_COMPILE = toString [
|
||||
"-Wno-error=cpp"
|
||||
"-Wno-error=bool-compare"
|
||||
"-Wno-error=deprecated-declarations"
|
||||
"-DOBJDUMP_PATH=\"${binutils}/bin/objdump\""
|
||||
"-Wno-error=stringop-truncation"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs scripts/bpf_helpers_doc.py
|
||||
'';
|
||||
|
||||
doCheck = false; # requires "sparse"
|
||||
doInstallCheck = false; # same
|
||||
|
||||
separateDebugInfo = true;
|
||||
installFlags = [ "install" "install-man" "ASCIIDOC8=1" "prefix=$(out)" ];
|
||||
|
||||
preFixup = ''
|
||||
wrapProgram $out/bin/perf \
|
||||
--prefix PATH : "${binutils}/bin"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://perf.wiki.kernel.org/";
|
||||
description = "Linux tools to profile with performance counters";
|
||||
maintainers = with lib.maintainers; [viric];
|
||||
platforms = with lib.platforms; linux;
|
||||
};
|
||||
}
|
48
pkgs/pmix/pmix2.nix
Normal file
48
pkgs/pmix/pmix2.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{ stdenv, lib, fetchFromGitHub, perl, autoconf, automake
|
||||
, libtool, flex, libevent, hwloc, munge, zlib
|
||||
} :
|
||||
|
||||
let
|
||||
version = "2.2.4";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "pmix";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "openpmix";
|
||||
owner = "openpmix";
|
||||
rev = "v${version}";
|
||||
sha256 = "1wc4sbnbg20lp6l6pk1sawrf5wrdajcijd1cmrpp1d6h9nv23ggv";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./autogen.pl
|
||||
patchShebangs ./config
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ perl autoconf automake libtool flex ];
|
||||
|
||||
buildInputs = [ libevent hwloc munge zlib ];
|
||||
|
||||
configureFlags = [
|
||||
"--with-libevent=${libevent.dev}"
|
||||
"--with-munge=${munge}"
|
||||
"--with-hwloc=${hwloc.dev}"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
./autogen.pl
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Process Management Interface for HPC environments";
|
||||
homepage = "https://openpmix.github.io/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.markuskowa ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
58
pkgs/rdma-core/default.nix
Normal file
58
pkgs/rdma-core/default.nix
Normal file
@ -0,0 +1,58 @@
|
||||
{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, docutils
|
||||
, pandoc, ethtool, iproute, libnl, udev, python, perl
|
||||
, makeWrapper
|
||||
} :
|
||||
|
||||
let
|
||||
version = "31.1";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "rdma-core";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linux-rdma";
|
||||
repo = "rdma-core";
|
||||
rev = "v${version}";
|
||||
sha256 = "1xkmdix6mgv6kjjj6wi844bfddhl0ybalrp5g8pf5izasc43brg7";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config pandoc docutils makeWrapper ];
|
||||
buildInputs = [ libnl ethtool iproute udev python perl ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_INSTALL_RUNDIR=/run"
|
||||
"-DCMAKE_INSTALL_SHAREDSTATEDIR=/var/lib"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace srp_daemon/srp_daemon.sh.in \
|
||||
--replace /bin/rm rm
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# cmake script is buggy, move file manually
|
||||
mkdir -p $out/${perl.libPrefix}
|
||||
mv $out/share/perl5/* $out/${perl.libPrefix}
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
for pls in $out/bin/{ibfindnodesusing.pl,ibidsverify.pl}; do
|
||||
echo "wrapping $pls"
|
||||
chmod +x "$pls"
|
||||
wrapProgram $pls --prefix PERL5LIB : "$out/${perl.libPrefix}"
|
||||
done
|
||||
|
||||
# Remove the binaries as they pull systemd
|
||||
rm -rf $out/bin
|
||||
rm -rf $out/sbin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "RDMA Core Userspace Libraries and Daemons";
|
||||
homepage = "https://github.com/linux-rdma/rdma-core";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
};
|
||||
}
|
13
pkgs/slurm/16.05.8.1/common-env-echo.patch
Normal file
13
pkgs/slurm/16.05.8.1/common-env-echo.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/common/env.c b/src/common/env.c
|
||||
index 987846d..73d3b3b 100644
|
||||
--- a/src/common/env.c
|
||||
+++ b/src/common/env.c
|
||||
@@ -1941,7 +1941,7 @@ char **env_array_user_default(const char *username, int timeout, int mode,
|
||||
char **env = NULL;
|
||||
char *starttoken = "XXXXSLURMSTARTPARSINGHEREXXXX";
|
||||
char *stoptoken = "XXXXSLURMSTOPPARSINGHEREXXXXX";
|
||||
- char cmdstr[256], *env_loc = NULL;
|
||||
+ char cmdstr[MAXPATHLEN], *env_loc = NULL;
|
||||
char *stepd_path = NULL;
|
||||
int fd1, fd2, fildes[2], found, fval, len, rc, timeleft;
|
||||
int buf_read, buf_rem, config_timeout;
|
87
pkgs/slurm/16.05.8.1/default.nix
Normal file
87
pkgs/slurm/16.05.8.1/default.nix
Normal file
@ -0,0 +1,87 @@
|
||||
{ stdenv, lib, fetchFromGitHub, pkg-config, libtool, curl
|
||||
, python3, munge, perl, pam, zlib, shadow, coreutils
|
||||
, ncurses, libmysqlclient, lua, hwloc, numactl
|
||||
, readline, freeipmi, xorg, lz4, rdma-core, nixosTests
|
||||
, pmix, enableX11 ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "slurm";
|
||||
version = "16.05.8.1";
|
||||
|
||||
# N.B. We use github release tags instead of https://www.schedmd.com/downloads.php
|
||||
# because the latter does not keep older releases.
|
||||
src = fetchFromGitHub {
|
||||
owner = "SchedMD";
|
||||
repo = "slurm";
|
||||
# The release tags use - instead of .
|
||||
rev = "${pname}-${builtins.replaceStrings ["."] ["-"] version}";
|
||||
sha256 = "1fkrbi4f22jb2pq19sv3j2yyvac4nh25fk8mzw6ic24swxp8wq9s";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
patches = [
|
||||
./major.patch
|
||||
./mvwprintw.patch
|
||||
# increase string length to allow for full
|
||||
# path of 'echo' in nix store
|
||||
#./common-env-echo.patch
|
||||
# Required for configure to pick up the right dlopen path
|
||||
#./pmix-configure.patch
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace src/common/env.c \
|
||||
--replace "/bin/echo" "${coreutils}/bin/echo"
|
||||
'';
|
||||
|
||||
# nixos test fails to start slurmd with 'undefined symbol: slurm_job_preempt_mode'
|
||||
# https://groups.google.com/forum/#!topic/slurm-devel/QHOajQ84_Es
|
||||
# this doesn't fix tests completely at least makes slurmd to launch
|
||||
hardeningDisable = [ "fortify" "bindnow" ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config libtool python3 ];
|
||||
buildInputs = [
|
||||
curl python3 munge perl pam zlib
|
||||
libmysqlclient ncurses lz4 rdma-core
|
||||
lua hwloc numactl readline freeipmi shadow.su
|
||||
pmix
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
"CFLAGS=-fcommon"
|
||||
"--with-freeipmi=${freeipmi}"
|
||||
"--with-hwloc=${hwloc}"
|
||||
"--with-lz4=${lz4.dev}"
|
||||
"--with-munge=${munge}"
|
||||
"--with-zlib=${zlib}"
|
||||
"--with-ofed=${rdma-core}"
|
||||
"--sysconfdir=/etc/slurm"
|
||||
"--with-pmix=${pmix}"
|
||||
"--disable-gtktest"
|
||||
"--disable-x11"
|
||||
];
|
||||
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs ./doc/html/shtml2html.py
|
||||
patchShebangs ./doc/man/man2html.py
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
rm -f $out/lib/*.la $out/lib/slurm/*.la
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.tests.slurm = nixosTests.slurm;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.schedmd.com/";
|
||||
description = "Simple Linux Utility for Resource Management";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ jagajaga markuskowa ];
|
||||
};
|
||||
}
|
10
pkgs/slurm/16.05.8.1/major.patch
Normal file
10
pkgs/slurm/16.05.8.1/major.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/src/plugins/task/cgroup/task_cgroup_devices.c 1970-01-01 01:00:01.000000000 +0100
|
||||
+++ b/src/plugins/task/cgroup/task_cgroup_devices.c 1970-01-01 01:00:01.000000000 +0100
|
||||
@@ -43,6 +43,7 @@
|
||||
#include <glob.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
#include <slurm/slurm.h>
|
||||
#include <slurm/slurm_errno.h>
|
||||
#include "src/common/xstring.h"
|
11
pkgs/slurm/16.05.8.1/mvwprintw.patch
Normal file
11
pkgs/slurm/16.05.8.1/mvwprintw.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/src/smap/partition_functions.c 2023-04-02 21:07:54.505816546 +0200
|
||||
+++ b/src/smap/partition_functions.c 2023-04-02 21:07:43.512816197 +0200
|
||||
@@ -588,7 +588,7 @@
|
||||
else
|
||||
tmp_state = "unk";
|
||||
mvwprintw(text_win, main_ycord, main_xcord,
|
||||
- tmp_state);
|
||||
+ "%s", tmp_state);
|
||||
main_xcord += 7;
|
||||
|
||||
if (part_ptr->max_time == INFINITE)
|
22
pkgs/slurm/16.05.8.1/pmi2.nix
Normal file
22
pkgs/slurm/16.05.8.1/pmi2.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
stdenv
|
||||
, slurm
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "pmi2-${version}";
|
||||
|
||||
inherit (slurm) src version prePatch nativeBuildInputs buildInputs
|
||||
configureFlags preConfigure;
|
||||
|
||||
# Only build the pmi2 library
|
||||
preBuild = ''cd contribs/pmi2'';
|
||||
|
||||
# Include also the pmi.h header
|
||||
postInstall = ''
|
||||
mkdir -p $out/include
|
||||
cp ../../slurm/pmi.h $out/include
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
}
|
13
pkgs/slurm/16.05.8.1/pmix-configure.patch
Normal file
13
pkgs/slurm/16.05.8.1/pmix-configure.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/configure b/configure
|
||||
index 1cf53bc..ab68441 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -21207,7 +21207,7 @@ rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
as_fn_error $? "error processing $x_ac_cv_pmix_libdir: PMIx v3.x was already found in one of the previous paths" "$LINENO" 5
|
||||
fi
|
||||
_x_ac_pmix_v3_found="1"
|
||||
- PMIX_V3_CPPFLAGS="-I$x_ac_cv_pmix_dir/include"
|
||||
+ PMIX_V3_CPPFLAGS="-I$x_ac_cv_pmix_dir/include -DPMIXP_V3_LIBPATH=\\\"$x_ac_cv_pmix_libdir\\\""
|
||||
if test "$ac_with_rpath" = "yes"; then
|
||||
PMIX_V3_LDFLAGS="-Wl,-rpath -Wl,$x_ac_cv_pmix_libdir -L$x_ac_cv_pmix_libdir"
|
||||
else
|
80
pkgs/slurm/default.nix
Normal file
80
pkgs/slurm/default.nix
Normal file
@ -0,0 +1,80 @@
|
||||
{ stdenv, lib, fetchFromGitHub, pkg-config, libtool, curl
|
||||
, python, munge, perl, pam, openssl
|
||||
, ncurses, libmysqlclient, gtk2, lua, hwloc, numactl
|
||||
, readline, freeipmi, libssh2, xorg
|
||||
, pmix
|
||||
# enable internal X11 support via libssh2
|
||||
, enableX11 ? true
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "slurm-${version}";
|
||||
version = "17.11.9-2";
|
||||
|
||||
# N.B. We use github release tags instead of https://www.schedmd.com/downloads.php
|
||||
# because the latter does not keep older releases.
|
||||
src = fetchFromGitHub {
|
||||
owner = "SchedMD";
|
||||
repo = "slurm";
|
||||
# The release tags use - instead of .
|
||||
rev = "${builtins.replaceStrings ["."] ["-"] name}";
|
||||
sha256 = "1lq4ac6yjai6wh979dciw8v3d99zbd3w36rfh0vpncqm672fg1qy";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
prePatch = lib.optional enableX11 ''
|
||||
substituteInPlace src/common/x11_util.c \
|
||||
--replace '"/usr/bin/xauth"' '"${xorg.xauth}/bin/xauth"'
|
||||
'';
|
||||
|
||||
# nixos test fails to start slurmd with 'undefined symbol: slurm_job_preempt_mode'
|
||||
# https://groups.google.com/forum/#!topic/slurm-devel/QHOajQ84_Es
|
||||
# this doesn't fix tests completely at least makes slurmd to launch
|
||||
hardeningDisable = [ "bindnow" ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config libtool ];
|
||||
buildInputs = [
|
||||
curl python munge perl pam openssl
|
||||
libmysqlclient ncurses gtk2
|
||||
lua hwloc numactl readline freeipmi
|
||||
pmix
|
||||
] ++ lib.optionals enableX11 [ libssh2 xorg.xauth ];
|
||||
|
||||
configureFlags = with lib;
|
||||
[ "--with-munge=${munge}"
|
||||
"--with-ssl=${openssl.dev}"
|
||||
"--with-hwloc=${hwloc.dev}"
|
||||
"--with-freeipmi=${freeipmi}"
|
||||
"--sysconfdir=/etc/slurm"
|
||||
"--with-pmix=${pmix}"
|
||||
] ++ (optional (gtk2 == null) "--disable-gtktest")
|
||||
++ (optional enableX11 "--with-libssh2=${libssh2.dev}");
|
||||
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs ./doc/html/shtml2html.py
|
||||
patchShebangs ./doc/man/man2html.py
|
||||
patchShebangs ./configure
|
||||
'';
|
||||
|
||||
# postBuild = ''
|
||||
# pushd contrib/pmi2
|
||||
# make -j install
|
||||
# popd
|
||||
# '';
|
||||
|
||||
postInstall = ''
|
||||
rm -f $out/lib/*.la $out/lib/slurm/*.la
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = http://www.schedmd.com/;
|
||||
description = "Simple Linux Utility for Resource Management";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ jagajaga markuskowa ];
|
||||
};
|
||||
}
|
82
pkgs/slurm/pmi2.nix
Normal file
82
pkgs/slurm/pmi2.nix
Normal file
@ -0,0 +1,82 @@
|
||||
{ stdenv, lib, fetchFromGitHub, pkg-config, libtool, curl
|
||||
, python3, munge, perl, pam, openssl
|
||||
, ncurses, libmysqlclient, gtk2, lua, hwloc, numactl
|
||||
, readline, freeipmi, libssh2, xorg
|
||||
, pmix
|
||||
# enable internal X11 support via libssh2
|
||||
, enableX11 ? true
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "slurm-libpmi2-${version}";
|
||||
version = "17.11.9-2";
|
||||
|
||||
# N.B. We use github release tags instead of https://www.schedmd.com/downloads.php
|
||||
# because the latter does not keep older releases.
|
||||
src = fetchFromGitHub {
|
||||
owner = "SchedMD";
|
||||
repo = "slurm";
|
||||
# The release tags use - instead of .
|
||||
rev = "${builtins.replaceStrings ["."] ["-"] name}";
|
||||
sha256 = "1lq4ac6yjai6wh979dciw8v3d99zbd3w36rfh0vpncqm672fg1qy";
|
||||
};
|
||||
|
||||
outputs = [ "out" ];
|
||||
|
||||
prePatch = lib.optional enableX11 ''
|
||||
substituteInPlace src/common/x11_util.c \
|
||||
--replace '"/usr/bin/xauth"' '"${xorg.xauth}/bin/xauth"'
|
||||
'';
|
||||
|
||||
# nixos test fails to start slurmd with 'undefined symbol: slurm_job_preempt_mode'
|
||||
# https://groups.google.com/forum/#!topic/slurm-devel/QHOajQ84_Es
|
||||
# this doesn't fix tests completely at least makes slurmd to launch
|
||||
hardeningDisable = [ "bindnow" ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config libtool ];
|
||||
buildInputs = [
|
||||
curl python3 munge perl pam openssl
|
||||
libmysqlclient ncurses gtk2
|
||||
lua hwloc numactl readline freeipmi
|
||||
pmix
|
||||
] ++ lib.optionals enableX11 [ libssh2 xorg.xauth ];
|
||||
|
||||
configureFlags = with lib;
|
||||
[ "--with-munge=${munge}"
|
||||
"--with-ssl=${openssl.dev}"
|
||||
"--with-hwloc=${hwloc.dev}"
|
||||
"--with-freeipmi=${freeipmi}"
|
||||
"--sysconfdir=/etc/slurm"
|
||||
"--with-pmix=${pmix}"
|
||||
] ++ (optional (gtk2 == null) "--disable-gtktest")
|
||||
++ (optional enableX11 "--with-libssh2=${libssh2.dev}");
|
||||
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs ./doc/html/shtml2html.py
|
||||
patchShebangs ./doc/man/man2html.py
|
||||
patchShebangs ./configure
|
||||
'';
|
||||
|
||||
preBuild = ''cd contribs/pmi2'';
|
||||
|
||||
#buildPhase = ''
|
||||
# pushd contrib/pmi2
|
||||
# make -j install SHELL=${SHELL}
|
||||
# popd
|
||||
#'';
|
||||
|
||||
postInstall = ''
|
||||
rm -f $out/lib/*.la $out/lib/slurm/*.la
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = http://www.schedmd.com/;
|
||||
description = "Simple Linux Utility for Resource Management";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ jagajaga markuskowa ];
|
||||
};
|
||||
}
|
30
pkgs/sonar/default.nix
Normal file
30
pkgs/sonar/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
stdenv
|
||||
, autoreconfHook
|
||||
, fetchFromGitHub
|
||||
, ovni
|
||||
, mpi
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sonar";
|
||||
version = "1.0.1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "sonar";
|
||||
rev = "${version}";
|
||||
sha256 = "sha256-DazOEaiMfJLrZNtmQEEHdBkm/m4hq5e0mPEfMtzYqWk=";
|
||||
};
|
||||
hardeningDisable = [ "all" ];
|
||||
dontStrip = true;
|
||||
configureFlags = [ "--with-ovni=${ovni}" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
ovni
|
||||
mpi
|
||||
];
|
||||
}
|
58
pkgs/tagaspi/default.nix
Normal file
58
pkgs/tagaspi/default.nix
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
stdenv
|
||||
, fetchFromGitHub
|
||||
, automake
|
||||
, autoconf
|
||||
, libtool
|
||||
, mpi
|
||||
, autoreconfHook
|
||||
, gpi-2
|
||||
, boost
|
||||
, numactl
|
||||
, rdma-core
|
||||
, gfortran
|
||||
, symlinkJoin
|
||||
}:
|
||||
|
||||
let
|
||||
mpiAll = symlinkJoin {
|
||||
name = "mpi-all";
|
||||
paths = [ mpi.all ];
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tagaspi";
|
||||
enableParallelBuilding = true;
|
||||
separateDebugInfo = true;
|
||||
|
||||
version = "2.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "tagaspi";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-RGG/Re2uM293HduZfGzKUWioDtwnSYYdfeG9pVrX9EM=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
autoreconfHook
|
||||
automake
|
||||
autoconf
|
||||
libtool
|
||||
boost
|
||||
numactl
|
||||
rdma-core
|
||||
gfortran
|
||||
mpiAll
|
||||
];
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
configureFlags = [
|
||||
"--with-gaspi=${gpi-2}"
|
||||
"CFLAGS=-fPIC"
|
||||
"CXXFLAGS=-fPIC"
|
||||
];
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
}
|
64
pkgs/tampi/default.nix
Normal file
64
pkgs/tampi/default.nix
Normal file
@ -0,0 +1,64 @@
|
||||
{
|
||||
stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, automake
|
||||
, autoconf
|
||||
, libtool
|
||||
, gnumake
|
||||
, boost
|
||||
, mpi
|
||||
, autoreconfHook
|
||||
, enableOvni ? true
|
||||
, ovni ? null
|
||||
, useGit ? false
|
||||
, gitUrl ? "ssh://git@bscpm04.bsc.es/interoperability/tampi.git"
|
||||
, gitBranch ? "master"
|
||||
, gitCommit ? "f6455db9d3124ae36e715a4874fd49720e79f20a"
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
assert enableOvni -> (ovni != null);
|
||||
|
||||
let
|
||||
release = rec {
|
||||
version = "4.1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "tampi";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-SwfPSnwcZnRnSgNvCD5sFSUJRpWINqI5I4adj5Hh+XY=";
|
||||
};
|
||||
};
|
||||
git = rec {
|
||||
version = src.shortRev;
|
||||
src = builtins.fetchGit {
|
||||
url = gitUrl;
|
||||
ref = gitBranch;
|
||||
rev = gitCommit;
|
||||
};
|
||||
};
|
||||
source = if (useGit) then git else release;
|
||||
in stdenv.mkDerivation {
|
||||
pname = "tampi";
|
||||
inherit (source) src version;
|
||||
enableParallelBuilding = true;
|
||||
separateDebugInfo = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
autoreconfHook
|
||||
gnumake
|
||||
libtool
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
mpi
|
||||
] ++ optional (enableOvni) ovni;
|
||||
configureFlags = optional (enableOvni) "--with-ovni=${ovni}";
|
||||
dontDisableStatic = true;
|
||||
hardeningDisable = [ "all" ];
|
||||
}
|
263
pkgs/vite/cmake.patch
Normal file
263
pkgs/vite/cmake.patch
Normal file
@ -0,0 +1,263 @@
|
||||
--- a/src/CMakeLists.txt 2020-11-21 14:05:24.912896596 +0100
|
||||
+++ b/src/CMakeLists.txt 2020-11-21 14:19:30.978284644 +0100
|
||||
@@ -130,8 +130,7 @@ SET(VITE_HDRS
|
||||
# Plugin header
|
||||
plugin/Command_window.hpp
|
||||
plugin/Plugin_window.hpp
|
||||
- plugin/Plugin.hpp
|
||||
- )
|
||||
+ plugin/Plugin.hpp)
|
||||
|
||||
SET(VITE_UIS
|
||||
interface/info_window.ui
|
||||
@@ -142,8 +141,7 @@ SET(VITE_UIS
|
||||
interface/list_of_counter_to_export.ui
|
||||
interface/node_select.ui
|
||||
interface/interval_select.ui
|
||||
- interface/statistics.ui
|
||||
- )
|
||||
+ interface/statistics.ui)
|
||||
|
||||
SET(VITE_SRCS
|
||||
# Messages & Errors
|
||||
@@ -220,29 +218,23 @@ SET(VITE_SRCS
|
||||
core/Core.cpp
|
||||
core/getopt.c
|
||||
# Main
|
||||
- main.cpp
|
||||
- )
|
||||
+ main.cpp)
|
||||
|
||||
-SET(VITE_RCCS
|
||||
- interface/vite.qrc
|
||||
- )
|
||||
+SET(VITE_RCCS interface/vite.qrc)
|
||||
|
||||
#############################################
|
||||
# QtColorPicker
|
||||
#############################################
|
||||
set(QTCOLORPICKERDIR
|
||||
- ${CMAKE_SOURCE_DIR}/externals/qtcolorpicker/src
|
||||
- )
|
||||
+ ${CMAKE_SOURCE_DIR}/externals/qtcolorpicker/src)
|
||||
|
||||
set(VITE_HDRS
|
||||
${VITE_HDRS}
|
||||
- ${QTCOLORPICKERDIR}/qtcolorpicker.h
|
||||
- )
|
||||
+ ${QTCOLORPICKERDIR}/qtcolorpicker.h)
|
||||
|
||||
set(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
- ${QTCOLORPICKERDIR}/qtcolorpicker.cpp
|
||||
- )
|
||||
+ ${QTCOLORPICKERDIR}/qtcolorpicker.cpp)
|
||||
|
||||
#############################################
|
||||
# VBO
|
||||
@@ -252,15 +244,13 @@ IF(VITE_ENABLE_VBO)
|
||||
${VITE_HDRS}
|
||||
render/vbo.hpp
|
||||
render/Shader.hpp
|
||||
- render/Render_alternate.hpp
|
||||
- )
|
||||
+ render/Render_alternate.hpp)
|
||||
|
||||
SET(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
render/vbo.cpp
|
||||
render/Shader.cpp
|
||||
- render/Render_alternate.cpp
|
||||
- )
|
||||
+ render/Render_alternate.cpp)
|
||||
ENDIF(VITE_ENABLE_VBO)
|
||||
|
||||
#############################################
|
||||
@@ -271,29 +261,25 @@ IF(VITE_ENABLE_OTF)
|
||||
${VITE_HDRS}
|
||||
parser/OTFParser/ParserDefinitionOTF.hpp
|
||||
parser/OTFParser/ParserEventOTF.hpp
|
||||
- parser/OTFParser/ParserOTF.hpp
|
||||
- )
|
||||
+ parser/OTFParser/ParserOTF.hpp)
|
||||
|
||||
SET(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
parser/OTFParser/ParserDefinitionOTF.cpp
|
||||
parser/OTFParser/ParserEventOTF.cpp
|
||||
- parser/OTFParser/ParserOTF.cpp
|
||||
- )
|
||||
+ parser/OTFParser/ParserOTF.cpp)
|
||||
|
||||
IF(VITE_ENABLE_MT_PARSERS)
|
||||
SET(VITE_HDRS
|
||||
${VITE_HDRS}
|
||||
parser/OTFParser/mt_ParserEventOTF.hpp
|
||||
parser/OTFParser/mt_ParserOTF.hpp
|
||||
- parser/OTFParser/OTFTraceBuilderThread.hpp
|
||||
- )
|
||||
+ parser/OTFParser/OTFTraceBuilderThread.hpp)
|
||||
SET(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
parser/OTFParser/mt_ParserEventOTF.cpp
|
||||
parser/OTFParser/mt_ParserOTF.cpp
|
||||
- parser/OTFParser/OTFTraceBuilderThread.cpp
|
||||
- )
|
||||
+ parser/OTFParser/OTFTraceBuilderThread.cpp)
|
||||
ENDIF()
|
||||
|
||||
INCLUDE_DIRECTORIES(BEFORE ${OTF_INCLUDE_DIR})
|
||||
@@ -310,15 +296,13 @@ IF(VITE_ENABLE_OTF2)
|
||||
${VITE_HDRS}
|
||||
parser/OTF2Parser/ParserDefinitionOTF2.hpp
|
||||
parser/OTF2Parser/ParserEventOTF2.hpp
|
||||
- parser/OTF2Parser/ParserOTF2.hpp
|
||||
- )
|
||||
+ parser/OTF2Parser/ParserOTF2.hpp)
|
||||
|
||||
SET(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
parser/OTF2Parser/ParserDefinitionOTF2.cpp
|
||||
parser/OTF2Parser/ParserEventOTF2.cpp
|
||||
- parser/OTF2Parser/ParserOTF2.cpp
|
||||
- )
|
||||
+ parser/OTF2Parser/ParserOTF2.cpp)
|
||||
|
||||
INCLUDE_DIRECTORIES(${OTF2_INCLUDE_DIR})
|
||||
|
||||
@@ -332,13 +316,11 @@ IF(VITE_ENABLE_TAU)
|
||||
SET(VITE_HDRS
|
||||
${VITE_HDRS}
|
||||
parser/TauParser/ParserTau.hpp
|
||||
- parser/TauParser/TauStructs.hpp
|
||||
- )
|
||||
+ parser/TauParser/TauStructs.hpp)
|
||||
|
||||
SET(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
- parser/TauParser/ParserTau.cpp
|
||||
- )
|
||||
+ parser/TauParser/ParserTau.cpp)
|
||||
|
||||
INCLUDE_DIRECTORIES(${TAU_INCLUDE_DIR})
|
||||
|
||||
@@ -357,8 +339,7 @@ IF(VITE_ENABLE_MT_PARSERS)
|
||||
parser/PajeParser/mt_ParserPaje.hpp
|
||||
parser/PajeParser/mt_PajeFileManager.hpp
|
||||
parser/PajeParser/BuilderThread.hpp
|
||||
- trace/TraceBuilderThread.hpp
|
||||
- )
|
||||
+ trace/TraceBuilderThread.hpp)
|
||||
|
||||
SET(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
@@ -367,8 +348,7 @@ IF(VITE_ENABLE_MT_PARSERS)
|
||||
parser/PajeParser/mt_ParserPaje.cpp
|
||||
parser/PajeParser/mt_PajeFileManager.cpp
|
||||
parser/PajeParser/BuilderThread.cpp
|
||||
- trace/TraceBuilderThread.cpp
|
||||
- )
|
||||
+ trace/TraceBuilderThread.cpp)
|
||||
|
||||
ENDIF()
|
||||
|
||||
@@ -385,16 +365,14 @@ IF(VITE_ENABLE_SERIALIZATION)
|
||||
parser/ParserSplitted.hpp
|
||||
trace/IntervalOfContainer.hpp
|
||||
trace/SerializerWriter.hpp
|
||||
- trace/SerializerDispatcher.hpp
|
||||
- )
|
||||
+ trace/SerializerDispatcher.hpp)
|
||||
|
||||
SET(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
parser/ParserSplitted.cpp
|
||||
trace/IntervalOfContainer.cpp
|
||||
trace/SerializerWriter.cpp
|
||||
- trace/SerializerDispatcher.cpp
|
||||
- )
|
||||
+ trace/SerializerDispatcher.cpp)
|
||||
|
||||
ENDIF(VITE_ENABLE_SERIALIZATION)
|
||||
|
||||
@@ -421,24 +399,22 @@ INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/common
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
- ${QTCOLORPICKERDIR}
|
||||
- )
|
||||
+ ${QTCOLORPICKERDIR})
|
||||
#ADD_LIBRARY(vite2 SHARED ${VITE_SRCS} ${VITE_MOC} ${VITE_RCC_SRCS})
|
||||
|
||||
-IF( VITE_ENABLE_OTF )
|
||||
- LINK_DIRECTORIES( ${OTF_LIBRARY_DIR} )
|
||||
-ENDIF( VITE_ENABLE_OTF )
|
||||
+IF(VITE_ENABLE_OTF)
|
||||
+ LINK_DIRECTORIES(${OTF_LIBRARY_DIR})
|
||||
+ENDIF(VITE_ENABLE_OTF)
|
||||
|
||||
IF(VITE_ENABLE_OTF2)
|
||||
- LINK_DIRECTORIES(${OTF2_LIBRARY_DIR} )
|
||||
+ LINK_DIRECTORIES(${OTF2_LIBRARY_DIR})
|
||||
ENDIF(VITE_ENABLE_OTF2)
|
||||
|
||||
#resource
|
||||
IF(WIN32)
|
||||
set(VITE_RES
|
||||
"${PROJECT_SOURCE_DIR}/src/interface/icon/logo.ico"
|
||||
- "${PROJECT_SOURCE_DIR}/src/interface/windows_icon.rc"
|
||||
- )
|
||||
+ "${PROJECT_SOURCE_DIR}/src/interface/windows_icon.rc")
|
||||
ENDIF(WIN32)
|
||||
|
||||
if( APPLE )
|
||||
@@ -456,7 +432,11 @@ if( APPLE )
|
||||
MACOSX_BUNDLE_COPYRIGHT "INRIA 2006-2012"
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/vite-info.plist.in)
|
||||
else( APPLE )
|
||||
- ADD_EXECUTABLE(vite ${VITE_SRCS} ${VITE_MOC} ${VITE_RCC_SRCS} ${VITE_RES})
|
||||
+ message("VITE_SRCS" ${VITE_SRCS} "END")
|
||||
+ message("VITE_MOC" ${VITE_MOC} "END")
|
||||
+ message("VITE_RCC_SRCS" ${VITE_RCC_SRCS} "END")
|
||||
+ message("VITE_RES" ${VITE_RES} "END")
|
||||
+ ADD_EXECUTABLE(vite ${VITE_SRCS} ${VITE_MOC} ${VITE_RCC_SRCS})
|
||||
endif( APPLE )
|
||||
|
||||
#############################################
|
||||
@@ -470,31 +450,22 @@ TARGET_LINK_LIBRARIES(vite
|
||||
${QT_LIBRARIES}
|
||||
${OPENGL_gl_LIBRARY}
|
||||
${OPENGL_glu_LIBRARY}
|
||||
- ${Boost_LIBRARIES}
|
||||
- )
|
||||
+ ${Boost_LIBRARIES})
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
- TARGET_LINK_LIBRARIES(vite
|
||||
- rt
|
||||
- )
|
||||
+ TARGET_LINK_LIBRARIES(vite rt)
|
||||
#ADD_DEFINITIONS("-DBOOST_GZIP")
|
||||
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
|
||||
IF(VITE_ENABLE_VBO)
|
||||
- TARGET_LINK_LIBRARIES(vite
|
||||
- ${GLEW_LIBRARY}
|
||||
- )
|
||||
+ TARGET_LINK_LIBRARIES(vite ${GLEW_LIBRARY})
|
||||
ENDIF(VITE_ENABLE_VBO)
|
||||
|
||||
IF(VITE_ENABLE_OTF)
|
||||
- TARGET_LINK_LIBRARIES(vite
|
||||
- ${OTF_LIBRARY}
|
||||
- )
|
||||
+ TARGET_LINK_LIBRARIES(vite ${OTF_LIBRARY})
|
||||
# if OTF is compiled with zlib support we need to add it
|
||||
IF(WIN32)
|
||||
- TARGET_LINK_LIBRARIES(vite
|
||||
- ${ZLIB_LIBRARY}
|
||||
- )
|
||||
+ TARGET_LINK_LIBRARIES(vite ${ZLIB_LIBRARY})
|
||||
ENDIF(WIN32)
|
||||
ENDIF(VITE_ENABLE_OTF)
|
||||
|
83
pkgs/vite/default.nix
Normal file
83
pkgs/vite/default.nix
Normal file
@ -0,0 +1,83 @@
|
||||
{
|
||||
fetchgit
|
||||
, stdenv
|
||||
, cmake
|
||||
, qtbase
|
||||
, qttools
|
||||
, qtcharts
|
||||
, libGLU
|
||||
, libGL
|
||||
, glm
|
||||
, glew
|
||||
, wrapQtAppsHook
|
||||
, otf ? null
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
# ViTE 1.1 has several bugs, so use the SVN version.
|
||||
let
|
||||
#rev = "1543";
|
||||
#externals = fetchsvn {
|
||||
# url = "svn://scm.gforge.inria.fr/svn/vite/externals";
|
||||
# sha256 = "1a422n3dp72v4visq5b1i21cf8sj12903sgg5v2hah3sgk02dnyz";
|
||||
# inherit rev;
|
||||
#};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "c6c0ce7";
|
||||
pname = "vite";
|
||||
|
||||
#dontStrip = true;
|
||||
#enableDebugging = true;
|
||||
preferLocalBuild = true;
|
||||
|
||||
#src = ./../../vite-c6c0ce7;
|
||||
src = fetchgit {
|
||||
url = "https://gitlab.inria.fr/solverstack/vite.git";
|
||||
sha256 = "17h57jjcdynnjd6s19hs6zdgvr9j7hj1rf6a62d9qky8wzb78y37";
|
||||
#rev = "373d4a8ebe86aa9ed07c9a8eb5e5e7f1602baef9";
|
||||
rev = "c6c0ce7a75324f03b24243397dfaa0d3bcd5bd1b";
|
||||
};
|
||||
|
||||
#patches = [ ./cmake.patch ];
|
||||
|
||||
#preConfigure = ''
|
||||
# rm -rv externals
|
||||
# ln -sv "${externals}" externals
|
||||
#'';
|
||||
|
||||
buildInputs = [
|
||||
cmake qtbase qttools qtcharts
|
||||
libGLU libGL glm glew wrapQtAppsHook
|
||||
] ++ optional (otf != null) otf;
|
||||
|
||||
#NIX_LDFLAGS = "-lGLU";
|
||||
|
||||
cmakeFlags = [
|
||||
# "-DCMAKE_BUILD_TYPE=Debug"
|
||||
#"-DVITE_ENABLE_OTF2=True"
|
||||
#"-DVITE_ENABLE_TAU=True"
|
||||
]
|
||||
++ optionals (otf != null)
|
||||
[
|
||||
"-DVITE_ENABLE_OTF=True"
|
||||
"-DOTF_LIBRARY_DIR=${otf}/lib"
|
||||
"-DOTF_INCLUDE_DIR=${otf}/include"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Visual Trace Explorer (ViTE), a tool to visualize execution traces";
|
||||
|
||||
longDescription = ''
|
||||
ViTE is a trace explorer. It is a tool to visualize execution
|
||||
traces in Pajé or OTF format for debugging and profiling
|
||||
parallel or distributed applications.
|
||||
'';
|
||||
|
||||
homepage = "http://vite.gforge.inria.fr/";
|
||||
license = lib.licenses.cecill20;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
77
pkgs/vtk/default.nix
Normal file
77
pkgs/vtk/default.nix
Normal file
@ -0,0 +1,77 @@
|
||||
{
|
||||
stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, cmake
|
||||
, libGLU
|
||||
, libGL
|
||||
, libX11
|
||||
, xorgproto
|
||||
, libXt
|
||||
, libtiff
|
||||
, qtLib ? null
|
||||
, enablePython ? false, python ? null
|
||||
, mpi ? null
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
os = lib.optionalString;
|
||||
majorVersion = "8.2";
|
||||
minorVersion = "0";
|
||||
version = "${majorVersion}.${minorVersion}";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "vtk-${os (qtLib != null) "qvtk-"}${version}";
|
||||
src = fetchurl {
|
||||
url = "${meta.homepage}files/release/${majorVersion}/VTK-${version}.tar.gz";
|
||||
sha256 = "1fspgp8k0myr6p2a6wkc21ldcswb4bvmb484m12mxgk1a9vxrhrl";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ libtiff ]
|
||||
++ optionals (qtLib != null) (with qtLib; [ qtbase qtx11extras qttools ])
|
||||
++ optional (qtLib != null) (with qtLib; [ qtbase qtx11extras qttools ])
|
||||
++ optionals stdenv.isLinux [ libGLU libGL libX11 xorgproto libXt ]
|
||||
++ optional enablePython [ python ]
|
||||
++ optional (mpi != null) [ mpi ];
|
||||
|
||||
preBuild = ''
|
||||
export LD_LIBRARY_PATH="$(pwd)/lib";
|
||||
'';
|
||||
|
||||
# Shared libraries don't work, because of rpath troubles with the current
|
||||
# nixpkgs cmake approach. It wants to call a binary at build time, just
|
||||
# built and requiring one of the shared objects.
|
||||
# At least, we use -fPIC for other packages to be able to use this in shared
|
||||
# objects.
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_C_FLAGS=-fPIC"
|
||||
"-DCMAKE_CXX_FLAGS=-fPIC"
|
||||
"-DVTK_USE_SYSTEM_TIFF=1"
|
||||
"-DVTK_Group_MPI=ON"
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DOPENGL_INCLUDE_DIR=${libGL}/include"
|
||||
]
|
||||
++ optional (mpi != null) [
|
||||
"-DVTK_Group_MPI=ON" ]
|
||||
++ optional (qtLib != null) [
|
||||
"-DVTK_Group_Qt:BOOL=ON" ]
|
||||
++ optional stdenv.isDarwin [
|
||||
"-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" ]
|
||||
++ optional enablePython [
|
||||
"-DVTK_WRAP_PYTHON:BOOL=ON" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "Open source libraries for 3D computer graphics, image processing and visualization";
|
||||
homepage = "https://www.vtk.org/";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ knedlsepp ];
|
||||
platforms = with lib.platforms; unix;
|
||||
};
|
||||
}
|
36
test/bugs/hwloc.c
Normal file
36
test/bugs/hwloc.c
Normal file
@ -0,0 +1,36 @@
|
||||
#include <stdio.h>
|
||||
#include <hwloc.h>
|
||||
#include <assert.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
size_t i, coreCount;
|
||||
hwloc_topology_t topology;
|
||||
hwloc_obj_t obj;
|
||||
|
||||
if(hwloc_topology_init(&topology))
|
||||
{
|
||||
fprintf(stderr, "hwloc_topology_init failed\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if(hwloc_topology_load(topology))
|
||||
{
|
||||
fprintf(stderr, "hwloc_topology_load failed\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
coreCount = hwloc_get_nbobjs_by_type(topology, HWLOC_OBJ_CORE);
|
||||
printf("coreCount = %zu\n", coreCount);
|
||||
|
||||
for(i = 0; i < coreCount; i++)
|
||||
{
|
||||
obj = hwloc_get_obj_by_type(topology, HWLOC_OBJ_PU, i);
|
||||
assert(obj != NULL);
|
||||
assert(obj->parent != NULL);
|
||||
printf("obj->parent->type = %d, i = %zu\n", obj->parent->type, i);
|
||||
assert(obj->parent->type == HWLOC_OBJ_CORE);
|
||||
}
|
||||
|
||||
printf("hwloc test OK\n");
|
||||
}
|
20
test/bugs/hwloc.nix
Normal file
20
test/bugs/hwloc.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
stdenv
|
||||
, hwloc
|
||||
, strace
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "hwloc-test";
|
||||
|
||||
src = ./.;
|
||||
|
||||
buildInputs = [ hwloc strace ];
|
||||
|
||||
buildPhase = ''
|
||||
ls -l /sys
|
||||
gcc -lhwloc hwloc.c -o hwloc
|
||||
strace ./hwloc
|
||||
'';
|
||||
|
||||
}
|
22
test/chroot.nix
Normal file
22
test/chroot.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{stdenv}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.0.1";
|
||||
name = "chroot-checker";
|
||||
src = ./chroot.nix;
|
||||
dontUnpack = true;
|
||||
buildPhase = ''
|
||||
if [ -e /boot ]; then
|
||||
echo Build is NOT under chroot
|
||||
echo This is the content of / :
|
||||
ls -l /
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "OK: Build is under chroot"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
'';
|
||||
}
|
32
test/compilers/asan.nix
Normal file
32
test/compilers/asan.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{ stdenv, writeText, which, strace }:
|
||||
|
||||
let
|
||||
hello_c = writeText "hello.c" ''
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
printf("Hello world!\n");
|
||||
return 0;
|
||||
}
|
||||
'';
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.0.1";
|
||||
name = "asan-c";
|
||||
buildInputs = [ stdenv which strace ];
|
||||
src = hello_c;
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
NIX_DEBUG = 0;
|
||||
buildPhase = ''
|
||||
cp ${hello_c} hello.c
|
||||
$CC -v -fsanitize=address hello.c -o hello
|
||||
./hello
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
touch $out
|
||||
'';
|
||||
}
|
20
test/compilers/clang-ompss2.nix
Normal file
20
test/compilers/clang-ompss2.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{stdenv, clang-ompss2, nanos6}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.0.1";
|
||||
name = "test-clang-ompss2";
|
||||
src = ./.;
|
||||
buildInputs = [ clang-ompss2 nanos6 ];
|
||||
NIX_DEBUG = 1;
|
||||
|
||||
buildPhase = ''
|
||||
clang -fompss-2 hello.c -o hello
|
||||
./hello
|
||||
clang++ -fompss-2 hello.cc -o hello
|
||||
./hello
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
'';
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user