question about lammps


yes the simulation take longer when i ran MPI simulation. i removed mpich2
because i have mpirun and mpich2 but the simulation with mpirun remain
longer than 1 processor.
i installed ubuntu as a virtual machine.

Dear Ali

   Sorry for the slow reply. (I had a deadline on 10/10, and then I
forgot about this email conversation until now.)

   Firstly, there should be no problem using lammps on virtual
machine. I've used lammps on virtualbox (running on both google and
amazon EC2 instances).

   To get around your problem you are having, I would try building
LAMMPS from scratch. First, create a new virtual machine with a fresh
version of ubuntu (since you are using ubuntu), and install the
packages lammps needs. In ubuntu 14.04, this is how you would do

sudo apt-get install g++ build-essential
sudo apt-get install mpi-default-bin mpi-default-dev
sudo apt-get install libfftw3-dev libjpeg-dev libpng12-dev

Then download the LAMMPS source-code, and build it from source using
these commands:

cd ~/Downloads
tar xzf lammps.tar.gz
cd ~/Downloads/lammps-11Sep15/src
  # (Note: the date of your LAMMPS version will be different.)

# The following optional commands enable features of LAMMPS you might need:
make yes-manybody
make yes-rigid
make yes-class2
make yes-body
make yes-mc
make yes-replica
make yes-user-misc
make yes-asphere
make yes-colloid
make yes-xtc

# (... Include any other customizations you need to LAMMPS here)
# Then compile LAMMPS using:

make ubuntu

The binary will be named "lmp_ubuntu" not "lammps-daily". (The more
general command is "make mpi". It creates a binary named "lmp_mpi".
Either one should work.) Copy the binary file to somewhere in your
$PATH, such as:

sudo cp lmp_ubuntu /usr/local/bin/

Then start another terminal, and test to see if "mpirun -np 4
lmp_ubuntu ..." is working as you expect. This has been tested on
ubuntu 14.04, but it should work with later ubuntu versions.

   If you can show that "lammps-daily" is not working with MPI on the
same computer (or virtual machine) where lmp_ubuntu is working, then
please report baack. This would need to be fixed.

   Againm, you can test to see if the problem you are having is a
problem with lammps-daily, or a problem with MPI by testing to see if
your mpirun is working. To do that, try running the "mpi_hello.c"
example program on this web site and running it:

   Thanks for testing lammps-daily


P.S. I do think the problem might be related to the fact that you
previously installed mpich2. Another option to try would be to use a
new virtual-machine image with a fresh version of ubuntu 14.04. Then
install the packages above and
sudo apt-get install mpi-default-dev and mpi-default-bin
sudo apt-get install lammps-daily.
It is not supposed to matter which version of mpi you are using,
however I suggest using a fresh version of ubuntu because you don't
want to install both mpich2 and openmpi on the same machine, and you
want to be sure to clear-away any debris left over from installing
mpich2. Otherwise, you will problems like the ones you are
describing. I've only tested LAMMPS using openmpi, so that is the
version I would install. Again, the ubuntu packages for that version
of mpi are currently named: "mpi-default-dev" and "mpi-default-bin"