forked from rarias/jungle
Compare commits
1 Commits
fix/cross/
...
pkgs/aocc
| Author | SHA1 | Date | |
|---|---|---|---|
|
1ed213243d
|
@@ -57,18 +57,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.fail2ban = {
|
|
||||||
enable = true;
|
|
||||||
maxretry = 5;
|
|
||||||
bantime-increment = {
|
|
||||||
enable = true; # Double ban time on each attack
|
|
||||||
maxtime = "7d"; # Ban up to a week
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Disable SSH login with password, allow only keypair
|
|
||||||
services.openssh.settings.PasswordAuthentication = false;
|
|
||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
extraCommands = ''
|
extraCommands = ''
|
||||||
# Blackhole BSC vulnerability scanner (OpenVAS) as it is spamming our
|
# Blackhole BSC vulnerability scanner (OpenVAS) as it is spamming our
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
vim wget git htop tmux pciutils tcpdump ripgrep nix-index nixos-option
|
vim wget git htop tmux pciutils tcpdump ripgrep nix-index nixos-option
|
||||||
nix-diff ipmitool freeipmi ethtool lm_sensors cmake gnumake file tree
|
nix-diff ipmitool freeipmi ethtool lm_sensors cmake gnumake file tree
|
||||||
ncdu config.boot.kernelPackages.perf ldns pv
|
ncdu config.boot.kernelPackages.perf ldns pv
|
||||||
# From jungle overlay
|
# From bsckgs overlay
|
||||||
osumb nixgen
|
osumb
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.direnv.enable = true;
|
programs.direnv.enable = true;
|
||||||
|
|||||||
@@ -139,7 +139,6 @@
|
|||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKGt0ESYxekBiHJQowmKpfdouw0hVm3N7tUMtAaeLejK vincent@varch"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKGt0ESYxekBiHJQowmKpfdouw0hVm3N7tUMtAaeLejK vincent@varch"
|
||||||
];
|
];
|
||||||
shell = pkgs.zsh;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pmartin1 = {
|
pmartin1 = {
|
||||||
|
|||||||
@@ -93,4 +93,20 @@
|
|||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig.ExecStart = script;
|
serviceConfig.ExecStart = script;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Only allow SSH connections from users who have a SLURM allocation
|
||||||
|
# See: https://slurm.schedmd.com/pam_slurm_adopt.html
|
||||||
|
security.pam.services.sshd.rules.account.slurm = {
|
||||||
|
control = "required";
|
||||||
|
enable = true;
|
||||||
|
modulePath = "${pkgs.slurm}/lib/security/pam_slurm_adopt.so";
|
||||||
|
args = [ "log_level=debug5" ];
|
||||||
|
order = 999999; # Make it last one
|
||||||
|
};
|
||||||
|
|
||||||
|
# Disable systemd session (pam_systemd.so) as it will conflict with the
|
||||||
|
# pam_slurm_adopt.so module. What happens is that the shell is first adopted
|
||||||
|
# into the slurmstepd task and then into the systemd session, which is not
|
||||||
|
# what we want, otherwise it will linger even if all jobs are gone.
|
||||||
|
security.pam.services.sshd.startSession = lib.mkForce false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ lib, pkgs, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -21,20 +21,4 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
services.slurm.client.enable = true;
|
services.slurm.client.enable = true;
|
||||||
|
|
||||||
# Only allow SSH connections from users who have a SLURM allocation
|
|
||||||
# See: https://slurm.schedmd.com/pam_slurm_adopt.html
|
|
||||||
security.pam.services.sshd.rules.account.slurm = {
|
|
||||||
control = "required";
|
|
||||||
enable = true;
|
|
||||||
modulePath = "${pkgs.slurm}/lib/security/pam_slurm_adopt.so";
|
|
||||||
args = [ "log_level=debug5" ];
|
|
||||||
order = 999999; # Make it last one
|
|
||||||
};
|
|
||||||
|
|
||||||
# Disable systemd session (pam_systemd.so) as it will conflict with the
|
|
||||||
# pam_slurm_adopt.so module. What happens is that the shell is first adopted
|
|
||||||
# into the slurmstepd task and then into the systemd session, which is not
|
|
||||||
# what we want, otherwise it will linger even if all jobs are gone.
|
|
||||||
security.pam.services.sshd.startSession = lib.mkForce false;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,31 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
let
|
||||||
|
suspendProgram = pkgs.writeShellScript "suspend.sh" ''
|
||||||
|
exec 1>>/var/log/power_save.log 2>>/var/log/power_save.log
|
||||||
|
set -x
|
||||||
|
export "PATH=/run/current-system/sw/bin:$PATH"
|
||||||
|
echo "$(date) Suspend invoked $0 $*" >> /var/log/power_save.log
|
||||||
|
hosts=$(scontrol show hostnames $1)
|
||||||
|
for host in $hosts; do
|
||||||
|
echo Shutting down host: $host
|
||||||
|
ipmitool -I lanplus -H ''${host}-ipmi -P "" -U "" chassis power off
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
resumeProgram = pkgs.writeShellScript "resume.sh" ''
|
||||||
|
exec 1>>/var/log/power_save.log 2>>/var/log/power_save.log
|
||||||
|
set -x
|
||||||
|
export "PATH=/run/current-system/sw/bin:$PATH"
|
||||||
|
echo "$(date) Suspend invoked $0 $*" >> /var/log/power_save.log
|
||||||
|
hosts=$(scontrol show hostnames $1)
|
||||||
|
for host in $hosts; do
|
||||||
|
echo Starting host: $host
|
||||||
|
ipmitool -I lanplus -H ''${host}-ipmi -P "" -U "" chassis power on
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
in {
|
||||||
services.slurm = {
|
services.slurm = {
|
||||||
controlMachine = "apex";
|
controlMachine = "apex";
|
||||||
clusterName = "jungle";
|
clusterName = "jungle";
|
||||||
@@ -34,6 +59,16 @@
|
|||||||
# the resources. Use the task/cgroup plugin to enable process containment.
|
# the resources. Use the task/cgroup plugin to enable process containment.
|
||||||
TaskPlugin=task/affinity,task/cgroup
|
TaskPlugin=task/affinity,task/cgroup
|
||||||
|
|
||||||
|
# Power off unused nodes until they are requested
|
||||||
|
SuspendProgram=${suspendProgram}
|
||||||
|
SuspendTimeout=60
|
||||||
|
ResumeProgram=${resumeProgram}
|
||||||
|
ResumeTimeout=300
|
||||||
|
SuspendExcNodes=fox
|
||||||
|
|
||||||
|
# Turn the nodes off after 1 hour of inactivity
|
||||||
|
SuspendTime=3600
|
||||||
|
|
||||||
# Reduce port range so we can allow only this range in the firewall
|
# Reduce port range so we can allow only this range in the firewall
|
||||||
SrunPortRange=60000-61000
|
SrunPortRange=60000-61000
|
||||||
|
|
||||||
|
|||||||
32
overlay.nix
32
overlay.nix
@@ -9,12 +9,15 @@ let
|
|||||||
bscPkgs = {
|
bscPkgs = {
|
||||||
agenix = prev.callPackage ./pkgs/agenix/default.nix { };
|
agenix = prev.callPackage ./pkgs/agenix/default.nix { };
|
||||||
amd-uprof = prev.callPackage ./pkgs/amd-uprof/default.nix { };
|
amd-uprof = prev.callPackage ./pkgs/amd-uprof/default.nix { };
|
||||||
|
aoccUnwrapped = callPackage ./pkgs/aocc/unwrapped.nix { };
|
||||||
|
aocc = callPackage ./pkgs/aocc/default.nix { };
|
||||||
|
stdenvAocc = final.overrideCC final.stdenv final.aocc;
|
||||||
bench6 = callPackage ./pkgs/bench6/default.nix { };
|
bench6 = callPackage ./pkgs/bench6/default.nix { };
|
||||||
bigotes = callPackage ./pkgs/bigotes/default.nix { };
|
bigotes = callPackage ./pkgs/bigotes/default.nix { };
|
||||||
clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { };
|
clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { };
|
||||||
clangOmpss2Nanos6 = callPackage ./pkgs/llvm-ompss2/default.nix { useNanos6 = true; };
|
clangOmpss2Nanos6 = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nanos6; };
|
||||||
clangOmpss2Nodes = callPackage ./pkgs/llvm-ompss2/default.nix { useNodes = true; useOpenmp = true; };
|
clangOmpss2Nodes = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmp; };
|
||||||
clangOmpss2NodesOmpv = callPackage ./pkgs/llvm-ompss2/default.nix { useNodes = true; useOpenmpV = true; };
|
clangOmpss2NodesOmpv = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmpv; };
|
||||||
clangOmpss2Unwrapped = callPackage ./pkgs/llvm-ompss2/clang.nix { };
|
clangOmpss2Unwrapped = callPackage ./pkgs/llvm-ompss2/clang.nix { };
|
||||||
cudainfo = prev.callPackage ./pkgs/cudainfo/default.nix { };
|
cudainfo = prev.callPackage ./pkgs/cudainfo/default.nix { };
|
||||||
#extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated
|
#extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated
|
||||||
@@ -37,7 +40,6 @@ let
|
|||||||
nanos6 = callPackage ./pkgs/nanos6/default.nix { };
|
nanos6 = callPackage ./pkgs/nanos6/default.nix { };
|
||||||
nanos6Debug = final.nanos6.override { enableDebug = true; };
|
nanos6Debug = final.nanos6.override { enableDebug = true; };
|
||||||
nixtools = callPackage ./pkgs/nixtools/default.nix { };
|
nixtools = callPackage ./pkgs/nixtools/default.nix { };
|
||||||
nixgen = callPackage ./pkgs/nixgen/default.nix { };
|
|
||||||
# Broken because of pkgsStatic.libcap
|
# Broken because of pkgsStatic.libcap
|
||||||
# See: https://github.com/NixOS/nixpkgs/pull/268791
|
# See: https://github.com/NixOS/nixpkgs/pull/268791
|
||||||
#nix-wrap = callPackage ./pkgs/nix-wrap/default.nix { };
|
#nix-wrap = callPackage ./pkgs/nix-wrap/default.nix { };
|
||||||
@@ -54,10 +56,10 @@ let
|
|||||||
#psmpi = callPackage ./pkgs/parastation/psmpi.nix { }; # Unmaintaned
|
#psmpi = callPackage ./pkgs/parastation/psmpi.nix { }; # Unmaintaned
|
||||||
slurm = import ./pkgs/slurm/default.nix { slurm = prev.slurm; };
|
slurm = import ./pkgs/slurm/default.nix { slurm = prev.slurm; };
|
||||||
sonar = callPackage ./pkgs/sonar/default.nix { };
|
sonar = callPackage ./pkgs/sonar/default.nix { };
|
||||||
stdenvClangOmpss2 = final.stdenv.override { cc = final.buildPackages.clangOmpss2; allowedRequisites = null; };
|
stdenvClangOmpss2 = final.stdenv.override { cc = final.clangOmpss2; allowedRequisites = null; };
|
||||||
stdenvClangOmpss2Nanos6 = final.stdenv.override { cc = final.buildPackages.clangOmpss2Nanos6; allowedRequisites = null; };
|
stdenvClangOmpss2Nanos6 = final.stdenv.override { cc = final.clangOmpss2Nanos6; allowedRequisites = null; };
|
||||||
stdenvClangOmpss2Nodes = final.stdenv.override { cc = final.buildPackages.clangOmpss2Nodes; allowedRequisites = null; };
|
stdenvClangOmpss2Nodes = final.stdenv.override { cc = final.clangOmpss2Nodes; allowedRequisites = null; };
|
||||||
stdenvClangOmpss2NodesOmpv = final.stdenv.override { cc = final.buildPackages.clangOmpss2NodesOmpv; allowedRequisites = null; };
|
stdenvClangOmpss2NodesOmpv = final.stdenv.override { cc = final.clangOmpss2NodesOmpv; allowedRequisites = null; };
|
||||||
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
||||||
tampi = callPackage ./pkgs/tampi/default.nix { };
|
tampi = callPackage ./pkgs/tampi/default.nix { };
|
||||||
upc-qaire-exporter = prev.callPackage ./pkgs/upc-qaire-exporter/default.nix { };
|
upc-qaire-exporter = prev.callPackage ./pkgs/upc-qaire-exporter/default.nix { };
|
||||||
@@ -101,16 +103,14 @@ let
|
|||||||
pkgsTopLevel = filterAttrs (_: isDerivation) bscPkgs;
|
pkgsTopLevel = filterAttrs (_: isDerivation) bscPkgs;
|
||||||
|
|
||||||
# Native build in that platform doesn't imply cross build works
|
# Native build in that platform doesn't imply cross build works
|
||||||
canCrossCompile = platform: default: pkg:
|
canCrossCompile = platform: pkg:
|
||||||
(isDerivation pkg) &&
|
(isDerivation pkg) &&
|
||||||
# If meta.cross is undefined, use default
|
# Must be defined explicitly
|
||||||
(pkg.meta.cross or default) &&
|
(pkg.meta.cross or false) &&
|
||||||
(meta.availableOn final.pkgsCross.${platform}.stdenv.hostPlatform pkg);
|
(meta.availableOn platform pkg);
|
||||||
|
|
||||||
# For now only RISC-V
|
# For now only RISC-V
|
||||||
crossSet = genAttrs [ "riscv64" ] (platform:
|
crossSet = { riscv64 = final.pkgsCross.riscv64.bsc.pkgsTopLevel; };
|
||||||
filterAttrs (_: canCrossCompile platform true)
|
|
||||||
final.pkgsCross.${platform}.bsc.pkgsTopLevel);
|
|
||||||
|
|
||||||
buildList = name: paths:
|
buildList = name: paths:
|
||||||
final.runCommandLocal name { } ''
|
final.runCommandLocal name { } ''
|
||||||
@@ -130,7 +130,7 @@ let
|
|||||||
# For now only RISC-V
|
# For now only RISC-V
|
||||||
crossList = buildList "ci-cross"
|
crossList = buildList "ci-cross"
|
||||||
(filter
|
(filter
|
||||||
(canCrossCompile "riscv64" false) # opt-in (pkgs with: meta.cross = true)
|
(canCrossCompile final.pkgsCross.riscv64.stdenv.hostPlatform)
|
||||||
(builtins.attrValues crossSet.riscv64));
|
(builtins.attrValues crossSet.riscv64));
|
||||||
|
|
||||||
in bscPkgs // {
|
in bscPkgs // {
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ in
|
|||||||
meta = {
|
meta = {
|
||||||
description = "Performance analysis tool-suite for x86 based applications";
|
description = "Performance analysis tool-suite for x86 based applications";
|
||||||
homepage = "https://www.amd.com/es/developer/uprof.html";
|
homepage = "https://www.amd.com/es/developer/uprof.html";
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = lib.platforms.linux;
|
||||||
license = lib.licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
maintainers = with lib.maintainers.bsc; [ rarias varcila ];
|
maintainers = with lib.maintainers.bsc; [ rarias varcila ];
|
||||||
};
|
};
|
||||||
|
|||||||
16
pkgs/aocc/default.nix
Normal file
16
pkgs/aocc/default.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ wrapCCWith
|
||||||
|
, aoccUnwrapped
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cc = aoccUnwrapped;
|
||||||
|
in wrapCCWith {
|
||||||
|
inherit cc;
|
||||||
|
|
||||||
|
extraBuildCommands = ''
|
||||||
|
echo "-isystem ${cc}/include" >> $out/nix-support/cc-cflags
|
||||||
|
|
||||||
|
wrap aocc $wrapper $ccPath/clang
|
||||||
|
wrap aocc++ $wrapper $ccPath/clang++
|
||||||
|
'';
|
||||||
|
}
|
||||||
51
pkgs/aocc/unwrapped.nix
Normal file
51
pkgs/aocc/unwrapped.nix
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
{ lib
|
||||||
|
, fetchurl
|
||||||
|
, stdenv
|
||||||
|
, autoPatchelfHook
|
||||||
|
, rocmPackages
|
||||||
|
, zlib
|
||||||
|
, libffi
|
||||||
|
, elfutils
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
# in newer nixpkgs the runtime is hsakmt
|
||||||
|
rocmRuntime =
|
||||||
|
if rocmPackages ? hsakmt then
|
||||||
|
rocmPackages.hsakmt
|
||||||
|
else
|
||||||
|
rocmPackages.rocm-runtime;
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "aocc-compiler";
|
||||||
|
version = "5.0.0";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://download.amd.com/developer/eula/aocc/aocc-5-0/aocc-compiler-5.0.0.tar";
|
||||||
|
sha256 = "sha256-lm+sLSx1np3m6WnBCtp6ezBsET9/HgfqN2gp7IY4Dao=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ autoPatchelfHook ];
|
||||||
|
buildInputs = [
|
||||||
|
elfutils
|
||||||
|
zlib
|
||||||
|
rocmRuntime
|
||||||
|
stdenv.cc.cc.lib
|
||||||
|
];
|
||||||
|
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||||
|
dontStrip = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -a . $out/
|
||||||
|
|
||||||
|
ln -s ${lib.getLib libffi}/lib/libffi.so $out/lib/libffi.so.6
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
inherit rocmRuntime;
|
||||||
|
isClang = true; # Needed for wrapCCWith
|
||||||
|
};
|
||||||
|
|
||||||
|
meta.mainProgram = "clang";
|
||||||
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
stdenv
|
stdenv
|
||||||
, lib
|
|
||||||
, cudatoolkit
|
, cudatoolkit
|
||||||
, cudaPackages
|
, cudaPackages
|
||||||
, autoAddDriverRunpath
|
, autoAddDriverRunpath
|
||||||
@@ -41,9 +40,4 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
'';
|
'';
|
||||||
installPhase = "touch $out";
|
installPhase = "touch $out";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
|
||||||
platforms = [ "x86_64-linux" ];
|
|
||||||
maintainers = with lib.maintainers.bsc; [ rarias ];
|
|
||||||
};
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
, automake
|
, automake
|
||||||
, libtool
|
, libtool
|
||||||
, mpi
|
, mpi
|
||||||
|
, rsync
|
||||||
, gfortran
|
, gfortran
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@@ -43,24 +44,13 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-infiniband=${rdma-core-all}"
|
"--with-infiniband=${rdma-core-all}"
|
||||||
"--with-mpi=yes" # fixes mpi detection when cross-compiling
|
"--with-mpi=${mpiAll}"
|
||||||
"--with-slurm"
|
"--with-slurm"
|
||||||
"CFLAGS=-fPIC"
|
"CFLAGS=-fPIC"
|
||||||
"CXXFLAGS=-fPIC"
|
"CXXFLAGS=-fPIC"
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
buildInputs = [ slurm mpiAll rdma-core-all autoconf automake libtool rsync gfortran ];
|
||||||
autoconf
|
|
||||||
automake
|
|
||||||
gfortran
|
|
||||||
libtool
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
slurm
|
|
||||||
mpiAll
|
|
||||||
rdma-core-all
|
|
||||||
];
|
|
||||||
|
|
||||||
hardeningDisable = [ "all" ];
|
hardeningDisable = [ "all" ];
|
||||||
|
|
||||||
@@ -70,6 +60,5 @@ stdenv.mkDerivation rec {
|
|||||||
maintainers = with lib.maintainers.bsc; [ rarias ];
|
maintainers = with lib.maintainers.bsc; [ rarias ];
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
license = lib.licenses.gpl3Plus;
|
license = lib.licenses.gpl3Plus;
|
||||||
cross = false; # infiniband detection does not work
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
stdenv
|
llvmPackages_latest
|
||||||
, llvmPackages_latest
|
|
||||||
, lib
|
, lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, cmake
|
, cmake
|
||||||
|
, bash
|
||||||
, python3
|
, python3
|
||||||
, perl
|
, perl
|
||||||
, which
|
, which
|
||||||
@@ -11,26 +11,24 @@
|
|||||||
, libffi
|
, libffi
|
||||||
, zlib
|
, zlib
|
||||||
, pkg-config
|
, pkg-config
|
||||||
|
, gcc # needed to set the rpath of libstdc++ for clang-tblgen
|
||||||
, enableDebug ? false
|
, enableDebug ? false
|
||||||
, useGit ? false
|
, useGit ? false
|
||||||
, gitUrl ? "ssh://git@bscpm04.bsc.es/llvm-ompss/llvm-mono.git"
|
, gitUrl ? "ssh://git@bscpm04.bsc.es/llvm-ompss/llvm-mono.git"
|
||||||
, gitBranch ? "master"
|
, gitBranch ? "master"
|
||||||
, gitCommit ? "872ba63f86edaefc9787984ef3fae9f2f94e0124" # github-release-2025.11
|
, gitCommit ? "880e2341c56bad1dc14e8c369fb3356bec19018e"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
llvmPackages = llvmPackages_latest;
|
stdenv = llvmPackages_latest.stdenv;
|
||||||
llvmStdenv = llvmPackages.stdenv;
|
|
||||||
# needed to set the rpath of libstdc++ for clang-tblgen
|
|
||||||
gcc = stdenv.cc;
|
|
||||||
|
|
||||||
release = rec {
|
release = rec {
|
||||||
version = "2025.11";
|
version = "2025.06";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "bsc-pm";
|
owner = "bsc-pm";
|
||||||
repo = "llvm";
|
repo = "llvm";
|
||||||
rev = "refs/tags/github-release-${version}";
|
rev = "refs/tags/github-release-${version}";
|
||||||
hash = "sha256-UgwMTUkM9Z87dDH205swZFBeFhrcbLAxginViG40pBM=";
|
hash = "sha256-ww9PpRmtz/M9IyLiZ8rAehx2UW4VpQt+svf4XfKBzKo=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -45,7 +43,7 @@ let
|
|||||||
|
|
||||||
source = if (useGit) then git else release;
|
source = if (useGit) then git else release;
|
||||||
|
|
||||||
in llvmStdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
pname = "clang-ompss2";
|
pname = "clang-ompss2";
|
||||||
inherit (source) src version;
|
inherit (source) src version;
|
||||||
|
|
||||||
@@ -62,12 +60,13 @@ in llvmStdenv.mkDerivation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
bash
|
||||||
cmake
|
cmake
|
||||||
elfutils
|
elfutils
|
||||||
llvmPackages.lld
|
llvmPackages_latest.lld
|
||||||
perl
|
|
||||||
pkg-config
|
pkg-config
|
||||||
python3
|
python3
|
||||||
|
perl
|
||||||
which
|
which
|
||||||
zlib
|
zlib
|
||||||
];
|
];
|
||||||
@@ -98,13 +97,8 @@ in llvmStdenv.mkDerivation {
|
|||||||
cd build
|
cd build
|
||||||
cmakeDir="../llvm"
|
cmakeDir="../llvm"
|
||||||
cmakeFlagsArray=(
|
cmakeFlagsArray=(
|
||||||
"-DLLVM_HOST_TRIPLE=${llvmStdenv.targetPlatform.config}"
|
"-DLLVM_HOST_TRIPLE=${stdenv.targetPlatform.config}"
|
||||||
'' + (if "${llvmStdenv.targetPlatform.config}" == "riscv64-unknown-linux-gnu" then ''
|
|
||||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=riscv64-unknown-linux-gnu"
|
|
||||||
"-DLLVM_TARGETS_TO_BUILD=RISCV"
|
|
||||||
'' else ''
|
|
||||||
"-DLLVM_TARGETS_TO_BUILD=host"
|
"-DLLVM_TARGETS_TO_BUILD=host"
|
||||||
'') + ''
|
|
||||||
"-DLLVM_BUILD_LLVM_DYLIB=ON"
|
"-DLLVM_BUILD_LLVM_DYLIB=ON"
|
||||||
"-DLLVM_LINK_LLVM_DYLIB=ON"
|
"-DLLVM_LINK_LLVM_DYLIB=ON"
|
||||||
# Required to run clang-ast-dump and clang-tblgen during build
|
# Required to run clang-ast-dump and clang-tblgen during build
|
||||||
@@ -113,8 +107,7 @@ in llvmStdenv.mkDerivation {
|
|||||||
"-DCMAKE_CXX_FLAGS_DEBUG=-g -ggnu-pubnames"
|
"-DCMAKE_CXX_FLAGS_DEBUG=-g -ggnu-pubnames"
|
||||||
"-DCMAKE_EXE_LINKER_FLAGS_DEBUG=-Wl,--gdb-index"
|
"-DCMAKE_EXE_LINKER_FLAGS_DEBUG=-Wl,--gdb-index"
|
||||||
"-DLLVM_LIT_ARGS=-sv --xunit-xml-output=xunit.xml"
|
"-DLLVM_LIT_ARGS=-sv --xunit-xml-output=xunit.xml"
|
||||||
"-DLLVM_ENABLE_PROJECTS=clang;lld"
|
"-DLLVM_ENABLE_PROJECTS=clang;compiler-rt;lld"
|
||||||
#"-DLLVM_ENABLE_PROJECTS=clang;compiler-rt;lld"
|
|
||||||
"-DLLVM_ENABLE_ASSERTIONS=ON"
|
"-DLLVM_ENABLE_ASSERTIONS=ON"
|
||||||
"-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON"
|
"-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON"
|
||||||
"-DCMAKE_INSTALL_BINDIR=bin"
|
"-DCMAKE_INSTALL_BINDIR=bin"
|
||||||
@@ -124,8 +117,8 @@ in llvmStdenv.mkDerivation {
|
|||||||
# install
|
# install
|
||||||
"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON"
|
"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON"
|
||||||
"-DCMAKE_INSTALL_RPATH=${zlib}/lib:${gcc.cc.lib}/lib"
|
"-DCMAKE_INSTALL_RPATH=${zlib}/lib:${gcc.cc.lib}/lib"
|
||||||
#"-DLLVM_APPEND_VC_REV=ON"
|
"-DLLVM_APPEND_VC_REV=ON"
|
||||||
#"-DLLVM_FORCE_VC_REVISION=${source.version}"
|
"-DLLVM_FORCE_VC_REVISION=${source.version}"
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|||||||
@@ -3,43 +3,25 @@
|
|||||||
, lib
|
, lib
|
||||||
, gcc
|
, gcc
|
||||||
, clangOmpss2Unwrapped
|
, clangOmpss2Unwrapped
|
||||||
|
, openmp ? null
|
||||||
, openmp
|
|
||||||
, useOpenmp ? false
|
|
||||||
, openmpv
|
|
||||||
, useOpenmpV ? false
|
|
||||||
, nanos6
|
|
||||||
, useNanos6 ? false
|
|
||||||
, nodes
|
|
||||||
, useNodes ? false
|
|
||||||
|
|
||||||
, wrapCCWith
|
, wrapCCWith
|
||||||
, llvmPackages_latest
|
, llvmPackages_latest
|
||||||
|
, ompss2rt ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
getSplice = target: pkg: if pkg ? "__spliced" && pkg.__spliced ? target then pkg.__spliced."${target}" else pkg;
|
usingNodesAndOmpv = (openmp.pname == "openmp-v" && ompss2rt.pname == "nodes");
|
||||||
#getSpliceTargetTarget = pkg: if pkg ? "__spliced" && pkg.__spliced ? "targetTarget" then pkg.__spliced.targetTarget else pkg;
|
sameNosv = openmp.nosv == ompss2rt.nosv;
|
||||||
getSpliceTargetTarget = getSplice "targetTarget";
|
|
||||||
omp = if useOpenmp then openmp else if useOpenmpV then openmpv else null;
|
|
||||||
ompss2rtUnspliced = if useNanos6 then nanos6 else if useNodes then nodes else null;
|
|
||||||
ompss2rt = getSpliceTargetTarget ompss2rtUnspliced;
|
|
||||||
usingNodesAndOmpv = (omp.pname == "openmp-v" && ompss2rt.pname == "nodes");
|
|
||||||
sameNosvUnspliced = omp.nosv == ompss2rtUnspliced.nosv;
|
|
||||||
sameNosvSpliced = (getSpliceTargetTarget omp.nosv) == ompss2rt.nosv;
|
|
||||||
in
|
in
|
||||||
|
|
||||||
assert assertMsg (usingNodesAndOmpv -> sameNosvUnspliced) "OpenMP-V and NODES must share the same nOS-V before splice";
|
assert assertMsg (usingNodesAndOmpv -> sameNosv) "OpenMP-V and NODES must share the same nOS-V";
|
||||||
assert assertMsg (usingNodesAndOmpv -> sameNosvSpliced) "OpenMP-V and NODES must share the same nOS-V after splice";
|
|
||||||
assert assertMsg (useOpenmp -> !useOpenmpV) "Either OpenMP or OpenMP-V may be enabled, but not both";
|
|
||||||
assert assertMsg (useNanos6 -> !useNodes) "Either Nanos6 or NODES may be enabled, but not both";
|
|
||||||
|
|
||||||
let
|
let
|
||||||
homevar = if ompss2rt.pname == "nanos6" then "NANOS6_HOME" else "NODES_HOME";
|
homevar = if ompss2rt.pname == "nanos6" then "NANOS6_HOME" else "NODES_HOME";
|
||||||
rtname = if ompss2rt.pname == "nanos6" then "libnanos6" else "libnodes";
|
rtname = if ompss2rt.pname == "nanos6" then "libnanos6" else "libnodes";
|
||||||
ompname = if omp.pname == "openmp-v" then "libompv" else "libomp";
|
ompname = if openmp.pname == "openmp-v" then "libompv" else "libomp";
|
||||||
|
|
||||||
|
|
||||||
# We need to replace the lld linker from bintools with our linker just built,
|
# We need to replace the lld linker from bintools with our linker just built,
|
||||||
@@ -55,13 +37,12 @@ let
|
|||||||
inherit gcc;
|
inherit gcc;
|
||||||
cc = clangOmpss2Unwrapped;
|
cc = clangOmpss2Unwrapped;
|
||||||
gccVersion = with versions; let v = gcc.version; in concatStringsSep "." [(major v) (minor v) (patch v)];
|
gccVersion = with versions; let v = gcc.version; in concatStringsSep "." [(major v) (minor v) (patch v)];
|
||||||
in (wrapCCWith {
|
in wrapCCWith {
|
||||||
inherit cc bintools;
|
inherit cc bintools;
|
||||||
# extraPackages adds packages to depsTargetTargetPropagated
|
# extraPackages adds packages to depsTargetTargetPropagated
|
||||||
extraPackages = optional (omp != null) omp;
|
extraPackages = optional (openmp != null) openmp;
|
||||||
extraBuildCommands = ''
|
extraBuildCommands = ''
|
||||||
echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
|
echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
|
||||||
#echo "-fuse-ld=lld" >> $out/nix-support/cc-cflags
|
|
||||||
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gccVersion}" >> $out/nix-support/cc-cflags
|
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gccVersion}" >> $out/nix-support/cc-cflags
|
||||||
echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gccVersion}" >> $out/nix-support/cc-ldflags
|
echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gccVersion}" >> $out/nix-support/cc-ldflags
|
||||||
echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags
|
echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags
|
||||||
@@ -75,17 +56,15 @@ in (wrapCCWith {
|
|||||||
|
|
||||||
echo "--gcc-toolchain=${gcc}" >> $out/nix-support/cc-cflags
|
echo "--gcc-toolchain=${gcc}" >> $out/nix-support/cc-cflags
|
||||||
|
|
||||||
wrap ${targetConfig}clang++ $wrapper $ccPath/clang++
|
wrap clang++ $wrapper $ccPath/clang++
|
||||||
wrap ${targetConfig}clang $wrapper $ccPath/clang
|
|
||||||
|
|
||||||
'' + optionalString (omp != null) ''
|
'' + optionalString (openmp != null) ''
|
||||||
echo "export OPENMP_RUNTIME=${ompname}" >> $out/nix-support/cc-wrapper-hook
|
echo "export OPENMP_RUNTIME=${ompname}" >> $out/nix-support/cc-wrapper-hook
|
||||||
'' + optionalString (ompss2rt != null) ''
|
'' + optionalString (ompss2rt != null) ''
|
||||||
echo "export OMPSS2_RUNTIME=${rtname}" >> $out/nix-support/cc-wrapper-hook
|
echo "export OMPSS2_RUNTIME=${rtname}" >> $out/nix-support/cc-wrapper-hook
|
||||||
echo "export ${homevar}=${ompss2rt}" >> $out/nix-support/cc-wrapper-hook
|
echo "export ${homevar}=${ompss2rt}" >> $out/nix-support/cc-wrapper-hook
|
||||||
'' + optionalString (ompss2rt != null && ompss2rt.pname == "nodes") ''
|
'' + optionalString (ompss2rt != null && ompss2rt.pname == "nodes") ''
|
||||||
echo "export NOSV_HOME=${ompss2rt}" >> $out/nix-support/cc-wrapper-hook
|
echo "export NOSV_HOME=${ompss2rt.nosv}" >> $out/nix-support/cc-wrapper-hook
|
||||||
'';
|
'';
|
||||||
}) // { inherit ompss2rt; }
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,9 +39,6 @@ stdenv.mkDerivation rec {
|
|||||||
perl
|
perl
|
||||||
pkg-config
|
pkg-config
|
||||||
python3
|
python3
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
] ++ lib.optionals enableNosv [
|
] ++ lib.optionals enableNosv [
|
||||||
nosv
|
nosv
|
||||||
] ++ lib.optionals enableOvni [
|
] ++ lib.optionals enableOvni [
|
||||||
|
|||||||
@@ -6,13 +6,6 @@
|
|||||||
, pmix
|
, pmix
|
||||||
, gfortran
|
, gfortran
|
||||||
, symlinkJoin
|
, symlinkJoin
|
||||||
# Disabled when cross-compiling
|
|
||||||
# To fix cross compilation, we should fill the values in:
|
|
||||||
# https://github.com/pmodels/mpich/blob/main/maint/fcrosscompile/cross_values.txt.in
|
|
||||||
# For each arch
|
|
||||||
, enableFortran ? stdenv.hostPlatform == stdenv.buildPlatform
|
|
||||||
, perl
|
|
||||||
, targetPackages
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@@ -22,13 +15,10 @@ let
|
|||||||
paths = [ pmix.dev pmix.out ];
|
paths = [ pmix.dev pmix.out ];
|
||||||
};
|
};
|
||||||
in mpich.overrideAttrs (old: {
|
in mpich.overrideAttrs (old: {
|
||||||
buildInputs = old.buildInputs ++ [
|
buildInput = old.buildInputs ++ [
|
||||||
libfabric
|
libfabric
|
||||||
pmixAll
|
pmixAll
|
||||||
];
|
];
|
||||||
nativeBuildInputs = old.nativeBuildInputs ++ [
|
|
||||||
perl
|
|
||||||
];
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-shared"
|
"--enable-shared"
|
||||||
"--enable-sharedlib"
|
"--enable-sharedlib"
|
||||||
@@ -41,21 +31,10 @@ in mpich.overrideAttrs (old: {
|
|||||||
] ++ lib.optionals (lib.versionAtLeast gfortran.version "10") [
|
] ++ lib.optionals (lib.versionAtLeast gfortran.version "10") [
|
||||||
"FFLAGS=-fallow-argument-mismatch" # https://github.com/pmodels/mpich/issues/4300
|
"FFLAGS=-fallow-argument-mismatch" # https://github.com/pmodels/mpich/issues/4300
|
||||||
"FCFLAGS=-fallow-argument-mismatch"
|
"FCFLAGS=-fallow-argument-mismatch"
|
||||||
] ++ lib.optionals (!enableFortran) [
|
|
||||||
"--disable-fortran"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
preFixup = ''
|
|
||||||
sed -i 's:^CC=.*:CC=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc:' $out/bin/mpicc
|
|
||||||
sed -i 's:^CXX=.*:CXX=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}c++:' $out/bin/mpicxx
|
|
||||||
'' + lib.optionalString enableFortran ''
|
|
||||||
sed -i 's:^FC=.*:FC=${targetPackages.gfortran or gfortran}/bin/${targetPackages.gfortran.targetPrefix or gfortran.targetPrefix}gfortran:' $out/bin/mpifort
|
|
||||||
'';
|
|
||||||
|
|
||||||
hardeningDisable = [ "all" ];
|
hardeningDisable = [ "all" ];
|
||||||
|
|
||||||
meta = old.meta // {
|
meta = old.meta // {
|
||||||
maintainers = old.meta.maintainers ++ (with lib.maintainers.bsc; [ rarias ]);
|
maintainers = old.meta.maintainers ++ (with lib.maintainers.bsc; [ rarias ]);
|
||||||
cross = true;
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
stdenv
|
|
||||||
, lib
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
pname = "nixgen";
|
|
||||||
version = "0.0.1";
|
|
||||||
src = ./nixgen;
|
|
||||||
dontUnpack = true;
|
|
||||||
phases = [ "installPhase" ];
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp -a $src $out/bin/nixgen
|
|
||||||
'';
|
|
||||||
meta = {
|
|
||||||
description = "Quickly generate flake.nix from command line";
|
|
||||||
maintainers = with lib.maintainers.bsc; [ rarias ];
|
|
||||||
platforms = lib.platforms.linux;
|
|
||||||
license = lib.licenses.gpl3Plus;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Copyright (c) 2025, Barcelona Supercomputing Center (BSC)
|
|
||||||
# SPDX-License-Identifier: GPL-3.0+
|
|
||||||
# Author: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
|
|
||||||
|
|
||||||
function usage() {
|
|
||||||
echo "USAGE: nixgen [-f] [package [...]] [-b package [...]]" >&2
|
|
||||||
echo " Generates a flake.nix file with the given packages." >&2
|
|
||||||
echo " After flake.nix is created, use 'nix develop' to enter the shell." >&2
|
|
||||||
echo "OPTIONS" >&2
|
|
||||||
echo " -f Overwrite existing flake.nix (default: no)." >&2
|
|
||||||
echo " packages... Add these packages to the shell." >&2
|
|
||||||
echo " -b packages... Add the dependencies needed to build these packages." >&2
|
|
||||||
echo "EXAMPLE" >&2
|
|
||||||
echo " $ nixgen ovni bigotes -b nosv tampi" >&2
|
|
||||||
echo " Adds the packages ovni and bigotes as well as all required dependencies" >&2
|
|
||||||
echo " to build nosv and tampi." >&2
|
|
||||||
echo "AUTHOR" >&2
|
|
||||||
echo " Rodrigo Arias Mallo <rodrigo.arias@bsc.es>" >&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
mode=package
|
|
||||||
packages=
|
|
||||||
inputsFrom=
|
|
||||||
force=
|
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]; then
|
|
||||||
usage
|
|
||||||
fi
|
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
|
||||||
case $1 in -b)
|
|
||||||
mode=build
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-f)
|
|
||||||
force=1
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-h)
|
|
||||||
usage
|
|
||||||
;;
|
|
||||||
-*|--*)
|
|
||||||
echo "error: unknown option $1" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if [ "$mode" == "package" ]; then
|
|
||||||
packages+="${packages:+ }$1"
|
|
||||||
else
|
|
||||||
inputsFrom+="${inputsFrom:+ }$1"
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ ! "$force" -a -e flake.nix ]; then
|
|
||||||
echo "error: flake.nix exists, force overwrite with -f" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat > flake.nix <<EOF
|
|
||||||
{
|
|
||||||
inputs.jungle.url = "git+https://jungle.bsc.es/git/rarias/jungle";
|
|
||||||
outputs = { self, jungle }:
|
|
||||||
let
|
|
||||||
nixpkgs = jungle.inputs.nixpkgs;
|
|
||||||
customOverlay = (final: prev: {
|
|
||||||
# Example overlay, for now empty
|
|
||||||
});
|
|
||||||
pkgs = import nixpkgs {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
overlays = [
|
|
||||||
# Apply jungle overlay to get our BSC custom packages
|
|
||||||
jungle.outputs.bscOverlay
|
|
||||||
# And on top apply our local changes to customize for cluster
|
|
||||||
customOverlay
|
|
||||||
];
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
devShells.x86_64-linux.default = pkgs.mkShell {
|
|
||||||
pname = "devshell";
|
|
||||||
# Include these packages in the shell
|
|
||||||
packages = with pkgs; [
|
|
||||||
$packages
|
|
||||||
];
|
|
||||||
# The dependencies needed to build these packages will be also included
|
|
||||||
inputsFrom = with pkgs; [
|
|
||||||
$inputsFrom
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
@@ -14,19 +14,19 @@
|
|||||||
, useGit ? false
|
, useGit ? false
|
||||||
, gitUrl ? "ssh://git@gitlab-internal.bsc.es/nos-v/nodes.git"
|
, gitUrl ? "ssh://git@gitlab-internal.bsc.es/nos-v/nodes.git"
|
||||||
, gitBranch ? "master"
|
, gitBranch ? "master"
|
||||||
, gitCommit ? "511489e71504a44381e0930562e7ac80ac69a848" # version-1.4
|
, gitCommit ? "6002ec9ae6eb876d962cc34366952a3b26599ba6"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
release = rec {
|
release = rec {
|
||||||
version = "1.4";
|
version = "1.3";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "bsc-pm";
|
owner = "bsc-pm";
|
||||||
repo = "nodes";
|
repo = "nodes";
|
||||||
rev = "version-${version}";
|
rev = "version-${version}";
|
||||||
hash = "sha256-+lR/R0l3fGZO3XG7whMorFW2y2YZ0ZFnLeOHyQYrAsQ=";
|
hash = "sha256-cFb9pxcjtkMmH0CsGgUO9LTdXDNh7MCqicgGWawLrsU=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -13,19 +13,19 @@
|
|||||||
, useGit ? false
|
, useGit ? false
|
||||||
, gitUrl ? "git@gitlab-internal.bsc.es:nos-v/nos-v.git"
|
, gitUrl ? "git@gitlab-internal.bsc.es:nos-v/nos-v.git"
|
||||||
, gitBranch ? "master"
|
, gitBranch ? "master"
|
||||||
, gitCommit ? "1108e4786b58e0feb9a16fa093010b763eb2f8e8" # version 4.0.0
|
, gitCommit ? "9f47063873c3aa9d6a47482a82c5000a8c813dd8"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
release = rec {
|
release = rec {
|
||||||
version = "4.0.0";
|
version = "3.2.0";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "bsc-pm";
|
owner = "bsc-pm";
|
||||||
repo = "nos-v";
|
repo = "nos-v";
|
||||||
rev = "${version}";
|
rev = "${version}";
|
||||||
hash = "sha256-llaq73bd/YxLVKNlMebnUHKa4z3sdcsuDUoVwUxNuw8=";
|
hash = "sha256-yaz92426EM8trdkBJlISmAoG9KJCDTvoAW/HKrasvOw=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -32,11 +32,6 @@ stdenv.mkDerivation rec {
|
|||||||
"CXX=mpicxx"
|
"CXX=mpicxx"
|
||||||
];
|
];
|
||||||
|
|
||||||
env = {
|
|
||||||
MPICH_CC="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc";
|
|
||||||
MPICH_CXX="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++";
|
|
||||||
};
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
for f in $(find $out -executable -type f); do
|
for f in $(find $out -executable -type f); do
|
||||||
@@ -49,6 +44,5 @@ stdenv.mkDerivation rec {
|
|||||||
homepage = "http://mvapich.cse.ohio-state.edu/benchmarks/";
|
homepage = "http://mvapich.cse.ohio-state.edu/benchmarks/";
|
||||||
maintainers = [ ];
|
maintainers = [ ];
|
||||||
platforms = lib.platforms.all;
|
platforms = lib.platforms.all;
|
||||||
cross = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
, useGit ? false
|
, useGit ? false
|
||||||
, gitBranch ? "master"
|
, gitBranch ? "master"
|
||||||
, gitUrl ? "ssh://git@bscpm04.bsc.es/rarias/ovni.git"
|
, gitUrl ? "ssh://git@bscpm04.bsc.es/rarias/ovni.git"
|
||||||
, gitCommit ? "06432668f346c8bdc1006fabc23e94ccb81b0d8b" # version 1.13.0
|
, gitCommit ? "e4f62382076f0cf0b1d08175cf57cc0bc51abc61"
|
||||||
, enableDebug ? false
|
, enableDebug ? false
|
||||||
# Only enable MPI if the build is native (fails on cross-compilation)
|
# Only enable MPI if the build is native (fails on cross-compilation)
|
||||||
, useMpi ? (stdenv.buildPlatform.canExecute stdenv.hostPlatform)
|
, useMpi ? (stdenv.buildPlatform.canExecute stdenv.hostPlatform)
|
||||||
@@ -15,13 +15,13 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
release = rec {
|
release = rec {
|
||||||
version = "1.13.0";
|
version = "1.12.0";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "bsc-pm";
|
owner = "bsc-pm";
|
||||||
repo = "ovni";
|
repo = "ovni";
|
||||||
rev = "${version}";
|
rev = "${version}";
|
||||||
hash = "sha256-0l2ryIyWNiZqeYdVlnj/WnQGS3xFCY4ICG8JedX424w=";
|
hash = "sha256-H04JvsVKrdqr3ON7JhU0g17jjlg/jzQ7eTfx9vUNd3E=";
|
||||||
} // { shortRev = "0643266"; };
|
} // { shortRev = "a73afcf"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
git = rec {
|
git = rec {
|
||||||
|
|||||||
@@ -35,6 +35,5 @@ stdenv.mkDerivation rec {
|
|||||||
maintainers = with lib.maintainers.bsc; [ rarias ];
|
maintainers = with lib.maintainers.bsc; [ rarias ];
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
cross = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,14 +5,23 @@
|
|||||||
, automake
|
, automake
|
||||||
, autoconf
|
, autoconf
|
||||||
, libtool
|
, libtool
|
||||||
|
, mpi
|
||||||
, autoreconfHook
|
, autoreconfHook
|
||||||
, gpi-2
|
, gpi-2
|
||||||
, boost
|
, boost
|
||||||
, numactl
|
, numactl
|
||||||
, rdma-core
|
, rdma-core
|
||||||
, gfortran
|
, gfortran
|
||||||
|
, symlinkJoin
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
mpiAll = symlinkJoin {
|
||||||
|
name = "mpi-all";
|
||||||
|
paths = [ mpi.all ];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "tagaspi";
|
pname = "tagaspi";
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
@@ -26,18 +35,16 @@ stdenv.mkDerivation rec {
|
|||||||
hash = "sha256-RGG/Re2uM293HduZfGzKUWioDtwnSYYdfeG9pVrX9EM=";
|
hash = "sha256-RGG/Re2uM293HduZfGzKUWioDtwnSYYdfeG9pVrX9EM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
buildInputs = [
|
||||||
autoreconfHook
|
autoreconfHook
|
||||||
automake
|
automake
|
||||||
autoconf
|
autoconf
|
||||||
libtool
|
libtool
|
||||||
gfortran
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
boost
|
boost
|
||||||
numactl
|
numactl
|
||||||
rdma-core
|
rdma-core
|
||||||
|
gfortran
|
||||||
|
mpiAll
|
||||||
];
|
];
|
||||||
|
|
||||||
dontDisableStatic = true;
|
dontDisableStatic = true;
|
||||||
@@ -56,6 +63,5 @@ stdenv.mkDerivation rec {
|
|||||||
maintainers = with lib.maintainers.bsc; [ rarias ];
|
maintainers = with lib.maintainers.bsc; [ rarias ];
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
license = lib.licenses.gpl3Plus;
|
license = lib.licenses.gpl3Plus;
|
||||||
cross = false; # gpi-2 cannot cross
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,6 +68,5 @@ in stdenv.mkDerivation {
|
|||||||
maintainers = with lib.maintainers.bsc; [ rarias ];
|
maintainers = with lib.maintainers.bsc; [ rarias ];
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
license = lib.licenses.gpl3Plus;
|
license = lib.licenses.gpl3Plus;
|
||||||
cross = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user