Skip to content

Commit 706e0e9

Browse files
Merge pull request #1296 from rgsl888prabhu/main-merge-release/26.06_03
Main merge release/26.06 03
2 parents e160dcc + 1568ca8 commit 706e0e9

10 files changed

Lines changed: 283 additions & 73 deletions

File tree

ci/build_wheel_libcuopt.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,22 @@ bash ci/utils/install_protobuf_grpc.sh
2929

3030
export SKBUILD_CMAKE_ARGS="-DCUOPT_BUILD_WHEELS=ON;-DDISABLE_DEPRECATION_WARNING=ON"
3131

32+
# OpenSSL 3 hints for libcuopt's own find_package(OpenSSL).
33+
#
34+
# install_protobuf_grpc.sh links gRPC against OpenSSL 3 (see that script for
35+
# rationale). libcuopt then re-resolves OpenSSL via find_package because
36+
# gRPC's imported targets propagate it transitively. On Rocky/RHEL 8 the
37+
# EPEL openssl3-devel package installs in non-default paths, so we have to
38+
# point CMake at them; on Rocky/RHEL 9+ and Ubuntu 22.04+ the default
39+
# OpenSSL is already 3.x and no hints are needed.
40+
if [ -f /etc/os-release ]; then
41+
. /etc/os-release
42+
if [[ "$ID" == "rocky" || "$ID" == "centos" || "$ID" == "rhel" || "$ID" == "fedora" ]] && \
43+
[[ "${VERSION_ID%%.*}" == "8" ]]; then
44+
SKBUILD_CMAKE_ARGS="${SKBUILD_CMAKE_ARGS};-DOPENSSL_INCLUDE_DIR=/usr/include/openssl3;-DOPENSSL_SSL_LIBRARY=/usr/lib64/openssl3/libssl.so;-DOPENSSL_CRYPTO_LIBRARY=/usr/lib64/openssl3/libcrypto.so"
45+
fi
46+
fi
47+
3248
# For pull requests we are enabling assert mode.
3349
if [ "$RAPIDS_BUILD_TYPE" = "pull-request" ]; then
3450
echo "Building in assert mode"
@@ -72,6 +88,14 @@ EXCLUDE_ARGS=(
7288
--exclude "libnvJitLink*"
7389
--exclude "librapids_logger.so"
7490
--exclude "librmm.so"
91+
# OpenSSL 3 is intentionally NOT bundled. Resolving libssl.so.3 / libcrypto.so.3
92+
# at runtime via the host (or container image) keeps libcrypto and the FIPS
93+
# provider (system or mounted) byte-version-matched, which is required for
94+
# the FIPS provider's HMAC integrity check and avoids loading two libcrypto.so.3
95+
# in the same process. Hosts must provide libssl.so.3 / libcrypto.so.3 (Ubuntu
96+
# 22.04+, RHEL/Rocky 9+, manylinux_2_28+ with openssl3, Debian 12+).
97+
--exclude "libssl.so.3"
98+
--exclude "libcrypto.so.3"
7599
)
76100

77101
ci/build_wheel.sh libcuopt ${package_dir}

ci/test_wheel_cuopt.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ set -euo pipefail
99
# so those constraints will affect all future 'pip install' calls
1010
source rapids-init-pip
1111

12+
# Make sure libssl.so.3 / libcrypto.so.3 are on the linker path before any
13+
# 'import cuopt'. cuopt wheels link OpenSSL 3 and don't bundle it; on Rocky 8
14+
# the runtime needs to come from EPEL (no-op on distros that already ship it).
15+
bash "$(dirname "$(realpath "${BASH_SOURCE[0]}")")/utils/install_openssl3_runtime.sh"
16+
1217
# Download the packages built in the previous step
1318
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
1419
CUOPT_SH_CLIENT_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_sh_client" RAPIDS_PY_WHEEL_PURE="1" rapids-download-wheels-from-github python)

ci/test_wheel_cuopt_server.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ set -eou pipefail
77

88
source rapids-init-pip
99

10+
# Make sure libssl.so.3 / libcrypto.so.3 are on the linker path before any
11+
# 'import cuopt'. cuopt wheels link OpenSSL 3 and don't bundle it; on Rocky 8
12+
# the runtime needs to come from EPEL (no-op on distros that already ship it).
13+
bash "$(dirname "$(realpath "${BASH_SOURCE[0]}")")/utils/install_openssl3_runtime.sh"
14+
1015
# Download the packages built in the previous step
1116
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
1217
CUOPT_SERVER_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_server_${RAPIDS_PY_CUDA_SUFFIX}" RAPIDS_PY_WHEEL_PURE="1" rapids-download-wheels-from-github python)
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
3+
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
# Install OpenSSL 3 runtime libraries when the host distro doesn't ship them
7+
# by default. cuopt wheels DT_NEEDED libssl.so.3 / libcrypto.so.3 and do NOT
8+
# bundle them (see docs/openssl3-runtime-requirements.md), so the test image
9+
# has to provide them at runtime.
10+
#
11+
# Coverage:
12+
# - Rocky/RHEL/Alma 8: needs openssl3 from EPEL (default OpenSSL is 1.0.x).
13+
# - Other distros (Ubuntu 22.04+, Debian 12+, RHEL/Rocky 9+, Fedora 36+):
14+
# already ship libssl.so.3 / libcrypto.so.3 — no-op.
15+
#
16+
# Safe to run unconditionally; only takes action where needed.
17+
18+
set -euo pipefail
19+
20+
if [ ! -f /etc/os-release ]; then
21+
exit 0
22+
fi
23+
24+
. /etc/os-release
25+
26+
case "${ID:-}" in
27+
rocky|rhel|centos|almalinux)
28+
if [[ "${VERSION_ID%%.*}" == "8" ]]; then
29+
echo "==> Installing OpenSSL 3 runtime from EPEL (Rocky/RHEL/Alma 8)"
30+
if ! rpm -q epel-release >/dev/null 2>&1; then
31+
dnf install -y -q epel-release
32+
fi
33+
# 'openssl3' is the runtime package; it drops libssl.so.3 /
34+
# libcrypto.so.3 into /usr/lib64 and ldconfig picks them up
35+
# automatically. ('openssl3-devel' is what the build host uses.)
36+
dnf install -y -q openssl3
37+
ldconfig_out="$(ldconfig -p)"
38+
if ! grep -q "libssl\.so\.3" <<<"${ldconfig_out}" || \
39+
! grep -q "libcrypto\.so\.3" <<<"${ldconfig_out}"; then
40+
echo "ERROR: libssl.so.3 / libcrypto.so.3 still not on linker path" >&2
41+
exit 1
42+
fi
43+
fi
44+
;;
45+
*)
46+
# Ubuntu 22.04+, Debian 12+, etc. ship OpenSSL 3 by default; nothing to do.
47+
;;
48+
esac

ci/utils/install_protobuf_grpc.sh

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@ echo " Build dir: ${BUILD_DIR}"
9090
echo " Skip deps: ${SKIP_DEPS}"
9191
echo "=============================================="
9292

93+
# OpenSSL 3 hints for CMake's find_package(OpenSSL).
94+
#
95+
# On Rocky/RHEL 8 the default 'openssl-devel' is still 1.1.1k, so we install
96+
# 'openssl3-devel' from EPEL. That package installs in non-default paths
97+
# (/usr/include/openssl3 and /usr/lib64/openssl3) so we have to point CMake
98+
# at them explicitly. On Rocky/RHEL 9+ and Ubuntu 22.04+ the default OpenSSL
99+
# devel package is already 3.x, so no special handling is needed.
100+
OPENSSL_INCLUDE_DIR_HINT=""
101+
OPENSSL_LIB_DIR_HINT=""
102+
93103
# Install system dependencies if not skipped
94104
if [ "${SKIP_DEPS}" = false ]; then
95105
echo ""
@@ -100,11 +110,35 @@ if [ "${SKIP_DEPS}" = false ]; then
100110
# Enable PowerTools (Rocky 8) or CRB (Rocky 9) for some packages
101111
if [[ "${VERSION_ID%%.*}" == "8" ]]; then
102112
dnf config-manager --set-enabled powertools || dnf config-manager --set-enabled PowerTools || true
113+
# EPEL provides 'openssl3-devel' in parallel with the system OpenSSL 1.1.x.
114+
dnf install -y epel-release
115+
dnf install -y git cmake ninja-build gcc gcc-c++ openssl3-devel zlib-devel c-ares-devel
116+
OPENSSL_INCLUDE_DIR_HINT="/usr/include/openssl3"
117+
OPENSSL_LIB_DIR_HINT="/usr/lib64/openssl3"
103118
elif [[ "${VERSION_ID%%.*}" == "9" ]]; then
104119
dnf config-manager --set-enabled crb || true
120+
dnf install -y git cmake ninja-build gcc gcc-c++ openssl-devel zlib-devel c-ares-devel
121+
elif [[ "$ID" == "fedora" ]]; then
122+
# Fedora 36+ ships OpenSSL 3.x as the default 'openssl-devel'.
123+
dnf install -y git cmake ninja-build gcc gcc-c++ openssl-devel zlib-devel c-ares-devel
124+
else
125+
echo "ERROR: ${PRETTY_NAME:-$ID $VERSION_ID} is not a supported RHEL-family release for OpenSSL 3 builds." >&2
126+
echo "Supported: Rocky/RHEL/CentOS/Alma 8 or 9, or Fedora. Re-run with --skip-deps to bypass." >&2
127+
exit 1
105128
fi
106-
dnf install -y git cmake ninja-build gcc gcc-c++ openssl-devel zlib-devel c-ares-devel
107129
elif [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then
130+
# The default 'libssl-dev' package is OpenSSL 3.x on Ubuntu 22.04+
131+
# and Debian 12+. Older releases (Ubuntu 20.04, Debian 11) ship
132+
# OpenSSL 1.1.1, which we deliberately do not link against (see top
133+
# of file). Refuse to proceed there rather than silently regress.
134+
DISTRO_MAJOR="${VERSION_ID%%.*}"
135+
if [[ "$ID" == "ubuntu" && "${DISTRO_MAJOR}" -lt 22 ]] || \
136+
[[ "$ID" == "debian" && "${DISTRO_MAJOR}" -lt 12 ]]; then
137+
echo "ERROR: ${PRETTY_NAME:-$ID $VERSION_ID} ships OpenSSL 1.1; cuopt requires OpenSSL 3." >&2
138+
echo "Upgrade to Ubuntu 22.04+ / Debian 12+, or install OpenSSL 3 manually" >&2
139+
echo "(e.g. via PPA or backport) and re-run this script with --skip-deps." >&2
140+
exit 1
141+
fi
108142
apt-get update
109143
apt-get install -y git cmake ninja-build g++ libssl-dev zlib1g-dev libc-ares-dev
110144
else
@@ -200,6 +234,17 @@ cmake --install "${PROTOBUF_BUILD}"
200234

201235
echo ""
202236
echo "Building gRPC (using installed Abseil and Protobuf)..."
237+
# When building on Rocky/RHEL 8, the EPEL openssl3-devel package installs
238+
# headers in /usr/include/openssl3 and libs in /usr/lib64/openssl3. CMake's
239+
# FindOpenSSL.cmake doesn't know to look there, so pass explicit hints.
240+
GRPC_OPENSSL_HINTS=()
241+
if [[ -n "${OPENSSL_INCLUDE_DIR_HINT}" && -n "${OPENSSL_LIB_DIR_HINT}" ]]; then
242+
GRPC_OPENSSL_HINTS=(
243+
"-DOPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR_HINT}"
244+
"-DOPENSSL_SSL_LIBRARY=${OPENSSL_LIB_DIR_HINT}/libssl.so"
245+
"-DOPENSSL_CRYPTO_LIBRARY=${OPENSSL_LIB_DIR_HINT}/libcrypto.so"
246+
)
247+
fi
203248
cmake -S "${GRPC_SRC}" -B "${GRPC_BUILD}" -G Ninja \
204249
-DCMAKE_BUILD_TYPE=Release \
205250
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
@@ -214,6 +259,7 @@ cmake -S "${GRPC_SRC}" -B "${GRPC_BUILD}" -G Ninja \
214259
-DgRPC_SSL_PROVIDER=package \
215260
-DgRPC_ZLIB_PROVIDER=package \
216261
-DgRPC_CARES_PROVIDER=package \
262+
"${GRPC_OPENSSL_HINTS[@]}" \
217263
-DCMAKE_PREFIX_PATH="${PREFIX}" \
218264
-DCMAKE_INSTALL_PREFIX="${PREFIX}"
219265
cmake --build "${GRPC_BUILD}" --parallel

cpp/src/mip_heuristics/mip_constants.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@
2121
#define CUOPT_MIP_RINS_REQUIRED_THREAD_COUNT 4
2222
#define CUOPT_MIP_BATCH_PDLP_REQUIRED_THREAD_COUNT 3
2323
#define CUOPT_MIP_CLIQUE_CUTS_REQUIRED_THREAD_COUNT 3
24+
25+
// MIP-only gate: skip the concurrent barrier when fewer threads are available than this
26+
// (1 PDLP + 1 dual simplex + 1 barrier). Stand-alone LP always runs all three.
27+
#define CUOPT_CONCURRENT_LP_BARRIER_REQUIRED_THREAD_COUNT 3

0 commit comments

Comments
 (0)