Loading pkgs/by-name/su/superlu_dist/package.nix +26 −9 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ lib, stdenv, fetchFromGitHub, fetchurl, llvmPackages, cmake, gfortran, blas, Loading @@ -10,7 +12,9 @@ mpiCheckPhaseHook, metis, parmetis, withExamples ? false, fortranSupport ? stdenv.hostPlatform.isLinux, enableOpenMP ? true, # Todo: ask for permission of unfree parmetis withParmetis ? false, }: Loading @@ -34,6 +38,10 @@ stdenv.mkDerivation (finalAttrs: { patches = [ ./mc64ad_dist-stub.patch (fetchurl { url = "https://github.com/xiaoyeli/superlu_dist/commit/8ef3f7fda091529d7e7f16087864fee66c4834c9.patch"; hash = "sha256-kCSqojYKpk75m+FwhS0hXHSybm+GZzOYikePcf2U3Fw="; }) ]; postPatch = '' Loading @@ -41,13 +49,20 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail "LargeDiag_MC64" "NOROWPERM" ''; nativeBuildInputs = [ nativeBuildInputs = [ cmake ] ++ lib.optionals fortranSupport [ gfortran ]; buildInputs = [ lib.optionals (enableOpenMP && stdenv.cc.isClang) [ # cmake can not find mpi if openmp is placed after mpi llvmPackages.openmp ] ++ [ mpi lapack ] Loading @@ -60,9 +75,11 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ (lib.cmakeBool "enable_examples" withExamples) (lib.cmakeBool "enable_openmp" enableOpenMP) (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) (lib.cmakeBool "enable_fortran" true) (lib.cmakeBool "enable_complex16" true) (lib.cmakeBool "BUILD_STATIC_LIBS" stdenv.hostPlatform.isStatic) (lib.cmakeBool "XSDK_ENABLE_Fortran" fortranSupport) (lib.cmakeBool "TPL_ENABLE_INTERNAL_BLASLIB" false) (lib.cmakeBool "TPL_ENABLE_LAPACKLIB" true) (lib.cmakeBool "TPL_ENABLE_PARMETISLIB" withParmetis) Loading Loading @@ -96,7 +113,7 @@ stdenv.mkDerivation (finalAttrs: { asl20 ]; description = "Library for the solution of large, sparse, nonsymmetric systems of linear equations"; platforms = lib.platforms.linux; platforms = lib.platforms.unix; maintainers = with lib.maintainers; [ qbisi ]; }; }) Loading
pkgs/by-name/su/superlu_dist/package.nix +26 −9 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ lib, stdenv, fetchFromGitHub, fetchurl, llvmPackages, cmake, gfortran, blas, Loading @@ -10,7 +12,9 @@ mpiCheckPhaseHook, metis, parmetis, withExamples ? false, fortranSupport ? stdenv.hostPlatform.isLinux, enableOpenMP ? true, # Todo: ask for permission of unfree parmetis withParmetis ? false, }: Loading @@ -34,6 +38,10 @@ stdenv.mkDerivation (finalAttrs: { patches = [ ./mc64ad_dist-stub.patch (fetchurl { url = "https://github.com/xiaoyeli/superlu_dist/commit/8ef3f7fda091529d7e7f16087864fee66c4834c9.patch"; hash = "sha256-kCSqojYKpk75m+FwhS0hXHSybm+GZzOYikePcf2U3Fw="; }) ]; postPatch = '' Loading @@ -41,13 +49,20 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail "LargeDiag_MC64" "NOROWPERM" ''; nativeBuildInputs = [ nativeBuildInputs = [ cmake ] ++ lib.optionals fortranSupport [ gfortran ]; buildInputs = [ lib.optionals (enableOpenMP && stdenv.cc.isClang) [ # cmake can not find mpi if openmp is placed after mpi llvmPackages.openmp ] ++ [ mpi lapack ] Loading @@ -60,9 +75,11 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ (lib.cmakeBool "enable_examples" withExamples) (lib.cmakeBool "enable_openmp" enableOpenMP) (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) (lib.cmakeBool "enable_fortran" true) (lib.cmakeBool "enable_complex16" true) (lib.cmakeBool "BUILD_STATIC_LIBS" stdenv.hostPlatform.isStatic) (lib.cmakeBool "XSDK_ENABLE_Fortran" fortranSupport) (lib.cmakeBool "TPL_ENABLE_INTERNAL_BLASLIB" false) (lib.cmakeBool "TPL_ENABLE_LAPACKLIB" true) (lib.cmakeBool "TPL_ENABLE_PARMETISLIB" withParmetis) Loading Loading @@ -96,7 +113,7 @@ stdenv.mkDerivation (finalAttrs: { asl20 ]; description = "Library for the solution of large, sparse, nonsymmetric systems of linear equations"; platforms = lib.platforms.linux; platforms = lib.platforms.unix; maintainers = with lib.maintainers; [ qbisi ]; }; })