LAMMPS with GPU

Dear all,
I have compiled LAMMPS with GPU according to the documentation in LAMMPS. However, when I run the binary file it goes to CPU not in the GPU. Could anyone say how it supposed to run?

With best regards,
Pritam

Dear all,
I have compiled LAMMPS with GPU according to the documentation in LAMMPS. However, when I run the binary file it goes to CPU not in the GPU. Could anyone say how it supposed to run?

did you change your input file accordingly, or did you change your
command line to run LAMMPS accordingly?

GPU acceleration is a optional feature and requires activation (via
the package command or command line flag) and use of suitable adapted
styles (used either explicitly or via suffixes selectable via the
suffix command or command line flag).

in other words: please have another, careful look at the documentation.

axel.

I’m new in using gpu. I think there are two modifications that should be applied when using gpu: (1) changing the input file; and (2) modifying the job script file (if submitting to a supercomputer)

1-
I am using the suffix command in the beginning of the input file:

suffix gpu

Just a short question, did you compile lammps with GPU?
I have used the job script where the command line
srun --gres=gpu:1 lmp_kai.openmpi -sf gpu -pk gpu 2 -in Test.in

I did not make any change in INPUT script.

With best regards,
Pritam

Yes, absolutely. I’m going to use the lammps with gpu feature on the machine.

And, does it work well when you used only this command line?

Bests
X

Yes, it was working with me. But some other problem arises which is not related to the initiation of GPU. I am trying to solve it.
Best wishes,
Pritam

Unfortunately this command does not work for me. esp. the machine does not recognize “–gres=gpu:1” part

If you are using the GPU package (as opposed to USER-CUDA or KOKKOS pacakges),

there is a doc/Section_acclerate_gpu.html doc page which explains

how to run with the GPU package. Usually, you

don’t need to change your input script at all,

you can control everything thru command-line args

used to launch LAMMPS and enable the GPU usage.

Steve

that’s a an option of the queue manager (slurm). it means you are asking, from general resources (gres) 1 gpu. if you don’t have any gpu available as gres in the partition you are running in slurm, you won’t be able to request one.