mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
debug
This commit is contained in:
@@ -123,7 +123,7 @@ inputs: rec
|
||||
# wrapped binaries
|
||||
gcc gfortran glibc glibc.dev binutils iconv
|
||||
# not wrapped binaries
|
||||
gcc.cc gcc.cc.lib gfortran.cc binutils.bintools
|
||||
gcc.cc gcc.cc.lib gfortran.cc gfortran.cc.lib binutils.bintools
|
||||
];
|
||||
};
|
||||
highfive = inputs.pkgs.callPackage ./highfive.nix { src = inputs.topInputs.highfive; };
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
{
|
||||
src, stdenv, autoPatchelfHook, wrapCCWith, writeText, addAttrsToDerivation, config, overrideCC, symlinkJoin,
|
||||
gcc, glibc_multi, libz, zstd, libxml2, flock, numactl, ncurses, dpkg, cudaPackages, openssl, gmp, openssl_1_1
|
||||
gcc, glibc_multi, libz, zstd, libxml2, flock, numactl, ncurses, dpkg, cudaPackages, openssl, gmp, openssl_1_1,
|
||||
libxcrypt-legacy, libfabric, rdma-core
|
||||
}:
|
||||
let
|
||||
nvhpc = stdenv.mkDerivation
|
||||
{
|
||||
pname = "nvhpc";
|
||||
inherit (src) src version;
|
||||
buildInputs = [ libz libxml2 zstd numactl ncurses openssl gmp openssl_1_1 ];
|
||||
buildInputs = [ libz libxml2 zstd numactl ncurses openssl gmp openssl_1_1 libxcrypt-legacy libfabric rdma-core ];
|
||||
nativeBuildInputs = [ autoPatchelfHook dpkg flock ];
|
||||
langFortran = true;
|
||||
dontConfigure = true;
|
||||
@@ -18,16 +19,25 @@ let
|
||||
# install component
|
||||
# NVHPC use very complex mechanism to identify the location of compilers, headers, etc.
|
||||
# we should keep the original structure
|
||||
mkdir -p $out/opt/nvidia/hpc_sdk/Linux_x86_64/${src.version}/
|
||||
cp -r opt/nvidia/hpc_sdk/Linux_x86_64/${src.version}/{compilers,cuda} \
|
||||
$out/opt/nvidia/hpc_sdk/Linux_x86_64/${src.version}
|
||||
mkdir -p $out
|
||||
cp -r opt $out
|
||||
rm -rf $out/opt/nvidia/hpc_sdk/Linux_x86_64/${src.version}/{examples,profilers,comm_libs/${src.cudaVersion}/hpcx/hpcx-*/ompi/tests,cuda/12.6/bin/cuda-gdb-python3.10-tui}
|
||||
|
||||
mkdir -p $out/nix-support
|
||||
> $out/nix-support/setup-hook << EOF
|
||||
addNvhpcEnv() {
|
||||
addToSearchPath PATH $out/opt/nvidia/hpc_sdk/Linux_x86_64/${src.version}/compilers/bin
|
||||
addToSearchPath PATH $out/opt/nvidia/hpc_sdk/Linux_x86_64/${src.version}/comm_libs/mpi/bin
|
||||
}
|
||||
addEnvHooks "$hostOffset" addHarepath
|
||||
EOF
|
||||
'';
|
||||
autoPatchelfIgnoreMissingDeps = [ "libgdrapi.so.2" ];
|
||||
postFixup =
|
||||
''
|
||||
sed -i '/makelocalrc executed by/d' $out/opt/nvidia/hpc_sdk/Linux_x86_64/${src.version}/compilers/bin/makelocalrc
|
||||
$out/opt/nvidia/hpc_sdk/Linux_x86_64/${src.version}/compilers/bin/makelocalrc \
|
||||
$out/opt/nvidia/hpc_sdk/Linux_x86_64/${src.version}/compilers/bin -x
|
||||
ln -s $out/opt/nvidia/hpc_sdk/Linux_x86_64/${src.version}/compilers/bin $out
|
||||
'';
|
||||
};
|
||||
# fix /usr/lib/crt1.o impure path used in link
|
||||
|
||||
Reference in New Issue
Block a user