Skip to content

YingzhouLi/metismex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MetisMex

DOI

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.

Compile and Installation on Ubuntu


  1. Download MetisMex

    git clone https://github.com/YingzhouLi/metismex.git
    cd metismex
    
  2. 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 ../..
    
  3. Compile or Install MetisMex.

    a. Compile MetisMex

    matlab -nojvm -r "make;quit"
    

    b. Install MetisMex

    matlab -nojvm -r "make(1);quit"
    
  4. Test MetisMex

    cd test
    matlab &
    >> test
    >> test_sparse
    

Compile and Installation on Mac


  1. Download MetisMex

    git clone https://github.com/YingzhouLi/metismex.git
    cd metismex
    
  2. Install the latest version of metis.

    a. Superuser or Root

    brew install metis
    

    b. User

    cd external/metis
    make config
    make
    cd ../..
    
  3. Compile or Install MetisMex.

    a. Compile MetisMex

    matlab -nojvm -r "make;quit"
    

    b. Install MetisMex

    matlab -nojvm -r "make(1);quit"
    
  4. Test MetisMex

    cd test
    matlab &
    >> test
    >> test_sparse
    

Compile and Installation on Windows


  1. 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 udpate mex setup as in this post.

  2. Download MetisMex as a zip file and unzip it.

  3. 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.

  4. Compile or Install MetisMex.

    a. Compile MetisMex

    matlab -nojvm -r "make;quit"
    

    b. Install MetisMex

    matlab -nojvm -r "make(1);quit"
    
  5. Test MetisMex

    cd test
    matlab &
    >> test
    >> test_sparse
    
    
    
    

Uninstall on Ubuntu, Mac, or Windows


  1. Download MetisMex.

    git clone https://github.com/YingzhouLi/metismex.git
    cd metismex
    
  2. Uninstall MetisMex

    matlab -nojvm -r "make(-1);quit"
    

BibTeX Export


@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}
}

Acknowledgments


Many thanks to David Gleich and Robert Bridson. Yingzhou Li implements this repository after carefully exploring their previous work metismex and metismex.c.