From 37edecec5304f6021cb0f0d0add67416fcdd89a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Madon?= <mael.madon@irit.fr> Date: Tue, 3 May 2022 10:07:38 +0200 Subject: [PATCH] simplified the nix file with pinned kapack repository --- 0_prepare_workload.ipynb | 20 +++++++++---- default.nix | 47 +++++++++--------------------- default.nix.old | 62 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 39 deletions(-) create mode 100644 default.nix.old diff --git a/0_prepare_workload.ipynb b/0_prepare_workload.ipynb index 25aa7e2..2e1d4b0 100644 --- a/0_prepare_workload.ipynb +++ b/0_prepare_workload.ipynb @@ -12,10 +12,20 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "f66eb756", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " % Total % Received % Xferd Average Speed Time Time Time Current\n", + " Dload Upload Total Spent Left Speed\n", + "100 55.0M 100 55.0M 0 0 1410k 0 0:00:39 0:00:39 --:--:-- 432k\n" + ] + } + ], "source": [ "# Download the workload (548.3 MB unzipped)\n", "!curl https://www.cs.huji.ac.il/labs/parallel/workload/l_metacentrum2/METACENTRUM-2013-3.swf.gz \\\n", @@ -24,7 +34,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 2, "id": "bound-harvey", "metadata": {}, "outputs": [], @@ -53,7 +63,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 3, "id": "ff40dcdd", "metadata": { "scrolled": true @@ -153,7 +163,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 4, "id": "6ec15ee8", "metadata": {}, "outputs": [ diff --git a/default.nix b/default.nix index 5d59b18..fd5d0da 100644 --- a/default.nix +++ b/default.nix @@ -1,53 +1,32 @@ -{ - kapack ? import ( fetchTarball "https://github.com/oar-team/nur-kapack/archive/master.tar.gz") {} -}: +# Reproductibility: pin a specific commit of nur-kapack repository +# This one contains Batsim v4.10 and Simgrid v3.31 +{ kapack ? import (fetchTarball { + url = "https://github.com/oar-team/nur-kapack/archive/b3611a0e7aadd69ca961d14639e8470df19f8564.tar.gz"; + sha256 = "sha256:0rjwq0csb1z79jakicl638xa8r1wwyf8vd8ymrpfa1waiw7vfpc5"; + }) {} +}: with kapack.pkgs; let self = rec { - my-simgrid = kapack.simgrid-light.overrideAttrs(old: rec { - version = "33035e7eeaee7a34efd75d675555eec32d34856a"; - src = kapack.pkgs.fetchgit rec { - url = "https://framagit.org/simgrid/simgrid.git"; - rev = version; - sha256 = "0a2w8qzw5sa7rccn6m0r6ifjcvzyadijfg8p3g2j6nhpav2rm2l7"; - }; - patches = []; - doCheck = false; - }); - - my-batsim = (kapack.batsim.override { simgrid = my-simgrid; }) - .overrideAttrs(old: rec { - version = "ccd208711985af2b10d726a29bd9396e4da8d6a6"; - src = kapack.pkgs.fetchgit rec { - url = "https://framagit.org/batsim/batsim.git"; - rev = version; - sha256 = "0sf6i70qh8jfl2vhmrvm9bjrwda4cf15v5xbpnq5gfb57fq87n8v"; - }; - patches = []; - }); - - my_batsched = kapack.batsched.overrideAttrs (attr: rec { + # For my scheduler and user simulator (batmen), pin a specific git commit: + batmen = kapack.batsched.overrideAttrs (attr: rec { name = "batmen"; version = "b63e95fad46962572b1f1d6db5bda979ca20dae0"; # commit "clean nix file and update README" src = kapack.pkgs.fetchgit rec { url = "https://gitlab.irit.fr/sepia-pub/mael/batmen.git"; rev = version; sha256 = "1q2s1f68j4wd8vzzzirpjp7851l342hq6dvd9ky5g62zdps5mqlj"; - }; }); exp_env = mkShell rec { name = "exp_env"; buildInputs = [ - # simulator - my-batsim - # scheduler implementations - my_batsched - # misc. tools to execute instances - kapack.batexpe - kapack.evalys + kapack.batsim-410 # data center simulator + batmen # scheduler + user simulator + kapack.batexpe # tool to execute batsim instances + kapack.evalys # for data visualization (python3.withPackages (ps: with ps; with python3Packages; [jupyter ipython pandas numpy matplotlib plotly pip tabulate pytz isodate ordered-set yattag]) diff --git a/default.nix.old b/default.nix.old new file mode 100644 index 0000000..5d59b18 --- /dev/null +++ b/default.nix.old @@ -0,0 +1,62 @@ +{ + kapack ? import ( fetchTarball "https://github.com/oar-team/nur-kapack/archive/master.tar.gz") {} +}: + +with kapack.pkgs; + +let self = rec { + my-simgrid = kapack.simgrid-light.overrideAttrs(old: rec { + version = "33035e7eeaee7a34efd75d675555eec32d34856a"; + src = kapack.pkgs.fetchgit rec { + url = "https://framagit.org/simgrid/simgrid.git"; + rev = version; + sha256 = "0a2w8qzw5sa7rccn6m0r6ifjcvzyadijfg8p3g2j6nhpav2rm2l7"; + }; + patches = []; + doCheck = false; + }); + + my-batsim = (kapack.batsim.override { simgrid = my-simgrid; }) + .overrideAttrs(old: rec { + version = "ccd208711985af2b10d726a29bd9396e4da8d6a6"; + src = kapack.pkgs.fetchgit rec { + url = "https://framagit.org/batsim/batsim.git"; + rev = version; + sha256 = "0sf6i70qh8jfl2vhmrvm9bjrwda4cf15v5xbpnq5gfb57fq87n8v"; + }; + patches = []; + }); + + my_batsched = kapack.batsched.overrideAttrs (attr: rec { + name = "batmen"; + version = "b63e95fad46962572b1f1d6db5bda979ca20dae0"; # commit "clean nix file and update README" + src = kapack.pkgs.fetchgit rec { + url = "https://gitlab.irit.fr/sepia-pub/mael/batmen.git"; + rev = version; + sha256 = "1q2s1f68j4wd8vzzzirpjp7851l342hq6dvd9ky5g62zdps5mqlj"; + + }; + }); + + exp_env = mkShell rec { + name = "exp_env"; + buildInputs = [ + # simulator + my-batsim + # scheduler implementations + my_batsched + # misc. tools to execute instances + kapack.batexpe + kapack.evalys + (python3.withPackages + (ps: with ps; with python3Packages; [jupyter ipython pandas numpy matplotlib + plotly pip tabulate pytz isodate ordered-set yattag]) + ) + curl + ]; + }; +}; +in + self + + -- GitLab