GROMACS modification: No
The gromacs mdrun jobs are run on a system with 2 x nvidia A100 gpus and 1 x AMD-7542 processor based system. We want to find out, the time spent by gromacs on cpu & gpu separately. For example, if the job takes 10 minutes to complete, then is it possible to find out how much time it’s spent on cpu & gpu respectively. Is there any flag available to mdrun, that can fetch this information?
It is not possible to get GPU time with CUDA during mdrun, as there is no reliable way of getting GPU time. You will have to run a profiler to get that. I think that CPU will always be 100% busy, either computing or waiting (spinning) for results from the GPU. The only thing that you can see, in the table at the end of the log file, is how long the CPU has been waiting for results from the GPU.
You can use
nvidia-smi dmon to monitor GPU utilization while running the simulation or as @hess noted use nsight systems to gather a trace and analyze GPU utilization using that tool.
Note that only a single core will be busy, the rest will be idle.