Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install METIS on ubuntu

Tags:

c++

ubuntu

metis

I want to install the METIS package on ubuntu.

I tried the instructions on the install.txt file which says to use

$ make install 

which I did, after installing make as well.

I also tried the

sudo apt-get install metis

which installed it successfully but

when trying to use it in both cases I get

metis.h: No such file in directory compilation terminated

In case anyone asks I use g++ -I/path/to/file myprogram.cpp to specify the path where metis.h is.

I believe I haven't done something correct in the installation but I can't determine what it is.

Can someone help me with the installation process?

like image 545
System Avatar asked Mar 16 '16 20:03

System


2 Answers

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

like image 70
ksyrium Avatar answered Nov 15 '22 03:11

ksyrium


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)
like image 2
Soeren Avatar answered Nov 15 '22 02:11

Soeren