GPU utilization and MPI

GROMACS version: 2021
GROMACS modification: Yes/No
Here post your question
I have NVIDIA Geforce GTX 1660 super,6GB which is CUDA enabled.
During the GROMACS installation I used DGMX_GPU=cuda in command line.
Now, I am running a 20ns job by using simple command gmx mdrun -s topol-nvt.tpr -deffnm nvt.
How do I confirm that job is using GPU? or is there anything else need to write in command line?
Another query, can I use MPI and GPU simultaneously for increasing the efficiency?

Take a look at the log file. There you will find a hardware detection report as well as a hardware usage and task assignment report which will indicate whether you are using a GPU and which of the computations are offloaded.

To check GPU utilization use the nvidia-smi tool.

If you have a single GPU, you have no need for MPI. In addition, GROMACS has a built-in MPI (called thread-MPI) which allows MPI-type parallelization as long as you run on a single node.

Thank you so much for your information.
I will check my log file.
Is there anything additional need to write to command line for GPU utilization?

That depends on your use-case; see

Okay, Thanks a lot!

Dear pszilard,
I have checked my log file where I found
GROMACS version: 2020.1-Ubuntu-2020.1-1
Precision: Single
Memory model:64bit
MPI library : thread_mpi
OpenMP support : enabled (GMX_OPENMP_MAX_THREADS = 64)
GPU support: disabled.
Then I reinstall the gromacs with command: cmake … -DGMX_BUILD_OWN_FFTW=ON -DGMX_GPU=CUDA -DGMX_MPI=ON
After that when I am trying to run using gmx mdrun … -nb gpu -pme gpu
the system is showing the following:
Inconsistency in user input:
Nonbonded interactions on the GPU were requested with -nb gpu, but the GROMACS binary has been build without GPU support.Either run without selecting GPU options or recompile GROMACS with GPU support enabled.
Now What can be done to solve this?

That was GROMACS provided as an Ubuntu package built without GPU support.

That suggests that you still do not have GPU support. Have you checked your log?

Yeah I have checked my log after getting your suggestion. I found that run was performed completely without GPU support and it took near about 6 hours for 20 ns run.
Then I reinstall the GROMACS package and able to enable the GPU support. I run following command gmx mdrun -s topol-nvt.tpr -deffnm nvt -nb gpu for the same system what I used before. This time it has been taken 9 hours for the similar 20 ns run.
I was wondering that why it has taken so long time in spite of getting GPU support?

Please share you log files and some information about the simulated system, otherwise it is hard to assess the performance of your simulations.

1 Like

I have shared two screenshots of the log file because presently I don’t have the access the computer for the sharing the log file. Kindly look these images and I will share you tomorrow the original file.
Here I am simulating the Ionic Liquid.
Thanks a lot for your kind concern.