update defines from -DLMP_USER-<PKG> to -DLMP_<PKG> for consistency
This commit is contained in:
@ -3,7 +3,7 @@ if(NOT FOUND_IMMINTRIN)
|
|||||||
message(FATAL_ERROR "immintrin.h header not found, Intel package won't work without it")
|
message(FATAL_ERROR "immintrin.h header not found, Intel package won't work without it")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_compile_definitions(lammps PRIVATE -DLMP_USER_INTEL)
|
target_compile_definitions(lammps PRIVATE -DLMP_INTEL)
|
||||||
|
|
||||||
set(INTEL_ARCH "cpu" CACHE STRING "Architectures used by INTEL (cpu or knl)")
|
set(INTEL_ARCH "cpu" CACHE STRING "Architectures used by INTEL (cpu or knl)")
|
||||||
set(INTEL_ARCH_VALUES cpu knl)
|
set(INTEL_ARCH_VALUES cpu knl)
|
||||||
|
|||||||
@ -114,5 +114,5 @@ else()
|
|||||||
target_link_libraries(lmp PRIVATE ${mdi_LIBRARY})
|
target_link_libraries(lmp PRIVATE ${mdi_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_compile_definitions(lammps PRIVATE -DLMP_USER_MDI)
|
target_compile_definitions(lammps PRIVATE -DLMP_MDI)
|
||||||
target_compile_definitions(lmp PRIVATE -DLMP_USER_MDI)
|
target_compile_definitions(lmp PRIVATE -DLMP_MDI)
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
${OPENMP_SOURCES_DIR}/fix_nh_omp.cpp
|
${OPENMP_SOURCES_DIR}/fix_nh_omp.cpp
|
||||||
${OPENMP_SOURCES_DIR}/fix_nh_sphere_omp.cpp
|
${OPENMP_SOURCES_DIR}/fix_nh_sphere_omp.cpp
|
||||||
${OPENMP_SOURCES_DIR}/domain_omp.cpp)
|
${OPENMP_SOURCES_DIR}/domain_omp.cpp)
|
||||||
target_compile_definitions(lammps PRIVATE -DLMP_USER_OMP)
|
target_compile_definitions(lammps PRIVATE -DLMP_OPENMP)
|
||||||
set_property(GLOBAL PROPERTY "OMP_SOURCES" "${OPENMP_SOURCES}")
|
set_property(GLOBAL PROPERTY "OMP_SOURCES" "${OPENMP_SOURCES}")
|
||||||
|
|
||||||
# detects styles which have OPENMP version
|
# detects styles which have OPENMP version
|
||||||
|
|||||||
@ -56,7 +56,7 @@ if (test $mode = 1) then
|
|||||||
|
|
||||||
if (test -e ../Makefile.package) then
|
if (test -e ../Makefile.package) then
|
||||||
sed -i -e 's/[^ \t]*INTEL[^ \t]* //' ../Makefile.package
|
sed -i -e 's/[^ \t]*INTEL[^ \t]* //' ../Makefile.package
|
||||||
sed -i -e 's|^PKG_INC =[ \t]*|&-DLMP_USER_INTEL |' ../Makefile.package
|
sed -i -e 's|^PKG_INC =[ \t]*|&-DLMP_INTEL |' ../Makefile.package
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif (test $mode = 0) then
|
elif (test $mode = 0) then
|
||||||
|
|||||||
@ -50,7 +50,7 @@
|
|||||||
#ifndef LMP_INTEL_PREPROCESS_H
|
#ifndef LMP_INTEL_PREPROCESS_H
|
||||||
#define LMP_INTEL_PREPROCESS_H
|
#define LMP_INTEL_PREPROCESS_H
|
||||||
|
|
||||||
// LAMMPS_MEMALIGN is set to 64 by default for -DLMP_USER_INTEL
|
// LAMMPS_MEMALIGN is set to 64 by default for -DLMP_INTEL
|
||||||
// so we only need to error out in case of a different alignment
|
// so we only need to error out in case of a different alignment
|
||||||
#if LAMMPS_MEMALIGN && (LAMMPS_MEMALIGN != 64)
|
#if LAMMPS_MEMALIGN && (LAMMPS_MEMALIGN != 64)
|
||||||
#error Please set -DLAMMPS_MEMALIGN=64 in CCFLAGS of your LAMMPS makefile for INTEL package
|
#error Please set -DLAMMPS_MEMALIGN=64 in CCFLAGS of your LAMMPS makefile for INTEL package
|
||||||
|
|||||||
@ -40,7 +40,7 @@ if (test $1 = 1) then
|
|||||||
sed -i -e 's/[^ \t]*mdi[^ \t]* //g' ../Makefile.package
|
sed -i -e 's/[^ \t]*mdi[^ \t]* //g' ../Makefile.package
|
||||||
sed -i -e 's|^PKG_INC =[ \t]*|&-I../../lib/mdi/includelink |' ../Makefile.package
|
sed -i -e 's|^PKG_INC =[ \t]*|&-I../../lib/mdi/includelink |' ../Makefile.package
|
||||||
sed -i -e 's/[^ \t]*MDI[^ \t]* //' ../Makefile.package
|
sed -i -e 's/[^ \t]*MDI[^ \t]* //' ../Makefile.package
|
||||||
sed -i -e 's|^PKG_INC =[ \t]*|&-DLMP_USER_MDI |' ../Makefile.package
|
sed -i -e 's|^PKG_INC =[ \t]*|&-DLMP_MDI |' ../Makefile.package
|
||||||
sed -i -e 's|^PKG_PATH =[ \t]*|&-L../../lib/mdi/liblink |' ../Makefile.package
|
sed -i -e 's|^PKG_PATH =[ \t]*|&-L../../lib/mdi/liblink |' ../Makefile.package
|
||||||
sed -i -e 's|^PKG_LIB =[ \t]*|&-lmdi |' ../Makefile.package
|
sed -i -e 's|^PKG_LIB =[ \t]*|&-lmdi |' ../Makefile.package
|
||||||
sed -i -e 's|^PKG_SYSINC =[ \t]*|&$(mdi_SYSINC) |' ../Makefile.package
|
sed -i -e 's|^PKG_SYSINC =[ \t]*|&$(mdi_SYSINC) |' ../Makefile.package
|
||||||
|
|||||||
@ -54,7 +54,7 @@ if (test $mode = 1) then
|
|||||||
|
|
||||||
if (test -e ../Makefile.package) then
|
if (test -e ../Makefile.package) then
|
||||||
sed -i -e 's/[^ \t]*OMP[^ \t]* //' ../Makefile.package
|
sed -i -e 's/[^ \t]*OMP[^ \t]* //' ../Makefile.package
|
||||||
sed -i -e 's|^PKG_INC =[ \t]*|&-DLMP_USER_OMP |' ../Makefile.package
|
sed -i -e 's|^PKG_INC =[ \t]*|&-DLMP_OPENMP |' ../Makefile.package
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# need to delete a bunch of dependency files because they
|
# need to delete a bunch of dependency files because they
|
||||||
@ -65,7 +65,7 @@ if (test $mode = 1) then
|
|||||||
rm -f ../Obj_*/$f
|
rm -f ../Obj_*/$f
|
||||||
done
|
done
|
||||||
|
|
||||||
# force rebuild of files with LMP_USER_OMP switch
|
# force rebuild of files with LMP_OPENMP switch
|
||||||
|
|
||||||
touch ../accelerator_omp.h
|
touch ../accelerator_omp.h
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ elif (test $mode = 0) then
|
|||||||
rm -f ../Obj_*/$f
|
rm -f ../Obj_*/$f
|
||||||
done
|
done
|
||||||
|
|
||||||
# force rebuild of files with LMP_USER_OMP switch
|
# force rebuild of files with LMP_OPENMP switch
|
||||||
|
|
||||||
touch ../accelerator_omp.h
|
touch ../accelerator_omp.h
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
// NOTE: this file is *supposed* to be included multiple times
|
// NOTE: this file is *supposed* to be included multiple times
|
||||||
|
|
||||||
#ifdef LMP_USER_OMP
|
#ifdef LMP_OPENMP
|
||||||
|
|
||||||
// true interface to OPENMP
|
// true interface to OPENMP
|
||||||
|
|
||||||
@ -41,4 +41,4 @@ class DomainOMP : public Domain {
|
|||||||
|
|
||||||
#endif /* LMP_DOMAIN_OMP_H */
|
#endif /* LMP_DOMAIN_OMP_H */
|
||||||
|
|
||||||
#endif /* !LMP_USER_OMP */
|
#endif /* !LMP_OPENMP */
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#ifdef LMP_USER_INTEL
|
#ifdef LMP_INTEL
|
||||||
#include "neigh_request.h"
|
#include "neigh_request.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2196,7 +2196,7 @@ void Atom::setup_sort_bins()
|
|||||||
bininvy = nbiny / (bboxhi[1]-bboxlo[1]);
|
bininvy = nbiny / (bboxhi[1]-bboxlo[1]);
|
||||||
bininvz = nbinz / (bboxhi[2]-bboxlo[2]);
|
bininvz = nbinz / (bboxhi[2]-bboxlo[2]);
|
||||||
|
|
||||||
#ifdef LMP_USER_INTEL
|
#ifdef LMP_INTEL
|
||||||
int intel_neigh = 0;
|
int intel_neigh = 0;
|
||||||
if (neighbor->nrequest) {
|
if (neighbor->nrequest) {
|
||||||
if (neighbor->requests[0]->intel) intel_neigh = 1;
|
if (neighbor->requests[0]->intel) intel_neigh = 1;
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#ifdef LMP_USER_OMP
|
#ifdef LMP_OPENMP
|
||||||
#include "modify.h"
|
#include "modify.h"
|
||||||
#include "fix_omp.h"
|
#include "fix_omp.h"
|
||||||
#include "thr_data.h"
|
#include "thr_data.h"
|
||||||
@ -48,7 +48,7 @@ static void mpi_timings(const char *label, Timer *t, enum Timer::ttype tt,
|
|||||||
MPI_Comm world, const int nprocs, const int nthreads,
|
MPI_Comm world, const int nprocs, const int nthreads,
|
||||||
const int me, double time_loop, FILE *scr, FILE *log);
|
const int me, double time_loop, FILE *scr, FILE *log);
|
||||||
|
|
||||||
#ifdef LMP_USER_OMP
|
#ifdef LMP_OPENMP
|
||||||
static void omp_times(FixOMP *fix, const char *label, enum Timer::ttype which,
|
static void omp_times(FixOMP *fix, const char *label, enum Timer::ttype which,
|
||||||
const int nthreads,FILE *scr, FILE *log);
|
const int nthreads,FILE *scr, FILE *log);
|
||||||
#endif
|
#endif
|
||||||
@ -363,7 +363,7 @@ void Finish::end(int flag)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LMP_USER_OMP
|
#ifdef LMP_OPENMP
|
||||||
int ifix = modify->find_fix("package_omp");
|
int ifix = modify->find_fix("package_omp");
|
||||||
|
|
||||||
// print thread breakdown only with full timer detail
|
// print thread breakdown only with full timer detail
|
||||||
@ -691,7 +691,7 @@ void mpi_timings(const char *label, Timer *t, enum Timer::ttype tt,
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
#ifdef LMP_USER_OMP
|
#ifdef LMP_OPENMP
|
||||||
void omp_times(FixOMP *fix, const char *label, enum Timer::ttype which,
|
void omp_times(FixOMP *fix, const char *label, enum Timer::ttype which,
|
||||||
const int nthreads,FILE *scr, FILE *log)
|
const int nthreads,FILE *scr, FILE *log)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1222,7 +1222,7 @@ bool Info::has_accelerator_feature(const std::string &package,
|
|||||||
return lmp_gpu_config(category,setting);
|
return lmp_gpu_config(category,setting);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(LMP_USER_OMP)
|
#if defined(LMP_OPENMP)
|
||||||
if (package == "OPENMP") {
|
if (package == "OPENMP") {
|
||||||
if (category == "precision") {
|
if (category == "precision") {
|
||||||
if (setting == "double") return true;
|
if (setting == "double") return true;
|
||||||
@ -1238,7 +1238,7 @@ bool Info::has_accelerator_feature(const std::string &package,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(LMP_USER_INTEL)
|
#if defined(LMP_INTEL)
|
||||||
if (package == "INTEL") {
|
if (package == "INTEL") {
|
||||||
if (category == "precision") {
|
if (category == "precision") {
|
||||||
if (setting == "double") return true;
|
if (setting == "double") return true;
|
||||||
|
|||||||
@ -798,7 +798,7 @@ void LAMMPS::create()
|
|||||||
else neighbor = new Neighbor(this);
|
else neighbor = new Neighbor(this);
|
||||||
|
|
||||||
if (kokkos) domain = new DomainKokkos(this);
|
if (kokkos) domain = new DomainKokkos(this);
|
||||||
#ifdef LMP_USER_OMP
|
#ifdef LMP_OPENMP
|
||||||
else domain = new DomainOMP(this);
|
else domain = new DomainOMP(this);
|
||||||
#else
|
#else
|
||||||
else domain = new Domain(this);
|
else domain = new Domain(this);
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// import MolSSI Driver Interface library
|
// import MolSSI Driver Interface library
|
||||||
#if defined(LMP_USER_MDI)
|
#if defined(LMP_MDI)
|
||||||
#include <mdi.h>
|
#include <mdi.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
MPI_Comm lammps_comm = MPI_COMM_WORLD;
|
MPI_Comm lammps_comm = MPI_COMM_WORLD;
|
||||||
|
|
||||||
#if defined(LMP_USER_MDI)
|
#if defined(LMP_MDI)
|
||||||
// initialize MDI interface, if compiled in
|
// initialize MDI interface, if compiled in
|
||||||
|
|
||||||
int mdi_flag;
|
int mdi_flag;
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
|
||||||
#if defined(LMP_USER_INTEL) && \
|
#if defined(LMP_INTEL) && \
|
||||||
((defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER)))
|
((defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER)))
|
||||||
#ifndef LMP_INTEL_NO_TBB
|
#ifndef LMP_INTEL_NO_TBB
|
||||||
#define LMP_USE_TBB_ALLOCATOR
|
#define LMP_USE_TBB_ALLOCATOR
|
||||||
@ -31,7 +31,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LMP_USER_INTEL) && !defined(LAMMPS_MEMALIGN) && !defined(_WIN32)
|
#if defined(LMP_INTEL) && !defined(LAMMPS_MEMALIGN) && !defined(_WIN32)
|
||||||
#define LAMMPS_MEMALIGN 64
|
#define LAMMPS_MEMALIGN 64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#if defined(LMP_USER_INTEL) && !defined(LAMMPS_MEMALIGN) && !defined(_WIN32)
|
#if defined(LMP_INTEL) && !defined(LAMMPS_MEMALIGN) && !defined(_WIN32)
|
||||||
#define LAMMPS_MEMALIGN 64
|
#define LAMMPS_MEMALIGN 64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#if defined(LMP_USER_INTEL) && !defined(LAMMPS_MEMALIGN) && !defined(_WIN32)
|
#if defined(LMP_INTEL) && !defined(LAMMPS_MEMALIGN) && !defined(_WIN32)
|
||||||
#define LAMMPS_MEMALIGN 64
|
#define LAMMPS_MEMALIGN 64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user