Skip to content

Commit

Permalink
Rebase to newest SuiteSparse build script
Browse files Browse the repository at this point in the history
  • Loading branch information
imciner2 committed Jan 10, 2024
1 parent 216fc37 commit 20d44a5
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 3 deletions.
2 changes: 0 additions & 2 deletions S/SuiteSparse/SuiteSparse@7/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ include("../common.jl")
name = "SuiteSparse"
version = v"7.4.0"

sources = suitesparse_sources(version)

sources = suitesparse_sources(version)
push!(sources, DirectorySource("./bundled"))

Expand Down
6 changes: 5 additions & 1 deletion S/SuiteSparse/SuiteSparse_GPU@7/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ name = "SuiteSparse_GPU"
version = v"7.4.0"

sources = suitesparse_sources(version)
push!(sources, DirectorySource("./bundled"))

const YGGDRASIL_DIR = "../../.."
include(joinpath(YGGDRASIL_DIR, "fancy_toys.jl"))
Expand All @@ -18,6 +19,9 @@ cd $WORKSPACE/srcdir/SuiteSparse
# Needs cmake >= 3.22 provided by jll
apk del cmake
# Apply upstream patch to fix BLAS calls (backported from 7.5.0 dev branch)
atomic_patch -p1 ${WORKSPACE}/srcdir/patches/blas_suffix.patch
# Ensure CUDA is on the path
export CUDA_HOME=${WORKSPACE}/destdir/cuda;
export PATH=$PATH:$CUDA_HOME/bin
Expand Down Expand Up @@ -105,7 +109,7 @@ for platform in platforms

build_tarballs(ARGS, name, version, sources, script, [platform],
gpu_products, [dependencies; cuda_deps]; lazy_artifacts=true,
julia_compat="1.10",preferred_gcc_version=v"9",
julia_compat="1.11",preferred_gcc_version=v"9",
augment_platform_block=CUDA.augment,
skip_audit=true, dont_dlopen=true)
end
40 changes: 40 additions & 0 deletions S/SuiteSparse/SuiteSparse_GPU@7/bundled/patches/blas_suffix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From b936940aab08dc4bc60ccf2b9daec2105a960ad4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Markus=20M=C3=BCtzel?= <[email protected]>
Date: Mon, 1 Jan 2024 13:00:17 +0100
Subject: [PATCH] Add preprocessor definitions also with user-supplied
BLAS_LIBRARIES

---
SuiteSparse_config/cmake_modules/SuiteSparseBLAS.cmake | 4 ++--
SuiteSparse_config/cmake_modules/SuiteSparseBLAS64.cmake | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/SuiteSparse_config/cmake_modules/SuiteSparseBLAS.cmake b/SuiteSparse_config/cmake_modules/SuiteSparseBLAS.cmake
index ca241472d..be7cd2e73 100644
--- a/SuiteSparse_config/cmake_modules/SuiteSparseBLAS.cmake
+++ b/SuiteSparse_config/cmake_modules/SuiteSparseBLAS.cmake
@@ -36,9 +36,9 @@ if ( DEFINED BLAS_LIBRARIES OR DEFINED BLAS_INCLUDE_DIRS )
# User supplied variables for libraries and/or include directories.
# Use them as-is.
if ( SUITESPARSE_USE_64BIT_BLAS )
- set ( SuiteSparse_BLAS_integer "int64_t" )
+ include ( SuiteSparseBLAS64 )
else ( )
- set ( SuiteSparse_BLAS_integer "int32_t" )
+ include ( SuiteSparseBLAS32 )
endif ( )
return ( )
endif ( )
diff --git a/SuiteSparse_config/cmake_modules/SuiteSparseBLAS64.cmake b/SuiteSparse_config/cmake_modules/SuiteSparseBLAS64.cmake
index 744aaef91..1a5c63690 100644
--- a/SuiteSparse_config/cmake_modules/SuiteSparseBLAS64.cmake
+++ b/SuiteSparse_config/cmake_modules/SuiteSparseBLAS64.cmake
@@ -37,7 +37,7 @@ set ( SuiteSparse_BLAS_integer "int64_t" )
# https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/suite-sparse/package.py

if ( DEFINED BLAS64_SUFFIX )
- # append BLAS64_SUFFIX to each BLAS and LAPACK name
+ # append BLAS64_SUFFIX to each BLAS and LAPACK function name
string ( FIND ${BLAS64_SUFFIX} "_" HAS_UNDERSCORE )
message ( STATUS "BLAS64_suffix: ${BLAS64_SUFFIX}" )
if ( HAS_UNDERSCORE EQUAL -1 )

0 comments on commit 20d44a5

Please sign in to comment.