Commit 2bc1f8db authored by Valentin Reis's avatar Valentin Reis

renames

parent e04f3a2f
{ stdenv, fetchgit, zeromq }:
stdenv.mkDerivation {
name = "simple";
src = fetchgit {
url="https://xgitlab.cels.anl.gov/argo/progress-benchmarks.git";
sha256="0wpxb25bfry116rzjb8c66fpxqibrn1dby4xpfsbrnvbhhirck9z";
};
buildInputs = [ zeromq];
requiredSystemFeatures = [ "icc+mkl" ];
buildPhase = ''
cd simple
export MKLROOT=/opt/intel/compilers_and_libraries_2018.3.222/linux/mkl
export IPPROOT=/opt/intel/compilers_and_libraries_2017.1.132/linux/ipp
export INTEL_LICENSE_FILE=/opt/intel/compilers_and_libraries_2017.1.132/linux/licenses
export LIBRARY_PATH=/opt/intel/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin:/opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64_lin/gcc4.7:/opt/intel/compilers_and_libraries_2017.1.132/linux/ipp/lib/intel64:/opt/intel/compilers_and_libraries_2017.1.132/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2017.1.132/linux/daal/lib/intel64_lin:$LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin:/opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64_lin/gcc4.7:/opt/intel/compilers_and_libraries_2017.1.132/linux/compiler/lib/intel64:/opt/intel/compilers_and_libraries_2017.1.132/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2017.1.132/linux/mpi/intel64/lib:/opt/intel/compilers_and_libraries_2017.1.132/linux/ipp/lib/intel64:/opt/intel/debugger_2017/iga/lib:/opt/intel/debugger_2017/libipt/intel64/lib:/opt/intel/compilers_and_libraries_2017.1.132/linux/daal/lib/intel64_lin:$LD_LIBRARY_PATH
export CPATH=/opt/intel/compilers_and_libraries_2018.3.222/linux/mkl/include:/opt/intel/compilers_and_libraries_2017.1.132/linux/ipp/include:/opt/intel/compilers_and_libraries_2017.1.132/linux/daal/include
export NLSPATH=/opt/intel/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin/locale/%l_%t/%N:/opt/intel/compilers_and_libraries_2017.1.132/linux/compiler/lib/intel64/locale/%l_%t/%N:/opt/intel/debugger_2017/gdb/intel64/share/locale/%l_%t/%N
export PATH=/opt/intel/compilers_and_libraries_2017.1.132/linux/bin/intel64:/opt/intel/compilers_and_libraries_2017.1.132/linux/mpi/intel64/bin:/opt/intel/debugger_2017/gdb/intel64_mic/bin:$PATH
export DAALROOT=/opt/intel/compilers_and_libraries_2017.1.132/linux/daal
export MPM_LAUNCHER=/opt/intel/debugger_2017/mpm/mic/bin/start_mpm.sh
export I_MPI_ROOT=/opt/intel/compilers_and_libraries_2017.1.132/linux/mpi
export CC=icc
make randomwalk
'';
installPhase = ''
mkdir -p $out/bin
cp graph500_reference_bfs $out/bin/graph500_reference_bfs
cp graph500_reference_bfs_sssp $out/bin/graph500_reference_bfs_sssp
'';
}
MKLROOT=/opt/intel/compilers_and_libraries_2018.3.222/linux/mkl
IPPROOT=/opt/intel/compilers_and_libraries_2017.1.132/linux/ipp
INTEL_LICENSE_FILE=/opt/intel/compilers_and_libraries_2017.1.132/linux/licenses
LIBRARY_PATH=/opt/intel/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin:/opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64_lin/gcc4.7:/opt/intel/compilers_and_libraries_2017.1.132/linux/ipp/lib/intel64:/opt/intel/compilers_and_libraries_2017.1.132/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2017.1.132/linux/daal/lib/intel64_lin
LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin:/opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2018.3.222/linux/tbb/lib/intel64_lin/gcc4.7:/opt/intel/compilers_and_libraries_2017.1.132/linux/compiler/lib/intel64:/opt/intel/compilers_and_libraries_2017.1.132/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2017.1.132/linux/mpi/intel64/lib:/opt/intel/compilers_and_libraries_2017.1.132/linux/ipp/lib/intel64:/opt/intel/debugger_2017/iga/lib:/opt/intel/debugger_2017/libipt/intel64/lib:/opt/intel/compilers_and_libraries_2017.1.132/linux/daal/lib/intel64_lin
CPATH=/opt/intel/compilers_and_libraries_2018.3.222/linux/mkl/include:/opt/intel/compilers_and_libraries_2017.1.132/linux/ipp/include:/opt/intel/compilers_and_libraries_2017.1.132/linux/daal/include
NLSPATH=/opt/intel/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64_lin/locale/%l_%t/%N:/opt/intel/compilers_and_libraries_2017.1.132/linux/compiler/lib/intel64/locale/%l_%t/%N:/opt/intel/debugger_2017/gdb/intel64/share/locale/%l_%t/%N
PATH=/opt/intel/compilers_and_libraries_2017.1.132/linux/bin/intel64:/opt/intel/compilers_and_libraries_2017.1.132/linux/mpi/intel64/bin:/opt/intel/debugger_2017/gdb/intel64_mic/bin
DAALROOT=/opt/intel/compilers_and_libraries_2017.1.132/linux/daal
MPM_LAUNCHER=/opt/intel/debugger_2017/mpm/mic/bin/start_mpm.sh
I_MPI_ROOT=/opt/intel/compilers_and_libraries_2017.1.132/linux/mpi
......@@ -13,6 +13,12 @@
let
callPackage = pkgs.lib.callPackageWith pkgs;
pythonPackages = pkgs.python27Packages;
utils = with pkgs.lib; rec{
makeSearchPath = subDir: packages:
concatStringsSep ":" (map (path: path + "/" + subDir) packages);
makeSearchPathOutput = output: subDir: pkgs: makeSearchPath subDir (map (pkg : "${pkg}/output") pkgs);
makeLibraryPath = makeSearchPathOutput "lib" "lib";
};
in rec {
libnrm = callPackage ./libnrm {};
nrm-containers = callPackage ./containers {
......@@ -26,56 +32,27 @@ in rec {
applications = {
lammps = pkgs.lammps-mpi;
amg = callPackage ./amg {};
qmcpack = callPackage ./qmcpack {};
openmc = callPackage ./openmc {};
stream = callPackage ./stream {};
graph500 = callPackage ./graph500 {};
simple = callPackage ./simple {};
amg = callPackage applications/amg {};
qmcpack = callPackage applications/qmcpack {};
openmc = callPackage applications/openmc {};
stream = callPackage applications/stream {};
graph500 = callPackage applications/graph500 {};
simple = callPackage applications/simple {};
};
}
# not buildable unless results are present(uses sudo: launch expes in nix-shell)
#appli-enforce = callPackage src/experiments/default.nix
#{ inherit nrm nrm-containers zymake app target;
#application= app;
#samplesize = samplesize-enforce;
#result_type = "enforce";};
## not buildable unless results are present(uses sudo: launch expes in nix-shell)
#appli-bandit = callPackage src/experiments/default.nix
#{ inherit nrm nrm-containers zymake app target;
#application= app;
#samplesize = samplesize-bandit;
#result_type = "bandit";};
#app-analysis-enforce = callPackage src/analysis/default.nix
#{ inherit zymake;
#input-enforce=appli-enforce;
#analysis_type = "enforce";
#target = "dummy";
#};
intel = with pkgs; rec {
inherit utils;
compiler_path = "/opt/intel/compilers_and_libraries_2017.1.132/linux/bin/intel64/icc";
icc = callPackage intel/icc { inherit compiler_path; };
mkl = callPackage intel/mkl { inherit compiler_path; };
#WrappedICC = if (icc-native != null) then (import ../patches/cc-wrapper {
#inherit stdenv binutils coreutils ;
#libc = glibc;
#nativeTools = false;
#nativeLibc = false;
#cc = icc-native;
#}) else null;
#stdenvICC = (overrideCC stdenv WrappedICC) // { isICC = true; };
};
#app-analysis-bandit = callPackage src/analysis/default.nix
#{ inherit zymake;
#analysis_type = "bandit";
#input-bandit = appli-bandit;
#input-enforce = appli-enforce;
#target = "dummy";
#};
#dev = let
#conf = pkgs.writeText "hound.conf" ''
#{ "max-concurrent-indexers" : 2,
#"dbpath" : "${builtins.toPath ./.}/hound",
#"repos" : {
#"nrm" : { "url" : "file://${builtins.toPath ./nrm}" },
#"containers" : { "url" : "file://${builtins.toPath ./containers}" } } }
#'';
#in pkgs.stdenv.mkDerivation {
##not buildable
#name="nrm-experimental-environment";
#buildInputs = [nrm pkgs.hound];
#shellHook = "${pkgs.hound}/bin/houndd -conf ${conf} &";
#};
#inherit pkgs;
}
{ stdenv
, which
, compiler_path
}:
let
gcc_path = "${stdenv.cc}/bin/gcc";
gxx_path = "${stdenv.cc}/bin/g++";
wrapper = stdenv.mkDerivation {
name = "intel-compiler-native";
unpackPhase = '' echo "no sources" '';
dontBuild = true;
installPhase = ''
mkdir -p $out/{bin,include,lib,nix-support};
echo "contruct icc path from ${compiler_path}";
ls ${compiler_path}/bin/intel64/ > /dev/null
pushd ${compiler_path}/bin/intel64/
for i in ./*
do
ln -s ${compiler_path}/bin/intel64/$i $out/bin/$i;
done
popd
ln -s $out/bin/icc $out/bin/cc
ln -s $out/bin/icpc $out/bin/c++
pushd ${compiler_path}/compiler/lib/intel64/
for i in ./*
do
ln -s ${compiler_path}/compiler/lib/intel64/$i $out/lib/$i;
done
popd
ln -s ${compiler_path}/compiler/include $out/include
echo "export NIX_CFLAGS_COMPILE=\"-gcc-name=${gcc_path} \''${NIX_CFLAGS_COMPILE}\"" >> $out/nix-support/compiler_setup.sh
echo "export NIX_CFLAGS_COMPILE=\"-gxx-name=${gcc_path} \''${NIX_CFLAGS_COMPILE}\"" >> $out/nix-support/compiler_setup.sh
echo "export NIX_CFLAGS_COMPILE=\"-L$out/lib \''${NIX_CFLAGS_COMPILE}\"" >> $out/nix-support/compiler_setup.sh
'';
preferLocalBuild = true;
passthru = {
isIcc = true;
gcc = stdenv.cc;
langFortran = true;
};
};
in wrapper
{ stdenv
, compiler_path
, patchelf
}:
let
wrapper = stdenv.mkDerivation {
name = "intel-mkl";
unpackPhase = ''echo "no sources"'';
dontBuild = true;
dontStrip = true;
installPhase = ''
mkdir -p $out/lib;
pushd ${compiler_path}/mkl/lib/intel64
for i in * ; do
echo "Nixify $i under ${compiler_path}/mkl/lib/intel64"
cp -f -L "${compiler_path}/mkl/lib/intel64/$i" "$out/lib/$i" || true
${patchelf}/bin/patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 $out/lib/$i || /bin/true
${patchelf}/bin/patchelf --set-rpath "${stdenv.cc.cc}/lib:${stdenv.glibc}/lib:$out/lib" "$out/lib/$i" || /bin/true
done
popd
cp -r ${compiler_path}/mkl/include $out/include
echo "Done"
'';
preferLocalBuild = true;
passthru = {
isMKL = true;
gcc = stdenv.cc;
blas = {
blas_ldflags = "-Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lpthread -lm -ldl";
cblas_ldflags = "-Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lpthread -lm -ldl";
cblas_header = "mkl_cblas.h";
include_prefix = "";
};
};
};
in wrapper
{ stdenv, fetchgit, zeromq
, useICC ? false
}:
stdenv.mkDerivation {
name = "graph500";
src = fetchgit {
url="https://xgitlab.cels.anl.gov/argo/progress-benchmarks.git";
sha256="0wpxb25bfry116rzjb8c66fpxqibrn1dby4xpfsbrnvbhhirck9z";
};
buildInputs = [ zeromq];
buildPhase = ''
cd simple
make CC=${if useICC then "icc" else "gcc"}
'';
installPhase = ''
mkdir -p $out/bin
cp graph500_reference_bfs $out/bin/graph500_reference_bfs
cp graph500_reference_bfs_sssp $out/bin/graph500_reference_bfs_sssp
'';
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment