Metis安装(5.0.1与4.0.3)

Metis安装的主要步骤

务必下载指定版本的metis源码,然后进行解压,进入源码的主目录下,在安装之前,通常会要求linux系统上安装了GCC,G++以及Cmake。可以百度自行检查。

一、选择指定编译器

可以选择使用环境变量指定编译器(无论是执行Makefile还是configure都可以选择这种方式进行编译器选项的指定):

export CC=gcc
export CXX=g++

也可以选择在指定配置脚本时指定编译器,

1.如果源码目录下存在名为Makefile的脚本文件(使用 Autotools 或 CMake 这样的构建系统的软件包),可以选择查看Makefile文件,看看是否存在config选项,一般是会有的,然后手动配置,有关命令要看过文件才知道。

make config CC=gcc  //指定编译器版本

2.如果源码目录下存在名为configure的脚本文件,可以执行如下命令查看帮助

./configure --help

如果configure脚本支持的话,可以通过如下命令选择指定编译器

./configure CC=gcc CXX=g++

当然,如果存在多个编译器版本,可以手动指定路径然后选择指定版本

./configure CC=/path/to/gcc-8.4.0

二、指定安装路径

Makefile指定安装路径

make config prefix=/path/to/installation/directory

configure指定安装路径:

./configure --prefix=/path/to/installation/directory

Cmake指定安装路径

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/path/to/installation ..

三、调试模式编译

如果想在后续gdb的时候调试metis相关代码,应该输入以下命令

make config debug="-g -Wall"

四、安装

依次执行如下命令即可

make
make install

如果cpu是多核处理器,可以选择如下命令

make -j4 && make install

make -j4 是一个 make 命令的选项,用于并行编译。具体来说,-j 后面可以跟一个数字,表示同时运行的任务数。-j4 意味着让 make 使用 4 个并行任务来编译。这对于多核处理器的系统来说,可以显著加速编译过程,因为它允许同时处理多个文件。
如果想要查看cpu的核数的话,可以选择如下命令:

lscpu或者nproc
  • 8
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
metis-5.1.0安装包和manual手册 2 What is new in version 5.0 4 2.1 Changes in the command-line programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1.1 Migration issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Changes in the API routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2.1 Migration issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3 Overview of METIS 6 3.1 Partitioning a graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.2 Alternate partitioning objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.3 Support for multi-phase and multi-physics computations . . . . . . . . . . . . . . . . . . . . . . . . 8 3.4 Partitioning a mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.5 Partitioning for heterogeneous parallel computing architectures . . . . . . . . . . . . . . . . . . . . . 8 3.6 Computing a fill-reducing ordering of a sparse matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.7 Converting a mesh into a graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 4 METIS’ stand-alone programs 9 4.1 Input file formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 4.1.1 Graph file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 4.1.2 Mesh file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.1.3 Target partition weights file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.2 Output file formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.2.1 Partition file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
安装metis_Eigen和suitesparse的步骤如下: 1. 安装Visual Studio 2015或以上版本,可以从Microsoft官网下载。 2. 下载metis的Windows二进制文件,可以从官网https://github.com/aydin-demircioglu/metis-windows/releases下载。 3. 解压缩Metis Windows二进制文件,并将其放在一个目录下。 4. 下载suitesparse的Windows二进制文件,可以从官网http://faculty.cse.tamu.edu/davis/suitesparse.html下载。 5. 解压缩Suitesparse Windows二进制文件,并将其放在一个目录下。 6. 下载Eigen的源代码,可以从官网http://eigen.tuxfamily.org/index.php?title=Main_Page下载。 7. 解压缩Eigen源代码,并将其放在一个目录下。 8. 打开Visual Studio,并创建一个新的空项目。 9. 将Eigen源代码目录中的“Eigen”文件夹复制到Visual Studio项目的目录中。 10. 在Visual Studio项目中添加Metis和Suitesparse的头文件和库文件路径,具体步骤如下: a. 在Visual Studio项目中右键单击“项目”并选择“属性”。 b. 选择“VC++目录”选项卡。 c. 在“包含目录”中添加Metis和Suitesparse的头文件路径。 d. 在“库目录”中添加Metis和Suitesparse的库文件路径。 11. 在Visual Studio项目中添加Metis和Suitesparse的库文件,具体步骤如下: a. 在Visual Studio项目中右键单击“项目”并选择“属性”。 b. 选择“链接器”选项卡。 c. 在“输入”中添加Metis和Suitesparse的库文件。 12. 现在可以在Visual Studio项目中使用Metis和Suitesparse库了。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值