From 20e3f4d4f02723aa02f04ceee8598882f8aeba44 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Tue, 9 Jun 2020 18:21:02 +0200 Subject: [PATCH] Add compilers --- bsc/extrae/default.nix | 1 + bsc/llvm-ompss2/default.nix | 21 +++++++++++++++++++++ bsc/nanos6/default.nix | 11 +++-------- bsc/tampi/default.nix | 4 +++- default.nix | 21 ++++++++++++++++----- 5 files changed, 44 insertions(+), 14 deletions(-) create mode 100644 bsc/llvm-ompss2/default.nix diff --git a/bsc/extrae/default.nix b/bsc/extrae/default.nix index ed6aa3f..b27537c 100644 --- a/bsc/extrae/default.nix +++ b/bsc/extrae/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation rec { sha256 = "0y036qc7y30pfj1mnb9nzv2vmxy6xxiy4pgfci6l3jc0lccdsgf8"; }; + enableParallelBuilding = true; nativeBuildInputs = [ gcc gfortran libunwind ]; buildInputs = [ binutils-unwrapped boost boost.dev libiberty mpi diff --git a/bsc/llvm-ompss2/default.nix b/bsc/llvm-ompss2/default.nix new file mode 100644 index 0000000..b5ca5c9 --- /dev/null +++ b/bsc/llvm-ompss2/default.nix @@ -0,0 +1,21 @@ +{ + stdenv +, fetchgit +, cmake +, lld +}: + +stdenv.mkDerivation rec { + version = "10.0.0"; + name = "llvm-ompss2-${version}"; + enableParallelBuilding = true; + buildInputs = [ cmake lld ]; + preConfigure = '' + ls + mkdir llvm-build + cd llvm-build + ../utils/OmpSs/setup-cmake.sh + ''; + src = "./llvm-mono/"; + #dontUnpack = true; +} diff --git a/bsc/nanos6/default.nix b/bsc/nanos6/default.nix index 949060b..ac214d9 100644 --- a/bsc/nanos6/default.nix +++ b/bsc/nanos6/default.nix @@ -9,12 +9,10 @@ , hwloc , papi #, gnumake -, withExtrae ? false , extrae +, extrae , boost }: -assert withExtrae -> extrae != null; - with stdenv.lib; stdenv.mkDerivation rec { @@ -26,6 +24,7 @@ stdenv.mkDerivation rec { sha256 = "03v1kpggdch25m1wfrdjl6crq252dgy6pms8h94d5jwcjh06fbf8"; }; + enableParallelBuilding = true; preConfigure = '' cd ${pname}-${version} sed -i 's|/bin/echo|echo|g' loader/scripts/common.sh loader/scripts/lint/common.sh @@ -44,10 +43,6 @@ stdenv.mkDerivation rec { numactl hwloc papi ] - ++ optional withExtrae extrae; + ++ (if (extrae != null) then [extrae] else []); - buildPhase = '' - make V=1 src/version/CodeVersionInfo.cpp - make V=1 - ''; } diff --git a/bsc/tampi/default.nix b/bsc/tampi/default.nix index a5cf0f2..c9f9cec 100644 --- a/bsc/tampi/default.nix +++ b/bsc/tampi/default.nix @@ -7,7 +7,7 @@ , gnumake , boost , mpi -, gcc }: +, gcc}: let inherit stdenv fetchurl; @@ -16,11 +16,13 @@ in { hello = stdenv.mkDerivation rec { name = "tampi-${version}"; + enableParallelBuilding = true; buildInputs = [ automake autoconf libtool gnumake boost mpi gcc ]; #hardeningDisable = [ "format" ]; preConfigure = '' autoreconf -fiv ''; + configureFlags = [ "--disable-mpi-mt-check" ]; src = fetchurl { url = "https://github.com/bsc-pm/tampi/archive/v${version}.tar.gz"; sha256 = "8608a74325939d2a6b56e82f7f6788efbc67731e2d64793bac69475f5b4b9704"; diff --git a/default.nix b/default.nix index c41843f..a649adc 100644 --- a/default.nix +++ b/default.nix @@ -12,16 +12,27 @@ let self.bsc = rec { # Load the current implementations - self.mpi = pkgs.mpich; + #mpi = pkgs.mpich; + mpi = pkgs.openmpi; + + # Load the compiler + #stdenv = pkgs.gcc7Stdenv; + #stdenv = pkgs.gcc9Stdenv; + #stdenv = pkgs.gcc10Stdenv; + stdenv = pkgs.clangStdenv; extrae = callPackage ./bsc/extrae { - mpi = self.mpi; + mpi = mpi; }; tampi = callPackage ./bsc/tampi { - mpi = self.mpi; + mpi = mpi; }; - nanos6 = callPackage ./bsc/nanos6 { }; -}; + nanos6 = callPackage ./bsc/nanos6 { + extrae = extrae; + }; + + #llvm-ompss2 = callPackage ./bsc/llvm-ompss2 { }; + }; in pkgs // self