Gromacs in colab is not using full gpu

it is using only 0.2 GPU ram for md simulation so is there any command to use the full gpu and gpu using is L4

                         :-) GROMACS - gmx, 2024.1 (-:

Executable:   /usr/local/gromacs/bin/gmx
Data prefix:  /usr/local/gromacs
Working dir:  /content/grojob
Command line:
  gmx --version

GROMACS version:     2024.1
Precision:           mixed
Memory model:        64 bit
MPI library:         thread_mpi
OpenMP support:      enabled (GMX_OPENMP_MAX_THREADS = 128)
GPU support:         CUDA
NBNxM GPU setup:     super-cluster 2x2x2 / cluster 8
SIMD instructions:   AVX_512
CPU FFT library:     fftw-3.3.8-sse2-avx-avx2-avx2_128-avx512
GPU FFT library:     cuFFT
Multi-GPU FFT:       none
RDTSCP usage:        enabled
TNG support:         enabled
Hwloc support:       disabled
Tracing support:     disabled
C compiler:          /usr/bin/cc GNU 11.4.0
C compiler flags:    -fexcess-precision=fast -funroll-all-loops -mavx512f -mfma -mavx512vl -mavx512dq -mavx512bw -Wno-missing-field-initializers -O3 -DNDEBUG
C++ compiler:        /usr/bin/c++ GNU 11.4.0
C++ compiler flags:  -fexcess-precision=fast -funroll-all-loops -mavx512f -mfma -mavx512vl -mavx512dq -mavx512bw -Wno-missing-field-initializers -Wno-cast-function-type-strict SHELL:-fopenmp -O3 -DNDEBUG
BLAS library:        External - detected on the system
LAPACK library:      External - detected on the system
CUDA compiler:       /usr/local/cuda/bin/nvcc nvcc: NVIDIA (R) Cuda compiler driver;Copyright (c) 2005-2023 NVIDIA Corporation;Built on Tue_Aug_15_22:02:13_PDT_2023;Cuda compilation tools, release 12.2, V12.2.140;Build cuda_12.2.r12.2/compiler.33191640_0
CUDA compiler flags:-std=c++17;--generate-code=arch=compute_50,code=sm_50;--generate-code=arch=compute_52,code=sm_52;--generate-code=arch=compute_60,code=sm_60;--generate-code=arch=compute_61,code=sm_61;--generate-code=arch=compute_70,code=sm_70;--generate-code=arch=compute_75,code=sm_75;--generate-code=arch=compute_80,code=sm_80;--generate-code=arch=compute_86,code=sm_86;--generate-code=arch=compute_89,code=sm_89;--generate-code=arch=compute_90,code=sm_90;-Wno-deprecated-gpu-targets;--generate-code=arch=compute_53,code=sm_53;--generate-code=arch=compute_80,code=sm_80;-use_fast_math;-Xptxas;-warn-double-usage;-Xptxas;-Werror;-D_FORCE_INLINES;-Xcompiler;-fopenmp;-fexcess-precision=fast -funroll-all-loops -mavx512f -mfma -mavx512vl -mavx512dq -mavx512bw -Wno-missing-field-initializers -Wno-cast-function-type-strict SHELL:-fopenmp -O3 -DNDEBUG
CUDA driver:         12.20
CUDA runtime:        12.20

Hi!

Does “0.2 GPU RAM” mean 0.2 GB?

If so, it is roughly what it should be for a typical biophysical system. Molecular dynamics don’t need a lot of RAM. They need a lot of processing power (CUDA cores).

Memory usage is quite irrelevant metric for GROMACS in most typical cases. The “GPU-Util” value reported by cuda-smi is a more relevant metric if you want to check that the GPU is fully loaded.

If your goal is really to use more RAM (for testing the GPU, perhaps?), then you need to either run a bigger system (e.g., solvate your protein in a bigger water box) or launch several independent runs of GROMACS (e.g., -multidir option, or just launch several instances manually). In all cases, the simulations will run slower, because there will be more stuff to compute.

But I suspect, however, that your goal is to make the simulation run faster. If so, please refer to our user guide: Getting good performance from mdrun - GROMACS 2024.1 documentation

Thank you for explaining me but can you tell me is there any way to check how many cuda cores simulation is using because %%bash command in colab doesn’t show anything until is has completed its task so its very difficult to check the run time and no. of cores used

Hi Ashutosh.

I think that your question is more closely related to Google Colab than it is to GROMACS.

For that, I recommend that you try this solution and then report your experience to our forum:

Display GPU Usage While Code is Running in Colab

Thanks for the opportunity to make my first contribution to the GROMACS community, small as it may be.

Ivan

1 Like

Hi!

Ivan above suggests a good way to check the usage in Colab.

However, I would advise to be careful when interpreting the results. GPU utilization is reasonable metric to check that GPU is used at all :) And if you have GPU usage of 10%, then something is indeed quite wrong. But having GPU utilization at 70% does not always mean that you can push it higher (e.g., if you have a very small system with all-atom constraints). And having GPU utilization at 98% does not mean you cannot get better performance (sometimes by reducing GPU usage and making better use of the CPU). So, ideally, always look at the logs and the actual achieved performance (ns/day).