git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7866 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2012-02-29 21:12:02 +00:00
parent 3c613c4cf4
commit 65aa4f9de4
4 changed files with 40 additions and 5 deletions

View File

@ -222,6 +222,32 @@ void VerletSplit::init()
Verlet::init();
}
/* ----------------------------------------------------------------------
setup before run
servant partition only sets up KSpace calculation
------------------------------------------------------------------------- */
void VerletSplit::setup()
{
if (comm->me == 0 && screen) fprintf(screen,"Setting up run ...\n");
if (!master) force->kspace->setup();
else Verlet::setup();
}
/* ----------------------------------------------------------------------
setup without output
flag = 0 = just force calculation
flag = 1 = reneighbor and force calculation
servant partition only sets up KSpace calculation
------------------------------------------------------------------------- */
void VerletSplit::setup_minimal(int flag)
{
if (!master) force->kspace->setup();
else Verlet::setup_minimal(flag);
}
/* ----------------------------------------------------------------------
run for N steps
master partition does everything but Kspace
@ -419,8 +445,11 @@ void VerletSplit::rk_setup()
// KSpace procs need to acquire ghost atoms and map all their atoms
// map_clear() call is in lieu of comm->exchange() which performs map_clear
// borders() call acquires ghost atoms and maps them
// NOTE: don't atom coords need to be communicated here before borders() ??
// could do this by calling r2k_comm() here and not again from run()
if (tip4p_flag) {
//r2k_comm();
MPI_Gatherv(atom->type,n,MPI_INT,atom->type,qsize,qdisp,MPI_INT,0,block);
MPI_Gatherv(atom->tag,n,MPI_INT,atom->tag,qsize,qdisp,MPI_INT,0,block);
if (!master) {

View File

@ -29,6 +29,8 @@ class VerletSplit : public Verlet {
VerletSplit(class LAMMPS *, int, char **);
~VerletSplit();
void init();
void setup();
void setup_minimal(int);
void run(int);
bigint memory_usage();

View File

@ -169,7 +169,8 @@ int FixTempRescale::modify_param(int narg, char **arg)
strcpy(id_temp,arg[1]);
int icompute = modify->find_compute(id_temp);
if (icompute < 0) error->all(FLERR,"Could not find fix_modify temperature ID");
if (icompute < 0)
error->all(FLERR,"Could not find fix_modify temperature ID");
temperature = modify->compute[icompute];
if (temperature->tempflag == 0)

View File

@ -57,13 +57,16 @@ void Replicate::command(int narg, char **arg)
// error and warning checks
if (nx <= 0 || ny <= 0 || nz <= 0) error->all(FLERR,"Illegal replicate command");
if (nx <= 0 || ny <= 0 || nz <= 0)
error->all(FLERR,"Illegal replicate command");
if (domain->dimension == 2 && nz != 1)
error->all(FLERR,"Cannot replicate 2d simulation in z dimension");
if ((nx > 1 && domain->xperiodic == 0) ||
(ny > 1 && domain->yperiodic == 0) ||
(nz > 1 && domain->zperiodic == 0))
error->warning(FLERR,"Replicating in a non-periodic dimension");
(nz > 1 && domain->zperiodic == 0)) {
if (comm->me == 0)
error->warning(FLERR,"Replicating in a non-periodic dimension");
}
if (atom->nextra_grow || atom->nextra_restart || atom->nextra_store)
error->all(FLERR,"Cannot replicate with fixes that store atom quantities");
@ -340,7 +343,7 @@ void Replicate::command(int narg, char **arg)
}
}
}
} // end of proc loop
}
// free communication buffer and old atom class