Skip to content
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

MACE : Lammps with GPU support error #238

Closed
Amitcuhp opened this issue Nov 24, 2023 · 7 comments
Closed

MACE : Lammps with GPU support error #238

Amitcuhp opened this issue Nov 24, 2023 · 7 comments

Comments

@Amitcuhp
Copy link

Installed gpu version of lammps succesfully. When trying lammps with gpu this error came:-

CUDA found, setting device type to torch::kCUDA.
Loading MACE model from "MACE_model_swa.model-lammps.pt" ...Loading MACE model from "MACE_model_swa.model-lammps.pt" ...Loading MACE model from "MACE_model_swa.model-lammps.pt" ...Loading MACE model from "MACE_model_swa.model-lammps.pt" ...Exception: CUDA error: invalid device ordinal
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Exception raised from c10_cuda_check_implementation at ../c10/cuda/CUDAException.cpp:31 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x57 (0x7fdd75152457 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::string const&) + 0x64 (0x7fdd7511c3ec in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libc10.so)
frame #2: c10::cuda::c10_cuda_check_implementation(std::string const&, std::string const&, int, bool) + 0xb4 (0x7fdd75041c64 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libc10_cuda.so)
frame #3: + 0x222cc (0x7fdd7501d2cc in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libc10_cuda.so)
frame #4: + 0x2f15bd4 (0x7fdd0218dbd4 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cuda_cu.so)
frame #5: + 0x2d26936 (0x7fdd01f9e936 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cuda_cu.so)
frame #6: + 0x2d26a70 (0x7fdd01f9ea70 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cuda_cu.so)
frame #7: at::_ops::empty_strided::redispatch(c10::DispatchKeySet, c10::ArrayRefc10::SymInt, c10::ArrayRefc10::SymInt, c10::optionalc10::ScalarType, c10::optionalc10::Layout, c10::optionalc10::Device, c10::optional) + 0xf3 (0x7fdd2d9dc713 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #8: + 0x29f6efe (0x7fdd2dceeefe in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #9: at::_ops::empty_strided::call(c10::ArrayRefc10::SymInt, c10::ArrayRefc10::SymInt, c10::optionalc10::ScalarType, c10::optionalc10::Layout, c10::optionalc10::Device, c10::optional) + 0x1bb (0x7fdd2da1f9cb in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #10: + 0x1c5eaa7 (0x7fdd2cf56aa7 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #11: at::native::_to_copy(at::Tensor const&, c10::optionalc10::ScalarType, c10::optionalc10::Layout, c10::optionalc10::Device, c10::optional, bool, c10::optionalc10::MemoryFormat) + 0x1823 (0x7fdd2d2bddc3 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #12: + 0x2bb171b (0x7fdd2dea971b in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #13: at::_ops::_to_copy::redispatch(c10::DispatchKeySet, at::Tensor const&, c10::optionalc10::ScalarType, c10::optionalc10::Layout, c10::optionalc10::Device, c10::optional, bool, c10::optionalc10::MemoryFormat) + 0xf5 (0x7fdd2d6f7005 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #14: + 0x29f6c73 (0x7fdd2dceec73 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #15: at::_ops::_to_copy::redispatch(c10::DispatchKeySet, at::Tensor const&, c10::optionalc10::ScalarType, c10::optionalc10::Layout, c10::optionalc10::Device, c10::optional, bool, c10::optionalc10::MemoryFormat) + 0xf5 (0x7fdd2d6f7005 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #16: + 0x3db99bb (0x7fdd2f0b19bb in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #17: + 0x3db9e2e (0x7fdd2f0b1e2e in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #18: at::_ops::_to_copy::call(at::Tensor const&, c10::optionalc10::ScalarType, c10::optionalc10::Layout, c10::optionalc10::Device, c10::optional, bool, c10::optionalc10::MemoryFormat) + 0x1f9 (0x7fdd2d777569 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #19: at::native::to(at::Tensor const&, c10::Device, c10::ScalarType, bool, bool, c10::optionalc10::MemoryFormat) + 0xc7 (0x7fdd2d2b60f7 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #20: + 0x2d6fb59 (0x7fdd2e067b59 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #21: at::_ops::to_device::call(at::Tensor const&, c10::Device, c10::ScalarType, bool, bool, c10::optionalc10::MemoryFormat) + 0x1ba (0x7fdd2d8dea6a in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #22: torch::jit::Unpickler::readInstruction() + 0x1af0 (0x7fdd300b42a0 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #23: torch::jit::Unpickler::run() + 0x90 (0x7fdd300b5080 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #24: torch::jit::Unpickler::parse_ivalue() + 0x18 (0x7fdd300b51d8 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #25: torch::jit::readArchiveAndTensors(std::string const&, std::string const&, std::string const&, c10::optional<std::function<c10::StrongTypePtr (c10::QualifiedName const&)> >, c10::optional<std::function<c10::intrusive_ptr<c10::ivalue::Object, c10::detail::intrusive_target_default_null_typec10::ivalue::Object > (c10::StrongTypePtr, c10::IValue)> >, c10::optionalc10::Device, caffe2::serialize::PyTorchStreamReader&, c10::Type::SingletonOrSharedTypePtrc10::Type (*)(std::string const&), std::shared_ptrtorch::jit::DeserializationStorageContext) + 0x45a (0x7fdd300726fa in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #26: + 0x4d65297 (0x7fdd3005d297 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #27: + 0x4d67fdb (0x7fdd3005ffdb in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #28: torch::jit::import_ir_module(std::shared_ptrtorch::jit::CompilationUnit, std::string const&, c10::optionalc10::Device, std::unordered_map<std::string, std::string, std::hashstd::string, std::equal_tostd::string, std::allocator<std::pair<std::string const, std::string> > >&) + 0x3a2 (0x7fdd30061a12 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #29: torch::jit::import_ir_module(std::shared_ptrtorch::jit::CompilationUnit, std::string const&, c10::optionalc10::Device) + 0x7b (0x7fdd3006212b in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #30: torch::jit::load(std::string const&, c10::optionalc10::Device) + 0xa5 (0x7fdd30062205 in /home/Raman/lammps-mace-gpu/libtorch-gpu/lib/libtorch_cpu.so)
frame #31: LAMMPS_NS::PairMACE::coeff(int, char**) + 0x115 (0x7fdd6ecfc625 in /home/Raman/lammps-mace-gpu/lammps/build-kokkos-cuda/liblammps.so.0)
frame #32: LAMMPS_NS::Input::pair_coeff() + 0x1e3 (0x7fdd6eaf4b73 in /home/Raman/lammps-mace-gpu/lammps/build-kokkos-cuda/liblammps.so.0)
frame #33: LAMMPS_NS::Input::execute_command() + 0x76e (0x7fdd6eafa3de in /home/Raman/lammps-mace-gpu/lammps/build-kokkos-cuda/liblammps.so.0)
frame #34: LAMMPS_NS::Input::file() + 0x155 (0x7fdd6eafacb5 in /home/Raman/lammps-mace-gpu/lammps/build-kokkos-cuda/liblammps.so.0)
frame #35: /home/Raman/lammps-mace-gpu/lammps/build-kokkos-cuda/lmp() [0x404528]
frame #36: __libc_start_main + 0xf5 (0x7fdd6d4ef555 in /lib64/libc.so.6)
frame #37: /home/Raman/lammps-mace-gpu/lammps/build-kokkos-cuda/lmp() [0x40467e]

application called MPI_Abort(MPI_COMM_WORLD, 1) - process 2

@Amitcuhp
Copy link
Author

First I have trained using develop branch .
After that converted the model by create-lammps.py script.
Then I am not able to use it.

@wcwitt
Copy link
Collaborator

wcwitt commented Nov 24, 2023 via email

@Amitcuhp
Copy link
Author

Oh sorry sir, got it. It is working fine

@nikhilss219
Copy link

Hi @Amitcuhp : Can you please guide me the steps that you followed for installation of LAMMPS for MACE.

@Amitcuhp
Copy link
Author

  1. Installed Spack
    Then downloaded the cudnn@8.2.0.53-11.3, cuda@11.0.2, gcc@8.2.0 and loaded by spack.

  2. Then as usual followed the https://mace-docs.readthedocs.io/en/latest/guide/lammps.html
    mkdir lammps-mace-gpu
    cd lammps-mace-gpu
    git clone --branch=mace --depth=1 https://github.com/ACEsuit/lammps
    wget https://download.pytorch.org/libtorch/cu117/libtorch-cxx11-abi-shared-with-deps-1.13.1%2Bcu117.zip
    unzip libtorch-cxx11-abi-shared-with-deps-1.13.1+cu117.zip
    mv libtorch libtorch-gpu

(Here the libtorch-cxx version you have to look for your machine, for my machine the cu116 worked)

  1. cd lammps
    mkdir build-kokkos-cuda
    cd build-kokkos-cuda
    cmake
    -D CMAKE_BUILD_TYPE=Release
    -D CMAKE_INSTALL_PREFIX=$(pwd)
    -D BUILD_MPI=yes
    -D BUILD_OMP=yes
    -D BUILD_SHARED_LIBS=yes
    -D LAMMPS_EXCEPTIONS=yes
    -D PKG_KOKKOS=yes
    -D Kokkos_ARCH_AMDAVX=yes
    -D Kokkos_ARCH_AMPERE100=yes
    -D Kokkos_ENABLE_CUDA=yes
    -D Kokkos_ENABLE_OPENMP=yes
    -D Kokkos_ENABLE_DEBUG=no
    -D Kokkos_ENABLE_DEBUG_BOUNDS_CHECK=no
    -D Kokkos_ENABLE_CUDA_UVM=no
    -D CMAKE_CXX_COMPILER=$(pwd)/../lib/kokkos/bin/nvcc_wrapper
    -D PKG_ML-MACE=yes
    -D CMAKE_PREFIX_PATH=$(pwd)/../../libtorch-gpu
    ../cmake

  2. make -j 12

@nikhilss219
Copy link

nikhilss219 commented Mar 14, 2024

Thanks for the prompt reply @Amitcuhp. I am still facing an error with this installation. I followed the steps that you have listed. I face issues during the make -j 12 command.
I have changed the cu117 version to cu116 version also. You have mentioned that i should select the correct cu*** version for my machine. How do you determine this.
I have also added the errors that are shown after the make command reaches 100%.

/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to cusparseSpSV_bufferSize@libcusparse.so.11' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to cusparseSpSM_createDescr@libcusparse.so.11'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to c10::Warning::Warning(c10::variant<c10::Warning::UserWarning, c10::Warning::DeprecationWarning>, c10::SourceLocation const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::chunk_nested_tensor(at::Tensor const&, long, long)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to cusparseSpSM_analysis@libcusparse.so.11' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::nested_dense_elementwise_stub'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to cusparseSpSV_destroyDescr@libcusparse.so.11' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::max_unary_out(at::Tensor const&, at::Tensor&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::qkv_projection(at::Tensor const&, at::Tensor const&, at::Tensor const&, long, at::Tensor const&)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::NestedTensor_tanh(at::Tensor const&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to c10::SymInt::toSymNodeImpl() const' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::copy_nested_(at::Tensor&, at::Tensor const&, bool)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::dense_dim_strided(at::Tensor const&)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::NestedTensor_tanh_(at::Tensor&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to c10d::Store::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::threshold_backward_sparse_compressed_out(at::Tensor const&, at::Tensor const&, c10::Scalar const&, at::Tensor&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::_ops::narrow::call(at::Tensor const&, long, c10::SymInt, c10::SymInt)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to cusparseSpSV_createDescr@libcusparse.so.11'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::squeeze_dim_nested(at::Tensor const&, long)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::ops::split_with_sizes::call(at::Tensor const&, c10::ArrayRefc10::SymInt, long)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::bmm_nt(at::Tensor const&, at::Tensor const&)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::sum_coo(at::Tensor const&, c10::optionalc10::ScalarType)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to c10::cuda::CUDACachingAllocator::allocator' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to cusparseSDDMM_preprocess@libcusparse.so.11'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::_ops::_efficient_attention_forward::call(at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::optional<at::Tensor> const&, c10::optional<long>, bool, bool)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::NestedTensor_div_Tensor(at::Tensor const&, at::Tensor const&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to cusparseSpSV_analysis@libcusparse.so.11' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::fill_nested
(at::Tensor&, at::Tensor const&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to c10::SymFloat::toSymNodeImpl() const' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::_to_copy_nested(at::Tensor const&, c10::optionalc10::ScalarType, c10::optionalc10::Layout, c10::optionalc10::Device, c10::optional, bool, c10::optionalc10::MemoryFormat)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to cusparseSpSM_bufferSize@libcusparse.so.11' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::unsqueeze_nested(at::Tensor const&, long)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::NestedTensor_neg_(at::Tensor&)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::relu_sparse(at::Tensor const&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::Context::userEnabledMemEfficientSDP() const' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::NestedTensor_neg(at::Tensor const&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::bmm_nn(at::Tensor&, at::Tensor const&, at::Tensor const&)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to c10::SymInt::SymInt(c10::intrusive_ptr<c10::SymNodeImpl, c10::detail::intrusive_target_default_null_typec10::SymNodeImpl >)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::_ops::pad::call(at::Tensor const&, c10::ArrayRef<c10::SymInt>, c10::basic_string_view<char>, c10::optional<double>)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to cusparseSDDMM@libcusparse.so.11'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to c10::Warning::Warning(c10::variant<c10::Warning::UserWarning, c10::Warning::DeprecationWarning>, c10::SourceLocation, char const*, bool)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::_ops::sparse_coo_tensor_with_dims_and_tensors::call(c10::SymInt, c10::SymInt, c10::ArrayRefc10::SymInt, at::Tensor const&, at::Tensor const&, c10::optionalc10::ScalarType, c10::optionalc10::Layout, c10::optionalc10::Device, c10::optional)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to cusparseSpSM_solve@libcusparse.so.11' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::relu_sparse
(at::Tensor&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::narrow_symint(at::Tensor const&, long, c10::SymInt, c10::SymInt)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to c10::cuda::getFreeMutex()'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to torch::Library::_impl(char const*, torch::CppFunction&&, torch::_RegisterOrVerify) &' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::threshold_backward_sparse_compressed(at::Tensor const&, at::Tensor const&, c10::Scalar const&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::nested_layer_norm(at::Tensor const&, c10::ArrayRef<long>, c10::optional<at::Tensor> const&, c10::optional<at::Tensor> const&, double)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::NestedTensor_div_Scalar(at::Tensor const&, c10::Scalar const&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::fill_nested_(at::Tensor&, c10::Scalar const&)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to c10::cuda::c10_cuda_check_implementation(char const*, char const*, int, bool)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::masked_softmax(at::Tensor&, c10::optional<at::Tensor>, at::Tensor const&, c10::optional<long>)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::squeeze_nested(at::Tensor const&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to c10::warn(c10::Warning const&)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to c10::WarningUtils::get_warnAlways()'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to cusparseSpSV_solve@libcusparse.so.11' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::diag_out(at::Tensor const&, long, at::Tensor&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::sparse_dim_strided(at::Tensor const&)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to cusparseSDDMM_bufferSize@libcusparse.so.11'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to cusparseSpSM_destroyDescr@libcusparse.so.11' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::transform0213_gemm_nt_bias(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to long c10::detail::maybe_wrap_dim_slow<long>(long, long, bool)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::threshold_backward_sparse(at::Tensor const&, at::Tensor const&, c10::Scalar const&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::threshold_backward_sparse_out(at::Tensor const&, at::Tensor const&, c10::Scalar const&, at::Tensor&)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::relu_sparse_csr(at::Tensor const&)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::relu_sparse_csr_(at::Tensor&)' /usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to at::native::empty_like_nested(at::Tensor const&, c10::optionalc10::ScalarType, c10::optionalc10::Layout, c10::optionalc10::Device, c10::optional, c10::optionalc10::MemoryFormat)'
/usr/bin/ld: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda.so: undefined reference to `cusparseSpMatSetAttribute@libcusparse.so.11'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/lmp.dir/build.make:100: lmp] Error 1
make[1]: *** [CMakeFiles/Makefile2:358: CMakeFiles/lmp.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Thanks again.

@nikhilss219
Copy link

Hi @Amitcuhp , I was able to compile using your instructions thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants