SuiteSparse は,下記の機能を持つソフトウェアである.
UFconfig は,SuiteSparseQR, AMD, COLAMD, CCOLAMD, CHOLMOD, KLU, BTF, LDL, CXSparse, and UMFPACK のビルドに必要.
AMD は,疎行列の並び替えの機能を持ったソフトウェア. これは,Cholesky factorization や, 不完全 LU 分解 (LU factorization) の前処理として行うもの.
インストールでは,次のページに記載の手順を行う.そして,次のページで公開のプログラム等を使用している.
https://github.com/jlblancoc/suitesparse-metis-for-windows
【目次】
Windows での Visual Studio Community 2022 のインストール: 別ページ »で説明
Visual Studio Community 2022 に, Build Tools for Visual Studio 2022の機能が含まれている.
Windows での Build Tools for Visual Studio 2022 (ビルドツール for Visual Studio 2022) のインストール: 別ページ »で説明
【関連する外部ページ】
Windows での Git のインストール: 別ページ »で説明
【関連する外部ページ】
Git の公式ページ: https://git-scm.com/
Windows での cmake のインストール: 別ページ »で説明
【関連する外部ページ】
cmake の公式ダウンロードページ: https://cmake.org/download/
次のページに記載の手順を行う.
https://github.com/jlblancoc/suitesparse-metis-for-windows
前もって,SuiteSparse, Metis をインストールするディレクトリを決めておく
このページでは,いずれも,c:\suitesparse 下にインストールするものとして説明する.
c: cd c:\ rmdir /s /q suitesparse-metis-for-windows
cd c:\ git clone --recursive https://github.com/jlblancoc/suitesparse-metis-for-windows call powershell -command "[System.Environment]::SetEnvironmentVariable(\"SP_ROOT\", \"c:\suitesparse-metis-for-windows\", \"Machine\")"
cmake でのオプションについて
cmake のオプションの 「Visual Studio 17 2022」のところは, 使用する Visual Studio のバージョンにあわせること. Visual Studio 2022 のときは,「Visual Studio 17 2022」. Visual Studio 2019 のときは,「Visual Studio 16 2019」
cmake の実行手順例は次の通り
cd c:\ cd suitesparse-metis-for-windows rmdir /s /q build mkdir build cd build del CMakeCache.txt cmake .. -G "Visual Studio 17 2022" -A x64 -T host=x64 ^ -DCMAKE_BUILD_TYPE=Release ^ -DBUILD_SHARED_LIBS=ON ^ -DCMAKE_INSTALL_PREFIX="C:/suitesparse"
エラーメッセージが出ていないこと.
cmake --build . --config RELEASE cmake --build . --config RELEASE --target INSTALL
コマンドプロンプトを管理者として実行: 別ページ »で説明
call powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";C:\suitesparse\lib\lapack_blas_windows\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")" call powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";C:\suitesparse\lib\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")" call powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";C:\suitesparse\bin\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")"
コマンドプロンプトを管理者として実行: 別ページ »で説明
call powershell -command "[System.Environment]::SetEnvironmentVariable(\"SUITESPARSE_ROOT\", \"c:\suitesparse\", \"Machine\")"
コマンドプロンプトを管理者として実行: 別ページ »で説明
call powershell -command "[System.Environment]::SetEnvironmentVariable(\"METIS_ROOT\", \"c:\suitesparse\", \"Machine\")"