Simulation box effect.

Hello All,

I have a basic question about the simulation box dimensions. I understand when you are using Periodic boundary conditions (PBC)
the box size will have some effect on the simulation as you are dictating how far/near the image atoms are. While using non-periodic
conditions will the box dimensions have any effect on the minimization, pressure, equilibration of the atomic structure contained in the
box? In my case it is CNTs which are being relaxed either using Molecular mechanics or through quenching in MD.

Thanks,

Freddie.

Hello All,

I have a basic question about the simulation box dimensions. I understand
when you are using Periodic boundary conditions (PBC)
the box size will have some effect on the simulation as you are dictating
how far/near the image atoms are. While using non-periodic
conditions will the box dimensions have any effect on the minimization,
pressure, equilibration of the atomic structure contained in the
box? In my case it is CNTs which are being relaxed either using Molecular
mechanics or through quenching in MD.

in principle there should be no impact of the box
size w/o periodic boundary conditions (or with
PBC, provided the box is so large that images
are outside the cutoff range).

there may still be little numerical differences
if you run in parallel, since the volume will
determine how the atoms are divided into
domains, and that in turn can change the
order in which forces are summed up and
that in turn can lead to little numerical differences
since in floating math the order of summation
matters.

axel.

Dr. Axel,

Thanks a lot for clarifying that.

Also now my simulations consists of moving CNTs all around the simulation box,
so usually i have to declare the box size to be almost thrice the CNTs i am simulating because eventually
some of the tubes will occupy that space. My question is will declaring a large box which consists of atoms
only in some confined space initially, effect the speed of my simulation? I am not aware of how the parallelization
occurs but i use the Balance command for load balance. I tried using Fix balance but did not notice any improvement
or am i doing it wrong (incorrect frequency). Before i play further with the ‘fix balance’ command i want to know if using
Fix balance will give me any improvement in my case?

Regards,
Freddie.

Dr. Axel,

Thanks a lot for clarifying that.

Also now my simulations consists of moving CNTs all around the simulation
box,
so usually i have to declare the box size to be almost thrice the CNTs i am
simulating because eventually
some of the tubes will occupy that space. My question is will declaring a
large box which consists of atoms
only in some confined space initially, effect the speed of my simulation? I
am not aware of how the parallelization
occurs but i use the Balance command for load balance. I tried using Fix
balance but did not notice any improvement
or am i doing it wrong (incorrect frequency). Before i play further with the
'fix balance' command i want to know if using
Fix balance will give me any improvement in my case?

sorry, but i would be able to predict the outcome of simulations
from such a vague description, i would be working the stock
market and make a ton of money. the lammps documentation
states what it does and what you can do, and if you do proper
systematic tests, you should be able to find out what is
helpful and what not. nobody can do this for you.

another option to consider in cases, where domain decomposition
may lead to load imbalances, is to use multi-threading instead
(or GPUs in the extreme case) the multi-threaded pair styles
parallelize over atoms and not domains (well over atoms *in*
the domain when using both MPI and OpenMP, but with larger
domains, it may be easier to maintain a similar number of atoms
per domain).

in the end "there ain't no escape from the blues!"

axel.

Dr.Axel,

With you answering so many people’s vague questions like mine, you might be able to crack the
stock market secret :slight_smile: .

I do believe there is no escape from trying it myself but i wanted to take a informed decision.
I did try what you said. Actually that is what i was doing all the time. I use MPI + OpenMP
parallelization for my simulation and it gave me the minimum simulation time.

Recently i got access to more number of systems/processors but unfortunately i can’t install
OpenMP in them due to user restrictions. I am just using MPI parallelization and found that
for the minimization method (HFTN) i use the increase in number of processors does not
necessarily mean decrease in simulation time.

It would be helpful if you can suggest what factors to consider in general to maximize the full use
of the resources while doing minimization.

Thanks for your help.

Regards,
Freddie.

P.S. On an unrelated note, can anyone suggest me where to get proper information of OpenMP regarding
launching of OpenMP+MPI jobs across multiple nodes. Is it possible that if the launching command is not
proper the OpenMP jobs might launch across different nodes though it is a shared memory parallelization?
or will it automatically assign OpenMP jobs to corresponding node?

Dr.Axel,

With you answering so many people's vague questions like mine, you might be
able to crack the
stock market secret :slight_smile: .

I do believe there is no escape from trying it myself but i wanted to take a
informed decision.
I did try what you said. Actually that is what i was doing all the time. I
use MPI + OpenMP
parallelization for my simulation and it gave me the minimum simulation
time.

Recently i got access to more number of systems/processors but unfortunately
i can't install
OpenMP in them due to user restrictions. I am just using MPI parallelization

OpenMP doesn't need to be installed.
all decent modern compilers support it.

and found that
for the minimization method (HFTN) i use the increase in number of
processors does not
necessarily mean decrease in simulation time.

yup. as strange as it may seem,
but bigger is not always better.
sometimes "less is more".

It would be helpful if you can suggest what factors to consider in general
to maximize the full use
of the resources while doing minimization.

there is no "silver bullet" that will give you
a simple answer. this is far to dependent
on the system at hand, its geometry and
its interactions. also, there are different
interpretations of "full use". whatever you
do, you will always have to make a compromise
and trade reduced parallel efficiency with
faster overall speed.

Thanks for your help.

Regards,
Freddie.

P.S. On an unrelated note, can anyone suggest me where to get proper
information of OpenMP regarding
launching of OpenMP+MPI jobs across multiple nodes. Is it possible that if
the launching command is not
proper the OpenMP jobs might launch across different nodes though it is a
shared memory parallelization?

this depends on the MPI launcher. the OpenMPI library has a
-npernode flag that will define how many MPI tasks per physical
node are launched. for other MPI libraries/implementations
similar things exist, but under different flags. on Cray XT/XE/XK
machines, you have a "distance" flag to aprun. you have to read
the documentation of the tools you use carefully. if you want
the most efficiency to you have to earn it.

there ain't no escape from the blues.

or will it automatically assign OpenMP jobs to corresponding node?

most of the time, no. an MPI launcher has no idea of OpenMP.

axel.