From 490b26ed064343b59043cdbf41445b23dea43561 Mon Sep 17 00:00:00 2001 From: sjplimp <sjplimp@f3b2605a-c512-4ea7-a41b-209d697bcdaa> Date: Mon, 15 Feb 2016 22:27:37 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14630 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/USER-INTEL/intel_preprocess.h | 10 ++++++++++ src/info.cpp | 5 +++-- src/library.cpp | 12 ++++++++---- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/USER-INTEL/intel_preprocess.h b/src/USER-INTEL/intel_preprocess.h index 96e740a667..50e10c3ff5 100644 --- a/src/USER-INTEL/intel_preprocess.h +++ b/src/USER-INTEL/intel_preprocess.h @@ -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 diff --git a/src/info.cpp b/src/info.cpp index 6bfd090b58..fe6f354fcd 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -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"); } } diff --git a/src/library.cpp b/src/library.cpp index 44734f95fc..da81194e3a 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -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); } } -- GitLab