Fixes to the Intel package to remove errors and warnings with clang-based compiler and support alternate preprocessor defines for the next-gen Intel compiler (currently not recommended for performance)..

This commit is contained in:
Mike Brown
2021-07-19 11:16:09 -07:00
parent b2a396da3c
commit d739c3bede
10 changed files with 63 additions and 42 deletions

View File

@ -16,7 +16,8 @@
#include "error.h"
#if defined(LMP_USER_INTEL) && defined(__INTEL_COMPILER)
#if defined(LMP_USER_INTEL) && \
((defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER)))
#ifndef LMP_INTEL_NO_TBB
#define LMP_USE_TBB_ALLOCATOR
#include "tbb/scalable_allocator.h"
@ -81,7 +82,7 @@ void *Memory::srealloc(void *ptr, bigint nbytes, const char *name)
#if defined(LMP_USE_TBB_ALLOCATOR)
ptr = scalable_aligned_realloc(ptr, nbytes, LAMMPS_MEMALIGN);
#elif defined(LMP_INTEL_NO_TBB) && defined(LAMMPS_MEMALIGN) && \
defined(__INTEL_COMPILER)
(defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER))
ptr = realloc(ptr, nbytes);
uintptr_t offset = ((uintptr_t)(const void *)(ptr)) % LAMMPS_MEMALIGN;