Skip to content

Commit 3b7b9a5

Browse files
committed
deps setup
1 parent e7aa8b2 commit 3b7b9a5

File tree

1 file changed

+80
-7
lines changed

1 file changed

+80
-7
lines changed

readme-hipo-deps.md

Lines changed: 80 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,100 @@
1-
Dependencies install ubuntu / macos
1+
# Dependencies install ubuntu
22

3-
1. Clone GKLib
3+
## Default: static
4+
5+
This default setup works for the GitHub runner ubuntu-latest.
46

7+
1. Clone GKLib
8+
```
59
git clone https://github.com/KarypisLab/GKlib.git
10+
```
611

712
2. Clone METIS
8-
13+
```
914
git clone https://github.com/KarypisLab/GKlib.git
15+
```
1016

1117
3. Create installs dir
12-
18+
```
1319
mkdir installs
20+
```
1421

1522
4. Install GKlib
16-
23+
```
1724
cd GKlib
1825
make config prefix=${{runner.workspace}}/installs
1926
make
2027
make install
28+
```
2129

2230
5. Install METIS
23-
31+
```
2432
cd METIS
2533
make config prefix=${{runner.workspace}}/installs
2634
make
27-
make install
35+
make install
36+
```
37+
38+
6. Check METIS and GKlib
39+
```
40+
cd installs
41+
ls
42+
ls lib
43+
```
44+
45+
7. Install BLAS or OpenBLAS
46+
```
47+
sudo apt update
48+
sudo apt install libblas-dev
49+
```
50+
or
51+
```
52+
sudo apt update
53+
sudo apt install libopenblas-dev
54+
```
55+
56+
8. Configure HiGHS
57+
```
58+
cmake -S. -B build -DHIPO=ON -DMETIS_ROOT=${{runner.workspace}}/installs -DGKLIB_ROOT=${{runner.workspace}}/installs
59+
```
60+
61+
--------------
62+
63+
## Alternative: shared
64+
65+
On some systems, the following error was encountered:
66+
67+
```
68+
relocation against symbol `gk_cur_jbufs` can not be used when making a shared object, please recompile with -fPIC
69+
```
70+
Possibly, METIS is trying to compile a shared lib and to link to a static version of GKlib. It can be resolved by making all libraries shared. Delete everything in `installs` and the `HiGHS/build` dir.
71+
72+
73+
4. Install GKlib shared
74+
```
75+
cd GKlib
76+
make config shared=1 prefix=${{runner.workspace}}/installs
77+
make
78+
make install
79+
```
80+
81+
Check if the shared library with no numbers in the file name is in `..../installs/lib/`. If not, make a link to it with
82+
```
83+
ln ..../installs/lib/libGKlib.0.so ..../installs/lib/libGKlib.so
84+
```
85+
86+
5. Install METIS shared
87+
```
88+
cd METIS
89+
make config shared=1 gklib_path=${{runner.workspace}}/installs prefix=${{runner.workspace}}/installs
90+
make
91+
make install
92+
```
93+
94+
Go to step 8.
95+
96+
--------
97+
98+
### Notes
99+
100+
Make sure, that in the HiGHS CMake output, the path where the GKlib library is found matches the path where the GKlib include header is. If not, there may be a system GKlib library which is being picked up by mistake. I is working on resolving this.

0 commit comments

Comments
 (0)