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

[SCS] link against libblastrampoline #9608

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
11 changes: 8 additions & 3 deletions S/SCS/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ sources = [
script = raw"""
cd $WORKSPACE/srcdir/scs*
flags="DLONG=1 USE_OPENMP=1"
blasldflags="-L${prefix}/lib -lopenblas"
if [[ "${target}" == *-mingw* ]]; then
LBT=blastrampoline-5
else
LBT=blastrampoline
fi
blasldflags="-L${prefix}/lib -l${LBT}"

make BLASLDFLAGS="${blasldflags}" ${flags} out/libscsdir.${dlext}
make BLASLDFLAGS="${blasldflags}" ${flags} out/libscsindir.${dlext}
Expand All @@ -34,7 +39,7 @@ products = [

# Dependencies that must be installed before this package can be built
dependencies = [
Dependency("OpenBLAS32_jll", v"0.3.10"),
Dependency(PackageSpec(name="libblastrampoline_jll", uuid="8e850b90-86db-534c-a0d3-1478176c7d93"), compat="5.4.0"),
# For OpenMP we use libomp from `LLVMOpenMP_jll` where we use LLVM as compiler (BSD
# systems), and libgomp from `CompilerSupportLibraries_jll` everywhere else.
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae");
Expand All @@ -44,4 +49,4 @@ dependencies = [
]

# Build the tarballs, and possibly a `build.jl` as well
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies, julia_compat="1.6")
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies, julia_compat="1.10")
11 changes: 8 additions & 3 deletions S/SCS_GPU/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ sources = [
script = raw"""
cd $WORKSPACE/srcdir/scs*
flags="DLONG=0 USE_OPENMP=1"
blasldflags="-L${libdir} -lopenblas"
if [[ "${target}" == *-mingw* ]]; then
LBT=blastrampoline-5
else
LBT=blastrampoline
fi
blasldflags="-L${libdir} -l${LBT}"

CUDA_PATH=$prefix/cuda make BLASLDFLAGS="${blasldflags}" ${flags} out/libscsgpuindir.${dlext}

Expand All @@ -37,7 +42,7 @@ products = [
]

dependencies = [
Dependency("OpenBLAS32_jll", v"0.3.10"),
Dependency(PackageSpec(name="libblastrampoline_jll", uuid="8e850b90-86db-534c-a0d3-1478176c7d93"), compat="5.4.0"),
# For OpenMP we use libomp from `LLVMOpenMP_jll` where we use LLVM as compiler (BSD
# systems), and libgomp from `CompilerSupportLibraries_jll` everywhere else.
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae");
Expand All @@ -52,6 +57,6 @@ for platform in platforms
cuda_deps = CUDA.required_dependencies(platform)

build_tarballs(ARGS, name, version, sources, script, [platform], products,
[dependencies; cuda_deps], julia_compat="1.6",
[dependencies; cuda_deps], julia_compat="1.10",
Copy link
Member

@ViralBShah ViralBShah Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, what's the reason to bump up the Julia compat to 1.10? Is it for LBT? If so, we can probably do 1.8, just to keep it on the conservative side.

My understanding is that you want these things to be maximally backwards compatible, even if only for installation purposes (and the upstream packages can have tighter Julia version bounds).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the comment, I'll change this to 1.8 then!

augment_platform_block=CUDA.augment)
end