Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SuiteSparse 7] Fix the SuiteSparse builds for 32-bit #6455

Merged
merged 7 commits into from
Mar 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
include("../common.jl")

name = "SuiteSparse32"
version = v"5.10.1"

sources = suitesparse_sources(version)

# Bash recipe for building across all platforms
script = raw"""
Expand Down Expand Up @@ -53,4 +56,4 @@ dependencies = [
]

# Build the tarballs
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6")
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
include("../common.jl")

name = "SuiteSparse"
version = v"5.10.1"

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

# Bash recipe for building across all platforms
script = raw"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
include("../common.jl")

name = "SuiteSparse"
version = v"7.0.1"

sources = suitesparse_sources(version)

# Bash recipe for building across all platforms
script = raw"""
Expand All @@ -23,6 +26,17 @@ if [[ ${bb_full_target} == *-sanitize+memory* ]]; then
cp -rL ${libdir}/linux/* /opt/x86_64-linux-musl/lib/clang/*/lib/linux/
fi

if [[ ${nbits} == 64 ]]; then
CMAKE_OPTIONS=(
-DBLAS64_SUFFIX="_64"
-DALLOW_64BIT_BLAS=YES
)
else
CMAKE_OPTIONS=(
-DALLOW_64BIT_BLAS=NO
)
fi

for proj in SuiteSparse_config AMD BTF CAMD CCOLAMD COLAMD CHOLMOD LDL KLU UMFPACK RBio SPQR; do
cd ${proj}/build
cmake .. -DCMAKE_BUILD_TYPE=Release \
Expand All @@ -37,11 +51,10 @@ for proj in SuiteSparse_config AMD BTF CAMD CCOLAMD COLAMD CHOLMOD LDL KLU UMFPA
-DBLAS_LINKER_FLAGS="${BLAS_NAME}" \
-DBLAS_UNDERSCORE=ON \
-DBLA_VENDOR="${BLAS_NAME}" \
-DBLAS64_SUFFIX="_64" \
-DALLOW_64BIT_BLAS=YES \
-DLAPACK_FOUND=1 \
-DLAPACK_LIBRARIES="${libdir}/lib${BLAS_NAME}.${dlext}" \
-DLAPACK_LINKER_FLAGS="${BLAS_NAME}"
-DLAPACK_LINKER_FLAGS="${BLAS_NAME}" \
"${CMAKE_OPTIONS[@]}"
make -j${nproc}
make install
cd ../..
Expand Down
35 changes: 0 additions & 35 deletions S/SuiteSparse/SuiteSparse@7/common.jl

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ include(joinpath(YGGDRASIL_DIR, "fancy_toys.jl"))
include(joinpath(YGGDRASIL_DIR, "platforms", "cuda.jl"))

name = "SuiteSparse_GPU"
version = v"5.10.1"

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

# Bash recipe for building across all platforms
script = raw"""
Expand Down
20 changes: 15 additions & 5 deletions S/SuiteSparse/common.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
using BinaryBuilder, Pkg

version = v"5.10.1"

# Collection of sources required to build SuiteSparse
sources = [
GitSource("https://github.com/DrTimothyAldenDavis/SuiteSparse.git",
"538273cfd53720a10e34a3d80d3779b607e1ac26"),
]
function suitesparse_sources(version::VersionNumber; kwargs...)
suitesparse_version_sources = Dict(
v"5.10.1" => [
GitSource("https://github.com/DrTimothyAldenDavis/SuiteSparse.git",
"538273cfd53720a10e34a3d80d3779b607e1ac26")
],
v"7.0.1" => [
GitSource("https://github.com/DrTimothyAldenDavis/SuiteSparse.git",
"03350b0faef6b77d965ddb7c3cd3614a45376bfd"),
],
)
return Any[
suitesparse_version_sources[version]...,
]
end

# We enable experimental platforms as this is a core Julia dependency
platforms = supported_platforms(;experimental=true)
Expand Down