forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14630 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
952671afd6
commit
490b26ed06
|
@ -183,6 +183,16 @@ enum {TIME_PACK, TIME_HOST_NEIGHBOR, TIME_HOST_PAIR, TIME_OFFLOAD_NEIGHBOR,
|
|||
ito = inum; \
|
||||
}
|
||||
|
||||
#define IP_PRE_omp_range_id_vec(ifrom, ito, tid, inum, \
|
||||
nthreads, vecsize) \
|
||||
{ \
|
||||
tid = 0; \
|
||||
int idelta = static_cast<int>(ceil(static_cast<float>(inum) \
|
||||
/vecsize)); \
|
||||
ifrom = 0; \
|
||||
ito = inum; \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _LMP_INTEL_OFFLOAD
|
||||
|
|
|
@ -337,8 +337,9 @@ void Info::command(int narg, char **arg)
|
|||
int *dynamic = group->dynamic;
|
||||
fprintf(out,"\nGroup information:\n");
|
||||
for (int i=0; i < ngroup; ++i) {
|
||||
fprintf(out,"Group[%2d]: %s (%s)\n",
|
||||
i, names[i], dynamic[i] ? "dynamic" : "static");
|
||||
if (names[i])
|
||||
fprintf(out,"Group[%2d]: %s (%s)\n",
|
||||
i, names[i], dynamic[i] ? "dynamic" : "static");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -437,7 +437,8 @@ void lammps_gather_atoms(void *ptr, char *name,
|
|||
if (count == 1) vector = (int *) vptr;
|
||||
else array = (int **) vptr;
|
||||
|
||||
int *copy = (int*) data;
|
||||
int *copy;
|
||||
lmp->memory->create(copy,count*natoms,"lib/gather:copy");
|
||||
for (i = 0; i < count*natoms; i++) copy[i] = 0;
|
||||
|
||||
tagint *tag = lmp->atom->tag;
|
||||
|
@ -453,7 +454,8 @@ void lammps_gather_atoms(void *ptr, char *name,
|
|||
copy[offset++] = array[i][0];
|
||||
}
|
||||
|
||||
MPI_Allreduce(MPI_IN_PLACE,data,count*natoms,MPI_INT,MPI_SUM,lmp->world);
|
||||
MPI_Allreduce(copy,data,count*natoms,MPI_INT,MPI_SUM,lmp->world);
|
||||
lmp->memory->destroy(copy);
|
||||
|
||||
} else {
|
||||
double *vector = NULL;
|
||||
|
@ -461,7 +463,8 @@ void lammps_gather_atoms(void *ptr, char *name,
|
|||
if (count == 1) vector = (double *) vptr;
|
||||
else array = (double **) vptr;
|
||||
|
||||
double *copy = (double*) data;
|
||||
double *copy;
|
||||
lmp->memory->create(copy,count*natoms,"lib/gather:copy");
|
||||
for (i = 0; i < count*natoms; i++) copy[i] = 0.0;
|
||||
|
||||
tagint *tag = lmp->atom->tag;
|
||||
|
@ -478,7 +481,8 @@ void lammps_gather_atoms(void *ptr, char *name,
|
|||
}
|
||||
}
|
||||
|
||||
MPI_Allreduce(MPI_IN_PLACE,data,count*natoms,MPI_DOUBLE,MPI_SUM,lmp->world);
|
||||
MPI_Allreduce(copy,data,count*natoms,MPI_DOUBLE,MPI_SUM,lmp->world);
|
||||
lmp->memory->destroy(copy);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue