Replies: 1 comment
|
Hi @achyuttt, The simplest workflow is to use the prebuilt CUDA package. A source build defaults to CPU unless CUDA is explicitly enabled. For NVIDIA/CUDA 12 with TensorFlow training and LAMMPS, create a fresh environment and run: python -m venv deepmd
source deepmd/bin/activate
python -m pip install -U pip
python -m pip install "deepmd-kit[gpu,cu12,lmp]"A compatible NVIDIA driver must already be installed. You can verify that TensorFlow sees the GPU with: python -c "import tensorflow as tf; print(tf.config.list_physical_devices(\"GPU\"))"When training starts, the DeePMD log should report a computing device such as If you prefer to build from source, the important options are: DP_VARIANT=cuda python -m pip install .and, for the C++ interface used by LAMMPS, add cmake -DENABLE_TENSORFLOW=TRUE \
-DUSE_TF_PYTHON_LIBS=TRUE \
-DUSE_CUDA_TOOLKIT=TRUE \
-DCMAKE_INSTALL_PREFIX=$deepmd_root ..The missing For the usual TensorFlow Typical launches are: # One GPU
CUDA_VISIBLE_DEVICES=0 lmp -in in.lammps
# Two GPUs: one MPI rank per GPU
CUDA_VISIBLE_DEVICES=0,1 mpirun -np 2 lmp -in in.lammps
# Force a CPU-only run
CUDA_VISIBLE_DEVICES="" lmp -in in.lammpsEach MPI rank can use at most one GPU. For multiple GPUs, use one rank per GPU as a starting point and benchmark the rank/thread settings for your system. Relevant documentation: If the GPU is still not detected, please share the output of Coding agent: Codex |
Uh oh!
There was an error while loading. Please reload this page.
Hello everyone,
I had a question about using the DeepMD potential in LAMMPS. I tried to compile the DeepMD from scratch but CPU version was installed. It couldn't utilize the GPU during training. Also, can I use both GPU an CPU for the potential made using DeepMD?
I want to install a GPU version of DeepMD for training and use both GPU + CPU while performing the MD in LAMMPS.
What would be the best workflow for this purpose?
I look forward to hearing from anyone soon
Thank you!
All reactions