Commit d0efe701 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6817 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 1d743442
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -42,14 +42,14 @@ PairOMPGPU::PairOMPGPU(LAMMPS *lmp) : Pointers(lmp)

PairOMPGPU::~PairOMPGPU()
{
  mem_free();
  free_mem();
}

/* ----------------------------------------------------------------------
   free any allocated memory
------------------------------------------------------------------------- */

void PairOMPGPU::mem_free() {
void PairOMPGPU::free_mem() {
  memory->sfree(eng_vdwl_thr);
  memory->sfree(eng_coul_thr);
  memory->destroy(virial_thr);
@@ -71,7 +71,7 @@ void PairOMPGPU::mem_free() {

void PairOMPGPU::init_style()
{
  mem_free();
  free_mem();
  
  #pragma omp parallel
  {
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ class PairOMPGPU : protected Pointers {
  PairOMPGPU(LAMMPS *);
  ~PairOMPGPU();

  void mem_free();
  void free_mem();
  void init_style();
  double memory_usage();
 
+7 −7
Original line number Diff line number Diff line
@@ -28,19 +28,19 @@ class PairCoulLong : public Pair {
 public:
  PairCoulLong(class LAMMPS *);
  ~PairCoulLong();
  void compute(int, int);
  void settings(int, char **);
  virtual void compute(int, int);
  virtual void settings(int, char **);
  void coeff(int, char **);
  void init_style();
  virtual void init_style();
  double init_one(int, int);
  void write_restart(FILE *);
  void read_restart(FILE *);
  void write_restart_settings(FILE *);
  void read_restart_settings(FILE *);
  double single(int, int, int, int, double, double, double, double &);
  virtual void write_restart_settings(FILE *);
  virtual void read_restart_settings(FILE *);
  virtual double single(int, int, int, int, double, double, double, double &);
  void *extract(char *, int &);

 private:
 protected:
  double cut_coul,cut_coulsq;
  double *cut_respa;
  double g_ewald;
+19 −2
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include "finish.h"
#include "timer.h"
#include "atom.h"
#include "comm.h"
#include "force.h"
#include "kspace.h"
#include "update.h"
@@ -83,6 +84,21 @@ void Finish::end(int flag)

    // overall loop time

#if defined(_OPENMP)    
    if (me == 0) {
      int ntasks = nprocs * comm->nthreads;
      if (screen) fprintf(screen,
			  "Loop time of %g on %d procs (%d MPI x %d OpenMP) "
			  "for %d steps with " BIGINT_FORMAT " atoms\n",
			  time_loop,ntasks,nprocs,comm->nthreads,
			  update->nsteps,atom->natoms);
      if (logfile) fprintf(logfile,
			  "Loop time of %g on %d procs (%d MPI x %d OpenMP) "
			  "for %d steps with " BIGINT_FORMAT " atoms\n",
			  time_loop,ntasks,nprocs,comm->nthreads,
			  update->nsteps,atom->natoms);
    }
#else
    if (me == 0) {
      if (screen) fprintf(screen,
			  "Loop time of %g on %d procs for %d steps with " 
@@ -93,6 +109,7 @@ void Finish::end(int flag)
			   BIGINT_FORMAT " atoms\n",
			   time_loop,nprocs,update->nsteps,atom->natoms);
    }
#endif

    if (time_loop == 0.0) time_loop = 1.0;
  }
+3 −3
Original line number Diff line number Diff line
@@ -515,9 +515,10 @@ void Min::force_clear()
  int nall;
  if (force->newton) nall = atom->nlocal + atom->nghost;
  else nall = atom->nlocal;
  int ntot = nall * comm->nthreads;

  double **f = atom->f;
  for (i = 0; i < nall; i++) {
  for (i = 0; i < ntot; i++) {
    f[i][0] = 0.0;
    f[i][1] = 0.0;
    f[i][2] = 0.0;
@@ -534,8 +535,7 @@ void Min::force_clear()

  if (erforceflag) {
    double *erforce = atom->erforce;
    for (i = 0; i < nall; i++)
      erforce[i] = 0.0;
    for (i = 0; i < nall; i++) erforce[i] = 0.0;
  }
}

Loading