[lammps-users] Parallel Computing problem with changing the fix_deposit.cpp and .h code

Dear steve:

I have changed the fix_deposit.h and cpp code. The puopose is keeping the numbers of deposited atoms constant. Here is my accession code:

int FixDeposit::setmask()
int mask = 0;
return mask;

/* ----------------------------------------------------------------------
perform particle insertion
------------------------------------------------------------------------- */

void FixDeposit::pre_exchange()

int i,j;
> int flag,flagall;
> double coord[3],lamda[3],delx,dely,delz,rsq;
> double *newcoord;
> double **x = atom->x;
> int *mask = atom->mask;
> int nlocal = atom->nlocal;
> int natoms;
> int data = 0;
> Region *region = domain->regions[iregion];
> for(int i=0; i< nlocal ; i++) {
> if (mask && groupbit && region->match(x[0],x[1],x[2])) data += 1;
> }
> MPI_Allreduce(&data,&natoms,1,MPI_INT,MPI_SUM,world);

// just return if should not be called on this timestep

if (next_reneighbor != update->ntimestep) return;
if (natoms >= nc) {
next_reneighbor += nfreq;

// compute current offset = bottom of insertion volume

double offset = 0.0;
if (rateflag) offset = (update->ntimestep - nfirst) * update->dt * rate;

double *sublo,*subhi;
if (domain->triclinic == 0) {
When serial compution is in my own computer,there is no problem.However when parallel compution is in cluster with the “fix deposit” command,the log file will be vacant and there is no dump file will be dumped.I can’t find the problem.So I ask you for help.I’ll be very thankful if you can help me with this problem. Have a good day!

Look forward to hearing from you soon.Thanks.

Beat wishes!

Wang XinHai

Sorry - I don't debug other people's code. It's
hard enough to debug my own. If you are writing
code and changing LAMMPS I suggest you
print statements and debug it yourself.


2010/9/14 <[email protected]>: