How to install METIS on ubuntu

限于喜欢 提交于 2019-11-29 14:38:15

You can try sudo apt-get install libmetis-dev.

BUILD.txt file from metis:

Building METIS requires CMake 2.8, found at http://www.cmake.org/, as well as GNU make. Assumming CMake and GNU make are installed, two commands should suffice to build metis:

 $ make config
 $ make

so, i tried not directly on ubuntu, but on my mac and it works in that order. after the two make command i have the following folder strucure:

build
-Darwin-x86_64 (the build architecture)
 -libmetis
   -libmetis.a
 -programs
   -gpmetis
    ...

after you can call

make install

I make a little test example and it works. You are maybe interest in my CMake-File. This could be the solution for your problem:

cmake_minimum_required(VERSION 2.8.9)
project (MetisTest)
include_directories("/usr/local/include")
link_directories("/usr/local/lib")
add_executable(metisTest main.cpp)
target_link_libraries(metisTest metis)

You may append your metis installation path to the environment variable CPLUS_INCLUDE_PATH. For example, in your ~/.bashrc, add:

export CPLUS_INCLUDE_PATH=$HOME/metis/include:$CPLUS_INCLUDE_PATH

then,

source ~/.bashrc

Please see more in the question Linux could not find metis.h.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!