LAMMPS is slower than expected

Dear LAMMPS users and Dr. Kohlmeyer,

I have implemented a Lennard jones code (with eps=sigma=1) in LAMMPS, but it is much slower than other codes. This is with no MPI. Could there be something wrong with my script?

Thomas H.
Postdoctoral Researcher in Molecular Sciences (PRMS)

Dear LAMMPS users and Dr. Kohlmeyer,

I have implemented a Lennard jones code (with eps=sigma=1) in LAMMPS, but it
is much slower than other codes. This is with no MPI. Could there be
something wrong with my script?

there certainly is something wrong with your question and your statement.

your statement and your question are *extremely* unscientific since
you fail to provide crucial information that is required to give a
meaningful answer:

- which other codes are you comparing to?
- how much slower is LAMMPS?
- on what kind of machine/hardware have you compared their performance?
- have you compared each code's performance with some published
benchmark numbers?
- did you compile each software yourself or used pre-compile
executables? if the former, did you use suitable compiler settings for
optimal performance?
- of course there can be something wrong with your script; but how can
anybody tell?
- also, when comparing to other codes, how are you making certain,
that you are simulating the same system under the same conditions?
- what size of a system and length of a run did you compare?
- how exactly did you measure the "speed" of the codes?

axel.

Hi,

sorry for that. I have a reference implementation in c++ that is
implemented in a very similar fashion. I measured total real time to
run a simulation of same size and same number of timesteps.

Attached is the LAMMPS scripts that run so slow (even for a very small
system). Maybe there is just some bad configuration in the script?

Thomas

calculate_forces.in (1.65 KB)

half_kick.in (772 Bytes)

reset_force.in (175 Bytes)

run.in (1.01 KB)

update_positions.in (461 Bytes)

pbc.in (603 Bytes)

Hi,

sorry for that. I have a reference implementation in c++ that is
implemented in a very similar fashion. I measured total real time to
run a simulation of same size and same number of timesteps.

great, so there is still no way to validate your statement
independently, since nobody here has your reference code, how can one
know, that you are actually comparing apples with apples.

Attached is the LAMMPS scripts that run so slow (even for a very small
system). Maybe there is just some bad configuration in the script?

...and you need to use 6 (six!) input scripts to do a test setup.
why don't you check the reference examples provided with LAMMPS? they
have timing info.
that should tell you whether your LAMMPS executable is performing reasonably.
for the rest, i have to repeat what i wrote before.
you are not arguing your point in a very scientific way. it is not us
that have to show you your mistake, but the burden is on you that
LAMMPS doesn't perform as advertised.

axel.

No, I have just put the different parts of the code in different files. The script starts at run.in only, so only 1 script in total.

Thomas

No, I have just put the different parts of the code in different files. The
script starts at run.in only, so only 1 script in total.

nobody will take you serious unless you actually provide verifiable
information and document your concerns about LAMMPS performance
properly.
how can we know that it is not *your* code that is broken? or you are
just having fun trolling?
particularly when considering that today is april fool's day??

axel.

Yeah you are right ;p April fools!

Richard pointed out that there were a couple of typos, fixed in the attached files.

Anders

calculate_forces.in (1.65 KB)

half_kick.in (764 Bytes)

pbc.in (603 Bytes)

reset_force.in (166 Bytes)

run.in (1.01 KB)

update_positions.in (461 Bytes)

Why don’t you run your code through a profiler to find out why it’s slow?

Stan

I guess the outcome of this would be, that LAMMPS needs to have a JIT-compiler for its scripting language. :wink:

Axel