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

[BUG] Building with GPU and Metatensor package fails #2

Open
PicoCentauri opened this issue Aug 26, 2024 · 2 comments
Open

[BUG] Building with GPU and Metatensor package fails #2

PicoCentauri opened this issue Aug 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@PicoCentauri
Copy link

Summary

When trying to build lammps with the metatensor and the GPU package the final linking of the executable fails.

LAMMPS Version and Platform

Ubuntu 22.04

Expected Behavior

Lammps can be build successfully.

Actual Behavior

Lammps build fails.

/usr/bin/ld: liblammps.a(info.cpp.o): in function `LAMMPS_NS::Info::get_gpu_device_info()':
/home/loche/repos/lab-cosmo/lammps/src/info.cpp:1115: undefined reference to `lmp_gpu_device_info()'
/usr/bin/ld: liblammps.a(info.cpp.o): in function `LAMMPS_NS::Info::has_accelerator_feature(std::string const&, std::string const&, std::string const&)':
/home/loche/repos/lab-cosmo/lammps/src/info.cpp:1166: undefined reference to `lmp_gpu_config(std::string const&, std::string const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/lmp.dir/build.make:114: lmp] Error 1
make[1]: *** [CMakeFiles/Makefile2:259: CMakeFiles/lmp.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Steps to Reproduce

Further Information, Files, and Links

TORCH_PREFIX=$(python -c "import torch; print(torch.utils.cmake_prefix_path)")

cmake \
    -DPKG_GPU=yes \
    -DGPU_API=cuda \
    -DGPU_PREC=single \
    -DPKG_ML-METATENSOR=ON \
    -DCMAKE_PREFIX_PATH="$TORCH_PREFIX" \
    ../cmake

make
@PicoCentauri PicoCentauri added the bug Something isn't working label Aug 26, 2024
@Luthaf
Copy link
Member

Luthaf commented Aug 26, 2024

I assume this works if you set -DPKG_ML-METATENSOR=OFF?

@PicoCentauri
Copy link
Author

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants