Skip to content

Commit 3dbe848

Browse files
committed
mip
2 parents e094095 + 6961aef commit 3dbe848

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2145
-1286
lines changed

.bazelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
build --enable_platform_specific_config
2+
3+
build:windows --enable_runfiles
4+
15
build:asan --strip=never
26
build:asan --copt -fsanitize=address
37
build:asan --copt -O1

.github/workflows/build-nuget-package.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@ concurrency:
77
cancel-in-progress: true
88

99
jobs:
10-
# macos 13 is Intel
11-
build_macos_13:
12-
runs-on: macos-13
13-
# strategy:
14-
# matrix:
15-
# python: [3.11]
10+
# Build macos intel
11+
build_macos_intel:
12+
runs-on: macos-15-intel
1613
steps:
1714
- uses: actions/checkout@v4
1815
- name: Build HiGHS
@@ -32,9 +29,9 @@ jobs:
3229
name: macos-x64
3330
path: ${{runner.workspace}}/build/dotnet/Highs.Native/runtimes
3431

35-
# macos 14 is M1
36-
build_macos_14:
37-
runs-on: macos-14
32+
# Build macos arm64
33+
build_macos_arm:
34+
runs-on: macos-14 # macos-14 is arm64
3835
steps:
3936
- uses: actions/checkout@v4
4037
- name: Build HiGHS
@@ -126,7 +123,7 @@ jobs:
126123

127124
build_windows:
128125
runs-on: windows-latest
129-
needs: [build_macos_13, build_macos_14, build_windows_32, build_linux, build_linux_arm64]
126+
needs: [build_macos_intel, build_macos_arm, build_windows_32, build_linux, build_linux_arm64]
130127
steps:
131128
- uses: actions/checkout@v4
132129
- name: Build HiGHS Windows native

.github/workflows/build-python-package.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,8 @@ jobs:
132132
python3 -m pip install pytest
133133
python3 -m pytest $GITHUB_WORKSPACE
134134
135-
# macos 13 is Intel
136-
build_wheel_macos_13:
137-
runs-on: macos-13
135+
build_wheel_macos_intel:
136+
runs-on: macos-15-intel
138137
strategy:
139138
matrix:
140139
python: [3.11]
@@ -163,9 +162,8 @@ jobs:
163162
python3 -m pip install pytest
164163
python3 -m pytest $GITHUB_WORKSPACE
165164
166-
# macos 14 is M1
167-
build_wheel_macos_14:
168-
runs-on: macos-14
165+
build_wheel_macos_arm:
166+
runs-on: macos-14 # macos-14 is arm64
169167
strategy:
170168
matrix:
171169
python: [3.11]

.github/workflows/build-wheels-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- [ubuntu-24.04, musllinux_x86_64] # No OpenBlas, no test
5050
- [ubuntu-24.04, musllinux_i686]
5151
- [ubuntu-24.04-arm, musllinux_aarch64]
52-
- [macos-13, macosx_x86_64]
52+
- [macos-15-intel, macosx_x86_64]
5353
- [macos-14, macosx_arm64]
5454
- [windows-2022, win_amd64]
5555
- [windows-2022, win32]

.github/workflows/build-wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- [ubuntu-24.04, musllinux_x86_64] # No OpenBlas, no test
3939
- [ubuntu-24.04, musllinux_i686]
4040
- [ubuntu-24.04-arm, musllinux_aarch64]
41-
- [macos-13, macosx_x86_64]
41+
- [macos-15-intel, macosx_x86_64]
4242
- [macos-14, macosx_arm64]
4343
- [windows-2022, win_amd64]
4444
- [windows-2022, win32]

.github/workflows/build-windows.yml

Lines changed: 64 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -180,35 +180,35 @@ jobs:
180180
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
181181
run: ctest --output-on-failure -C Debug
182182

183-
windows_debug_fb_off:
184-
runs-on: windows-latest
185-
186-
steps:
187-
- uses: actions/checkout@v4
188-
189-
- name: Create Build Environment
190-
# Some projects don't allow in-source building, so create a separate build directory
191-
# We'll use this as our working directory for all subsequent commands
192-
run: cmake -E make_directory ${{runner.workspace}}/build
193-
194-
- name: Configure CMake All
195-
shell: bash
196-
working-directory: ${{runner.workspace}}/build
197-
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DFAST_BUILD=OFF
198-
199-
- name: Build All
200-
working-directory: ${{runner.workspace}}/build
201-
shell: bash
202-
# Execute the build. You can specify a specific target with "--target <NAME>"
203-
run: |
204-
cmake --build . --parallel --config Debug
205-
206-
- name: Test All
207-
working-directory: ${{runner.workspace}}/build
208-
shell: bash
209-
# Execute tests defined by the CMake configuration.
210-
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
211-
run: ctest --parallel --timeout 300 --output-on-failure -C Debug
183+
# windows_debug_fb_off:
184+
# runs-on: windows-latest
185+
186+
# steps:
187+
# - uses: actions/checkout@v4
188+
189+
# - name: Create Build Environment
190+
# # Some projects don't allow in-source building, so create a separate build directory
191+
# # We'll use this as our working directory for all subsequent commands
192+
# run: cmake -E make_directory ${{runner.workspace}}/build
193+
194+
# - name: Configure CMake All
195+
# shell: bash
196+
# working-directory: ${{runner.workspace}}/build
197+
# run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DFAST_BUILD=OFF
198+
199+
# - name: Build All
200+
# working-directory: ${{runner.workspace}}/build
201+
# shell: bash
202+
# # Execute the build. You can specify a specific target with "--target <NAME>"
203+
# run: |
204+
# cmake --build . --parallel --config Debug
205+
206+
# - name: Test All
207+
# working-directory: ${{runner.workspace}}/build
208+
# shell: bash
209+
# # Execute tests defined by the CMake configuration.
210+
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
211+
# run: ctest --parallel --timeout 300 --output-on-failure -C Debug
212212

213213
windows_release64:
214214
runs-on: windows-2022
@@ -381,36 +381,38 @@ jobs:
381381
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
382382
run: ctest --output-on-failure -C Debug
383383

384-
windows_debug64_fb_off:
385-
runs-on: windows-latest
386-
387-
steps:
388-
- uses: actions/checkout@v4
389-
390-
- name: Create Build Environment
391-
# Some projects don't allow in-source building, so create a separate build directory
392-
# We'll use this as our working directory for all subsequent commands
393-
run: cmake -E make_directory ${{runner.workspace}}/build
394-
395-
- name: Configure CMake
396-
# Use a bash shell so we can use the same syntax for environment variable
397-
# access regardless of the host operating system
398-
shell: bash
399-
working-directory: ${{runner.workspace}}/build
400-
# Note the current convention is to use the -S and -B options here to specify source
401-
# and build directories, but this is only available with CMake 3.13 and higher.
402-
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
403-
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DFAST_BUILD=OFF -DHIGHSINT64=on -DHIGHS_NO_DEFAULT_THREADS=ON
404-
405-
- name: Build
406-
working-directory: ${{runner.workspace}}/build
407-
shell: bash
408-
# Execute the build. You can specify a specific target with "--target <NAME>"
409-
run: cmake --build . --config Debug --parallel
410-
411-
- name: Test
412-
working-directory: ${{runner.workspace}}/build
413-
shell: bash
414-
# Execute tests defined by the CMake configuration.
415-
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
416-
run: ctest --output-on-failure -C Debug
384+
# Switch off, fortran compiler lookup taking hours on new windows runner.
385+
# For fortran is best to use FAST_BUILD ON anyway.
386+
# windows_debug64_fb_off:
387+
# runs-on: windows-latest
388+
389+
# steps:
390+
# - uses: actions/checkout@v4
391+
392+
# - name: Create Build Environment
393+
# # Some projects don't allow in-source building, so create a separate build directory
394+
# # We'll use this as our working directory for all subsequent commands
395+
# run: cmake -E make_directory ${{runner.workspace}}/build
396+
397+
# - name: Configure CMake
398+
# # Use a bash shell so we can use the same syntax for environment variable
399+
# # access regardless of the host operating system
400+
# shell: bash
401+
# working-directory: ${{runner.workspace}}/build
402+
# # Note the current convention is to use the -S and -B options here to specify source
403+
# # and build directories, but this is only available with CMake 3.13 and higher.
404+
# # The CMake binaries on the Github Actions machines are (as of this writing) 3.12
405+
# run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DFAST_BUILD=OFF -DHIGHSINT64=on -DHIGHS_NO_DEFAULT_THREADS=ON
406+
407+
# - name: Build
408+
# working-directory: ${{runner.workspace}}/build
409+
# shell: bash
410+
# # Execute the build. You can specify a specific target with "--target <NAME>"
411+
# run: cmake --build . --config Debug --parallel
412+
413+
# - name: Test
414+
# working-directory: ${{runner.workspace}}/build
415+
# shell: bash
416+
# # Execute tests defined by the CMake configuration.
417+
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
418+
# run: ctest --output-on-failure -C Debug

.github/workflows/test-fortran-macos.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ on: [push, pull_request]
44

55
jobs:
66
fast_build_release:
7-
runs-on: [macos-13]
7+
runs-on: [macos-15-intel]
88

99

1010
steps:
1111
- uses: actions/checkout@v4
1212

13-
- uses: fortran-lang/setup-fortran@v1.6
13+
- uses: fortran-lang/setup-fortran@v1.8
1414
id: setup-fortran
1515
with:
1616
compiler: gcc
17-
version: 11
17+
version: 14
1818

1919
# - name: Install GFortran
2020
# run: brew install gfortran gcc
@@ -27,8 +27,8 @@ jobs:
2727
working-directory: ${{runner.workspace}}/build
2828
run: |
2929
cmake --version
30-
gfortran-11 --version
31-
cmake $GITHUB_WORKSPACE -DFORTRAN=ON
30+
gfortran-14 --version
31+
cmake $GITHUB_WORKSPACE -DFORTRAN=ON -DCMAKE_Fortran_COMPILER=gfortran-14
3232
3333
- name: Build
3434
shell: bash

.github/workflows/test-nuget-macos.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ concurrency:
77
cancel-in-progress: true
88

99
jobs:
10-
# macos 13 is Intel
11-
build_macos_13:
12-
runs-on: macos-13
10+
build_macos_intel:
11+
runs-on: macos-15-intel
1312
# strategy:
1413
# matrix:
1514
# python: [3.11]
@@ -55,9 +54,8 @@ jobs:
5554
dotnet run
5655
5756
58-
# macos 14 is M1
59-
build_macos_14:
60-
runs-on: macos-14
57+
build_macos_arm:
58+
runs-on: macos-14 # macos-14 is arm64
6159
steps:
6260
- uses: actions/checkout@v4
6361
- name: Build HiGHS

.github/workflows/test-nuget-package.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ concurrency:
77
cancel-in-progress: true
88

99
jobs:
10-
# macos 13 is Intel
11-
build_macos_13:
12-
runs-on: macos-13
10+
build_macos_intel:
11+
runs-on: macos-15-intel
1312
# strategy:
1413
# matrix:
1514
# python: [3.11]
@@ -56,9 +55,8 @@ jobs:
5655
5756
5857
59-
# macos 14 is M1
60-
build_macos_14:
61-
runs-on: macos-14
58+
build_macos_arm:
59+
runs-on: macos-14 # macos-14 is arm64
6260
steps:
6361
- uses: actions/checkout@v4
6462
- name: Build HiGHS

BUILD.bazel

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
12
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
23
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
4+
load("@rules_cuda//cuda:defs.bzl", "cuda_library", "requires_cuda")
35

46
copy_file(
57
name = "highs-config",
@@ -8,12 +10,43 @@ copy_file(
810
visibility = ["//visibility:public"],
911
)
1012

13+
bool_flag(
14+
name = "cupdlp_gpu",
15+
build_setting_default = False,
16+
visibility = ["//visibility:public"],
17+
)
18+
19+
config_setting(
20+
name = "cupdlp_gpu_enabled",
21+
flag_values = {
22+
"@rules_cuda//cuda:enable": "True",
23+
"@local_cuda//:valid_toolchain_found": "True",
24+
":cupdlp_gpu": "True",
25+
},
26+
)
27+
1128
cc_library(
1229
name = "config",
1330
srcs = ["HConfig.h"],
1431
visibility = ["//visibility:public"],
1532
)
1633

34+
cuda_library(
35+
name = "cupdlp",
36+
srcs = glob([
37+
"highs/pdlp/cupdlp/cuda/*.cu",
38+
]),
39+
hdrs = glob([
40+
"highs/pdlp/cupdlp/cuda/*.cuh",
41+
]),
42+
defines = ["CUPDLP_GPU"],
43+
target_compatible_with = requires_cuda(),
44+
deps = [
45+
"@local_cuda//:cublas",
46+
"@local_cuda//:cusparse",
47+
],
48+
)
49+
1750
cc_library(
1851
name = "highs",
1952
srcs = ["highs/interfaces/highs_c_api.cpp"] + glob([
@@ -48,6 +81,10 @@ cc_library(
4881
"-Wno-unused-but-set-variable",
4982
],
5083
}),
84+
defines = select({
85+
":cupdlp_gpu_enabled": ["CUPDLP_GPU"],
86+
"//conditions:default": ["CUPDLP_CPU"],
87+
}),
5188
includes = [
5289
"extern",
5390
# "extern/filereaderlp",
@@ -65,7 +102,6 @@ cc_library(
65102
# "highs/simplex",
66103
# "highs/test_kkt",
67104
# "highs/util",
68-
"bazel-bin",
69105
],
70106
linkopts = select({
71107
"@rules_cc//cc/compiler:msvc-cl": ["-DEFAULTLIB:shell32.lib"],
@@ -75,7 +111,10 @@ cc_library(
75111
deps = [
76112
"//:config",
77113
"@zlib",
78-
],
114+
] + select({
115+
":cupdlp_gpu_enabled": [":cupdlp"],
116+
"//conditions:default": [],
117+
}),
79118
)
80119

81120
cc_library(

0 commit comments

Comments
 (0)