Commit fec87c07 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

simplify compiling USER-INTEL package, by defaulting to -DLAMMPS_MEMALIGN=64 in case it is not set

parent bfea3dce
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -28,12 +28,10 @@
#ifndef LMP_INTEL_PREPROCESS_H
#define LMP_INTEL_PREPROCESS_H

#ifndef LAMMPS_MEMALIGN
#error Please set -DLAMMPS_MEMALIGN=64 in CCFLAGS for your LAMMPS makefile.
#else
#if (LAMMPS_MEMALIGN != 64)
#error Please set -DLAMMPS_MEMALIGN=64 in CCFLAGS for your LAMMPS makefile.
#endif
// LAMMPS_MEMALIGN is set to 64 by default for -DLMP_USER_INTEL
// so we only need to error out in case of a different alignment
#if LAMMPS_MEMALIGN && (LAMMPS_MEMALIGN != 64)
#error Please set -DLAMMPS_MEMALIGN=64 in CCFLAGS of your LAMMPS makefile for USER-INTEL package
#endif

#if defined(_OPENMP)
+4 −0
Original line number Diff line number Diff line
@@ -22,6 +22,10 @@
#include "tbb/scalable_allocator.h"
#endif

#if defined(LMP_USER_INTEL) && !defined(LAMMPS_MEMALIGN)
#define LAMMPS_MEMALIGN 64
#endif

using namespace LAMMPS_NS;

/* ---------------------------------------------------------------------- */
+4 −0
Original line number Diff line number Diff line
@@ -48,6 +48,10 @@ methods:
#ifndef LAMMPS_MY_PAGE_H
#define LAMMPS_MY_PAGE_H

#if defined(LMP_USER_INTEL) && !defined(LAMMPS_MEMALIGN)
#define LAMMPS_MEMALIGN 64
#endif

#include <stdlib.h>
namespace LAMMPS_NS {