Add stream benchmark
This commit is contained in:
33
pkgs/stream/default.nix
Normal file
33
pkgs/stream/default.nix
Normal 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
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user