se-ok / WLsimilarity

informal exposition of Weisfeiler-Leman similarity
27 stars 3 forks source link

issue about dgl #1

Closed williamweiwu closed 3 years ago

williamweiwu commented 3 years ago

Hi,

I am now running your algorithm, but encounter the following question.

  1. if I install dgl-cuda101, it will say, dgl._ffi.base.DGLError: Cannot assign node feature "h" on device cuda:0 to a graph on device cpu. Call DGLGraph.to() to copy the graph to the same device.

  2. according to the suggestion online, i tried pip install dgl==0.4.1. it will say, dgl._ffi.base.DGLError: [19:46:04] /opt/dgl/src/runtime/c_runtime_api.cc:87: Check failed: allow_missing: Device API gpu is not enabled.

Even if in the environment of cuda 10.0, according to Benchmark installation which you provide, it is the same as above.

Could you tell me your environment pls?

se-ok commented 3 years ago

Hi,

Thank you for your interest and I am sorry that you have trouble.

I attach my conda environment below. I tested with script sh script_main_SBMs_nns.sh SBM_CLUSTER 0 1. You can copy them in a env.yml file and run conda env create -f env.yml. Hope it helps.

name: benchmark_gnn
channels:
  - pytorch
  - dglteam
  - fragcolor
  - conda-forge
  - defaults
dependencies:
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=1_llvm
  - absl-py=0.9.0=py37_0
  - attrs=19.3.0=py_0
  - backcall=0.1.0=py_0
  - bleach=3.1.1=py_0
  - ca-certificates=2019.11.28=hecc5488_0
  - certifi=2019.11.28=py37_0
  - cffi=1.13.2=py37h8022711_0
  - chardet=3.0.4=py37_1003
  - cloudpickle=1.3.0=py_0
  - cryptography=2.8=py37h72c5cf5_1
  - cuda10.0=1.0=0
  - cudatoolkit=10.0.130=0
  - cudnn=7.6.5=cuda10.0_0
  - cycler=0.10.0=py_2
  - cytoolz=0.10.1=py37h516909a_0
  - dask-core=2.11.0=py_0
  - dbus=1.13.6=he372182_0
  - decorator=4.4.2=py_0
  - defusedxml=0.6.0=py_0
  - dgl-cuda10.0=0.4.2=py37_0
  - entrypoints=0.3=py37_1000
  - expat=2.2.9=he1b5a44_2
  - fontconfig=2.13.1=he4413a7_1000
  - freetype=2.10.0=he983fc9_1
  - gettext=0.19.8.1=hc5be6a0_1002
  - glib=2.58.3=py37h6f030ca_1002
  - gst-plugins-base=1.14.5=h0935bb2_2
  - gstreamer=1.14.5=h36ae1b5_2
  - h5py=2.9.0=nompi_py37h513d04c_1104
  - hdf5=1.10.5=nompi_h3c11f04_1104
  - icu=58.2=hf484d3e_1000
  - idna=2.8=py37_1000
  - imageio=2.8.0=py_0
  - importlib_metadata=1.5.0=py37_0
  - intel-openmp=2019.4=243
  - ipykernel=5.1.2=py37h5ca1d4c_0
  - ipython=7.7.0=py37h5ca1d4c_0
  - ipython_genutils=0.2.0=py_1
  - ipywidgets=7.5.1=py_0
  - jedi=0.16.0=py37_0
  - jinja2=2.11.1=py_0
  - joblib=0.14.1=py_0
  - jpeg=9c=h14c3975_1001
  - jsonschema=3.2.0=py37_0
  - jupyter=1.0.0=py_2
  - jupyter_client=5.3.1=py_0
  - jupyter_console=6.0.0=py_0
  - jupyter_core=4.5.0=py_0
  - kiwisolver=1.1.0=py37hc9558a2_0
  - libblas=3.8.0=15_openblas
  - libcblas=3.8.0=15_openblas
  - libedit=3.1.20181209=hc058e9b_0
  - libffi=3.2.1=he1b5a44_1006
  - libgcc-ng=9.2.0=h24d8f2e_2
  - libgfortran-ng=7.3.0=hdf63c60_5
  - libiconv=1.15=h516909a_1005
  - liblapack=3.8.0=15_openblas
  - libopenblas=0.3.8=h5ec1e0e_0
  - libpng=1.6.37=hed695b0_0
  - libprotobuf=3.11.4=h8b12597_0
  - libsodium=1.0.17=h516909a_0
  - libstdcxx-ng=9.2.0=hdf63c60_2
  - libtiff=4.1.0=hc3755c2_3
  - libuuid=2.32.1=h14c3975_1000
  - libxcb=1.13=h14c3975_1002
  - libxml2=2.9.9=h13577e0_2
  - llvm-openmp=9.0.1=hc9558a2_2
  - lz4-c=1.8.3=he1b5a44_1001
  - markdown=3.2.1=py_0
  - markupsafe=1.1.1=py37h516909a_0
  - matplotlib=3.1.0=py37_1
  - matplotlib-base=3.1.0=py37hfd891ef_1
  - mistune=0.8.4=py37h516909a_1000
  - mkl=2019.4=243
  - nbconvert=5.6.1=py37_0
  - nbformat=5.0.4=py_0
  - ncurses=6.1=hf484d3e_1002
  - networkx=2.3=py_0
  - ninja=1.10.0=hc9558a2_0
  - notebook=6.0.0=py37_0
  - numpy=1.16.4=py37h95a1406_0
  - olefile=0.46=py_0
  - openssl=1.1.1d=h516909a_0
  - pandoc=2.9.2=0
  - pandocfilters=1.4.2=py_1
  - parso=0.6.2=py_0
  - pcre=8.44=he1b5a44_0
  - pexpect=4.8.0=py37_0
  - pickleshare=0.7.5=py37_1000
  - pillow=6.1.0=py37h6b7be26_1
  - pip=20.0.2=py_2
  - plotly=4.1.1=py_0
  - prometheus_client=0.7.1=py_0
  - prompt_toolkit=2.0.10=py_0
  - protobuf=3.11.4=py37he1b5a44_0
  - pthread-stubs=0.4=h14c3975_1001
  - ptyprocess=0.6.0=py_1001
  - pycparser=2.19=py_2
  - pygments=2.5.2=py_0
  - pyopenssl=19.1.0=py_1
  - pyparsing=2.4.6=py_0
  - pyqt=5.9.2=py37hcca6a23_4
  - pyrsistent=0.15.7=py37h516909a_0
  - pysocks=1.7.1=py37_0
  - python=3.7.4=h265db76_1
  - python-dateutil=2.8.0=py_0
  - pytorch=1.3.1=py3.7_cuda10.0.130_cudnn7.6.3_0
  - pywavelets=1.1.1=py37hc1659b7_0
  - pyzmq=19.0.0=py37h1768529_0
  - qt=5.9.7=h52cfd70_2
  - qtconsole=4.7.1=py_0
  - qtpy=1.9.0=py_0
  - readline=7.0=hf8c457e_1001
  - requests=2.22.0=py37_1
  - retrying=1.3.3=py_2
  - scikit-image=0.15.0=py37hb3f55d8_2
  - scikit-learn=0.21.2=py37hcdab131_1
  - scipy=1.3.0=py37h921218d_1
  - send2trash=1.5.0=py_0
  - setuptools=45.2.0=py37_0
  - sip=4.19.8=py37hf484d3e_1000
  - six=1.14.0=py37_0
  - sqlite=3.31.1=h7b6447c_0
  - tensorboard=1.14.0=py37_0
  - tensorboardx=1.8=py_0
  - terminado=0.8.3=py37_0
  - testpath=0.4.4=py_0
  - tk=8.6.10=hed695b0_0
  - toolz=0.10.0=py_0
  - torchvision=0.4.2=py37_cu100
  - tornado=6.0.3=py37h516909a_4
  - tqdm=4.43.0=py_0
  - traitlets=4.3.3=py37_0
  - urllib3=1.25.7=py37_0
  - wcwidth=0.1.8=py_0
  - webencodings=0.5.1=py_1
  - werkzeug=1.0.0=py_0
  - wheel=0.34.2=py_1
  - widgetsnbextension=3.5.1=py37_0
  - xorg-libxau=1.0.9=h14c3975_0
  - xorg-libxdmcp=1.1.3=h516909a_0
  - xz=5.2.4=h14c3975_1001
  - zeromq=4.3.2=he1b5a44_2
  - zipp=3.1.0=py_0
  - zlib=1.2.11=h516909a_1006
  - zstd=1.4.4=h3b9ef0a_1
  - pip:
    - cython==0.29.15
    - pandas==1.0.3
    - pot==0.6.0
    - pytz==2020.1
    - seaborn==0.10.1
prefix: /home/seok/anaconda3/envs/benchmark_gnn
williamweiwu commented 3 years ago

Hi,

Thank you for your interest and I am sorry that you have trouble.

I attach my conda environment below. I tested with script sh script_main_SBMs_nns.sh SBM_CLUSTER 0 1. You can copy them in a env.yml file and run conda env create -f env.yml. Hope it helps.

name: benchmark_gnn
channels:
  - pytorch
  - dglteam
  - fragcolor
  - conda-forge
  - defaults
dependencies:
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=1_llvm
  - absl-py=0.9.0=py37_0
  - attrs=19.3.0=py_0
  - backcall=0.1.0=py_0
  - bleach=3.1.1=py_0
  - ca-certificates=2019.11.28=hecc5488_0
  - certifi=2019.11.28=py37_0
  - cffi=1.13.2=py37h8022711_0
  - chardet=3.0.4=py37_1003
  - cloudpickle=1.3.0=py_0
  - cryptography=2.8=py37h72c5cf5_1
  - cuda10.0=1.0=0
  - cudatoolkit=10.0.130=0
  - cudnn=7.6.5=cuda10.0_0
  - cycler=0.10.0=py_2
  - cytoolz=0.10.1=py37h516909a_0
  - dask-core=2.11.0=py_0
  - dbus=1.13.6=he372182_0
  - decorator=4.4.2=py_0
  - defusedxml=0.6.0=py_0
  - dgl-cuda10.0=0.4.2=py37_0
  - entrypoints=0.3=py37_1000
  - expat=2.2.9=he1b5a44_2
  - fontconfig=2.13.1=he4413a7_1000
  - freetype=2.10.0=he983fc9_1
  - gettext=0.19.8.1=hc5be6a0_1002
  - glib=2.58.3=py37h6f030ca_1002
  - gst-plugins-base=1.14.5=h0935bb2_2
  - gstreamer=1.14.5=h36ae1b5_2
  - h5py=2.9.0=nompi_py37h513d04c_1104
  - hdf5=1.10.5=nompi_h3c11f04_1104
  - icu=58.2=hf484d3e_1000
  - idna=2.8=py37_1000
  - imageio=2.8.0=py_0
  - importlib_metadata=1.5.0=py37_0
  - intel-openmp=2019.4=243
  - ipykernel=5.1.2=py37h5ca1d4c_0
  - ipython=7.7.0=py37h5ca1d4c_0
  - ipython_genutils=0.2.0=py_1
  - ipywidgets=7.5.1=py_0
  - jedi=0.16.0=py37_0
  - jinja2=2.11.1=py_0
  - joblib=0.14.1=py_0
  - jpeg=9c=h14c3975_1001
  - jsonschema=3.2.0=py37_0
  - jupyter=1.0.0=py_2
  - jupyter_client=5.3.1=py_0
  - jupyter_console=6.0.0=py_0
  - jupyter_core=4.5.0=py_0
  - kiwisolver=1.1.0=py37hc9558a2_0
  - libblas=3.8.0=15_openblas
  - libcblas=3.8.0=15_openblas
  - libedit=3.1.20181209=hc058e9b_0
  - libffi=3.2.1=he1b5a44_1006
  - libgcc-ng=9.2.0=h24d8f2e_2
  - libgfortran-ng=7.3.0=hdf63c60_5
  - libiconv=1.15=h516909a_1005
  - liblapack=3.8.0=15_openblas
  - libopenblas=0.3.8=h5ec1e0e_0
  - libpng=1.6.37=hed695b0_0
  - libprotobuf=3.11.4=h8b12597_0
  - libsodium=1.0.17=h516909a_0
  - libstdcxx-ng=9.2.0=hdf63c60_2
  - libtiff=4.1.0=hc3755c2_3
  - libuuid=2.32.1=h14c3975_1000
  - libxcb=1.13=h14c3975_1002
  - libxml2=2.9.9=h13577e0_2
  - llvm-openmp=9.0.1=hc9558a2_2
  - lz4-c=1.8.3=he1b5a44_1001
  - markdown=3.2.1=py_0
  - markupsafe=1.1.1=py37h516909a_0
  - matplotlib=3.1.0=py37_1
  - matplotlib-base=3.1.0=py37hfd891ef_1
  - mistune=0.8.4=py37h516909a_1000
  - mkl=2019.4=243
  - nbconvert=5.6.1=py37_0
  - nbformat=5.0.4=py_0
  - ncurses=6.1=hf484d3e_1002
  - networkx=2.3=py_0
  - ninja=1.10.0=hc9558a2_0
  - notebook=6.0.0=py37_0
  - numpy=1.16.4=py37h95a1406_0
  - olefile=0.46=py_0
  - openssl=1.1.1d=h516909a_0
  - pandoc=2.9.2=0
  - pandocfilters=1.4.2=py_1
  - parso=0.6.2=py_0
  - pcre=8.44=he1b5a44_0
  - pexpect=4.8.0=py37_0
  - pickleshare=0.7.5=py37_1000
  - pillow=6.1.0=py37h6b7be26_1
  - pip=20.0.2=py_2
  - plotly=4.1.1=py_0
  - prometheus_client=0.7.1=py_0
  - prompt_toolkit=2.0.10=py_0
  - protobuf=3.11.4=py37he1b5a44_0
  - pthread-stubs=0.4=h14c3975_1001
  - ptyprocess=0.6.0=py_1001
  - pycparser=2.19=py_2
  - pygments=2.5.2=py_0
  - pyopenssl=19.1.0=py_1
  - pyparsing=2.4.6=py_0
  - pyqt=5.9.2=py37hcca6a23_4
  - pyrsistent=0.15.7=py37h516909a_0
  - pysocks=1.7.1=py37_0
  - python=3.7.4=h265db76_1
  - python-dateutil=2.8.0=py_0
  - pytorch=1.3.1=py3.7_cuda10.0.130_cudnn7.6.3_0
  - pywavelets=1.1.1=py37hc1659b7_0
  - pyzmq=19.0.0=py37h1768529_0
  - qt=5.9.7=h52cfd70_2
  - qtconsole=4.7.1=py_0
  - qtpy=1.9.0=py_0
  - readline=7.0=hf8c457e_1001
  - requests=2.22.0=py37_1
  - retrying=1.3.3=py_2
  - scikit-image=0.15.0=py37hb3f55d8_2
  - scikit-learn=0.21.2=py37hcdab131_1
  - scipy=1.3.0=py37h921218d_1
  - send2trash=1.5.0=py_0
  - setuptools=45.2.0=py37_0
  - sip=4.19.8=py37hf484d3e_1000
  - six=1.14.0=py37_0
  - sqlite=3.31.1=h7b6447c_0
  - tensorboard=1.14.0=py37_0
  - tensorboardx=1.8=py_0
  - terminado=0.8.3=py37_0
  - testpath=0.4.4=py_0
  - tk=8.6.10=hed695b0_0
  - toolz=0.10.0=py_0
  - torchvision=0.4.2=py37_cu100
  - tornado=6.0.3=py37h516909a_4
  - tqdm=4.43.0=py_0
  - traitlets=4.3.3=py37_0
  - urllib3=1.25.7=py37_0
  - wcwidth=0.1.8=py_0
  - webencodings=0.5.1=py_1
  - werkzeug=1.0.0=py_0
  - wheel=0.34.2=py_1
  - widgetsnbextension=3.5.1=py37_0
  - xorg-libxau=1.0.9=h14c3975_0
  - xorg-libxdmcp=1.1.3=h516909a_0
  - xz=5.2.4=h14c3975_1001
  - zeromq=4.3.2=he1b5a44_2
  - zipp=3.1.0=py_0
  - zlib=1.2.11=h516909a_1006
  - zstd=1.4.4=h3b9ef0a_1
  - pip:
    - cython==0.29.15
    - pandas==1.0.3
    - pot==0.6.0
    - pytz==2020.1
    - seaborn==0.10.1
prefix: /home/seok/anaconda3/envs/benchmark_gnn

Thanks very much!