Skip to content

Commit 663fbf8

Browse files
committed
build metis
1 parent ceaaf0b commit 663fbf8

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

.github/workflows/metis-Windows.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
METIS=metis-5.1.0
4+
5+
wget -nv http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/${METIS}.tar.gz
6+
tar -xvzf ${METIS}.tar.gz
7+
rm -f ${METIS}.tar.gz
8+
cd ${METIS} || exit
9+
sed -i.bak -e 's/IDXTYPEWIDTH 32/IDXTYPEWIDTH 64/g' include/metis.h
10+
11+
# Fix GKlib on Windows: https://github.com/jlblancoc/suitesparse-metis-for-windows/issues/6
12+
sed -i.bak -e '61,69d' GKlib/gk_arch.h
13+
14+
cd build || exit
15+
16+
cmake .. -A x64 # Ensure we are building with x64
17+
cmake --build . --config "Release" --target ALL_BUILD
18+
cp libmetis/Release/metis.lib /c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/lib/x64
19+
cp ../include/metis.h /c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/include
20+
21+
rm -f ${METIS}

.github/workflows/metis.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
METIS=metis-5.1.0
4+
5+
wget -nv http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/${METIS}.tar.gz
6+
tar -xvzf ${METIS}.tar.gz
7+
rm -f ${METIS}.tar.gz
8+
cd ${METIS} || exit
9+
sed -i.bak -e 's/IDXTYPEWIDTH 32/IDXTYPEWIDTH 64/g' include/metis.h
10+
11+
make config
12+
make
13+
sudo make install
14+
15+
rm -f ${METIS}

.github/workflows/testing.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,20 @@ jobs:
2828
run: |
2929
pip install torch==${{ matrix.torch-version}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
3030
31-
- name: Install internal dependencies
31+
- name: Install torch-scatter
3232
run: |
3333
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-${{ matrix.torch-version }}+cpu.html
3434
35+
- name: Install METIS
36+
if: ${{ runner.os != 'Windows' }}
37+
run: |
38+
bash .github/workflows/metis.sh
39+
40+
- name: Install METIS on Windows
41+
if: ${{ runner.os == 'Windows' }}
42+
run: |
43+
bash .github/workflows/metis-${{ runner.os }}.sh
44+
3545
- name: Install main package
3646
run: |
3747
pip install -e .[test]

0 commit comments

Comments
 (0)