forked from rarias/jungle
Compare commits
19 Commits
master
...
fix/cross/
| Author | SHA1 | Date | |
|---|---|---|---|
| 3a75fc3c5a | |||
| 1cbedcb2ad | |||
| c9cc7bd060 | |||
| 9ac0e697d1 | |||
| 4f643f4603 | |||
| 996c99d5eb | |||
| f9c6f7d751 | |||
| 00a1133019 | |||
| 859eebda98 | |||
| c2a201b085 | |||
| f921f0a4bd | |||
| aa16bfc0bc | |||
|
a173af654f
|
|||
|
2fff7e4a7b
|
|||
|
a761b73336
|
|||
|
86eb796771
|
|||
|
08633435cf
|
|||
|
39d64456a4
|
|||
|
410040a4a0
|
@@ -57,6 +57,18 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
|||||||
@@ -139,6 +139,7 @@
|
|||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKGt0ESYxekBiHJQowmKpfdouw0hVm3N7tUMtAaeLejK vincent@varch"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKGt0ESYxekBiHJQowmKpfdouw0hVm3N7tUMtAaeLejK vincent@varch"
|
||||||
];
|
];
|
||||||
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
pmartin1 = {
|
pmartin1 = {
|
||||||
|
|||||||
14
overlay.nix
14
overlay.nix
@@ -12,9 +12,9 @@ let
|
|||||||
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 { ompss2rt = final.nanos6; };
|
clangOmpss2Nanos6 = callPackage ./pkgs/llvm-ompss2/default.nix { useNanos6 = true; };
|
||||||
clangOmpss2Nodes = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmp; };
|
clangOmpss2Nodes = callPackage ./pkgs/llvm-ompss2/default.nix { useNodes = true; useOpenmp = true; };
|
||||||
clangOmpss2NodesOmpv = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmpv; };
|
clangOmpss2NodesOmpv = callPackage ./pkgs/llvm-ompss2/default.nix { useNodes = true; useOpenmpV = true; };
|
||||||
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
|
||||||
@@ -54,10 +54,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.clangOmpss2; allowedRequisites = null; };
|
stdenvClangOmpss2 = final.stdenv.override { cc = final.buildPackages.clangOmpss2; allowedRequisites = null; };
|
||||||
stdenvClangOmpss2Nanos6 = final.stdenv.override { cc = final.clangOmpss2Nanos6; allowedRequisites = null; };
|
stdenvClangOmpss2Nanos6 = final.stdenv.override { cc = final.buildPackages.clangOmpss2Nanos6; allowedRequisites = null; };
|
||||||
stdenvClangOmpss2Nodes = final.stdenv.override { cc = final.clangOmpss2Nodes; allowedRequisites = null; };
|
stdenvClangOmpss2Nodes = final.stdenv.override { cc = final.buildPackages.clangOmpss2Nodes; allowedRequisites = null; };
|
||||||
stdenvClangOmpss2NodesOmpv = final.stdenv.override { cc = final.clangOmpss2NodesOmpv; allowedRequisites = null; };
|
stdenvClangOmpss2NodesOmpv = final.stdenv.override { cc = final.buildPackages.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 { };
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
, automake
|
, automake
|
||||||
, libtool
|
, libtool
|
||||||
, mpi
|
, mpi
|
||||||
, rsync
|
|
||||||
, gfortran
|
, gfortran
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@@ -44,13 +43,24 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-infiniband=${rdma-core-all}"
|
"--with-infiniband=${rdma-core-all}"
|
||||||
"--with-mpi=${mpiAll}"
|
"--with-mpi=yes" # fixes mpi detection when cross-compiling
|
||||||
"--with-slurm"
|
"--with-slurm"
|
||||||
"CFLAGS=-fPIC"
|
"CFLAGS=-fPIC"
|
||||||
"CXXFLAGS=-fPIC"
|
"CXXFLAGS=-fPIC"
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [ slurm mpiAll rdma-core-all autoconf automake libtool rsync gfortran ];
|
nativeBuildInputs = [
|
||||||
|
autoconf
|
||||||
|
automake
|
||||||
|
gfortran
|
||||||
|
libtool
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
slurm
|
||||||
|
mpiAll
|
||||||
|
rdma-core-all
|
||||||
|
];
|
||||||
|
|
||||||
hardeningDisable = [ "all" ];
|
hardeningDisable = [ "all" ];
|
||||||
|
|
||||||
@@ -60,5 +70,6 @@ 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 @@
|
|||||||
{
|
{
|
||||||
llvmPackages_latest
|
stdenv
|
||||||
|
, llvmPackages_latest
|
||||||
, lib
|
, lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, cmake
|
, cmake
|
||||||
, bash
|
|
||||||
, python3
|
, python3
|
||||||
, perl
|
, perl
|
||||||
, which
|
, which
|
||||||
@@ -11,7 +11,6 @@
|
|||||||
, 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"
|
||||||
@@ -20,7 +19,10 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
stdenv = llvmPackages_latest.stdenv;
|
llvmPackages = llvmPackages_latest;
|
||||||
|
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.11";
|
||||||
@@ -43,7 +45,7 @@ let
|
|||||||
|
|
||||||
source = if (useGit) then git else release;
|
source = if (useGit) then git else release;
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
in llvmStdenv.mkDerivation {
|
||||||
pname = "clang-ompss2";
|
pname = "clang-ompss2";
|
||||||
inherit (source) src version;
|
inherit (source) src version;
|
||||||
|
|
||||||
@@ -60,13 +62,12 @@ in stdenv.mkDerivation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
bash
|
|
||||||
cmake
|
cmake
|
||||||
elfutils
|
elfutils
|
||||||
llvmPackages_latest.lld
|
llvmPackages.lld
|
||||||
|
perl
|
||||||
pkg-config
|
pkg-config
|
||||||
python3
|
python3
|
||||||
perl
|
|
||||||
which
|
which
|
||||||
zlib
|
zlib
|
||||||
];
|
];
|
||||||
@@ -97,8 +98,13 @@ in stdenv.mkDerivation {
|
|||||||
cd build
|
cd build
|
||||||
cmakeDir="../llvm"
|
cmakeDir="../llvm"
|
||||||
cmakeFlagsArray=(
|
cmakeFlagsArray=(
|
||||||
"-DLLVM_HOST_TRIPLE=${stdenv.targetPlatform.config}"
|
"-DLLVM_HOST_TRIPLE=${llvmStdenv.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
|
||||||
@@ -107,7 +113,8 @@ in stdenv.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;compiler-rt;lld"
|
"-DLLVM_ENABLE_PROJECTS=clang;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"
|
||||||
@@ -117,8 +124,8 @@ in stdenv.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,25 +3,43 @@
|
|||||||
, 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
|
||||||
usingNodesAndOmpv = (openmp.pname == "openmp-v" && ompss2rt.pname == "nodes");
|
getSplice = target: pkg: if pkg ? "__spliced" && pkg.__spliced ? target then pkg.__spliced."${target}" else pkg;
|
||||||
sameNosv = openmp.nosv == ompss2rt.nosv;
|
#getSpliceTargetTarget = pkg: if pkg ? "__spliced" && pkg.__spliced ? "targetTarget" then pkg.__spliced.targetTarget else pkg;
|
||||||
|
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 -> sameNosv) "OpenMP-V and NODES must share the same nOS-V";
|
assert assertMsg (usingNodesAndOmpv -> sameNosvUnspliced) "OpenMP-V and NODES must share the same nOS-V before splice";
|
||||||
|
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 openmp.pname == "openmp-v" then "libompv" else "libomp";
|
ompname = if omp.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,
|
||||||
@@ -37,12 +55,13 @@ 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 (openmp != null) openmp;
|
extraPackages = optional (omp != null) omp;
|
||||||
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
|
||||||
@@ -56,15 +75,17 @@ in wrapCCWith {
|
|||||||
|
|
||||||
echo "--gcc-toolchain=${gcc}" >> $out/nix-support/cc-cflags
|
echo "--gcc-toolchain=${gcc}" >> $out/nix-support/cc-cflags
|
||||||
|
|
||||||
wrap clang++ $wrapper $ccPath/clang++
|
wrap ${targetConfig}clang++ $wrapper $ccPath/clang++
|
||||||
|
wrap ${targetConfig}clang $wrapper $ccPath/clang
|
||||||
|
|
||||||
'' + optionalString (openmp != null) ''
|
'' + optionalString (omp != 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.nosv}" >> $out/nix-support/cc-wrapper-hook
|
echo "export NOSV_HOME=${ompss2rt}" >> $out/nix-support/cc-wrapper-hook
|
||||||
'';
|
'';
|
||||||
}
|
}) // { inherit ompss2rt; }
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,9 @@ 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,6 +6,13 @@
|
|||||||
, 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
|
||||||
@@ -15,10 +22,13 @@ let
|
|||||||
paths = [ pmix.dev pmix.out ];
|
paths = [ pmix.dev pmix.out ];
|
||||||
};
|
};
|
||||||
in mpich.overrideAttrs (old: {
|
in mpich.overrideAttrs (old: {
|
||||||
buildInput = old.buildInputs ++ [
|
buildInputs = old.buildInputs ++ [
|
||||||
libfabric
|
libfabric
|
||||||
pmixAll
|
pmixAll
|
||||||
];
|
];
|
||||||
|
nativeBuildInputs = old.nativeBuildInputs ++ [
|
||||||
|
perl
|
||||||
|
];
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-shared"
|
"--enable-shared"
|
||||||
"--enable-sharedlib"
|
"--enable-sharedlib"
|
||||||
@@ -31,10 +41,21 @@ 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;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -32,6 +32,11 @@ 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
|
||||||
@@ -44,5 +49,6 @@ 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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,5 +35,6 @@ 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,23 +5,14 @@
|
|||||||
, 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;
|
||||||
@@ -35,16 +26,18 @@ stdenv.mkDerivation rec {
|
|||||||
hash = "sha256-RGG/Re2uM293HduZfGzKUWioDtwnSYYdfeG9pVrX9EM=";
|
hash = "sha256-RGG/Re2uM293HduZfGzKUWioDtwnSYYdfeG9pVrX9EM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
nativeBuildInputs = [
|
||||||
autoreconfHook
|
autoreconfHook
|
||||||
automake
|
automake
|
||||||
autoconf
|
autoconf
|
||||||
libtool
|
libtool
|
||||||
|
gfortran
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
boost
|
boost
|
||||||
numactl
|
numactl
|
||||||
rdma-core
|
rdma-core
|
||||||
gfortran
|
|
||||||
mpiAll
|
|
||||||
];
|
];
|
||||||
|
|
||||||
dontDisableStatic = true;
|
dontDisableStatic = true;
|
||||||
@@ -63,5 +56,6 @@ 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,5 +68,6 @@ 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