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

Upgrade Clp -- v1.17.9 #8066

Closed
wants to merge 7 commits into from
Closed
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
55 changes: 37 additions & 18 deletions C/Coin-OR/Clp/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# In addition to coin-or-common.jl, we need to modify this file to trigger a
# rebuild.
#
# Last updated: 2022-10-26
# Last updated: 2024-07-16

include("../coin-or-common.jl")

name = "Clp"
version = Clp_version

# Collection of sources required to build Clp
sources = [
GitSource("https://github.com/coin-or/Clp.git", Clp_gitsha),
Expand Down Expand Up @@ -35,6 +38,13 @@ if [[ ${target} == *aarch64* ]] || [[ ${target} == *arm* ]]; then
export CPPFLAGS="${CPPFLAGS} -D__arm__"
fi

# BLAS and LAPACK
if [[ "${target}" == *mingw* ]]; then
LBT="-lblastrampoline-5"
else
LBT="-lblastrampoline"
fi

../configure \
--prefix=$prefix \
--build=${MACHTYPE} \
Expand All @@ -45,19 +55,27 @@ fi
--disable-dependency-tracking \
--enable-shared \
lt_cv_deplibs_check_method=pass_all \
--with-blas="-lopenblas" \
--with-lapack="-lopenblas" \
--with-blas \
--with-blas-lib="-L${libdir} ${LBT}" \
--with-lapack \
--with-lapack-lib="-L${libdir} ${LBT}" \
--with-coinutils \
--with-coinutils-lib="-lCoinUtils" \
--with-osi-lib="-lOsi -lCoinUtils" \
--with-mumps-lib="-L${libdir} -ldmumps -lzmumps -lcmumps -lsmumps -lmumps_common -lmpiseq -lpord -lmetis -lopenblas -lgfortran -lpthread" \
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we needed to expand on fortran versions because of this

Copy link
Contributor Author

@amontoison amontoison Jul 16, 2024

Choose a reason for hiding this comment

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

I don't think so because Clp doesn't contain Fortran code.
It's MUMPS that is linked to libgfortran.
We need all these options only if we use static libraries.
Because we have a shared library libdmumps.$dlext, this library is already linked to libmetis, libpord, libgfortran etc...

--with-mumps-incdir="${includedir}/mumps_seq" \
--with-metis-lib="-L${libdir} -lmetis" \
--with-metis-incdir="${includedir}"
--with-osi \
--with-osi-lib="-lOsi" \
--with-metis \
--with-metis-lib="-lmetis" \
--with-mumps \
--with-mumps-lib="-L${libdir} -ldmumps" \
--with-mumps-incdir="${includedir}/mumps_seq"

make -j${nproc}
make install
"""

platforms = supported_platforms()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
platforms = supported_platforms()
# platforms is a global constant defined in coin-or-common.jl

Copy link
Contributor Author

Choose a reason for hiding this comment

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

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = expand_cxxstring_abis(supported_platforms())
platforms = filter!(!Sys.isfreebsd, platforms)

We don't want to use expand_cxxstring_abis is the code if it is not in C++.
We don't apply expand_gfortran_versions by default for the same reason.
I also don't think that FreeBSD is an issue now.

I suppose that you added these options a long time ago.

Copy link
Contributor

@odow odow Jul 16, 2024

Choose a reason for hiding this comment

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

We don't want to use expand_cxxstring_abis is the code if it is not in C++

Clp is written in C++?

I think they got added because at one point the auditor complained. But that was definitely a number of years ago so things might have changed.

platforms = expand_gfortran_versions(platforms)

# The products that we will ensure are always built
products = [
LibraryProduct("libClp", :libClp),
Expand All @@ -68,24 +86,25 @@ products = [

# Dependencies that must be installed before this package can be built
dependencies = [
Dependency("CoinUtils_jll", compat="$(CoinUtils_version)"),
Dependency("Osi_jll", compat="$(Osi_version)"),
Dependency("METIS_jll", compat="$(METIS_version)"),
Dependency("MUMPS_seq_jll", compat="$(MUMPS_seq_version)"),
Dependency("OpenBLAS32_jll", OpenBLAS32_version),
Dependency("CompilerSupportLibraries_jll"),
Dependency(PackageSpec(name="CoinUtils_jll", uuid="be027038-0da8-5614-b30d-e42594cb92df"), compat="=$(CoinUtils_version)"),
Dependency(PackageSpec(name="METIS_jll", uuid="d00139f3-1899-568f-a2f0-47f597d42d70"), compat="=$(METIS_version)"),
Dependency(PackageSpec(name="Osi_jll", uuid="7da25872-d9ce-5375-a4d3-7a845f58efdd"), compat="=$(Osi_version)"),
Dependency(PackageSpec(name="MUMPS_seq_jll", uuid="d7ed1dd3-d0ae-5e8e-bfb4-87a502085b8d"), compat="=$(MUMPS_seq_version_LBT)"),
Dependency(PackageSpec(name="libblastrampoline_jll", uuid="8e850b90-86db-534c-a0d3-1478176c7d93"), compat="5.4.0"),
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae"))
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(
ARGS,
"Clp",
Clp_version,
name,
version,
sources,
script,
expand_gfortran_versions(platforms),
platforms,
products,
dependencies;
preferred_gcc_version = gcc_version,
julia_compat = Julia_compat_version,
preferred_llvm_version = llvm_version,
julia_compat = "1.9"
)
6 changes: 3 additions & 3 deletions C/Coin-OR/coin-or-common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Cbc_gitsha = "3c1d759619f38bbd5916380df292cfc1dafba7f5"
Cgl_version = offset_version(v"0.60.6", v"0.0.0")
Cgl_gitsha = "8952b9e737e434b730fab5967cd28180b43d7234"

Clp_version = offset_version(v"1.17.7", v"0.0.0")
Clp_gitsha = "1c2586a08d33ecc59ed67d319c29044802c0866b"
Clp_version = offset_version(v"1.17.9", v"0.0.0")
Clp_gitsha = "7b9daa62d4c2710a368a17385913ce59d8c67b68"

Osi_version = offset_version(v"0.108.10", v"0.0.0")
Osi_gitsha = "2997cda8e85ccc6712c4b05404e7aa70500e422f"
Expand Down Expand Up @@ -82,7 +82,7 @@ Julia_compat_version = "1.6"
ASL_version = v"0.1.3"
METIS_version = v"5.1.2"
MUMPS_seq_version = v"5.4.1"
MUMPS_seq_version_LBT = v"500.600.201"
MUMPS_seq_version_LBT = v"500.700.200"
SPRAL_version_LBT = v"2024.1.18"
OpenBLAS32_version = v"0.3.26"

Expand Down