Skip to content

Commit f434d3b

Browse files
committed
Merge branch 'hipo-dev-latest' of https://github.com/ERGO-Code/HiGHS into hipo-dev-latest
2 parents 3a898c8 + 4d47c95 commit f434d3b

File tree

6 files changed

+106
-187
lines changed

6 files changed

+106
-187
lines changed

.github/workflows/julia-tests-ubuntu.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

.github/workflows/julia-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: JuliaCompileAndTest_
1+
name: JuliaCompileAndTest
22
on: [push, pull_request]
33
# needed to allow julia-actions/cache to delete old caches that it has created
44
permissions:

docs/src/guide/gpu.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,4 @@ nvcc --version
2828

2929
### Build HiGHS with GPU support
3030

31-
HiGHS must be built, from the root directory, with
32-
33-
```
34-
cmake -S. -Bbuild -DCUPDLP_GPU=ON
35-
cmake --build build --parallel
36-
```
37-
38-
This uses [FindCUDAToolkit](https://cmake.org/cmake/help/latest/module/FindCUDAToolkit.html) to find a CUDA installation locally.
39-
40-
#### Find CUDA
41-
42-
If CUDA is not found automatically, there is an extra option `-DCUPDLP_FIND_CUDA=ON`, to be used with `-DCUPDLP_GPU=ON`, which instead uses `cuPDLP-C`'s `FindCUDAConf.cmake`.
43-
44-
This requires the environment variable `CUDA_HOME` to be set to the directory with the CUDA installation. Having set this, run
45-
46-
```
47-
cmake -S. -Bbuild -DCUPDLP_GPU=ON -DCUPDLP_FIND_CUDA=ON
48-
cmake --build build --parallel
49-
```
50-
51-
to build HiGHS.
31+
See [Building HiGHS with NVidia GPU support](@ref gpu-build).

docs/src/installation.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,69 @@
55
HiGHS uses CMake as build system, and requires at least version
66
3.15. Details about building from source using CMake can be found in `HiGHS/cmake/README.md`.
77

8+
## HiGHS with HiPO
9+
10+
HiGHS does not have any external dependencies, however, the new interior point solver HiPO uses BLAS and Metis. At the moment HiPO is optional and can be enabled via CMake. To build HiPO, you need to have Metis and BLAS installed on your machine. Please follow the instructions below.
11+
12+
#### BLAS
13+
14+
On Linux, libblas and libopenblas are supported. We recomment libopenblas for its better performance. Install with
15+
16+
```
17+
sudo apt update
18+
sudo apt install libopenblas-dev
19+
```
20+
21+
On MacOS no BLAS installation is required because HiPO uses [Apple Accelerate](https://developer.apple.com/accelerate/).
22+
23+
On Windows, OpenBLAS is required. It could be installed via [vcpkg](https://learn.microsoft.com/en-us/vcpkg/get_started/overview) with
24+
25+
```
26+
vcpkg install openblas[threads]
27+
```
28+
Note, that `[threads]` is required for HiPO.
29+
30+
#### Metis
31+
There are some known issues with Metis so the recommented version is in [this fork](https://github.com/galabovaa/METIS/tree/510-ts), branch 510-ts. This is version 5.10 with several patches for more reliable build and execution. Clone the repository with
32+
```
33+
git clone https://github.com/galabovaa/METIS.git
34+
cd METIS
35+
git checkout 510-ts
36+
```
37+
38+
Then build with
39+
```
40+
cmake -S. -B build
41+
-DGKLIB_PATH=/path_to_METIS_repo/GKlib
42+
-DCMAKE_INSTALL_PREFIX=path_to_installs_dir
43+
cmake --build build
44+
cmake --install build
45+
```
46+
47+
On Windows, do not forget to specify configuration type
48+
```
49+
cmake --build build --config Release
50+
```
51+
52+
### HiPO
53+
54+
To install HiPO, on Linux and MacOS, run
55+
```
56+
cmake -S. -B build -DHIPO=ON -DMETIS_ROOT=path_to_installs_dir
57+
```
58+
On Windows, you also need to specify the path to OpenBLAS. If it was installed with vcpkg as suggested above, add the path to `vcpkg.cmake` to the CMake flags, e.g.
59+
```
60+
-DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
61+
```
62+
63+
## Bazel build
64+
65+
Alternatively, building with Bazel is supported for Bazel-based projects. To build HiGHS, from the root directory, run
66+
67+
```
68+
bazel build //...
69+
```
70+
871
## Install via a package manager
972

1073
HiGHS can be installed using a package manager in the cases of
@@ -39,3 +102,36 @@ filename.
39102
* For Windows users: choose the file ending in `x86_64-w64-mingw32-cxx11.tar.gz`
40103
* For M1 macOS users: choose the file ending in `aarch64-apple-darwin.tar.gz`
41104
* For Intel macOS users: choose the file ending in `x86_64-apple-darwin.tar.gz`
105+
106+
## [Building HiGHS with NVidia GPU support](@id gpu-build)
107+
108+
HiGHS must be built, from the root directory, with
109+
110+
```
111+
cmake -S. -Bbuild -DCUPDLP_GPU=ON
112+
cmake --build build --parallel
113+
```
114+
115+
This uses [FindCUDAToolkit](https://cmake.org/cmake/help/latest/module/FindCUDAToolkit.html) to find a CUDA installation locally. For more details on HiGHS with CMake, see `HiGHS/cmake/README.md`.
116+
117+
118+
#### Find CUDA
119+
120+
If CUDA is not found automatically, there is an extra option `-DCUPDLP_FIND_CUDA=ON`, to be used with `-DCUPDLP_GPU=ON`, which instead uses `cuPDLP-C`'s `FindCUDAConf.cmake`.
121+
122+
This requires the environment variable `CUDA_HOME` to be set to the directory with the CUDA installation. Having set this, run
123+
124+
```
125+
cmake -S. -Bbuild -DCUPDLP_GPU=ON -DCUPDLP_FIND_CUDA=ON
126+
cmake --build build --parallel
127+
```
128+
129+
to build HiGHS.
130+
131+
### Bazel build with Cuda
132+
133+
Alternatively, for Bazel run
134+
135+
```
136+
bazel build //... --//:cupdlp_gpu
137+
```

highs/ipm/hipo/factorhighs/Analyse.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@
77

88
#include "DataCollector.h"
99
#include "FactorHiGHSSettings.h"
10-
// #include "GKlib.h"
1110
#include "ReturnValues.h"
1211
#include "ipm/hipo/auxiliary/Auxiliary.h"
1312
#include "ipm/hipo/auxiliary/Log.h"
13+
14+
// define correct int type for Metis before header is included
15+
#ifdef HIGHSINT64
16+
#define IDXTYPEWIDTH 64
17+
#else
18+
#define IDXTYPEWIDTH 32
19+
#endif
1420
#include "metis.h"
1521

1622
namespace hipo {
@@ -104,7 +110,7 @@ Int Analyse::getPermutation() {
104110
}
105111
}
106112

107-
Int options[METIS_NOPTIONS];
113+
idx_t options[METIS_NOPTIONS];
108114
METIS_SetDefaultOptions(options);
109115
options[METIS_OPTION_SEED] = kMetisSeed;
110116

readme-hipo-deps.md

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)