Merge pull request #1616 from akohlmey/fixes-for-stable

Collected small fixes for stable release
This commit is contained in:
Axel Kohlmeyer 2019-08-05 16:48:50 -04:00 committed by GitHub
commit 16bf916dd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 12 deletions

View File

@ -133,6 +133,24 @@ foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES})
option(PKG_${PKG} "Build ${PKG} Package" OFF)
endforeach()
######################################################
# download and unpack support binaries for compilation
# of windows binaries.
######################################################
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(LAMMPS_THIRDPARTY_URL "http://download.lammps.org/thirdparty")
file(DOWNLOAD "${LAMMPS_THIRDPARTY_URL}/opencl-win-devel.tar.gz" "${CMAKE_CURRENT_BINARY_DIR}/opencl-win-devel.tar.gz"
EXPECTED_MD5 2c00364888d5671195598b44c2e0d44d)
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf opencl-win-devel.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
set(OpenCL_LIBRARY "${CMAKE_CURRENT_BINARY_DIR}/OpenCL/lib_win32/libOpenCL.dll")
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
set(OpenCL_LIBRARY "${CMAKE_CURRENT_BINARY_DIR}/OpenCL/lib_win64/libOpenCL.dll")
endif()
set(OpenCL_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/OpenCL/include")
endif()
######################################################
######################################################
# packages with special compiler needs or external libs
######################################################
@ -148,6 +166,7 @@ if(PKG_USER-ADIOS)
endif()
# do MPI detection after language activation, if MPI for these language is required
set(MPI_CXX_SKIP_MPICXX TRUE)
find_package(MPI QUIET)
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
if(BUILD_MPI)
@ -175,11 +194,13 @@ add_definitions(-DLAMMPS_${LAMMPS_SIZES})
set(LAMMPS_API_DEFINES "${LAMMPS_API_DEFINES} -DLAMMPS_${LAMMPS_SIZES}")
# posix_memalign is not available on Windows
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(LAMMPS_MEMALIGN "0" CACHE STRING "posix_memalign() is not available on Windows" FORCE)
else()
set(LAMMPS_MEMALIGN "64" CACHE STRING "enables the use of the posix_memalign() call instead of malloc() when large chunks or memory are allocated by LAMMPS. Set to 0 to disable")
if(NOT ${LAMMPS_MEMALIGN} STREQUAL "0")
add_definitions(-DLAMMPS_MEMALIGN=${LAMMPS_MEMALIGN})
endif()
endif()
if(NOT ${LAMMPS_MEMALIGN} STREQUAL "0")
add_definitions(-DLAMMPS_MEMALIGN=${LAMMPS_MEMALIGN})
endif()
option(LAMMPS_EXCEPTIONS "enable the use of C++ exceptions for error messages (useful for library interface)" OFF)
@ -229,6 +250,7 @@ if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE)
enable_language(Fortran)
file(GLOB LAPACK_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/linalg/[^.]*.[fF])
add_library(linalg STATIC ${LAPACK_SOURCES})
set(BLAS_LIBRARIES linalg)
set(LAPACK_LIBRARIES linalg)
else()
list(APPEND LAPACK_LIBRARIES ${BLAS_LIBRARIES})

View File

@ -3,9 +3,9 @@ set(WIN_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI USER-ATC USER-AWPMD
USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION
USER-DPD USER-DRUDE USER-EFF USER-FEP USER-INTEL USER-MANIFOLD
USER-MEAMC USER-MESO USER-MISC USER-MOFFF USER-MOLFILE USER-OMP
USER-PHONON USER-PTM USER-QTB USER-REAXC USER-SDPD USER-SMD
USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-YAFF)
USER-MEAMC USER-MESO USER-MISC USER-MGPT USER-MOFFF USER-MOLFILE
USER-OMP USER-PHONON USER-PTM USER-QTB USER-REAXC USER-SDPD
USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-YAFF)
foreach(PKG ${WIN_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
@ -13,5 +13,7 @@ endforeach()
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE)
set(WITH_GZIP ON CACHE BOOL "" FORCE)
set(WITH_FFMPEG ON CACHE BOOL "" FORCE)
set(LAMMPS_MEMALIGN "0" CACHE STRING "" FORCE)
set(INTEL_LRT_MODE "none" CACHE STRING "" FORCE)
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/lammps-installer")

View File

@ -18,7 +18,7 @@ parser = ArgumentParser(prog='Install.py',
# settings
thisdir = fullpath('.')
version = "kim-api-2.1.1"
version = "kim-api-2.1.2"
# help message

View File

@ -102,18 +102,20 @@ void VerletLRTIntel::setup(int flag)
}
#if defined(_LMP_INTEL_LRT_PTHREAD)
#if defined(__linux)
if (comm->me == 0) {
cpu_set_t cpuset;
sched_getaffinity(0, sizeof(cpuset), &cpuset);
int my_cpu_count = CPU_COUNT(&cpuset);
if (my_cpu_count < comm->nthreads + 1) {
char str[128];
sprintf(str,"Using %d threads per MPI, but only %d core(s) allocated"
" per MPI",
sprintf(str,"Using %d threads per MPI rank, but only %d core(s)"
" allocated for each MPI rank",
comm->nthreads + 1, my_cpu_count);
error->warning(FLERR, str);
}
}
#endif
_kspace_ready = 0;
_kspace_done = 0;

View File

@ -60,7 +60,7 @@
#include <sys/utsname.h>
#endif
#if defined __linux
#if defined(__linux)
#include <malloc.h>
#endif