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

This commit is contained in:
sjplimp
2016-05-13 15:46:48 +00:00
parent 39d713b5a3
commit 6334768dd1
5 changed files with 27 additions and 4 deletions

View File

@ -15,7 +15,7 @@ DEPFLAGS = -M
LINK = mpiicpc
LINKFLAGS = -g -qopenmp $(OPTFLAGS)
LIB = -ltbbmalloc -ltbbmalloc_proxy
LIB = -ltbbmalloc
SIZE = size
ARCHIVE = ar

View File

@ -13,6 +13,9 @@ style_kspace.h
style_minimize.h
style_pair.h
style_region.h
# deleted on 11 May 2016
pair_dpd_conservative.cpp
pair_dpd_conservative.h
# deleted on 21 Mar 2016
verlet_intel.cpp
verlet_intel.h

View File

@ -87,9 +87,10 @@ class Atom : protected Pointers {
// USER-DPD package
double *uCond, *uMech, *uChem, *uCGnew, *uCG;
double *duCond, *duMech, *duChem;
double *uCond,*uMech,*uChem,*uCGnew,*uCG;
double *duCond,*duMech,*duChem;
double *dpdTheta;
int nspecies_dpd;
// molecular info

View File

@ -17,6 +17,11 @@
#include "memory.h"
#include "error.h"
#if defined(LMP_USER_INTEL) && defined(__INTEL_COMPILER)
#define LMP_USE_TBB_ALLOCATOR
#include "tbb/scalable_allocator.h"
#endif
using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
@ -33,8 +38,14 @@ void *Memory::smalloc(bigint nbytes, const char *name)
#if defined(LAMMPS_MEMALIGN)
void *ptr;
#if defined(LMP_USE_TBB_ALLOCATOR)
ptr = scalable_aligned_malloc(nbytes, LAMMPS_MEMALIGN);
#else
int retval = posix_memalign(&ptr, LAMMPS_MEMALIGN, nbytes);
if (retval) ptr = NULL;
#endif
#else
void *ptr = malloc(nbytes);
#endif
@ -58,7 +69,11 @@ void *Memory::srealloc(void *ptr, bigint nbytes, const char *name)
return NULL;
}
#if defined(LMP_USE_TBB_ALLOCATOR)
ptr = scalable_aligned_realloc(ptr, nbytes, LAMMPS_MEMALIGN);
#else
ptr = realloc(ptr,nbytes);
#endif
if (ptr == NULL) {
char str[128];
sprintf(str,"Failed to reallocate " BIGINT_FORMAT " bytes for array %s",
@ -75,7 +90,11 @@ void *Memory::srealloc(void *ptr, bigint nbytes, const char *name)
void Memory::sfree(void *ptr)
{
if (ptr == NULL) return;
#if defined(LMP_USE_TBB_ALLOCATOR)
scalable_aligned_free(ptr);
#else
free(ptr);
#endif
}
/* ----------------------------------------------------------------------

View File

@ -826,7 +826,7 @@ void Modify::add_fix(int narg, char **arg, int trysuffix)
// increment nfix (if new)
// set fix mask values
// post_construct() allows new fix to create other fixes
// post_constructor() allows new fix to create other fixes
// nfix increment comes first so that recursive call to add_fix within
// post_constructor() will see updated nfix