Commit bdc6f729 authored by Valentin Reis's avatar Valentin Reis
Browse files

aml-check-knl

parent 9f50e760
Pipeline #7248 canceled with stages
in 2 minutes and 44 seconds
......@@ -2,13 +2,13 @@
"fetch": {
"args": {
"fetchSubmodules": false,
"rev": "6d6b9e7596c5ac46336a66a998f53812d6fb0a8b",
"sha256": "0vk4ayabwkivpbscaqjblzindwxja1799yn2sp2yrws6w4rwm04l",
"rev": "4e8c08e5874c70914cee61a73bc771b7fdc3cc20",
"sha256": "18qpv829lqjsm07cazgzfsdccg0rhl55nj8pck25d2haywffgghg",
"url": "https://xgitlab.cels.anl.gov/argo/aml.git"
},
"fn": "fetchgit"
},
"rev": "refs/heads/master",
"rev": "refs/heads/replicaset",
"type": "fetchgit",
"url": "https://xgitlab.cels.anl.gov/argo/aml.git"
}
\ No newline at end of file
......@@ -74,19 +74,22 @@ let
aml-check = aml.overrideAttrs (old:{
doCheck = true;
checkPhase = ''
make check
'';
checkPhase = "make check";
});
mkl = callPackage ./mkl {compiler_path = "/opt/intel/compilers_and_libraries/linux";};
icc = callPackage ./icc {compiler_path = "/opt/intel/compilers_and_libraries/linux";};
aml-check-knl = aml-check.overrideAttrs (old:{
CC="icc";
CFLAGS="-mkl -xhost";
makeFlags = old.makeFlags ++ [ "-j64" ];
configureFlags = old.configureFlags ++ [ "--enable-benchmarks" ];
#configureFlags="$configureFlags --enable-benchmarks"
preConfigure = ''
source /opt/intel/compilers_and_libraries/linux/bin/compilervars.sh intel64
makeFlags = [ "-j64" "V=1"];
configureFlags = [ "--enable-benchmarks" ];
buildInputs = old.buildInputs ++ [pkgs.man-db icc mkl];
CC="${icc}/bin/icc";
preConfigure = ''
export CFLAGS="-mkl -xhost"
export CC="${icc}/bin/icc"
find . -name '*.o'
find . -name '*.o' -delete
'';
});
......@@ -241,6 +244,7 @@ let
pyzmq = pkgs.pythonPackages.pyzmq.override { zeromq3 = pkgs.zeromq; };
hwloc2 = pkgs.hwloc.overrideAttrs (old:{
name="hwloc-2";
src = pkgs.fetchurl {
url = "https://download.open-mpi.org/release/hwloc/v2.0/hwloc-2.0.3.tar.gz";
sha256 = "0707ml34ylrr8zwwhddp64q6q57248m9646f27jadcx5m93g5pk4";
......@@ -254,7 +258,7 @@ let
buildInputs = [
# tooling may run mpiexec or hwloc:
pkgs.mpich2
pkgs.hwloc
hwloc2
# these are needed for some reason:
pkgs.coreutils
pkgs.utillinux
......
{ stdenv
, which
, compiler_path
}:
let
gcc_path = "${stdenv.cc}/bin/gcc";
gxx_path = "${stdenv.cc}/bin/g++";
in 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}/lib/intel64/
for i in ./*
do
ln -s ${compiler_path}/lib/intel64/$i $out/lib/$i;
done
popd
ln -s ${compiler_path}/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;
};
}
{ stdenv
, compiler_path
, patchelf
}:
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 = "";
};
};
}
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