From c524604ec79425d8f176674011c88aa8593d7f41 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Tue, 23 Oct 2012 16:56:18 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8995 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/USER-MISC/fix_imd.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/USER-MISC/fix_imd.cpp b/src/USER-MISC/fix_imd.cpp index 87c950d00d..3cc48aafbb 100644 --- a/src/USER-MISC/fix_imd.cpp +++ b/src/USER-MISC/fix_imd.cpp @@ -576,8 +576,8 @@ FixIMD::~FixIMD() #endif inthash_t *hashtable = (inthash_t *)idmap; - memory->sfree(comm_buf); - memory->sfree(force_buf); + memory->destroy(comm_buf); + memory->destroy(force_buf); inthash_destroy(hashtable); delete hashtable; free(rev_idmap); @@ -695,6 +695,7 @@ void FixIMD::setup(int) if (mask[i] & groupbit) ++nme; MPI_Allreduce(&nme,&nmax,1,MPI_INT,MPI_MAX,world); + memory->destroy(comm_buf); maxbuf = nmax*size_one; comm_buf = (void *) memory->smalloc(maxbuf,"imd:comm_buf"); @@ -1004,7 +1005,7 @@ void FixIMD::post_force(int vflag) MPI_Allreduce(&nme,&nmax,1,MPI_INT,MPI_MAX,world); if (nmax*size_one > maxbuf) { - memory->sfree(comm_buf); + memory->destroy(comm_buf); maxbuf = nmax*size_one; comm_buf = memory->smalloc(maxbuf,"imd:comm_buf"); }