diff --git a/bsc/intel-compiler/wrapper-fortran.nix b/bsc/intel-compiler/wrapper-fortran.nix deleted file mode 100644 index 17ccdf8..0000000 --- a/bsc/intel-compiler/wrapper-fortran.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - stdenv -, gcc -, iccUnwrapped -, wrapCCWith -}: - -let - targetConfig = stdenv.targetPlatform.config; - inherit gcc; -in wrapCCWith rec { - cc = iccUnwrapped; - extraBuildCommands = '' - echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags - echo "-isystem ${iccUnwrapped}/include" >> $out/nix-support/cc-cflags - echo "-isystem ${iccUnwrapped}/include/icc" >> $out/nix-support/cc-cflags - echo "-isystem ${gcc.cc}/include/c++/${gcc.version}" >> $out/nix-support/cc-cflags - echo "-isystem ${gcc.cc}/include/c++/${gcc.version}/${targetConfig}" >> $out/nix-support/cc-cflags - - echo "-L${iccUnwrapped}/lib" >> $out/nix-support/cc-ldflags - echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags - echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags - - # Create the wrappers for icx* - wrap lld $wrapper $ccPath/lld - wrap icx $wrapper $ccPath/icx - wrap icpx $wrapper $ccPath/icpx - ''; -} diff --git a/bsc/intel-oneapi/2022.3.1.nix b/bsc/intel-oneapi/2022.3.1.nix deleted file mode 100644 index 76ea008..0000000 --- a/bsc/intel-oneapi/2022.3.1.nix +++ /dev/null @@ -1,219 +0,0 @@ -{ stdenv -, fetchurl -, ncurses -, lib -, dpkg -, rsync -, libffi -, libelf -, libxml2 -, hwloc -, autoPatchelfHook -}: - -# The distribution of intel packages is a mess. We are doing the installation -# based on the .deb metapackage "intel-hpckit", and follow de dependencies, -# which have mismatching versions. - -# Bruno Bzeznik (bzizou) went through the madness of using their .sh installer, -# pulling all the X dependencies here: -# https://github.com/Gricad/nur-packages/blob/4b67c8ad0ce1baa1d2f53ba41ae5bca8e00a9a63/pkgs/intel/oneapi.nix - -# But this is an attempt to install the packages from the APT repo - -let - - # Composite based on hpckit - hpckit = { ver = "2022.2.0"; rev = "191"; }; - #basekit = { ver = "2022.2.0"; rev = "262"; }; - comp = { ver = "2022.0.2"; rev = "3658"; }; - mpi = { ver = "2021.6.0"; rev = "602"; }; - - compilerRev = "3768"; - mpiRev = "76"; - debList = [ - "intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-${v}-${v}-${compilerRev}_amd64.deb" - "intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-runtime-${v}-${v}-${compilerRev}_amd64.deb" - "intel-oneapi-compiler-fortran-common-${v}-${v}-${compilerRev}_all.deb" - "intel-oneapi-compiler-shared-${v}-${v}-${compilerRev}_amd64.deb" - "intel-oneapi-compiler-cpp-eclipse-cfg-${v}-${compilerRev}_all.deb" - "intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-common-${v}-${v}-${compilerRev}_all.deb" - "intel-oneapi-compiler-dpcpp-cpp-classic-fortran-shared-runtime-${v}-${v}-${compilerRev}_amd64.deb" - "intel-oneapi-compiler-dpcpp-cpp-common-${v}-${v}-${compilerRev}_all.deb" - "intel-oneapi-compiler-fortran-runtime-${v}-${v}-${compilerRev}_amd64.deb" - "intel-oneapi-compiler-shared-common-${v}-${v}-${compilerRev}_all.deb" - "intel-oneapi-compiler-shared-runtime-${v}-${v}-${compilerRev}_amd64.deb" - - "intel-oneapi-dpcpp-cpp-${v}-${v}-${compilerRev}_amd64.deb" - "intel-oneapi-openmp-${v}-${v}-${compilerRev}_amd64.deb" - "intel-oneapi-openmp-common-${v}-${v}-${compilerRev}_all.deb" - - "intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-${v}-${compilerRev}_amd64.deb" - "intel-oneapi-compiler-dpcpp-cpp-runtime-${v}-${v}-${compilerRev}_amd64.deb" - "intel-oneapi-compiler-dpcpp-eclipse-cfg-${v}-${compilerRev}_all.deb" - "intel-oneapi-compiler-dpcpp-cpp-${v}-${v}-${compilerRev}_amd64.deb" - "intel-oneapi-compiler-fortran-${v}-${v}-${compilerRev}_amd64.deb" - "intel-oneapi-compiler-fortran-runtime-${v}-${compilerRev}_amd64.deb" - - "intel-oneapi-mpi-devel-${mpi.ver}-${mpi.ver}-${mpi.rev}_amd64.deb" - "intel-oneapi-mpi-${mpi.ver}-${mpi.ver}-${mpi.rev}_amd64.deb" - - #"intel-oneapi-tbb-${v}-${v}-${tbbVer}_amd64.deb" - #"intel-oneapi-tbb-devel-${v}-${v}-${tbbVer}_amd64.deb" - #"intel-oneapi-tbb-common-${v}-${v}-${tbbVer}_all.deb" - #"intel-oneapi-tbb-common-devel-${v}-${v}-${tbbVer}_all.deb" - - #intel-basekit-2021.1.0 - #intel-hpckit-getting-started (>= 2021.1.0-2684) - #intel-oneapi-common-vars (>= 2021.1.1-60) - #intel-oneapi-common-licensing-2021.1.1 - #intel-oneapi-dev-utilities-2021.1.1 - #intel-oneapi-inspector (>= 2021.1.1-42) - #intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2021.1.1 - #intel-oneapi-compiler-fortran-2021.1.1 - #intel-oneapi-clck-2021.1.1 - #intel-oneapi-itac-2021.1.1 - ]; - - pkgsDesc = stdenv.mkDerivation { - name = "intel-oneapi-packages"; - srcs = [ - (fetchurl { - url = "https://apt.repos.intel.com/oneapi/dists/all/main/binary-amd64/Packages"; - sha256 = "sha256-swUGn097D5o1giK2l+3H4xFcUXSAUYtavQsPyiJlr2A="; - }) - (fetchurl { - url = "https://apt.repos.intel.com/oneapi/dists/all/main/binary-all/Packages"; - sha256 = "sha256-Ewpy0l0fXiJDG0FkAGykqizW1bm+/lcvI2OREyqzOLM="; - }) - ]; - phases = [ "installPhase" ]; - installPhase = '' - awk -F': ' '\ - BEGIN { print "[ {" } \ - NR>1 && /^Package: / { print "} {"; } \ - /: / { printf "%s = \"%s\";\n", $1, $2 } \ - END { print "} ]" }' $srcs > $out - ''; - }; - - pkgsExpanded = import pkgsDesc; - - getSum = pkgs: deb: - let - matches = lib.filter (x: "pool/main/${deb}" == x.Filename) pkgs; - match = assert lib.length matches == 1; lib.elemAt matches 0; - #match = lib.elemAt matches 0; - in - match.SHA256; - - apthost = "https://apt.repos.intel.com/oneapi/pool/main/"; - urls = builtins.map (x: apthost + x) debList; - sums = builtins.map (x: getSum pkgsExpanded x) debList; - getsrc = url: sha256: fetchurl { inherit url sha256; }; - - intel-oneapi-source = stdenv.mkDerivation rec { - version = v; - pname = "intel-oneapi-source"; - - srcs = lib.zipListsWith getsrc urls sums; - dontBuild = true; - dontStrip = true; - buildInputs = [ dpkg ]; - phases = [ "unpackPhase" "installPhase" ]; - - unpackCmd = '' - dpkg -x $curSrc . - ''; - - installPhase = '' - mkdir -p $out - mv intel $out - ''; - }; - -in - stdenv.mkDerivation rec { - version = v; - pname = "intel-oneapi"; - src = intel-oneapi-source; - - buildInputs = [ - rsync - libffi - libelf - libxml2 - hwloc - stdenv.cc.cc.lib - ]; - nativeBuildInputs = [ autoPatchelfHook ]; - - # The gcc package is required for building other programs - #propagatedBuildInputs = [ gcc ]; - - phases = [ "installPhase" "fixupPhase" ]; - - dontStrip = true; - - installPhase = '' - mkdir -p $out/{bin,lib,include} - mkdir -p $out/share/man - - cd $src - - # Compiler - pushd intel/oneapi/compiler/${version} - pushd linux - # Binaries - rsync -a bin/ $out/bin/ - rsync -a bin/intel64/ $out/bin/ - rsync -a bin-llvm/ $out/bin-llvm/ - - # Libraries - rsync -a --exclude=oclfpga lib/ $out/lib/ - rsync -a compiler/lib/intel64_lin/ $out/lib/ - - # Headers - rsync -a include/ $out/include/ - rsync -a compiler/include/ $out/include/ - popd - - # Manuals - rsync -a documentation/en/man/common/ $out/share/man/ - popd - ''; - - } - - - - - - -#in -# -#stdenv.mkDerivation rec { -# version = "2022.3.2"; -# pkgVersion = "2022.3.1.16997"; # Intel (R) Versioning ??? -# pname = "intel-onapi-hpc-toolkit"; -# -# # From their CI: https://github.com/oneapi-src/oneapi-ci/blob/master/.github/workflows/build_all.yml -# src = fetchurl { -# url = "https://registrationcenter-download.intel.com/akdlm/irc_nas/18975/l_HPCKit_p_${pkgVersion}_offline.sh"; -# sha256 = "sha256-04TYMArgro1i+ONdiNZejripMNneUPS7Gj+MSfoGfWI="; -# }; -# -# buildInputs = [ ncurses debs ]; -# -# unpackPhase = '' -# sh $src -x -# #sourceRoot=l_HPCKit_p_${pkgVersion}_offline -# ''; -# -# # The gcc package is required for building other programs -# #propagatedBuildInputs = [ gcc ]; -# -# installPhase = '' -# mv l_HPCKit_p_${pkgVersion}_offline $out -# ''; -#} diff --git a/bsc/intel-oneapi/license.nix b/bsc/intel-oneapi/license.nix deleted file mode 100644 index 710dab1..0000000 --- a/bsc/intel-oneapi/license.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ stdenv -, requireFile -}: - -stdenv.mkDerivation rec { - name = "intel-compiler-license"; - version = "2019.7.217"; - - src = requireFile { - name = "license.lic"; - sha256 = "0rgmsqkhpqcfny8j7msa4sgz3prhh248ylh69gjh12dkra77prsj"; - message = '' - The Intel Compiler requires a license. You can get one (free of charge) if - you meet the requeriments at the website: - - https://software.intel.com/content/www/us/en/develop/articles/qualify-for-free-software.html#opensourcecontributor - - Or you can use your own license. Add it to the store with: - - $ nix-store --add-fixed sha256 license.lic - /nix/store/2p9v0nvsl3scshjx348z6j32rh7ac0db-license.lic - - Notice that the name must match exactly "license.lic". - - Then update the hash in the bsc/intel-compiler/license.nix file using the - nix-hash command with: - - $ nix-hash --type sha256 --base32 --flat /nix/store/2p9v0nvsl3scshjx348z6j32rh7ac0db-license.lic - 06g2xgm1lch6zqfkhb768wacdx46kf61mfvj5wfpyssw0anr0x9q - ''; - }; - - dontUnpack = true; - - installPhase = '' - mkdir -p $out - cp $src $out/ - ''; -} diff --git a/bsc/intel-oneapi/oneapi.nix b/bsc/intel-oneapi/oneapi.nix deleted file mode 100644 index d447752..0000000 --- a/bsc/intel-oneapi/oneapi.nix +++ /dev/null @@ -1,100 +0,0 @@ -{ lib, stdenv, fetchurl, glibc, glib, libnotify, xdg-utils, ncurses, nss, - at-spi2-core, libdrm, gtk3, mesa, qt515, zlib, xorg, atk, nspr, dbus, - pango, cairo, gdk-pixbuf, xlibsWrapper, cups, expat, libxkbcommon, alsaLib, - file, at-spi2-atk, strace }: - -stdenv.mkDerivation rec { - version = "2022.2.0.262"; - hpc_version = "2022.2.0.191"; - name = "intel-oneapi-${version}"; - - # For localy downloaded offline installers - # sourceRoot = "/data/scratch/intel/oneapi_installer"; - - # For installer fetching (no warranty of the links) - sourceRoot = "."; - srcs = [ - (fetchurl { - url = "https://registrationcenter-download.intel.com/akdlm/irc_nas/18673/l_BaseKit_p_2022.2.0.262_offline.sh"; - sha256 = "03qx6sb58mkhc7iyc8va4y1ihj6l3155dxwmqj8dfw7j2ma7r5f6"; - }) - (fetchurl { - url = "https://registrationcenter-download.intel.com/akdlm/irc_nas/18679/l_HPCKit_p_2022.2.0.191_offline.sh"; - sha256 = "0swz4w9bn58wwqjkqhjqnkcs8k8ms9nn9s8k7j5w6rzvsa6817d2"; - }) - ]; - - nativeBuildInputs = [ file strace ]; - - propagatedBuildInputs = [ glibc glib libnotify xdg-utils ncurses nss - at-spi2-core xorg.libxcb libdrm gtk3 mesa qt515.full - zlib xorg.xlibsWrapper ]; - - libPath = lib.makeLibraryPath [ stdenv.cc.cc xorg.libX11 glib libnotify xdg-utils - ncurses nss at-spi2-core xorg.libxcb libdrm gtk3 - mesa qt515.full zlib atk nspr dbus pango cairo - gdk-pixbuf xlibsWrapper cups expat libxkbcommon alsaLib - at-spi2-atk xorg.libXcomposite xorg.libxshmfence - xorg.libXdamage xorg.libXext xorg.libXfixes - xorg.libXrandr ]; - - phases = [ "installPhase" "fixupPhase" "installCheckPhase" "distPhase" ]; - - installPhase = '' - cd $sourceRoot - mkdir -p $out/tmp - if [ "$srcs" = "" ] - then - base_kit="./l_BaseKit_p_${version}_offline.sh" - hpc_kit="./l_HPCKit_p_${hpc_version}_offline.sh" - else - base_kit=`echo $srcs|cut -d" " -f1` - hpc_kit=`echo $srcs|cut -d" " -f2` - fi - # Extract files - bash $base_kit --log $out/basekit_install_log --extract-only --extract-folder $out/tmp -a --install-dir $out --download-cache $out/tmp --download-dir $out/tmp --log-dir $out/tmp -s --eula accept - bash $hpc_kit --log $out/hpckit_install_log --extract-only --extract-folder $out/tmp -a --install-dir $out --download-cache $out/tmp --download-dir $out/tmp --log-dir $out/tmp -s --eula accept - for file in `grep -l -r "/bin/sh" $out/tmp` - do - sed -e "s,/bin/sh,${stdenv.shell},g" -i $file - done - export HOME=$out - # Patch the bootstraper binaries and libs - for files in `find $out/tmp/l_BaseKit_p_${version}_offline/lib` - do - patchelf --set-rpath "${glibc}/lib:$libPath:$out/tmp/l_BaseKit_p_${version}_offline/lib" $file 2>/dev/null || true - done - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${glibc}/lib:$libPath:$out/tmp/l_BaseKit_p_${version}_offline/lib" $out/tmp/l_BaseKit_p_${version}_offline/bootstrapper - # launch install - export LD_LIBRARY_PATH=${zlib}/lib - #export LD_DEBUG=libs - ls -l $out - cd $out/tmp - strace -f -e trace=execve -s 9999 $out/tmp/l_BaseKit_p_${version}_offline/install.sh --install-dir $out --download-cache $out/tmp --download-dir $out/tmp --log-dir $out/tmp --eula accept -s --ignore-errors - $out/tmp/l_HPCKit_p_${hpc_version}_offline/install.sh --install-dir $out --download-cache $out/tmp --download-dir $out/tmp --log-dir $out/tmp --eula accept -s --ignore-errors - rm -rf $out/tmp - ''; - - postFixup = '' - echo "Fixing rights..." - chmod u+w -R $out - echo "Patching rpath and interpreter..." - for dir in `find $out -mindepth 1 -maxdepth 1 -type d` - do - echo " $dir" - for file in `find $dir -type f -exec file {} + | grep ELF| awk -F: '{print $1}'` - do - echo " $file" - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath '$ORIGIN'":${glibc}/lib:$libPath:$dir/latest/lib64" $file 2>/dev/null || true - done - done - ''; - - meta = { - description = "Intel OneAPI Basekit + HPCKit"; - maintainers = [ lib.maintainers.bzizou ]; - platforms = lib.platforms.linux; - license = lib.licenses.unfree; - }; -} - diff --git a/bsc/intel-oneapi/wrapper.nix b/bsc/intel-oneapi/wrapper.nix deleted file mode 100644 index 17296ad..0000000 --- a/bsc/intel-oneapi/wrapper.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - stdenv -, gcc -, nanos6 -, iccUnwrapped -, wrapCCWith -, intelLicense -}: - -let - targetConfig = stdenv.targetPlatform.config; - inherit gcc; -in wrapCCWith rec { - cc = iccUnwrapped; - extraBuildCommands = '' - echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags - echo "-isystem ${iccUnwrapped}/include" >> $out/nix-support/cc-cflags - echo "-isystem ${iccUnwrapped}/include/intel64" >> $out/nix-support/cc-cflags - echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags - echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags - - cat "${iccUnwrapped}/nix-support/propagated-build-inputs" >> \ - $out/nix-support/propagated-build-inputs - - echo "export INTEL_LICENSE_FILE=${intelLicense}" \ - >> $out/nix-support/setup-hook - - # Create the wrappers for icc and icpc - wrap icc $wrapper $ccPath/icc - wrap icpc $wrapper $ccPath/icpc - wrap ifort $wrapper $ccPath/ifort - ''; -}