Issue compiling "METIS" in order to use "gpmetis" for graph partitioning

aroseman

Member
I am attemping to use "gpmetis" function on my "$*.graph.info$ file, however the command didn't exist, so I tried to download "GKlib" and "METIS" via GitHub, and recieved an error when compiling "METIS".

Here are those GitHub repos:

Here is how I attempted to install:
(First for GKlib)
  1. git clone GitHub - KarypisLab/GKlib: A library of various helper routines and frameworks used by many of the lab's software
  2. cd GKlib/
  3. module load cmake
  4. make distclean
  5. make config cc=gcc shared=1 prefix=~/local
  6. make
  7. make install
(Second for METIS)
  1. git clone GitHub - KarypisLab/METIS: METIS - Serial Graph Partitioning and Fill-reducing Matrix Ordering
  2. cd METIS/
  3. module load gcc
  4. module load cmake
  5. make distclean
  6. make config cc=gcc shared=1 prefix=~/local gklib_path=~/local
  7. make
  8. make install
Everything runs as normal for GKlib, however for METIS, I get this error:


"...... METIS/build/libmetis: ../libmetis/libmetis.so -lGKlib -lm /usr/bin/ld: cannot find -lGKlib"
 
Hi there,

I think it's possible that the libs for GKlib are being installed at ~/local/lib64 whereas METIS is looking inside ~/local/lib. At least one way to fix this would be to manually go into the CMakeLists.txt file in the root directory of METIS, and edit this line

Code:
link_directories(${GKLIB_PATH}/lib)
to
Code:
link_directories(${GKLIB_PATH}/lib64)

After this, please clean your METIS build and start over from Step 5.

Alternatively, you could try creating a symbolic link of the GKlib library file inside ~/local/lib64 to ~/local/lib.

Let me know if either of these fixes the problem for you.
 
Hi Abishek,

Thanks for the help!

1. Ok, I made the change to link_directories(${GKLIB_PATH}/lib64). Unfortunately, same issue occurs.

make.log is attached below

2. I also tried to link the .so* files into ~/local/lib, with "ln -s ~/local/lib64/libGKlib.so.0 ~/local/lib", and got the same error.

3. Here are what are in my ~/local/ directories

In ~/local/lib64/
ls ~/local/lib64/
==> libGKlib.so.0

In ~local/lib/
a directory named "cmake" ==> inside a directory named "GKlib"
==> instead are these files
GKlibConfig.cmake GKlibConfigVersion.cmake GKlibTargets.cmake GKlibTargets-noconfig.cmake

~/local/ file tree is attached below

4. I also tried link_directories(${GKLIB_PATH}/lib64/cmake) and link_directories(${GKLIB_PATH}/lib64/cmake/GKlib) and same error.
 

Attachments

  • make_1.log
    make_1.log
    50.8 KB · Views: 2
  • tree.png
    tree.png
    105.9 KB · Views: 2
Last edited:
Ok! I got it to run. Thanks so much for the help!
  1. ln -s ~/local/lib64/libGKlib.so.0 ~/local/lib64/libGKlib.so
  2. vi CMakeLists.txt
    1. CHANGE link_directories(${GKLIB_PATH}/lib) TO link_directories(${GKLIB_PATH}/lib64)
 
Last edited:
Back
Top