GPU performance :How to set the number of mpi tasks

Dear LAMMPS Users,

I have tested the GPU performance by typing the command below:

lmp_gpu -sf gpu -pk gpu 1 -in input.dat

The performance is quite slow, even compare to the calculation of CPU with 4 cores.

The GPU version of TITAN XP have 3840 cores per GPU. I have two TITAN XP GPU on Ubuntu 16.04 desktop.

I am using the lammps verion : 13Mar17.lammps.

I wanna use “mpirun” to improve the performance.

mpirun -np 12 lmp_gpu -sf gpu -pk gpu 2 -in input.dat

Actually, how to set up the number of mpi tasks using “mpirun”.Does it related to the number of Cores in GPU.

Can anyone know about this issue and give me some suggestion to set up the number of MPI tasks?

Best Wishes

Liyi

If your simulation is slow on a single GPU but not on 4 cores, maybe it is too small to make optimal use of the GPU? How many atoms do you have? Are their pair styles ported to the GPU?

I think you can find how to use multiple GPUs with MPI in the accelerator part of the lammps manual.

The GPU cores have nothing to do with MPI. For the GPU package

you can launch LAMMPS on multiple CPU cores (MPI tasks) and

have them all use the same GPU.

Steve

Dear Stefan.

Thank you for your reply.

My simulation system has around 20,000 atoms.

Yes.the pair styles was ported to GPU.

And I use kspace_style ewald for long rang Coulombics .

Maybe I need switch to kspace_style pppm for that?

My partial input as following:

units real
atom_style full
dimension 3
boundary p p p

pair_style lj/cut/coul/long 10
#kspace_style pppm 0.00001
kspace_style ewald 0.00001
pair_modify mix arithmetic tail yes
bond_style harmonic
angle_style harmonic
dihedral_style none
improper_style none

#special_bonds lj 0.0 0.0 0.0 coul 0.0 0.0 1.0e-50

read_data data.452

neighbor 2.0 bin
neigh_modify delay 5
timestep 2.0

Thank you very much

Liyi

Dear Steve

Thank you very much for your explanation.
I am also wondering if it is possible to specify the number of cores used per job.
Example, each GPU has 3840 cores. How can I write the command line to specify only use 256 cores for current job.

Thank you
Best regards
Liyi

[



liyi bai
邮箱:liyibai2011@…24…

](https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?iconUrl=http%3A%2F%2Fmail-online.nosdn.127.net%2F8931148f878b801829a41f7b4b58591c.jpg&name=liyi%20bai&uid=example%40163.com&ftlId=3&items=["邮箱:liyibai2011%40gmail.com"])

Signature is customized by Netease Mail Master

Dear Steve

Thank you very much for your explanation.
I am also wondering if it is possible to specify the number of cores used per job.

no.

Example, each GPU has 3840 cores. How can I write the command line to specify only use 256 cores for current job.

​you cannot.

​axel.