From bad6f3c76174dd7dfcfa11c248f37398f270f9dd Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 24 Jul 2020 13:24:30 +0200 Subject: [PATCH] Add garlic group --- bsc/garlic/default.nix | 14 ++++++++++++++ bsc/{ => garlic}/mpptest/default.nix | 2 +- bsc/garlic/ppong/default.nix | 24 ++++++++++++++++++++++++ default.nix | 7 +++---- 4 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 bsc/garlic/default.nix rename bsc/{ => garlic}/mpptest/default.nix (74%) create mode 100644 bsc/garlic/ppong/default.nix diff --git a/bsc/garlic/default.nix b/bsc/garlic/default.nix new file mode 100644 index 0000000..c22f3b0 --- /dev/null +++ b/bsc/garlic/default.nix @@ -0,0 +1,14 @@ +{ + pkgs +, bsc +}: + +let + callPackage = pkgs.lib.callPackageWith (pkgs // bsc // garlic); + callPackages = pkgs.lib.callPackagesWith (pkgs // bsc // garlic); + garlic = rec { + mpptest = callPackage ./mpptest/default.nix { }; + ppong = callPackage ./ppong/default.nix { }; + }; +in + garlic diff --git a/bsc/mpptest/default.nix b/bsc/garlic/mpptest/default.nix similarity index 74% rename from bsc/mpptest/default.nix rename to bsc/garlic/mpptest/default.nix index 39e187f..c142667 100644 --- a/bsc/mpptest/default.nix +++ b/bsc/garlic/mpptest/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { name = "mpptest"; src = fetchurl { - url = "ftp://ftp.mcs.anl.gov/pub/mpi/tools/perftest.tar.gz"; + url = "http://ftp.mcs.anl.gov/pub/mpi/tools/perftest.tar.gz"; sha256 = "11i22lq3pch3pvmhnbsgxzd8ap4yvpvlhy2f7k8x3krdwjhl0jvl"; }; diff --git a/bsc/garlic/ppong/default.nix b/bsc/garlic/ppong/default.nix new file mode 100644 index 0000000..89cdcdc --- /dev/null +++ b/bsc/garlic/ppong/default.nix @@ -0,0 +1,24 @@ +{ + stdenv +, mpi +, fetchurl +}: + +stdenv.mkDerivation { + name = "ppong"; + + src = fetchurl { + url = "http://www.csl.mtu.edu/cs4331/common/PPong.c"; + sha256 = "0d1w72gq9627448cb7ykknhgp2wszwd117dlbalbrpf7d0la8yc0"; + }; + + dontUnpack = true; + + buildPhase = '' + pwd + ls -la + mpicc PPong.c -o ppong + ''; + + buildInputs = [ mpi ]; +} diff --git a/default.nix b/default.nix index fd37fd4..46a9412 100644 --- a/default.nix +++ b/default.nix @@ -159,12 +159,11 @@ let fwi = callPackage ./bsc/apps/fwi/default.nix { }; - garlic = pkgs.buildEnv { - name = "garlic"; - paths = [ nbody gauss-seidel saiph creams lulesh hpcg hpccg fwi ]; + garlic = callPackage ./bsc/garlic/default.nix { + pkgs = pkgs; + bsc = self.bsc; }; - # Patched nix for deep cluster inherit (callPackage ./bsc/nix/default.nix { storeDir = "/nix/store";