Skip to content

AttributeError while running MACE in LAMMPS with ML-IAP #1447

@rajorshichat

Description

@rajorshichat

Hi,
I am trying to run MACE in LAMMPS with ML-IAP. Accordingly, I have followed the compilation instructions in the website. While the compilation was successful, I see the following error message when I try to start a simulation -

Traceback (most recent call last):
  File "mliap_unified_couple_kokkos.pyx", line 501, in mliap_unified_couple_kokkos.mliap_unified_connect_kokkos
  File "/gpfs/users/chattopadhyay/LAMMPS_MACE_NO_OMP/lib/python3.12/site-packages/torch/serialization.py", line 1097, in load
    return _load(
           ^^^^^^
  File "/gpfs/users/chattopadhyay/LAMMPS_MACE_NO_OMP/lib/python3.12/site-packages/torch/serialization.py", line 1526, in _load
    del torch._utils._thread_local_state.map_location
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: '_thread._local' object has no attribute 'map_location'
ERROR: Running mliappy unified module failure. (src/KOKKOS/mliap_unified_kokkos.cpp:248)
Last input line: pair_style mliap unified mace-mpa-0-medium.model-mliap_lammps.pt 0

The cmake command that I used to configure the system is as follows -

cmake -C kokkos-cuda.cmake -D CMAKE_CXX_COMPILER=$(which g++) -D CMAKE_BUILD_TYPE=Release
-D CMAKE_INSTALL_PREFIX=$(pwd) -D Kokkos_ARCH_ZEN2=ON -D Kokkos_ARCH_AMPERE80=ON 
-D BUILD_MPI=ON -D PKG_ML-IAP=ON -D PKG_ML-SNAP=ON -D MLIAP_ENABLE_PYTHON=ON 
-D PKG_PYTHON=ON -D BUILD_SHARED_LIBS=ON -D PKG_RIGID=ON -D PKG_MANYBODY=ON ../cmake

The version of CUDA is 12.6 whereas that of PyTorch is 2.4.1+cu121. I am running the simulations in a single NVIDIA A100-PCIE-40GB GPU card with the following command -

../lammps/build-mliap_no_omp/lmp -k on g 1 -sf kk -pk kokkos newton on neigh half -in in.input

I request you to kindly help me solve this issue. Thank you in advance for your suggestions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions