about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/science
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-12-01 19:00:09 +0100
committerAlyssa Ross <hi@alyssa.is>2023-12-01 19:00:09 +0100
commit9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d (patch)
tree4368f9e4cb2d5b93a956c085337e45cb70f1e331 /nixpkgs/pkgs/development/libraries/science
parenta9cbfb6941b47d6f50129e6e36927882392daed7 (diff)
parent2344fe1da14cb08b0c18743b207995f9b8597915 (diff)
downloadnixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.gz
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.bz2
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.lz
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.xz
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.zst
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.zip
Merge https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/science')
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/cfitsio/default.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/cudnn/releases.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/mkl/default.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/petsc/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/petsc/filter_mpi_warnings.patch24
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/tensorrt/extension.nix12
7 files changed, 64 insertions, 50 deletions
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/cfitsio/default.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/cfitsio/default.nix
index 426cbd3ff4ea..aa8c3f54e2fe 100644
--- a/nixpkgs/pkgs/development/libraries/science/astronomy/cfitsio/default.nix
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/cfitsio/default.nix
@@ -8,11 +8,11 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "cfitsio";
-  version = "4.3.0";
+  version = "4.3.1";
 
   src = fetchurl {
     url = "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-${finalAttrs.version}.tar.gz";
-    hash = "sha256-/a3AHQnPn1QlOALF7IfrEN5RzkEwQRQVrojDCUBiG4s=";
+    hash = "sha256-R6fI7gVoe+Hh2O7rlPuI8GD7882KTfUsy4jV6w9QYr4=";
   };
 
   patches = [
diff --git a/nixpkgs/pkgs/development/libraries/science/math/cudnn/releases.nix b/nixpkgs/pkgs/development/libraries/science/math/cudnn/releases.nix
index b82dd78178c0..1cca4d9d015d 100644
--- a/nixpkgs/pkgs/development/libraries/science/math/cudnn/releases.nix
+++ b/nixpkgs/pkgs/development/libraries/science/math/cudnn/releases.nix
@@ -169,17 +169,17 @@
     hash = "sha256-edd6dpx+cXWrx7XC7VxJQUjAYYqGQThyLIh/lcYjd3w=";
   }
   {
-    version = "8.9.1.23";
+    version = "8.9.6.50";
     minCudaVersion = "11.0";
     maxCudaVersion = "11.8";
-    url = "https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.9.1.23_cuda11-archive.tar.xz";
-    hash = "sha256-ptmIcmfihZDJ25XOZcvpamaN8DUjOLfTN+BTLe0zSFw=";
+    url = "https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.9.6.50_cuda11-archive.tar.xz";
+    hash = "sha256-oOLvVemfTNZH99HaqlqkUE/6M1ujAYbVwyiPL0ffBX4=";
   }
   {
-    version = "8.9.1.23";
+    version = "8.9.6.50";
     minCudaVersion = "12.0";
-    maxCudaVersion = "12.1";
-    url = "https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.9.1.23_cuda12-archive.tar.xz";
-    hash = "sha256-NRY8XFQr4MURc4sn4lI1GTy+7cXg4AbkSxzerxki6D4=";
+    maxCudaVersion = "12.2";
+    url = "https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.9.6.50_cuda12-archive.tar.xz";
+    hash = "sha256-FyIlnblSZbs4E0OKWhxuzZed6JrkU2YDkEBC4STTAtU=";
   }
 ]
diff --git a/nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix b/nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix
index 6b8588207dc3..1aaab46e1d1d 100644
--- a/nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix
+++ b/nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix
@@ -8,12 +8,7 @@
 { blas
 , cmake
 , cudaPackages
-  # FIXME: cuda being unfree means ofborg won't eval "magma".
-  # respecting config.cudaSupport -> false by default
-  # -> ofborg eval -> throws "no GPU targets specified".
-  # Probably should delete everything but "magma-cuda" and "magma-hip"
-  # from all-packages.nix
-, cudaSupport ? true
+, cudaSupport ? config.cudaSupport
 , fetchurl
 , gfortran
 , cudaCapabilities ? cudaPackages.cudaFlags.cudaCapabilities
@@ -25,8 +20,10 @@
 , magmaRelease
 , ninja
 , config
-, rocmSupport ? config.rocmSupport
-, static ? false
+  # At least one back-end has to be enabled,
+  # and we can't default to CUDA since it's unfree
+, rocmSupport ? !cudaSupport
+, static ? stdenv.hostPlatform.isStatic
 , stdenv
 , symlinkJoin
 }:
@@ -133,6 +130,8 @@ stdenv.mkDerivation {
 
   cmakeFlags = [
     "-DGPU_TARGET=${gpuTargetString}"
+    (lib.cmakeBool "MAGMA_ENABLE_CUDA" cudaSupport)
+    (lib.cmakeBool "MAGMA_ENABLE_HIP" rocmSupport)
   ] ++ lists.optionals static [
     "-DBUILD_SHARED_LIBS=OFF"
   ] ++ lists.optionals cudaSupport [
@@ -140,11 +139,9 @@ stdenv.mkDerivation {
     "-DMIN_ARCH=${minArch}" # Disarms magma's asserts
     "-DCMAKE_C_COMPILER=${backendStdenv.cc}/bin/cc"
     "-DCMAKE_CXX_COMPILER=${backendStdenv.cc}/bin/c++"
-    "-DMAGMA_ENABLE_CUDA=ON"
   ] ++ lists.optionals rocmSupport [
     "-DCMAKE_C_COMPILER=${rocmPackages.clr}/bin/hipcc"
     "-DCMAKE_CXX_COMPILER=${rocmPackages.clr}/bin/hipcc"
-    "-DMAGMA_ENABLE_HIP=ON"
   ];
 
   buildFlags = [
@@ -155,7 +152,7 @@ stdenv.mkDerivation {
   doCheck = false;
 
   passthru = {
-    inherit cudaPackages cudaSupport;
+    inherit cudaPackages cudaSupport rocmSupport gpuTargets;
   };
 
   meta = with lib; {
@@ -164,7 +161,11 @@ stdenv.mkDerivation {
     homepage = "http://icl.cs.utk.edu/magma/index.html";
     platforms = platforms.unix;
     maintainers = with maintainers; [ connorbaker ];
-    # CUDA and ROCm are mutually exclusive
-    broken = cudaSupport && rocmSupport || cudaSupport && strings.versionOlder cudaVersion "9";
+
+    # Cf. https://bitbucket.org/icl/magma/src/fcfe5aa61c1a4c664b36a73ebabbdbab82765e9f/CMakeLists.txt#lines-20
+    broken =
+      !(cudaSupport || rocmSupport) # At least one back-end enabled
+      || (cudaSupport && rocmSupport) # Mutually exclusive
+      || (cudaSupport && strings.versionOlder cudaVersion "9");
   };
 }
diff --git a/nixpkgs/pkgs/development/libraries/science/math/mkl/default.nix b/nixpkgs/pkgs/development/libraries/science/math/mkl/default.nix
index 585f4c3a14e3..f4b168b37fe2 100644
--- a/nixpkgs/pkgs/development/libraries/science/math/mkl/default.nix
+++ b/nixpkgs/pkgs/development/libraries/science/math/mkl/default.nix
@@ -34,32 +34,32 @@ let
 
   oneapi-mkl = fetchurl {
     url = "https://yum.repos.intel.com/oneapi/intel-oneapi-mkl-${mklVersion}-${mklVersion}-${rel}.x86_64.rpm";
-    hash = "sha256-BeI5zB0rrE6C21dezNc7/WSKmTWpjsZbpg0/y0Y87VQ=";
+    hash = "sha256-PGLPNnR+11AmmaNxldeze/l2Kw/4+mfjB+RqsPhP6oM=";
   };
 
   oneapi-mkl-common = fetchurl {
     url = "https://yum.repos.intel.com/oneapi/intel-oneapi-mkl-common-${mklVersion}-${mklVersion}-${rel}.noarch.rpm";
-    hash = "sha256-NjIqTeFppwjXFlPYHPHfZa/bWBiHJru3atC4fIMXN0w=";
+    hash = "sha256-wztTE2R/IdG6ujGf7KFocpRmXzlZSnEKopTBOlPPlBw=";
   };
 
   oneapi-mkl-common-devel = fetchurl {
     url = "https://yum.repos.intel.com/oneapi/intel-oneapi-mkl-common-devel-${mklVersion}-${mklVersion}-${rel}.noarch.rpm";
-    hash = "sha256-GX19dlvBWRgwSOCmWcEOrnbmp4S2j0448fWpx+iPVWw=";
+    hash = "sha256-MWa8mpyFM4zgDLup+EzFRM+N2Oxf0o6FBBRM8mAanbI=";
   };
 
   oneapi-mkl-devel = fetchurl {
     url = "https://yum.repos.intel.com/oneapi/intel-oneapi-mkl-devel-${mklVersion}-${mklVersion}-${rel}.x86_64.rpm";
-    hash = "sha256-F4XxtSPAjNaShEL/l44jJK+JdOOkYI19X/njRB6FkNw=";
+    hash = "sha256-Arq5kXktI92031XqfV0pkzQCHaFsTRKX05iOA/fPNOs=";
   };
 
   oneapi-openmp = fetchurl {
     url = "https://yum.repos.intel.com/oneapi/intel-oneapi-openmp-${mklVersion}-${mklVersion}-${openmpRel}.x86_64.rpm";
-    hash = "sha256-1SlkI01DxFvwGPBJ73phs86ka0SmCrniwiXQ9DJwIXw=";
+    hash = "sha256-cyBD3P4AEvyreP4pP3BE+yyDB+ptblOQ9GYI8ysGsIM=";
   };
 
   oneapi-tbb = fetchurl {
     url = "https://yum.repos.intel.com/oneapi/intel-oneapi-tbb-${tbbVersion}-${tbbVersion}-${tbbRel}.x86_64.rpm";
-    hash = "sha256-wIktdf1p1SS1KrnUlc8LPkm0r9dhZE6cQNr4ZKTWI6A=";
+    hash = "sha256-pzJpQdiYVpcKDShePak2I0uEh7u08vJgX7OBF5p5yAM=";
   };
 
 in stdenvNoCC.mkDerivation ({
diff --git a/nixpkgs/pkgs/development/libraries/science/math/petsc/default.nix b/nixpkgs/pkgs/development/libraries/science/math/petsc/default.nix
index 6589fc0b9b64..c07250c660a3 100644
--- a/nixpkgs/pkgs/development/libraries/science/math/petsc/default.nix
+++ b/nixpkgs/pkgs/development/libraries/science/math/petsc/default.nix
@@ -6,11 +6,15 @@
 , python3
 , blas
 , lapack
+, mpiSupport ? true
 , mpi                   # generic mpi dependency
 , openssh               # required for openmpi tests
-, petsc-withp4est ? true
+, petsc-withp4est ? false
 , p4est
 , zlib                  # propagated by p4est but required by petsc
+, petsc-optimized ? false
+, petsc-scalar-type ? "real"
+, petsc-precision ? "double"
 }:
 
 # This version of PETSc does not support a non-MPI p4est build
@@ -18,14 +22,14 @@ assert petsc-withp4est -> p4est.mpiSupport;
 
 stdenv.mkDerivation rec {
   pname = "petsc";
-  version = "3.19.2";
+  version = "3.19.4";
 
   src = fetchurl {
     url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-${version}.tar.gz";
-    sha256 = "sha256-EU82P3ebsWg5slwOcPiwrg2UfVDnL3xs3csRsAEHmxY=";
+    sha256 = "sha256-fJQbcb5Sw7dkIU5JLfYBCdEvl/fYVMl6RN8MTZWLOQY=";
   };
 
-  mpiSupport = !withp4est || p4est.mpiSupport;
+  inherit mpiSupport;
   withp4est = petsc-withp4est;
 
   strictDeps = true;
@@ -49,7 +53,6 @@ stdenv.mkDerivation rec {
   patches = [ ./filter_mpi_warnings.patch ];
 
   preConfigure = ''
-    export FC="${gfortran}/bin/gfortran" F77="${gfortran}/bin/gfortran"
     patchShebangs ./lib/petsc/bin
     configureFlagsArray=(
       $configureFlagsArray
@@ -68,6 +71,14 @@ stdenv.mkDerivation rec {
       ''}
       "--with-blas=1"
       "--with-lapack=1"
+      "--with-scalar-type=${petsc-scalar-type}"
+      "--with-precision=${petsc-precision}"
+      ${lib.optionalString petsc-optimized ''
+        "--with-debugging=0"
+        COPTFLAGS='-g -O3'
+        FOPTFLAGS='-g -O3'
+        CXXOPTFLAGS='-g -O3'
+      ''}
     )
   '';
 
diff --git a/nixpkgs/pkgs/development/libraries/science/math/petsc/filter_mpi_warnings.patch b/nixpkgs/pkgs/development/libraries/science/math/petsc/filter_mpi_warnings.patch
index 590528446f61..6a3c7bee051e 100644
--- a/nixpkgs/pkgs/development/libraries/science/math/petsc/filter_mpi_warnings.patch
+++ b/nixpkgs/pkgs/development/libraries/science/math/petsc/filter_mpi_warnings.patch
@@ -6,7 +6,7 @@ index 168febb34b6..71068469066 100644
  #  these tests are used by the makefile in PETSC_DIR for basic tests of the install and should not be removed
  testex5f: ex5f.PETSc
  	-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex5f -snes_rtol 1e-4 > ex5f_1.tmp 2>&1; \
-+        sed -i '/\[hwloc\/linux\]/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex5f_1.tmp; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex5f_1.tmp; \
          if (${DIFF} output/ex5f_1.testout ex5f_1.tmp > /dev/null 2>&1) then \
            echo "Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process"; \
          else \
@@ -14,7 +14,7 @@ index 168febb34b6..71068469066 100644
          ${MAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ex5f.rm;
  testex19: ex19.PETSc
  	-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres  > ex19_1.tmp 2>&1; \
-+        sed -i '/\[hwloc\/linux\]/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
          if (${DIFF} output/ex19_1.testout ex19_1.tmp > /dev/null 2>&1) then \
            echo "C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process"; \
          else \
@@ -22,7 +22,7 @@ index 168febb34b6..71068469066 100644
          ${RM} -f ex19_1.tmp;
  testex19_mpi:
  	-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres  > ex19_1.tmp 2>&1; \
-+        sed -i '/\[hwloc\/linux\]/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
          if (${DIFF} output/ex19_1.testout ex19_1.tmp > /dev/null 2>&1) then \
            echo "C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes"; \
          else \
@@ -30,7 +30,7 @@ index 168febb34b6..71068469066 100644
  #use unpreconditioned norm because HYPRE device installations use different AMG parameters
  runex19_hypre:
  	-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \
-+        sed -i '/\[hwloc\/linux\]/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
            if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \
              echo "C/C++ example src/snes/tutorials/ex19 run successfully with hypre"; \
            else  \
@@ -38,7 +38,7 @@ index 168febb34b6..71068469066 100644
            ${RM} -f ex19_1.tmp
  runex19_hypre_cuda:
  	-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -dm_vec_type cuda -dm_mat_type aijcusparse -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \
-+        sed -i '/\[hwloc\/linux\]/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
  	   if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \
             echo "C/C++ example src/snes/tutorials/ex19 run successfully with hypre/cuda"; \
             else  \
@@ -46,7 +46,7 @@ index 168febb34b6..71068469066 100644
  	   ${RM} -f ex19_1.tmp
  runex19_hypre_hip:
  	-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -dm_vec_type hip -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \
-+        sed -i '/\[hwloc\/linux\]/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
  	   if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \
             echo "C/C++ example src/snes/tutorials/ex19 run successfully with hypre/hip"; \
             else \
@@ -54,7 +54,7 @@ index 168febb34b6..71068469066 100644
  	   ${RM} -f ex19_1.tmp
  runex19_cuda:
  	-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -snes_monitor -dm_mat_type seqaijcusparse -dm_vec_type seqcuda -pc_type gamg -pc_gamg_esteig_ksp_max_it 10 -ksp_monitor -mg_levels_ksp_max_it 3  > ex19_1.tmp 2>&1; \
-+        sed -i '/\[hwloc\/linux\]/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
  	   if (${DIFF} output/ex19_cuda_1.out ex19_1.tmp) then \
             echo "C/C++ example src/snes/tutorials/ex19 run successfully with cuda"; \
             else  \
@@ -62,7 +62,7 @@ index 168febb34b6..71068469066 100644
  	   ${RM} -f ex19_1.tmp
  runex19_ml:
  	-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -pc_type ml > ex19_1.tmp 2>&1; \
-+        sed -i '/\[hwloc\/linux\]/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
  	   if (${DIFF} output/ex19_ml.out ex19_1.tmp) then  \
             echo "C/C++ example src/snes/tutorials/ex19 run successfully with ml"; \
             else \
@@ -70,7 +70,7 @@ index 168febb34b6..71068469066 100644
             ${RM} -f ex19_1.tmp
  runex19_fieldsplit_mumps:
  	-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -pc_type fieldsplit -pc_fieldsplit_block_size 4 -pc_fieldsplit_type SCHUR -pc_fieldsplit_0_fields 0,1,2 -pc_fieldsplit_1_fields 3 -fieldsplit_0_pc_type lu -fieldsplit_1_pc_type lu -snes_monitor_short -ksp_monitor_short  -fieldsplit_0_pc_factor_mat_solver_type mumps -fieldsplit_1_pc_factor_mat_solver_type mumps > ex19_6.tmp 2>&1; \
-+        sed -i '/\[hwloc\/linux\]/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_6.tmp; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_6.tmp; \
  	   if (${DIFF} output/ex19_fieldsplit_5.out ex19_6.tmp) then  \
             echo "C/C++ example src/snes/tutorials/ex19 run successfully with mumps"; \
             else  \
@@ -78,7 +78,7 @@ index 168febb34b6..71068469066 100644
             ${RM} -f ex19_6.tmp
  runex19_superlu_dist:
  	-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_grid_x 20 -da_grid_y 20 -pc_type lu -pc_factor_mat_solver_type superlu_dist > ex19.tmp 2>&1; \
-+        sed -i '/\[hwloc\/linux\]/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19.tmp; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19.tmp; \
  	   if (${DIFF} output/ex19_superlu.out ex19.tmp) then \
             echo "C/C++ example src/snes/tutorials/ex19 run successfully with superlu_dist"; \
             else  \
@@ -86,7 +86,7 @@ index 168febb34b6..71068469066 100644
  	   ${RM} -f ex19.tmp
  runex19_suitesparse:
  	-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -pc_type lu -pc_factor_mat_solver_type umfpack > ex19_1.tmp 2>&1; \
-+        sed -i '/\[hwloc\/linux\]/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
  	   if (${DIFF} output/ex19_suitesparse.out ex19_1.tmp) then \
             echo "C/C++ example src/snes/tutorials/ex19 run successfully with suitesparse"; \
             else \
@@ -94,7 +94,7 @@ index 168febb34b6..71068469066 100644
  	   ${RM} -f ex19_1.tmp
  runex3k_kokkos: ex3k.PETSc
  	-@OMP_PROC_BIND=false ${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex3k -view_initial -dm_vec_type kokkos -dm_mat_type aijkokkos -use_gpu_aware_mpi 0 -snes_monitor > ex3k_1.tmp 2>&1 ;\
-+        sed -i '/\[hwloc\/linux\]/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex3k_1.tmp; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex3k_1.tmp; \
  	if (${DIFF} output/ex3k_1.out ex3k_1.tmp) then \
            echo "C/C++ example src/snes/tutorials/ex3k run successfully with kokkos-kernels"; \
          else \
diff --git a/nixpkgs/pkgs/development/libraries/science/math/tensorrt/extension.nix b/nixpkgs/pkgs/development/libraries/science/math/tensorrt/extension.nix
index c6596dbaacde..b4018c6cc284 100644
--- a/nixpkgs/pkgs/development/libraries/science/math/tensorrt/extension.nix
+++ b/nixpkgs/pkgs/development/libraries/science/math/tensorrt/extension.nix
@@ -38,13 +38,13 @@ final: prev: let
     + ".tar.gz";
 
   tensorRTVersions = {
-    "8.6.0" = [
+    "8.6.1" = [
       rec {
-        fileVersionCuda = "11.8";
-        fullVersion = "8.6.0.12";
-        sha256 = "sha256-wXMqEJPFerefoLaH8GG+Np5EnJwXeStmDzZj7Nj6e2M=";
+        fileVersionCuda = "12.0";
+        fullVersion = "8.6.1.6";
+        sha256 = "sha256-D4FXpfxTKZQ7M4uJNZE3M1CvqQyoEjnNrddYDNHrolQ=";
         tarball = tarballURL { inherit fileVersionCuda fullVersion; };
-        supportedCudaVersions = [ "11.0" "11.1" "11.2" "11.3" "11.4" "11.5" "11.6" "11.7" "11.8" ];
+        supportedCudaVersions = [ "12.0" "12.1" ];
       }
     ];
     "8.5.3" = [
@@ -133,6 +133,8 @@ final: prev: let
     "11.6" = "8.4.0";
     "11.7" = "8.5.3";
     "11.8" = "8.5.3";
+    "12.0" = "8.6.1";
+    "12.1" = "8.6.1";
   }.${cudaVersion} or "8.4.0";
 
 in tensorRTPackages