R: Re: manual output

For example, this is an output for 1 and 2 processors (identical results):

Component: -1.01982
Component: -1.02193
Component: -1.02399
Component: -1.03146
Component: -1.0334
Component: -1.03527
Component: -1.02494
Component: -1.02673
Component: -1.03225
Component: -1.03345

but when I switch to 4 processors I get:

Component: -0.345621
Component: -0.350271
Component: -0.359292
Component: -0.356795
Component: -0.360651
Component: -0.367863
Component: -0.372585
Component: -0.377683
Component: -0.375943
Component: -0.380856

, that is a big difference...

----Messaggio originale----
Da: [email protected]
Data: 11/11/2013 19.02
A: "[email protected]"<[email protected]>
Cc: "LAMMPS Users Mailing List"<[email protected]>
Ogg: Re: [lammps-users] manual output

Hello to all Lammps users!

   I've got a programming question. Let's say that I modify the file:

compute_heat_flux.cpp

introducing these lines:

-----------------------------------------
if (universe->me == 0) {
       std ::ofstream myfile;
       myfile.open ("file.dat",std::ios_base::app);

       myfile << "Component: " << vector[3]<< "\n";

       myfile.close();
   }
---------------------------------

just after the MPI_All_Reduce in ComputeHeatFlux::compute_vector().

In my mind the output file should be indipendent of the number of

processors I

use but I do not observe this. I get the same number for one and two
processors, but from three the numbers are different. Is there something

wrong?

For example, this is an output for 1 and 2 processors (identical results):

is this off the same restart w/o modification? or from freshly or
re-initialized velocities?
in the former case the differences should be small, but they should
diverge as the trajectories decorrelate. in the latter case, they will
be decorrelated immediately. if you look at the bundled example in the
example/KAPPA folder, you see the second variant and get the same kind
of difference.

so it depends on the boundary conditions, what you should get.

axel.