MetisMex is a Matlab interface to METIS. This code works with the latest stable version of Metis (5.1.0, 2013-03-30). And the source files are included under external folder.
The following instructions worked on Ubuntu (14.04 LTS) and OSX 10.10 with Matlab installed. The instructions on Windows 10 have been validated with MATLAB 2020a and Visual Studio 2019 BuildTools.
-
Download MetisMex
git clone https://github.com/YingzhouLi/metismex.git cd metismex
-
Install the latest version of metis.
a. Superuser or Root
sudo apt-get install libmetis-dev
b. User
cd external/metis make config make cd ../..
-
Compile or Install MetisMex.
a. Compile MetisMex
matlab -nojvm -r "make;quit"
b. Install MetisMex
matlab -nojvm -r "make(1);quit"
-
Test MetisMex
cd test matlab & >> test >> test_sparse
-
Download MetisMex
git clone https://github.com/YingzhouLi/metismex.git cd metismex
-
Install the latest version of metis.
a. Superuser or Root
brew install metis
b. User
cd external/metis make config make cd ../..
-
Compile or Install MetisMex.
a. Compile MetisMex
matlab -nojvm -r "make;quit"
b. Install MetisMex
matlab -nojvm -r "make(1);quit"
-
Test MetisMex
cd test matlab & >> test >> test_sparse
-
Prerequisites packages include CMake and Visual Studio package.
a. CMake can be installed from either installer or through chocolatey Windows package manager.
b. There are four different versions of Visual Studio
The setup of
mex
in Matlab is straightforward for the first three versions. However, if you prefer to install BuildTools, which is much ligher in terms of disk space, then you need to udpatemex
setup as in this post. -
Download MetisMex as a zip file and unzip it.
-
Install the latest version of metis through Windows PowerShell.
cd PATH_TO_METISMEX\external\metis mkdir build\Win-x86_64 cd build\Win-x86_64 cmake -G "Visual Studio 16 2019" -A x64 -DGKLIB_PATH="..\..\GKlib" ..\.. &"PATH_TO_VS\Bin\MSBuild.exe" ALL_BUILD.vcxproj /property:Configuration=Release cd ..\..
If different version of Visual Studio is installed, the
cmake
line need to be updated accordingly as in link or link. -
Compile or Install MetisMex.
a. Compile MetisMex
matlab -nojvm -r "make;quit"
b. Install MetisMex
matlab -nojvm -r "make(1);quit"
-
Test MetisMex
cd test matlab & >> test >> test_sparse
-
Download MetisMex.
git clone https://github.com/YingzhouLi/metismex.git cd metismex
-
Uninstall MetisMex
matlab -nojvm -r "make(-1);quit"
@software{li_yingzhou_2020_3746725,
author = {Li, Yingzhou},
title = {{M}etis{M}ex: A {MATLAB} toolbox of interfaces to the
{M}etis library}},
month = apr,
year = 2020,
publisher = {Zenodo},
version = {v1.0},
doi = {10.5281/zenodo.3746725},
url = {https://doi.org/10.5281/zenodo.3746725}
}
Many thanks to David Gleich and Robert Bridson. Yingzhou Li implements this repository after carefully exploring their previous work metismex and metismex.c.