-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation error #39
Comments
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 ( -Alan |
Hi Alan, That's great! After I installed and switched to gcc-10, it successfully installed deepwave-0.0.9. Thank you very much, (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. |
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. |
That was quick! Thank you, Alan! |
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 |
Hi Alan,
Hope all is well and glad to catch up with you on GitHub! I try to install deepwave via a clean conda environment but failed.
My setup is ubuntu=20.04, python=3.9, torch=1.10.1 with gpu. I suspect I need to switch to gcc 10 (current gcc 9) for tigerlake. Could you please shed some lights on how to specify gcc when installing deepwave if possible? The following is the error message I had.
Thank you very much for the help!
Best regards,
Yong
The text was updated successfully, but these errors were encountered: