diff --git a/vincent/chol/.gitignore b/vincent/chol/.gitignore new file mode 100644 index 0000000..89f9ac0 --- /dev/null +++ b/vincent/chol/.gitignore @@ -0,0 +1 @@ +out/ diff --git a/vincent/chol/flake.lock b/vincent/chol/flake.lock new file mode 100644 index 0000000..b525e6d --- /dev/null +++ b/vincent/chol/flake.lock @@ -0,0 +1,45 @@ +{ + "nodes": { + "jungle": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1769187376, + "narHash": "sha256-H8aMWt4OVwXWoUPPSZuj0eSq3Ur17nY62Ap+hYiQy3o=", + "ref": "refs/heads/master", + "rev": "deb0cd1488b8d72ad1395b25aa4dbbdf721274d9", + "revCount": 1533, + "type": "git", + "url": "https://jungle.bsc.es/git/rarias/jungle" + }, + "original": { + "type": "git", + "url": "https://jungle.bsc.es/git/rarias/jungle" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1767634882, + "narHash": "sha256-2GffSfQxe3sedHzK+sTKlYo/NTIAGzbFCIsNMUPAAnk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3c9db02515ef1d9b6b709fc60ba9a540957f661c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "jungle": "jungle" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/vincent/chol/flake.nix b/vincent/chol/flake.nix new file mode 100644 index 0000000..fa411ab --- /dev/null +++ b/vincent/chol/flake.nix @@ -0,0 +1,61 @@ +{ + inputs.jungle.url = "git+https://jungle.bsc.es/git/rarias/jungle"; + outputs = { self, jungle }: + let + nixpkgs = jungle.inputs.nixpkgs; + customOverlay = (final: prev: { + + # Build blis for Fox architecture and without OpenMP + amd-blis = (prev.amd-blis.override { + withOpenMP = false; + withArchitecture = "zen4"; + }).overrideAttrs (old: { + hardeningDisable = [ "all" ]; + }); + + # Disable OpenMP in flame + amd-libflame = (prev.amd-libflame.override { + withOpenMP = false; + }).overrideAttrs (old: { + hardeningDisable = [ "all" ]; + }); + + # Build bench6 with blis + bench6 = prev.bench6.overrideAttrs (old: { + buildInputs = with final; [ + bigotes + openmp + openmpv + nanos6 + nodes + nosv + mpi + tampi + ovni + amd-blis + amd-libflame + ]; + cmakeFlags = (old.cmakeFlags or []) ++ [ + "-DCBLAS_INCLUDE_DIR=${final.amd-blis}/include/blis" + "-DLAPACKE_INCLUDE_DIR=${final.amd-libflame}/include" + "-DLAPACKE_LIBRARY=${final.amd-libflame}/lib/liblapacke.so.3" + ]; + }); + }); + pkgs = import nixpkgs { + system = "x86_64-linux"; + overlays = [ + jungle.outputs.bscOverlay + customOverlay + ]; + }; + in { + devShells.x86_64-linux.default = pkgs.mkShell { + pname = "devshell"; + packages = with pkgs; [ + bench6 bigotes ministat + ]; + }; + packages.x86_64-linux.bench6 = pkgs.bench6; + }; +} diff --git a/vincent/chol/run.sh b/vincent/chol/run.sh new file mode 100755 index 0000000..8431a1f --- /dev/null +++ b/vincent/chol/run.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +if [ -z "$1" ]; then + exec nix develop -c $0 run + #exec srun -J chol -p fox --exclusive nix develop -c $0 run +fi + +set -eux + +size=$((32*1024)) +bs=512 + +b6dir=$(which b6_cholesky_nodes | awk -F/ '{print $4}') +wdir="out/$b6dir" + +mkdir -p "$wdir" + +log="$wdir/b6_cholesky_nodes-$size-$bs.csv" +bigotes -o "$log" -- b6_cholesky_nodes $size $bs +ministat -w80 "$log"