METIS安装与使用

官网的源码安装失败,从github上下载了一个源码(不过是metis4版本),
https://github.com/bchretien/metis4
用cmake安装。一开始configure会报错如下:
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run “cmake
–help-policy CMP0042” for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
上网查找解决方案为:在CMakeList.txt 里面的第一行加上:

set(CMAKE_MACOSX_RPATH 1)

然后可以顺利configure和generate。然后open project,打开Xcode。
将products文件夹下的运行程序编译,显示build succeeded后,该程序可直接使用。
在这里插入图片描述

下面以pmetis为例,将安装包中自带的图文件4elt.graph分成6个部分

/Users/ycy/Desktop/metis4-master/build/Programs/Debug/pmetis-4 /Users/ycy/Desktop/4elt.graph 6

在这里插入图片描述

会在桌面上生成4elt.graph.part.6,为划分结果。

参考:
https://stackoverflow.com/questions/31561309/cmake-warnings-under-os-x-macosx-rpath-is-not-specified-for-the-following-targe
http://www.liuxiao.org/2015/01/mac-cmake-解决-command-not-found-问题/

https://blog.csdn.net/xuchonghao/article/details/80342483

2.27补充:
官方metis5.1.0 cmake报错的问题已解决,解决方案参考:http://glaros.dtc.umn.edu/gkhome/node/908

猜你喜欢

转载自blog.csdn.net/yaochuyi/article/details/87278178