Coder Social home page Coder Social logo

Installation error about deepwave HOT 5 CLOSED

ar4 avatar ar4 commented on August 29, 2024
Installation error

from deepwave.

Comments (5)

ar4 avatar ar4 commented on August 29, 2024

Hi Yong,

It's good to hear from you again. I hope that you are well and enjoying the new job.

Compiling the native code causes trouble for so many people that I wonder whether I should just rewrite it in Python, even if it makes it a bit slower. In your case it looks like there is a compiler bug that is causing it to expand "-march=native" into "-march=tigerlake" even though the "tigerlake" option is not supported by your compiler. I thus agree with your analysis that switching to GCC 10 should solve the problem. Another solution that might be quicker is to download the Deepwave code (git clone --depth=1 https://github.com/ar4/deepwave.git) and modify the compilation command (in setup.py) to remove the '-march=native' bits and then install this local version (pip install .). If you would instead prefer to switch to GCC 10, then I think you can specify which compiler to use with environment variables (CXX=<path to GCC 10 C++ compiler> pip install deepwave). I hope that works. Let me know how it goes.

-Alan

from deepwave.

yongmayer avatar yongmayer commented on August 29, 2024

Hi Alan,

That's great! After I installed and switched to gcc-10, it successfully installed deepwave-0.0.9.
I also agree that making it python native sounds very attractive.
On a slightly different note, I noticed from another thread regarding the 8th order implementation. However, the installation for that version is not successful. FYI, the following error message:

Thank you very much,
Yong


(seis) yma@lambda [~]$ pip install git+https://github.com/ar4/deepwave.git@8th-order
Collecting git+https://github.com/ar4/deepwave.git@8th-order
  Cloning https://github.com/ar4/deepwave.git (to revision 8th-order) to /tmp/pip-req-build-3vx65ncm
  Running command git clone -q https://github.com/ar4/deepwave.git /tmp/pip-req-build-3vx65ncm
  Running command git checkout -b 8th-order --track origin/8th-order
  Switched to a new branch '8th-order'
  Branch '8th-order' set up to track remote branch '8th-order' from 'origin'.
  Resolved https://github.com/ar4/deepwave.git to commit 30d99d7434494747ee59dbe565bfb47b6f78b42b
Requirement already satisfied: numpy in ./anaconda3/envs/seis/lib/python3.9/site-packages (from deepwave==0.0.8) (1.21.2)
Requirement already satisfied: scipy in ./anaconda3/envs/seis/lib/python3.9/site-packages (from deepwave==0.0.8) (1.7.3)
Requirement already satisfied: torch>=1.7.1 in ./anaconda3/envs/seis/lib/python3.9/site-packages (from deepwave==0.0.8) (1.10.1)
Requirement already satisfied: typing_extensions in ./anaconda3/envs/seis/lib/python3.9/site-packages (from torch>=1.7.1->deepwave==0.0.8) (3.10.0.2)
Building wheels for collected packages: deepwave
  Building wheel for deepwave (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/yxm906/anaconda3/envs/seis/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-3vx65ncm/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-3vx65ncm/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-612y98av
       cwd: /tmp/pip-req-build-3vx65ncm/
  Complete output (72 lines):
  Warning: 'classifiers' should be a list, got type 'tuple'
  running bdist_wheel
  /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/utils/cpp_extension.py:381: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
    warnings.warn(msg.format('we could not find ninja.'))
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.9
  creating build/lib.linux-x86_64-3.9/deepwave
  copying deepwave/wavelets.py -> build/lib.linux-x86_64-3.9/deepwave
  copying deepwave/__init__.py -> build/lib.linux-x86_64-3.9/deepwave
  copying deepwave/utils.py -> build/lib.linux-x86_64-3.9/deepwave
  creating build/lib.linux-x86_64-3.9/deepwave/scalar
  copying deepwave/scalar/scalar.py -> build/lib.linux-x86_64-3.9/deepwave/scalar
  copying deepwave/scalar/scalar_born.py -> build/lib.linux-x86_64-3.9/deepwave/scalar
  copying deepwave/scalar/__init__.py -> build/lib.linux-x86_64-3.9/deepwave/scalar
  creating build/lib.linux-x86_64-3.9/deepwave/base
  copying deepwave/base/pad.py -> build/lib.linux-x86_64-3.9/deepwave/base
  copying deepwave/base/model.py -> build/lib.linux-x86_64-3.9/deepwave/base
  copying deepwave/base/propagator.py -> build/lib.linux-x86_64-3.9/deepwave/base
  copying deepwave/base/extract.py -> build/lib.linux-x86_64-3.9/deepwave/base
  copying deepwave/base/__init__.py -> build/lib.linux-x86_64-3.9/deepwave/base
  running build_ext
  /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/utils/cpp_extension.py:782: UserWarning: The detected CUDA version (11.1) has a minor version mismatch with the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem.
    warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
  building 'scalar1d_cpu_iso_8_float' extension
  creating build/temp.linux-x86_64-3.9
  creating build/temp.linux-x86_64-3.9/deepwave
  creating build/temp.linux-x86_64-3.9/deepwave/scalar
  gcc -pthread -B /home/yxm906/anaconda3/envs/seis/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yxm906/anaconda3/envs/seis/include -I/home/yxm906/anaconda3/envs/seis/include -fPIC -O2 -isystem /home/yxm906/anaconda3/envs/seis/include -fPIC -DDIM=1 -DTYPE=float -Ideepwave/scalar -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/TH -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/THC -I/home/yxm906/anaconda3/envs/seis/include/python3.9 -c deepwave/scalar/scalar.cpp -o build/temp.linux-x86_64-3.9/deepwave/scalar/scalar.o -Ofast -march=native -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=scalar1d_cpu_iso_8_float -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
  gcc -pthread -B /home/yxm906/anaconda3/envs/seis/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yxm906/anaconda3/envs/seis/include -I/home/yxm906/anaconda3/envs/seis/include -fPIC -O2 -isystem /home/yxm906/anaconda3/envs/seis/include -fPIC -DDIM=1 -DTYPE=float -Ideepwave/scalar -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/TH -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/THC -I/home/yxm906/anaconda3/envs/seis/include/python3.9 -c deepwave/scalar/scalar_cpu.cpp -o build/temp.linux-x86_64-3.9/deepwave/scalar/scalar_cpu.o -Ofast -march=native -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=scalar1d_cpu_iso_8_float -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
  gcc -pthread -B /home/yxm906/anaconda3/envs/seis/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yxm906/anaconda3/envs/seis/include -I/home/yxm906/anaconda3/envs/seis/include -fPIC -O2 -isystem /home/yxm906/anaconda3/envs/seis/include -fPIC -DDIM=1 -DTYPE=float -Ideepwave/scalar -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/TH -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/THC -I/home/yxm906/anaconda3/envs/seis/include/python3.9 -c deepwave/scalar/scalar_wrapper.cpp -o build/temp.linux-x86_64-3.9/deepwave/scalar/scalar_wrapper.o -Ofast -march=native -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=scalar1d_cpu_iso_8_float -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
  <command-line>: error: expected ‘>’ before numeric constant
  /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeMetaFunctions.h:34:32: note: in expansion of macro ‘DIM’
     34 |                 template <bool DIM = false>
        |                                ^~~
  In file included from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeFunctions.h:6,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/TensorIndexing.h:11,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/ATen.h:20,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/extension.h:4,
                   from deepwave/scalar/scalar_wrapper.cpp:1:
  /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeMetaFunctions.h: In member function ‘at::meta::structured_all_dim::precompute_out<true> at::meta::structured_all_dim::precompute_out<<anonymous> >::set_dim(int64_t)’:
  /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeMetaFunctions.h:38:43: error: static assertion failed: dim already set
     38 |                         static_assert(DIM == false, "dim already set");
  /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeMetaFunctions.h: At global scope:
  <command-line>: error: expected ‘>’ before numeric constant
  /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeMetaFunctions.h:51:32: note: in expansion of macro ‘DIM’
     51 |                 template <bool DIM = false>
        |                                ^~~
  In file included from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeFunctions.h:6,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/TensorIndexing.h:11,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/ATen.h:20,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
                   from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/extension.h:4,
                   from deepwave/scalar/scalar_wrapper.cpp:1:
  /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeMetaFunctions.h: In member function ‘at::meta::structured_any_dim::precompute_out<true> at::meta::structured_any_dim::precompute_out<<anonymous> >::set_dim(int64_t)’:
  /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeMetaFunctions.h:55:43: error: static assertion failed: dim already set
     55 |                         static_assert(DIM == false, "dim already set");
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for deepwave
  Running setup.py clean for deepwave
Failed to build deepwave
Installing collected packages: deepwave
    Running setup.py install for deepwave ... error
    ERROR: Command errored out with exit status 1:
     command: /home/yxm906/anaconda3/envs/seis/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-3vx65ncm/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-3vx65ncm/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-pkuwdw4n/install-record.txt --single-version-externally-managed --compile --install-headers /home/yxm906/anaconda3/envs/seis/include/python3.9/deepwave
         cwd: /tmp/pip-req-build-3vx65ncm/
    Complete output (72 lines):
    Warning: 'classifiers' should be a list, got type 'tuple'
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.9
    creating build/lib.linux-x86_64-3.9/deepwave
    copying deepwave/wavelets.py -> build/lib.linux-x86_64-3.9/deepwave
    copying deepwave/__init__.py -> build/lib.linux-x86_64-3.9/deepwave
    copying deepwave/utils.py -> build/lib.linux-x86_64-3.9/deepwave
    creating build/lib.linux-x86_64-3.9/deepwave/scalar
    copying deepwave/scalar/scalar.py -> build/lib.linux-x86_64-3.9/deepwave/scalar
    copying deepwave/scalar/scalar_born.py -> build/lib.linux-x86_64-3.9/deepwave/scalar
    copying deepwave/scalar/__init__.py -> build/lib.linux-x86_64-3.9/deepwave/scalar
    creating build/lib.linux-x86_64-3.9/deepwave/base
    copying deepwave/base/pad.py -> build/lib.linux-x86_64-3.9/deepwave/base
    copying deepwave/base/model.py -> build/lib.linux-x86_64-3.9/deepwave/base
    copying deepwave/base/propagator.py -> build/lib.linux-x86_64-3.9/deepwave/base
    copying deepwave/base/extract.py -> build/lib.linux-x86_64-3.9/deepwave/base
    copying deepwave/base/__init__.py -> build/lib.linux-x86_64-3.9/deepwave/base
    running build_ext
    /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/utils/cpp_extension.py:381: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
      warnings.warn(msg.format('we could not find ninja.'))
    /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/utils/cpp_extension.py:782: UserWarning: The detected CUDA version (11.1) has a minor version mismatch with the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem.
      warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
    building 'scalar1d_cpu_iso_8_float' extension
    creating build/temp.linux-x86_64-3.9
    creating build/temp.linux-x86_64-3.9/deepwave
    creating build/temp.linux-x86_64-3.9/deepwave/scalar
    gcc -pthread -B /home/yxm906/anaconda3/envs/seis/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yxm906/anaconda3/envs/seis/include -I/home/yxm906/anaconda3/envs/seis/include -fPIC -O2 -isystem /home/yxm906/anaconda3/envs/seis/include -fPIC -DDIM=1 -DTYPE=float -Ideepwave/scalar -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/TH -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/THC -I/home/yxm906/anaconda3/envs/seis/include/python3.9 -c deepwave/scalar/scalar.cpp -o build/temp.linux-x86_64-3.9/deepwave/scalar/scalar.o -Ofast -march=native -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=scalar1d_cpu_iso_8_float -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
    gcc -pthread -B /home/yxm906/anaconda3/envs/seis/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yxm906/anaconda3/envs/seis/include -I/home/yxm906/anaconda3/envs/seis/include -fPIC -O2 -isystem /home/yxm906/anaconda3/envs/seis/include -fPIC -DDIM=1 -DTYPE=float -Ideepwave/scalar -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/TH -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/THC -I/home/yxm906/anaconda3/envs/seis/include/python3.9 -c deepwave/scalar/scalar_cpu.cpp -o build/temp.linux-x86_64-3.9/deepwave/scalar/scalar_cpu.o -Ofast -march=native -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=scalar1d_cpu_iso_8_float -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
    gcc -pthread -B /home/yxm906/anaconda3/envs/seis/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yxm906/anaconda3/envs/seis/include -I/home/yxm906/anaconda3/envs/seis/include -fPIC -O2 -isystem /home/yxm906/anaconda3/envs/seis/include -fPIC -DDIM=1 -DTYPE=float -Ideepwave/scalar -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/TH -I/home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/THC -I/home/yxm906/anaconda3/envs/seis/include/python3.9 -c deepwave/scalar/scalar_wrapper.cpp -o build/temp.linux-x86_64-3.9/deepwave/scalar/scalar_wrapper.o -Ofast -march=native -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=scalar1d_cpu_iso_8_float -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
    <command-line>: error: expected ‘>’ before numeric constant
    /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeMetaFunctions.h:34:32: note: in expansion of macro ‘DIM’
       34 |                 template <bool DIM = false>
          |                                ^~~
    In file included from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeFunctions.h:6,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/TensorIndexing.h:11,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/ATen.h:20,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/extension.h:4,
                     from deepwave/scalar/scalar_wrapper.cpp:1:
    /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeMetaFunctions.h: In member function ‘at::meta::structured_all_dim::precompute_out<true> at::meta::structured_all_dim::precompute_out<<anonymous> >::set_dim(int64_t)’:
    /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeMetaFunctions.h:38:43: error: static assertion failed: dim already set
       38 |                         static_assert(DIM == false, "dim already set");
    /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeMetaFunctions.h: At global scope:
    <command-line>: error: expected ‘>’ before numeric constant
    /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeMetaFunctions.h:51:32: note: in expansion of macro ‘DIM’
       51 |                 template <bool DIM = false>
          |                                ^~~
    In file included from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeFunctions.h:6,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/TensorIndexing.h:11,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/ATen.h:20,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
                     from /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/torch/extension.h:4,
                     from deepwave/scalar/scalar_wrapper.cpp:1:
    /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeMetaFunctions.h: In member function ‘at::meta::structured_any_dim::precompute_out<true> at::meta::structured_any_dim::precompute_out<<anonymous> >::set_dim(int64_t)’:
    /home/yxm906/anaconda3/envs/seis/lib/python3.9/site-packages/torch/include/ATen/NativeMetaFunctions.h:55:43: error: static assertion failed: dim already set
       55 |                         static_assert(DIM == false, "dim already set");
    error: command '/usr/bin/gcc' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/yxm906/anaconda3/envs/seis/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-3vx65ncm/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-3vx65ncm/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-pkuwdw4n/install-record.txt --single-version-externally-managed --compile --install-headers /home/yxm906/anaconda3/envs/seis/include/python3.9/deepwave Check the logs for full command output.

from deepwave.

ar4 avatar ar4 commented on August 29, 2024

That's great, and I'm glad that the fix was so easy.

I think the 8th order version should work now (I had to rename some macros to avoid a conflict as recent PyTorch versions have also started using the same names). I haven't integrated the ability to switch to the 8th order version in the master branch as the results didn't look much less dispersive to me (maybe even higher order of accuracy is needed), but hopefully it is still useful.

from deepwave.

yongmayer avatar yongmayer commented on August 29, 2024

That was quick! Thank you, Alan!

from deepwave.

ar4 avatar ar4 commented on August 29, 2024

Hi Yong,

The ability to select the 8th order propagator (as well as 2nd, 4th, or 6th), as well as a better PML and other improvements, is now included in the master branch. Unfortunately the performance of the pure TorchScript version that I hoped to use was inadequate, so it is still necessary to compile C++/CUDA code. I am trying a slightly different approach to that now, though, which might be less problematic for users (but I expect it will still be the main source of issues). The current implementation of the new PML makes this release a bit slower than the previous one, but I hope to reduce the difference in the next release.

-Alan

from deepwave.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.