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 での Build Tools for Visual Studio 2022 (ビルドツール for Visual Studio 2022) のインストール: 別ページ »で説明している.
次のコマンドを実行
if not exist c:\vcpkg ( cd c:\ rmdir /s /q vcpkg git clone https://github.com/microsoft/vcpkg cd c:\vcpkg git pull .\bootstrap-vcpkg.bat .\vcpkg update .\vcpkg integrate install powershell -command "[System.Environment]::SetEnvironmentVariable(\"VCPKG_ROOT\", \"c:\vcpkg\", \"Machine\")" powershell -command "[System.Environment]::SetEnvironmentVariable(\"VCPKG_DEFAULT_TRIPLET\", \"x64-windows\", \"Machine\")" powershell -command "[System.Environment]::SetEnvironmentVariable(\"CMAKE_TOOLCHAIN_FILE\", \"c:/vcpkg/scripts/buildsystems/vcpkg.cmake\", \"Machine\")" powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"LIB\", \"Machine\"); $oldpath += \";c:\vcpkg\installed\x64-windows\lib\"; [System.Environment]::SetEnvironmentVariable(\"LIB\", $oldpath, \"Machine\")" powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"INCLUDE\", \"Machine\"); $oldpath += \";c:\vcpkg\installed\x64-windows\include\"; [System.Environment]::SetEnvironmentVariable(\"INCLUDE\", $oldpath, \"Machine\")" powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";c:\vcpkg\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")" powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";c:\vcpkg\installed\x64-windows\bin\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")" )
次のコマンドを実行
c:\vcpkg\vcpkg search suitesparse c:\vcpkg\vcpkg install --triplet x64-windows suitesparse powershell -command "[System.Environment]::SetEnvironmentVariable(\"SP_ROOT\", \"C:\vcpkg\installed\x64-windows\", \"Machine\")" powershell -command "[System.Environment]::SetEnvironmentVariable(\"SUITESPARSE_ROOT\", \"C:\vcpkg\installed\x64-windows\", \"Machine\")"
次のコマンドを実行
c:\vcpkg\vcpkg search metis c:\vcpkg\vcpkg install --triplet x64-windows metis powershell -command "[System.Environment]::SetEnvironmentVariable(\"METIS_ROOT\", \"C:\vcpkg\installed\x64-windows\", \"Machine\")"
Gitは,バージョン管理システム.ソースコードの管理や複数人での共同に役立つ.
【サイト内の関連ページ】
Windows での Git のインストール: 別ページ »で説明している.
【関連する外部ページ】
Git の公式ページ: https://git-scm.com/
CMake はビルドツールである.
【サイト内の関連ページ】
Windows での cmake のインストール: 別ページ »で説明している.
【関連する外部ページ】
CMake の公式ダウンロードページ: https://cmake.org/download/
【サイト内の関連ページ】
Windows での Visual Studio Community 2022 のインストール: 別ページ »で説明している.なお,Visual Studio には,ビルドツール(Build Tools)が含まれている.
Windows での ビルドツール for Visual Studio 2022 (Build Tools for Visual Studio 2022) のインストール: 別ページ »で説明している.
【関連する外部ページ】
次のページに記載の手順を行う.
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 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"
エラーメッセージが出ていないこと.
コマンドプロンプトを管理者として実行: 別ページ »で説明
次のコマンドを実行
powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";C:\suitesparse\lib\lapack_blas_windows\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")" powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";C:\suitesparse\lib\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")" powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";C:\suitesparse\bin\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")"
コマンドプロンプトを管理者として実行: 別ページ »で説明
次のコマンドを実行
powershell -command "[System.Environment]::SetEnvironmentVariable(\"SUITESPARSE_ROOT\", \"c:\suitesparse\", \"Machine\")"
コマンドプロンプトを管理者として実行: 別ページ »で説明
次のコマンドを実行
powershell -command "[System.Environment]::SetEnvironmentVariable(\"METIS_ROOT\", \"c:\suitesparse\", \"Machine\")"