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: Axel Kohlmeyer <akohlmey@...24...>
Date: Tue, 5 Sep 2017 06:26:52 -0400



On Tue, Sep 5, 2017 at 4:29 AM, Neda Rafiee via lammps-users <lammps-users@lists.sourceforge.net> 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.

axel.

 
Thanks,
Neda

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...6297....sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lammps-users




--
Dr. Axel Kohlmeyer  akohlmey@...12...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.