git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15057 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -15,7 +15,7 @@ DEPFLAGS = -M
|
|||||||
|
|
||||||
LINK = mpiicpc
|
LINK = mpiicpc
|
||||||
LINKFLAGS = -g -qopenmp $(OPTFLAGS)
|
LINKFLAGS = -g -qopenmp $(OPTFLAGS)
|
||||||
LIB = -ltbbmalloc -ltbbmalloc_proxy
|
LIB = -ltbbmalloc
|
||||||
SIZE = size
|
SIZE = size
|
||||||
|
|
||||||
ARCHIVE = ar
|
ARCHIVE = ar
|
||||||
|
|||||||
@ -13,6 +13,9 @@ style_kspace.h
|
|||||||
style_minimize.h
|
style_minimize.h
|
||||||
style_pair.h
|
style_pair.h
|
||||||
style_region.h
|
style_region.h
|
||||||
|
# deleted on 11 May 2016
|
||||||
|
pair_dpd_conservative.cpp
|
||||||
|
pair_dpd_conservative.h
|
||||||
# deleted on 21 Mar 2016
|
# deleted on 21 Mar 2016
|
||||||
verlet_intel.cpp
|
verlet_intel.cpp
|
||||||
verlet_intel.h
|
verlet_intel.h
|
||||||
|
|||||||
@ -87,9 +87,10 @@ class Atom : protected Pointers {
|
|||||||
|
|
||||||
// USER-DPD package
|
// USER-DPD package
|
||||||
|
|
||||||
double *uCond, *uMech, *uChem, *uCGnew, *uCG;
|
double *uCond,*uMech,*uChem,*uCGnew,*uCG;
|
||||||
double *duCond, *duMech, *duChem;
|
double *duCond,*duMech,*duChem;
|
||||||
double *dpdTheta;
|
double *dpdTheta;
|
||||||
|
int nspecies_dpd;
|
||||||
|
|
||||||
// molecular info
|
// molecular info
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,11 @@
|
|||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.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;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -33,8 +38,14 @@ void *Memory::smalloc(bigint nbytes, const char *name)
|
|||||||
|
|
||||||
#if defined(LAMMPS_MEMALIGN)
|
#if defined(LAMMPS_MEMALIGN)
|
||||||
void *ptr;
|
void *ptr;
|
||||||
|
|
||||||
|
#if defined(LMP_USE_TBB_ALLOCATOR)
|
||||||
|
ptr = scalable_aligned_malloc(nbytes, LAMMPS_MEMALIGN);
|
||||||
|
#else
|
||||||
int retval = posix_memalign(&ptr, LAMMPS_MEMALIGN, nbytes);
|
int retval = posix_memalign(&ptr, LAMMPS_MEMALIGN, nbytes);
|
||||||
if (retval) ptr = NULL;
|
if (retval) ptr = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
void *ptr = malloc(nbytes);
|
void *ptr = malloc(nbytes);
|
||||||
#endif
|
#endif
|
||||||
@ -58,7 +69,11 @@ void *Memory::srealloc(void *ptr, bigint nbytes, const char *name)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(LMP_USE_TBB_ALLOCATOR)
|
||||||
|
ptr = scalable_aligned_realloc(ptr, nbytes, LAMMPS_MEMALIGN);
|
||||||
|
#else
|
||||||
ptr = realloc(ptr,nbytes);
|
ptr = realloc(ptr,nbytes);
|
||||||
|
#endif
|
||||||
if (ptr == NULL) {
|
if (ptr == NULL) {
|
||||||
char str[128];
|
char str[128];
|
||||||
sprintf(str,"Failed to reallocate " BIGINT_FORMAT " bytes for array %s",
|
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)
|
void Memory::sfree(void *ptr)
|
||||||
{
|
{
|
||||||
if (ptr == NULL) return;
|
if (ptr == NULL) return;
|
||||||
|
#if defined(LMP_USE_TBB_ALLOCATOR)
|
||||||
|
scalable_aligned_free(ptr);
|
||||||
|
#else
|
||||||
free(ptr);
|
free(ptr);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|||||||
@ -826,7 +826,7 @@ void Modify::add_fix(int narg, char **arg, int trysuffix)
|
|||||||
|
|
||||||
// increment nfix (if new)
|
// increment nfix (if new)
|
||||||
// set fix mask values
|
// 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
|
// nfix increment comes first so that recursive call to add_fix within
|
||||||
// post_constructor() will see updated nfix
|
// post_constructor() will see updated nfix
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user