IBM/aihwkit

Error when verifying aihwkit installation

lorsonblair opened this issue · 3 comments

I was having the following error installing with miniconda3:


$ conda install aihwkit -c file:/$HOME/aihwkit-condapkg/linux-64
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system:

  • feature:/linux-ppc64le::__glibc==2.28=0
  • feature:|@/linux-ppc64le::__glibc==2.28=0
  • aihwkit -> __glibc[version='>=2.17']
    Your installed version is: 2.28

I got it to install "sucessfully" to my environment using pip: pip install aihwkit. However, when verifying the installation with the example code provided in the documentation, https://aihwkit.readthedocs.io/en/latest/install.html, I get the following error:


Traceback (most recent call last):
File "/gpfs/.../example.py", line 2, in
from aihwkit.nn import AnalogLinear
File "/gpfs/.../miniconda3/envs/patch_analog/lib/python3.9/site-packages/aihwkit/nn/init.py", line 17, in
from aihwkit.nn.modules.container import AnalogSequential
File "/gpfs/.../miniconda3/envs/patch_analog/lib/python3.9/site-packages/aihwkit/nn/modules/container.py", line 21, in
from aihwkit.nn.modules.base import AnalogModuleBase
File "/gpfs/.../miniconda3/envs/patch_analog/lib/python3.9/site-packages/aihwkit/nn/modules/base.py", line 22, in
from aihwkit.simulator.configs import (
File "/gpfs/.../miniconda3/envs/patch_analog/lib/python3.9/site-packages/aihwkit/simulator/configs/init.py", line 15, in
from .configs import (
File "/gpfs/.../miniconda3/envs/patch_analog/lib/python3.9/site-packages/aihwkit/simulator/configs/configs.py", line 18, in
from aihwkit.simulator.configs.devices import (
File "/gpfs/.../miniconda3/envs/patch_analog/lib/python3.9/site-packages/aihwkit/simulator/configs/devices.py", line 22, in
from aihwkit.simulator.configs.helpers import (
File "/gpfs/.../miniconda3/envs/patch_analog/lib/python3.9/site-packages/aihwkit/simulator/configs/helpers.py", line 20, in
from aihwkit.simulator.rpu_base import devices, tiles
ImportError: /gpfs/.../miniconda3/envs/patch_analog/lib/python3.9/site-packages/aihwkit/simulator/rpu_base.cpython-39-powerpc64le-linux-gnu.so: undefined symbol: _ZN3c106detail14torchCheckFailEPKcS2_jRKSs


I'm using torch 1.13.1 and cuda 11.2

Hi @lorsonblair:
seems that your system is not correctly set up. You need to make sure that you compile in the same environment that you want to run it in. In fact your glibc version is not correct as the error message points out, which looks like an environment mismatch.

On a power system it might be best to directly compile it with (after cloning)

git clone git@github.com:IBM/aihwkit.git
cd aihwkit
make build flags="-DUSE_CUDA=ON -DRPU_BLAS=OpenBLAS"

Make sure that you have GCC >= 7 or so installed.

@maljoras, thanks for your reply. I'm installing on another system (linux-64) Ubuntu 22.04. I got the initial verification to work. I am however unable to compile the cuda version.


python setup.py install --user -j8 -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE -DUSE_CUDA=ON -DRPU_BLAS=OpenBLAS
Traceback (most recent call last):
File "/home/lorson/aihwkit_env/aihwkit/setup.py", line 17, in
from setuptools import find_packages
ModuleNotFoundError: No module named 'setuptools'
make: *** [Makefile:22: build] Error 1


I followed the instruction in the advanced setup documentation which suggests creating a python virtual environment and cloning the github in there. I will attempt to fix the issue on the power 64 system once I get this one working.

Hi:
you need to install all necessary requirements first.
pip install -r requirements.txt