Skip to content

Commit

Permalink
with umap and umap-apps
Browse files Browse the repository at this point in the history
  • Loading branch information
Meandres committed Jun 27, 2024
1 parent 5539cdf commit 0f973b7
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 0 deletions.
2 changes: 2 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ rec {
bima = pkgs.callPackage ./pkgs/bima {};
vhive = pkgs.callPackage ./pkgs/vhive { };
firecracker-containerd = pkgs.callPackage ./pkgs/firecracker-containerd { };
umap = pkgs.callPackage ./pkgs/umap { };
umap-apps = pkgs.callPackage ./pkgs/umap-apps { inherit umap; };
}
43 changes: 43 additions & 0 deletions pkgs/umap-apps/cstdint.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
diff --git a/src/bfs/bfs_kernel.hpp b/src/bfs/bfs_kernel.hpp
index 0fdd7ae..4e733ff 100644
--- a/src/bfs/bfs_kernel.hpp
+++ b/src/bfs/bfs_kernel.hpp
@@ -17,6 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include <iostream>
#include <limits>
+#include <cstdint>

#ifdef _OPENMP
#include <omp.h>
diff --git a/src/bfs/compute_degree_distribution.cpp b/src/bfs/compute_degree_distribution.cpp
index 27c70a2..cf2d53a 100644
--- a/src/bfs/compute_degree_distribution.cpp
+++ b/src/bfs/compute_degree_distribution.cpp
@@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include <unordered_map>
#include <vector>
#include <algorithm>
+#include <cstdint>

/// This is a utility program to compute a degree distribution
/// This program treat the input files as directed graph
@@ -90,4 +91,4 @@ int main(int argc, char **argv) {
std::cout << "Finished degree distribution computation" << std::endl;

return 0;
-}
\ No newline at end of file
+}
diff --git a/src/bfs/ingest_edge_list.cpp b/src/bfs/ingest_edge_list.cpp
index a975d5b..461a05b 100644
--- a/src/bfs/ingest_edge_list.cpp
+++ b/src/bfs/ingest_edge_list.cpp
@@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include <algorithm>
#include <tuple>
#include <cstring>
+#include <cstdint>

#include "../utility/bitmap.hpp"
#include "../utility/mmap.hpp"
23 changes: 23 additions & 0 deletions pkgs/umap-apps/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ pkgs, stdenv, lib, fetchFromGitHub, umap }:

stdenv.mkDerivation rec {
pname = "umap-apps";
version = "v" + "1.1";
src = fetchFromGitHub {
owner = "LLNL";
repo = "umap-apps";
rev = version;
hash = "sha256-n6UOqzfuI8DVIA7B6uYpPCpn78f+5w74pcsSYmGwHm8=";
};
cmakeFlags = [ "-DUMAP_INSTALL_PATH=${umap}" ];

nativeBuildInputs = [ umap pkgs.cmake pkgs.gnumake ];
patches = [ ./cstdint.patch ];

meta = with lib; {
homepage = https://github.com/LLNL/umap;
description = "User-space Page Management";
license = licenses.lgpl2;
broken = false;
};
}
36 changes: 36 additions & 0 deletions pkgs/umap/cstdint.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
diff --git a/examples/bfs/bfs_kernel.hpp b/examples/bfs/bfs_kernel.hpp
index 8c8613b..599ab8a 100644
--- a/examples/bfs/bfs_kernel.hpp
+++ b/examples/bfs/bfs_kernel.hpp
@@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "utility/bitmap.hpp"
#include "utility/open_mp.hpp"
+#include <cstdint>

namespace bfs {

diff --git a/examples/bfs/rmat_graph_generator/ingest_edge_list.cpp b/examples/bfs/rmat_graph_generator/ingest_edge_list.cpp
index 09303f6..3ba259d 100644
--- a/examples/bfs/rmat_graph_generator/ingest_edge_list.cpp
+++ b/examples/bfs/rmat_graph_generator/ingest_edge_list.cpp
@@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include <algorithm>
#include <tuple>
#include <cstring>
+#include <cstdint>

#include "utility/bitmap.hpp"
#include "utility/mmap.hpp"
diff --git a/examples/bfs/utility/bitmap.hpp b/examples/bfs/utility/bitmap.hpp
index 1881b85..c78c293 100644
--- a/examples/bfs/utility/bitmap.hpp
+++ b/examples/bfs/utility/bitmap.hpp
@@ -16,6 +16,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define LIB_UTILITY_BITMAP_HPP

#include <iostream>
+#include <cstdint>

namespace utility
{
22 changes: 22 additions & 0 deletions pkgs/umap/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ pkgs, stdenv, lib, fetchFromGitHub }:

stdenv.mkDerivation rec {
pname = "umap";
version = "v" + "2.1.1";
src = fetchFromGitHub {
owner = "LLNL";
repo = "umap";
rev = version;
hash = "sha256-nAzQ7fK9BsfgOSWuoQLeqomy6LO+ERP0fjj12iQXp5I=";
};

nativeBuildInputs = [ pkgs.cmake pkgs.gnumake ];
patches = [ ./cstdint.patch ];

meta = with lib; {
homepage = https://github.com/LLNL/umap;
description = "User-space Page Management";
license = licenses.lgpl2;
broken = false;
};
}

0 comments on commit 0f973b7

Please sign in to comment.