atom_style atomic not enabled for CUDA?

Hi everyone! I’ve been using lammps with openmpi so far, but I’ve decided to install now with the user-cuda package (GeForce GTX 560).

The main issue is that i’m not allowed to run any simulation at all, not even those in the examples listed under the …/lammps/examples/USER/cuda/ directory, it keeps yelling at me “USER-CUDA package requires a cuda enabled atom_style”. However, I’ve checked on the lammps site and it says that “atom_type atomic” is “cudable”.

I’m running the simulation with the following command:

mpirun lmp_openmpi -np 1 -c on -sf cuda < in.melt_5.0.cuda

and the in.melt_5.0.cuda file is attached, but the important things (i believe) are:

package cuda gpu/node 2
newton off

units lj
atom_style atomic

lattice fcc 0.8442
region box block 0 {xx} 0 {yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
mass 1 1.0

velocity all create 1.44 87287 loop geom

fix 1 all nve

run 5000

thanks in advance!
Pablo

in.melt_5.0.cuda (528 Bytes)

OK, after playing a bit, it looked like something in the compilation went wrong regarding file permissions, so now it works perfectly.

Pablo

Hello Pablo,

I am not sure if user-cuda is fully functionable as it is expected now. But I just managed to compile lammps with cuda,
while several problems encountered:
1) no Makefile.lammps is found in lib/cuda;
2) no Makefile.lammps is created after make; I guessed the setting from that of gpu;
3) when set prec_timer=0, the compilation failed; perhapys related to my arch, set to 1 solves;
4) once compiled, it complains "USER-CUDA package requires a cuda enabled atomic style" with any input from
     examples/USER/cuda.

I am using the latest tar-ball distribution from lammps website.

Anything wrong?

Thanks.

Lingti

? 2013-06-11 5:26, Pablo Alcain ??:

Hello Pablo,

I am not sure if user-cuda is fully functionable as it is expected now. But
I just managed to compile lammps with cuda,
while several problems encountered:
1) no Makefile.lammps is found in lib/cuda;
2) no Makefile.lammps is created after make; I guessed the setting from that
of gpu;
3) when set prec_timer=0, the compilation failed; perhapys related to my
arch, set to 1 solves;
4) once compiled, it complains "USER-CUDA package requires a cuda enabled
atomic style" with any input from
    examples/USER/cuda.

I am using the latest tar-ball distribution from lammps website.

Anything wrong?

USER-CUDA is a "user" package and thus it is the responsibility of the
corresponding contributor to keep it up-to-date. sometimes changes to
the core of LAMMPS can break such packages (i support several of
those, so i know what i am talking about), since people that develop
new features or make those changes do not always pay attention to side
effects or are simply not aware of it.

christian trott (cc'd) is the author of USER-CUDA and has changed jobs
since he originally developed USER-CUDA and that can have significant
side effects to how much time you have available to keep maintaining
such a large package.

outside of waiting for christian to track this down and fix it, you
have two alternatives:
- figure out what is wrong and correct it yourself (and contribute the
changes back, of course)
- try the GPU package

axel.

Well, it turns out that by using "lmp -suffix cuda" this problem is gone,
while "lmp -cuda on" without "-suffix cuda" does not work. Had expected it to work
the same either way.
于 2013-07-20 23:57, Axel Kohlmeyer 写道:

Well, it turns out that by using "lmp -suffix cuda" this problem is gone,
while "lmp -cuda on" without "-suffix cuda" does not work. Had expected
it to work the same either way.

technically, -cuda on / off and -suffix cuda are two very different things.

the first instantiates a special support class that does all the
additional data management required for the /cuda styles and the
--suffix flag selects those by default. now the documented behavior,
as far as i recall, is that if you compile in the USER-CUDA package,
both should be enabled by default (which i personally find a bit
irritating, since the default behavior of a large program should not
change based on compile options, but that is a different story). so
what you are reporting is thus a bit surprising, indeed, and i am not
aware of any changes that would do this explicitly, so it has to be an
unexpected side effect of some other change.

axel.

Thanks Axel.

I have another problem, the manual says that user-cuda uses only one
processor (cpu core)
per gpu, while the gpu package can use multiple cpu per gpu. It seems to
me that
I can run jobs with 4 processors and 2 gpus with user-cuda. Has the
limitation on # of cpus
been removed or did I do something wrong?

Thanks.
Lingti

�� 2013-07-21 13:04, Axel Kohlmeyer �:

Thanks Axel.

I have another problem, the manual says that user-cuda uses only one
processor (cpu core) per gpu, while the gpu package can use multiple cpu per gpu. It seems to
me that I can run jobs with 4 processors and 2 gpus with user-cuda. Has the
limitation on # of cpus been removed or did I do something wrong?

have you looked at the performance?

axel.

Not yet; just have the gpu installed, trying to figure out how it works with lammps.
Lingti
于 2013-07-21 14:57, Axel Kohlmeyer 写道:

I’ll look into the issue with Makefile.lammps in the lib/cuda
dir. That is broken due to some recent changes.

The rest of your troubles appear to be due to not using
-suffix cuda or not explicitly specifying using atom_style atomic/cuda
in your input script, as Axel says.

Steve

The USER-CUDA package will only couple one CPU with one GPU.
Of course if you have a system with many nodes, you can run N CPUs
coupled to N GPUs. The GPU package will allow multiple CPUs
to use the same GPU and ditto for systems with many multicore CPUs
hooked to many GPUs.

Steve

Thanks Steve.

What you said here is exactly on the manual. But I did can run lammps with
4 cpus and 1 gpu with user-cuda, and it is faster than 1 cpu + 1 gpu.
I will check this further.

Thanks.
Lingti

�� 2013-07-22 22:58, Steve Plimpton �: