Skip to content

Installing pyamgx and cupy on windows

fizmat edited this page Mar 25, 2020 · 6 revisions

pyamgx and cupy on windows

Step-by-step install guide, works on Windows 10

Requirements

python >=3.6,<=3.7

CUDA

Latest CUDA (1.0.2) works now.

Cmake

https://cmake.org/download/

Compiler

Use Visual Studio 2017, AMGX does not compile with VS2019: https://github.com/NVIDIA/AMGX/issues/79

scipy and cython

pip install scipy cython

Build/install

cupy

Just pip install cupy-cuda101

AMGX

See also https://github.com/NVIDIA/AMGX#-building

  1. From empty AMGX build dir (for example AMGX/build):
  • in powershell & "C:\Program Files\CMake\bin\cmake.exe" -G "Visual Studio 15 2017 Win64" ..
  • in cmd "C:\Program Files\CMake\bin\cmake.exe" -G "Visual Studio 15 2017 Win64" ..
  1. Open build/AMG.sln in VS 2017
  2. Switch build configuration from Debug to Release (https://github.com/NVIDIA/AMGX/issues/43)
  3. Build amgx.sh project, it is enough to install pyamgx.

pyamgx

See also https://pyamgx.readthedocs.io/en/latest/install.html

  1. in setup.py comment out lines 42-44 (runtime_library_dirs = ...): https://github.com/shwina/pyamgx/issues/16
  2. in setup.py add in setup arguments (line 54) data_files=[('lib\\site-packages\\', [AMGX_BUILD_DIR + "\\amgxsh.dll"])]
  3. in cmd
  4. don't forget to activate your ef_python venv
  5. SET AMGX_DIR="your AMGX source dir"
  6. SET AMGX_BUILD_DIR="your AMGX build dir\Release"
  7. pip install "your pyamgx dir"
Clone this wiki locally