Error running on multiple pprocessors

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?

Thanks,

Neda

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&quot; membrane\_lipid\_restraint\.lammps\.col &gt; 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&quot; &gt; 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 a lot Dear Axel.

My problem was solved with exactly what you said.

Bests,

Neda