Add stream benchmark

This commit is contained in:
Rodrigo Arias 2024-09-25 13:08:40 +02:00
parent c4af9e7c73
commit 8780098a29
2 changed files with 34 additions and 0 deletions

View File

@ -9,6 +9,7 @@ final: prev:
rvb = final.callPackage ./pkgs/rvb/default.nix { }; rvb = final.callPackage ./pkgs/rvb/default.nix { };
rvb-clang = final.callPackage ./pkgs/rvb/default.nix { stdenv = final.stdenvClangEpi; }; rvb-clang = final.callPackage ./pkgs/rvb/default.nix { stdenv = final.stdenvClangEpi; };
stream = final.callPackage ./pkgs/stream/default.nix { };
blis = ((prev.blis.override { blis = ((prev.blis.override {
blas64 = true; blas64 = true;

33
pkgs/stream/default.nix Normal file
View File

@ -0,0 +1,33 @@
{
stdenv
, fetchFromGitHub
}:
stdenv.mkDerivation rec {
pname = "stream";
version = "4dbce1d0";
src = fetchFromGitHub {
owner = "jeffhammond";
repo = "STREAM";
rev = "4dbce1d0fdb7410e8f21b48f3381bc0a1341967f";
sha256 = "sha256-sBwdPeaMyI/wH1Nq0yQtb/kvi5913e0azXaulOJIG3A=";
};
# CFLAGS='-O2 -fopenmp -DSTREAM_ARRAY_SIZE=40000000'
buildPhase = ''
set -x
make stream_c.exe CC=$CC FC=$FC CFLAGS=-O2
set +x
'';
#nativeBuildInputs = [ gfortran ];
dontStrip = true;
dontConfigure = true;
enableParallelBuilding = false;
hardeningDisable = [ "all" ];
installPhase = ''
mkdir -p $out/bin
cp -a stream_c.exe $out/bin/stream
'';
}