Linux Could Not Find Metis.H

Linux could not find metis.h

My advice is to work with cmake. In this question:install metis on unbuntu, I wrote down my cmake file. The command

include_directories("/home/jd/metis/include")

should solve your problem.

Installing and using the ParMetis library

You need to provide the location of your ParMetis library to
the compiler, since you have choosen to install the library
not in the default library directories.

mpic++ test.cpp -I /My-ParMETIS-Directory/ -I /My-METIS-Directory/

Edit#2:

What I did to get your code compiling:

  1. Download the ParMetis library from webpage to /tmp

    cd /tmp/
    wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz
  2. Unpack archive

    tar -xf parmetis-4.0.3.tar.gz
  3. Install ParMETIS into directory /tmp/parmetis

    mkdir parmetis
    cd parmetis-4.0.3/
    make config prefix=/tmp/parmetis
    make install
  4. Install METIS into directory /tmp/metis

    cd /tmp/
    mkdir metis
    cd parmetis-4.0.3/metis
    make config prefix=/tmp/metis
    make install
  5. Compile test.cpp which is located in /tmp/

    cd /tmp/
    mpic++ test.cpp -I /tmp/parmetis -I /tmp/metis


Related Topics



Leave a reply



Submit