LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Error running on multiple pprocessors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Error running on multiple pprocessors

From: Neda Rafiee <ne.rafiee@...444...>
Date: Wed, 6 Sep 2017 19:39:28 +0430

Thanks a lot Dear Axel.
My problem was solved with exactly what you said.

On Tue, Sep 5, 2017 at 2:56 PM, Axel Kohlmeyer <akohlmey@...24...> wrote:

On Tue, Sep 5, 2017 at 4:29 AM, Neda Rafiee via lammps-users <> wrote:
Dear all,
according to lammps-manual, I guess my problem with running my program on multiple processors has something to do with using "shell " command in my input file. It was written in the manual that "With the exception of cd, all commands, including ones invoked via a system() call, are executed by only a
single processor, so that files/directories are not being manipulated by multiple processors."
Anyway, I want to run my system in parallel to make if faster and I have the following section in my input file:

velocity        all create 300 1503999197 dist gaussian
include         restraints/constraint_angletype
fix             1 all nvt temp 300 300 100.0
shell           sed -e "s/\$fc/5/g"  membrane_lipid_restraint.lammps.col > restraints/${outputname}.col
fix             restraint all colvars restraints/${outputname}.col output ${outputname}
shell           tr '[A-Z]' '[a-z]' < restraints/dihe.restraint |sed -e "s/\$fc/1/g" > restraints/${outputname}.dihe
include         restraints/${outputname}.dihe

Can anyone help me change this part so that I can use parallelization?

your assessment makes no sense at all. it is *exactly* for uses like above, that the shell command is only executed on one processor.
otherwise, there would be a very high chance of file corruption due to the output files being written to at the same time by multiple processes.
at any rate, the input file is only read by the first process, anyway, and then communicated to the other processes via message passing communication. so there is no gain in doing the file operations on multiple processors.



Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list

Dr. Axel Kohlmeyer  akohlmey@...24...
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.