diff --git a/.gitignore b/.gitignore index 51da0f84ce..c3d2afe211 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ compile_commands.json .clangd .idea/ src/interface/stable_29Sep2021.tar.gz +build/ diff --git a/include/.gitignore b/include/.gitignore index e69de29bb2..db4787e66c 100644 --- a/include/.gitignore +++ b/include/.gitignore @@ -0,0 +1 @@ +*.h \ No newline at end of file diff --git a/lib/.gitignore b/lib/.gitignore index e69de29bb2..17a27a73ab 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -0,0 +1,2 @@ +*.a +*.so \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000000..d99c6ba05c --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,144 @@ +################################################################################################### +# CMake Build System for n2p2 +################################################################################################### + +################################################################################################### +# Project & CMake Information +cmake_minimum_required(VERSION 3.16) # Same required version as LAMMPS (no extra dependencies) +project(n2p2 VERSION 2.2.0) +################################################################################################### + +################################################################################################### +# Git version info for project +execute_process(COMMAND git describe --tags --always + OUTPUT_VARIABLE GIT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process(COMMAND git rev-parse HEAD + OUTPUT_VARIABLE GIT_REV OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process(COMMAND git rev-parse --abbrev-ref HEAD + OUTPUT_VARIABLE GIT_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE) +################################################################################################### + +################################################################################################### +# Set C++ Standard +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 11) +endif() +if(CMAKE_CXX_STANDARD LESS 11) + message(FATAL_ERROR "C++ standard must be set to at least 11") +endif() + +# Manually append the standard flag to CMAKE_CXX_FLAGS for external Makefile usage +if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +#elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") +endif() +################################################################################################### + +################################################################################################### +# Project Path Variables +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../bin) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../lib) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../lib) +set(PROJECT_INCLUDE ${CMAKE_BINARY_DIR}/../include) +set(CMAKE_SHARED_LIBRARY_SUFFIX .so) +################################################################################################### + +################################################################################################### +# Document CLI Option Defaults +option(BUILD_SHARED_LIBS "Build using shared libraries" OFF) +option(NDEBUG "Disable all C++ asserts (also Eigen debugging)." OFF) + +# N2P2 Compile Options +option(N2P2_NO_SF_GROUPS "Disable Symmetry function groups (NOT RECOMMENDED)" OFF) +option(N2P2_FULL_SFD_MEMORY "Store zero symmetry function derivatives" OFF) +option(N2P2_NO_SF_CACHE "Do not use symmetry function cache." OFF) +option(N2P2_NO_ASYM_POLY "Disable asymmetric polynomial symmetry functions." OFF) +option(N2P2_NO_TIME "Build with dummy Stopwatch class." OFF) +option(N2P2_NO_NEIGH_CHECK "Disable check for low number of neighbors." OFF) +option(N2P2_NO_MPI "Compile without MPI support." OFF) + +# Which interfaces to build +option(N2P2_IF_LAMMPS "Build LAMMPS interface into libnnpif" ON) +option(N2P2_IF_CABANA "Build CabanaMD interface into libnnpif" ON) + +# Eigen Optimization Options +option(EIGEN_DONT_PARALLELIZE "Disable Eigen multi threading." ON) +option(EIGEN_USE_BLAS "Use BLAS together with Eigen." ON) +option(EIGEN_USE_MKL_ALL "Use Intel MKL together with Eigen." OFF) +################################################################################################### + +################################################################################################### +# Set N2P2 Preprocessor Options Variable (Used in subdirectory CMakeLists) +if(N2P2_NO_SF_GROUPS) + set(N2P2_PROJECT_OPTIONS "${N2P2_PROJECT_OPTIONS} -DN2P2_NO_SF_GROUPS") +endif(N2P2_NO_SF_GROUPS) + +if(N2P2_FULL_SFD_MEMORY) + set(N2P2_PROJECT_OPTIONS "${N2P2_PROJECT_OPTIONS} -DN2P2_FULL_SFD_MEMORY") +endif(N2P2_FULL_SFD_MEMORY) + +if(N2P2_NO_SF_CACHE) + set(N2P2_PROJECT_OPTIONS "${N2P2_PROJECT_OPTIONS} -DN2P2_NO_SF_CACHE") +endif(N2P2_NO_SF_CACHE) + +if(N2P2_NO_ASYM_POLY) + set(N2P2_PROJECT_OPTIONS "${N2P2_PROJECT_OPTIONS} -DN2P2_NO_ASYM_POLY") +endif(N2P2_NO_ASYM_POLY) + +if(N2P2_NO_TIME) + set(N2P2_PROJECT_OPTIONS "${N2P2_PROJECT_OPTIONS} -DN2P2_NO_TIME") +endif(N2P2_NO_TIME) + +if(N2P2_NO_NEIGH_CHECK) + set(N2P2_PROJECT_OPTIONS "${N2P2_PROJECT_OPTIONS} -DN2P2_NO_NEIGH_CHECK") +endif(N2P2_NO_NEIGH_CHECK) + +if(N2P2_NO_MPI) + set(N2P2_PROJECT_OPTIONS "${N2P2_PROJECT_OPTIONS} -DN2P2_NO_MPI") +else() + set(CMAKE_C_COMPILER "mpicc") + set(CMAKE_CXX_COMPILER "mpicxx") +endif(N2P2_NO_MPI) + +if(EIGEN_DONT_PARALLELIZE) + set(EIGEN_PROJECT_OPTIONS "${EIGEN_PROJECT_OPTIONS} -DEIGEN_DONT_PARALLELIZE") +endif(EIGEN_DONT_PARALLELIZE) + +if(EIGEN_USE_BLAS) + set(EIGEN_PROJECT_OPTIONS "${EIGEN_PROJECT_OPTIONS} -DEIGEN_USE_BLAS") +endif(EIGEN_USE_BLAS) + +if(EIGEN_USE_MKL_ALL) + set(EIGEN_PROJECT_OPTIONS "${EIGEN_PROJECT_OPTIONS} -DEIGEN_USE_MKL_ALL") +endif(EIGEN_USE_MKL_ALL) + +set(PROJECT_OPTIONS "${PROJECT_OPTIONS} ${N2P2_PROJECT_OPTIONS} ${EIGEN_PROJECT_OPTIONS}") + +if(NDEBUG) + set(PROJECT_OPTIONS "${PROJECT_OPTIONS} -DNDEBUG") +endif(NDEBUG) + +if(N2P2_IF_LAMMPS) + list(APPEND INTERFACES "${INTERFACES} LAMMPS") +endif(N2P2_IF_LAMMPS) + +if(N2P2_IF_CABANA) + list(APPEND INTERFACES "${INTERFACES} CabanaMD") +endif(N2P2_IF_CABANA) +################################################################################################### + +################################################################################################### +find_package(MPI REQUIRED) +find_package(GSL REQUIRED) +find_package(Eigen3 3.4 REQUIRED NO_MODULE) +link_directories(${GSL_LIBRARY_DIRS} ${MPI_LIBRARY_DIRS}) +list(GET GSL_LIBRARIES 0 FIRST_GSL_LIBRARY) +get_filename_component(GSL_LIBRARY_DIR "${FIRST_GSL_LIBRARY}" DIRECTORY) + +# Go into each subdirectory +add_subdirectory(libnnp) +add_subdirectory(libnnptrain) +add_subdirectory(application) +add_subdirectory(libnnpif) +add_subdirectory(interface) +################################################################################################### \ No newline at end of file diff --git a/src/application/CMakeLists.txt b/src/application/CMakeLists.txt new file mode 100644 index 0000000000..e8fc3f48f5 --- /dev/null +++ b/src/application/CMakeLists.txt @@ -0,0 +1,64 @@ +################################################################################################### +# CMake Build System for n2p2 executables +################################################################################################### + +################################################################################################### +# Specify executables based on dependencies +# APP_CORE require only libnnp +set(APP_CORE + nnp-convert + nnp-cutoff + nnp-dist + nnp-predict + nnp-prune + nnp-select + nnp-symfunc) + +# APP_DATASET require libnnp and libnnptrain (Use class Dataset only, not Training) +# NB: These are separated out since they do not require the Eigen library +set(APP_DATASET + nnp-atomenv + nnp-checkf + nnp-comp2 + nnp-dataset + nnp-norm + nnp-scaling) + +# APP_TRAINING require libnnp and libnnptrain +set(APP_TRAINING + nnp-checkdw + nnp-norm2 + nnp-train) + +# APP contains all executables +set(APP ${APP_CORE} ${APP_DATASET} ${APP_TRAINING}) +################################################################################################### + +################################################################################################### +# Specify Build Target for Each APP +foreach(app IN ITEMS ${APP}) + add_executable(${app} ${app}.cpp) +endforeach(app IN ITEMS ${APP}) + +# Set Directory-Wide Project Options +add_compile_options(${PROJECT_OPTIONS}) +################################################################################################### + +################################################################################################### +# Find Required Package dependencies +include_directories(${MPI_INCLUDE_PATH} ${GSL_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/libnnp ${PROJECT_SOURCE_DIR}/libnnptrain) + +# Add Link Dependencies based on requirements +foreach(app IN ITEMS ${APP_CORE}) + target_link_libraries(${app} PRIVATE nnp) +endforeach(app IN ITEMS ${APP_CORE}) + +foreach(app IN ITEMS ${APP_DATASET}) + target_link_libraries(${app} PRIVATE ${GSL_LIBRARIES} nnp nnptrain) +endforeach(app IN ITEMS ${APP_DATASET}) + +foreach(app IN ITEMS ${APP_TRAINING}) + target_link_libraries(${app} PRIVATE ${GSL_LIBRARIES} Eigen3::Eigen nnp nnptrain) +endforeach(app IN ITEMS ${APP_TRAINING}) + +###################################################################################################]] diff --git a/src/interface/CMakeLists.txt b/src/interface/CMakeLists.txt new file mode 100644 index 0000000000..55685c3b6b --- /dev/null +++ b/src/interface/CMakeLists.txt @@ -0,0 +1,104 @@ +################################################################################################### +# CMake Build System for n2p2 LAMMPS interface +################################################################################################### + +################################################################################################### +# Skip if not building LAMMPS or LAMMPS interface +if(NOT N2P2_IF_LAMMPS ) + return() +endif(NOT N2P2_IF_LAMMPS ) +################################################################################################### + +################################################################################################### +# LAMMPS Specific Options +# Build Internal Version or External (sets name of the lammps package) +option(LAMMPS_INTERNAL + "Build as internal package. Uses name nnp vs. hdnnp to avoid conflict with release version." + OFF) +if(LAMMPS_INTERNAL) + set(LAMMPS_PACKAGE_NAME nnp) +else() + set(LAMMPS_PACKAGE_NAME hdnnp) +endif(LAMMPS_INTERNAL) + +# Download & Build own LAMMPS executable +option(BUILD_LAMMPS + "Build minimal LAMMPS executable. (Either Specify DOWNLOAD_LAMMPS=ON or LAMMPS_PATH)" OFF) + +if (NOT LAMMPS_PATH) + option(DOWNLOAD_LAMMPS "Download LAMMPS. This supersedes LAMMPS_PATH variable." OFF) +else() + option(DOWNLOAD_LAMMPS "Download LAMMPS. This supersedes LAMMPS_PATH variable." OFF) +endif (NOT LAMMPS_PATH) + +# Specify Default LAMMPS Version +if (NOT LAMMPS_VERSION) + set(LAMMPS_VERSION "lammps-29Aug2024") +endif (NOT LAMMPS_VERSION) +################################################################################################### + +################################################################################################### +# Configure makefiles and extra cmake file to add N2P2 options to LAMMPS build +message("Creating LAMMPS configuration files.") +configure_file(LAMMPS/Makefile.lammps-extra.config.in ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/Makefile.lammps-extra) +configure_file(LAMMPS/lammps-extra.cmake.config.in ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lammps-extra.cmake) +################################################################################################### + +################################################################################################### +# Download LAMMPS if needed +if(DOWNLOAD_LAMMPS) + if (LAMMPS_PATH) + message(WARNING "Specified both LAMMPS_PATH and DOWNLOAD_LAMMPS=ON. Ignoring LAMMPS_PATH.") + endif (LAMMPS_PATH) + + message("Downloading LAMMPS to ${CMAKE_BINARY_DIR}/_deps/lammps-nnp-src/") + include(FetchContent) + FetchContent_Declare(lammps-hdnnp + URL https://download.lammps.org/tars/${LAMMPS_VERSION}.tar.gz) + FetchContent_MakeAvailable(lammps-hdnnp) + + set(LAMMPS_PATH "${CMAKE_BINARY_DIR}/_deps/lammps-hdnnp-src/") +endif(DOWNLOAD_LAMMPS) +################################################################################################### + +if(BUILD_LAMMPS) + ################################################################################################### + # Symlink to n2p2 Library from LAMMPS + add_custom_target(link_n2p2 ALL + #COMMAND ${CMAKE_COMMAND} -E make_directory ${LAMMPS_PATH}lib/nnp + COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ${LAMMPS_PATH}/lib/hdnnp/liblink + COMMAND ${CMAKE_COMMAND} -E create_symlink ${PROJECT_INCLUDE} ${LAMMPS_PATH}/lib/hdnnp/includelink + COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/Makefile.lammps-extra ${LAMMPS_PATH}/lib/hdnnp/Makefile.lammps + COMMENT "Creating Symlink from LAMMPS to n2p2.") + ################################################################################################### + + ################################################################################################### + # Copy Source Code to LAMMPS + add_custom_target(update_lammps ALL + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/interface/LAMMPS/src/ML-HDNNP/ ${LAMMPS_PATH}src/ML-HDNNP + COMMENT "Updating LAMMPS ML-HDNNP package.") + ################################################################################################### + + ################################################################################################### + # Patch LAMMPS makefile.mpi + add_custom_target(patch_lammps_makefile ALL + COMMAND sed -i.bak "s,^CC .*$$,CC = ${MPI_CXX_COMPILER}," ${LAMMPS_PATH}/src/MAKE/Makefile.mpi + COMMAND sed -i.bak "s,^CCFLAGS .*$$,CCFLAGS = ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_MPI} -I${GSL_INCLUDE_DIRS} -I${EIGEN3_INCLUDE_DIR}," ${LAMMPS_PATH}/src/MAKE/Makefile.mpi + COMMAND sed -i.bak "s,^LINK .*$$,LINK = ${MPI_CXX_COMPILER} ," ${LAMMPS_PATH}/src/MAKE/Makefile.mpi + COMMAND sed -i.bak "s,^LINKFLAGS .*$$,LINKFLAGS = ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_MPI} -L${GSL_LIBRARY_DIR}," ${LAMMPS_PATH}/src/MAKE/Makefile.mpi + COMMENT "Patching LAMMPS makefile.mpi") + ################################################################################################### + + ################################################################################################### + # Build a minimal LAMMPS Executable (uses LAMMPS make build system) + add_custom_target(build_lammps ALL + COMMAND ${CMAKE_COMMAND} -E chdir ${LAMMPS_PATH}/src/ make yes-ml-hdnnp + COMMAND ${CMAKE_COMMAND} -E chdir ${LAMMPS_PATH}/src/ make yes-kspace + COMMAND ${CMAKE_COMMAND} -E chdir ${LAMMPS_PATH}/src/ make yes-molecule + COMMAND ${CMAKE_COMMAND} -E chdir ${LAMMPS_PATH}/src/ make mpi + DEPENDS "${LAMMPS_PATH}/src/ML-HDNNP" + COMMENT "Building minimal LAMMPS Distribution. Version: ${LAMMPS_VERSION}") + install(FILES "${LAMMPS_PATH}/src/lmp_mpi" DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + add_dependencies(build_lammps link_n2p2 update_lammps patch_lammps_makefile nnpif) + ################################################################################################### +endif(BUILD_LAMMPS) \ No newline at end of file diff --git a/src/interface/LAMMPS/Makefile.lammps-extra.config.in b/src/interface/LAMMPS/Makefile.lammps-extra.config.in new file mode 100644 index 0000000000..6f8cdb5fc8 --- /dev/null +++ b/src/interface/LAMMPS/Makefile.lammps-extra.config.in @@ -0,0 +1,5 @@ +# Settings that the LAMMPS build will import when this package library is used + +${LAMMPS_PACKAGE_NAME}_SYSINC = ${N2P2_PROJECT_OPTIONS} +${LAMMPS_PACKAGE_NAME}_SYSLIB = -lnnpif -lnnp -lgsl -lgslcblas +${LAMMPS_PACKAGE_NAME}_SYSPATH = diff --git a/src/interface/LAMMPS/lammps-extra.cmake.config.in b/src/interface/LAMMPS/lammps-extra.cmake.config.in new file mode 100644 index 0000000000..2b0b131ff9 --- /dev/null +++ b/src/interface/LAMMPS/lammps-extra.cmake.config.in @@ -0,0 +1 @@ +target_compile_definitions(lammps PRIVATE ${N2P2_PROJECT_OPTIONS}) \ No newline at end of file diff --git a/src/libnnp/CMakeLists.txt b/src/libnnp/CMakeLists.txt new file mode 100644 index 0000000000..1a1674650e --- /dev/null +++ b/src/libnnp/CMakeLists.txt @@ -0,0 +1,23 @@ +################################################################################################### +# CMake Build System for n2p2/libnnp +################################################################################################### + +################################################################################################### +# Set Source Files +file(GLOB SRC_FILES "*.cpp") +file(GLOB HDR_FILES "*.h") +################################################################################################### + +################################################################################################### +# Specify Build Targets +add_library(nnp ${SRC_FILES}) +add_compile_options(${PROJECT_OPTIONS}) +configure_file(version.config.h ${CMAKE_CURRENT_SOURCE_DIR}/version.h) +install(FILES ${HDR_FILES} DESTINATION ${PROJECT_INCLUDE}) # Headers copied at install time +################################################################################################### + +################################################################################################### +# Find Required Package dependencies +target_link_libraries(nnp PUBLIC MPI::MPI_CXX Eigen3::Eigen) +include_directories(${MPI_INCLUDE_PATH}) +################################################################################################### \ No newline at end of file diff --git a/src/libnnp/version.config.h b/src/libnnp/version.config.h new file mode 100644 index 0000000000..26e4f614f1 --- /dev/null +++ b/src/libnnp/version.config.h @@ -0,0 +1,25 @@ +// n2p2 - A neural network potential package +// Copyright (C) 2018 Andreas Singraber (University of Vienna) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#ifndef VERSION_H +#define VERSION_H + +#define N2P2_VERSION "${PROJECT_VERSION}" +#define N2P2_GIT_VERSION "${GIT_VERSION}" +#define N2P2_GIT_REV "${GIT_REV}" +#define N2P2_GIT_BRANCH "${GIT_BRANCH}" + +#endif diff --git a/src/libnnpif/CMakeLists.txt b/src/libnnpif/CMakeLists.txt new file mode 100644 index 0000000000..91984e16e4 --- /dev/null +++ b/src/libnnpif/CMakeLists.txt @@ -0,0 +1,41 @@ +################################################################################################### +# CMake Build System for n2p2/libnnpif +################################################################################################### + +################################################################################################### +# Set Source Files +file(GLOB LAMMPS_SRC_FILES "LAMMPS/*.cpp") +file(GLOB LAMMPS_HDR_FILES "LAMMPS/*.h") +file(GLOB CABANA_SRC_FILES "CabanaMD/*.cpp") +file(GLOB CABANA_HDR_FILES "CabanaMD/*.h") + +if(N2P2_IF_LAMMPS) + list(APPEND SRC_FILES ${LAMMPS_SRC_FILES}) + list(APPEND HDR_FILES ${LAMMPS_HDR_FILES}) +endif(N2P2_IF_LAMMPS) + +if(N2P2_IF_CABANA) + list(APPEND SRC_FILES ${CABANA_SRC_FILES}) + list(APPEND HDR_FILES ${CABANA_HDR_FILES}) +endif(N2P2_IF_CABANA) +################################################################################################### + +################################################################################################### +# Specify Build Targets +add_library(nnpif ${SRC_FILES}) +add_compile_options(${PROJECT_OPTIONS}) + +# Headers need to be available at compile time to enable LAMMPS build +add_custom_target(install-nnpif-headers ALL + COMMAND ${CMAKE_COMMAND} -E copy ${LAMMPS_HDR_FILES} ${PROJECT_INCLUDE} + COMMAND ${CMAKE_COMMAND} -E copy ${CABANA_HDR_FILES} ${PROJECT_INCLUDE} + COMMENT "Installing libnnpif headers.") +#install(FILES ${HDR_FILES} DESTINATION ${PROJECT_INCLUDE}) # Headers copied at install time +################################################################################################### + +################################################################################################### +# Find Required Package dependencies +find_package(MPI REQUIRED) +include_directories(${MPI_INCLUDE_PATH} ${PROJECT_SOURCE_DIR}/libnnp) +target_link_libraries(nnpif MPI::MPI_CXX nnp) +################################################################################################### \ No newline at end of file diff --git a/src/libnnptrain/CMakeLists.txt b/src/libnnptrain/CMakeLists.txt new file mode 100644 index 0000000000..22b41ab169 --- /dev/null +++ b/src/libnnptrain/CMakeLists.txt @@ -0,0 +1,22 @@ +################################################################################################### +# CMake Build System for n2p2/libnnptrain +################################################################################################### + +################################################################################################### +# Set Source Files +file(GLOB SRC_FILES "*.cpp") +file(GLOB HDR_FILES "*.h") +################################################################################################### + +################################################################################################### +# Specify Build Targets +add_library(nnptrain ${SRC_FILES}) +add_compile_options(${PROJECT_OPTIONS}) +install(FILES ${HDR_FILES} DESTINATION ${PROJECT_INCLUDE}) # Headers copied at install time +################################################################################################### + +################################################################################################### +# Find Required Package dependencies +include_directories(${MPI_INCLUDE_PATH} ${PROJECT_SOURCE_DIR}/libnnp ${GSL_INCLUDE_DIRS}) +target_link_libraries(nnptrain MPI::MPI_CXX ${GSL_LIBRARIES} Eigen3::Eigen nnp) +################################################################################################### \ No newline at end of file diff --git a/src/llvm.cmake b/src/llvm.cmake new file mode 100644 index 0000000000..1baa836059 --- /dev/null +++ b/src/llvm.cmake @@ -0,0 +1,10 @@ +# CMake Cache File Setting Defaults for Mac LLVM toolchain + +#set(CMAKE_CXX_COMPILER "mpic++" CACHE STRING "" FORCE) +#set(MPI_CXX "mpic++" CACHE STRING "" FORCE) +#set(MPI_CXX_COMPILER "mpic++" CACHE STRING "" FORCE) + +set(CMAKE_CXX_FLAGS "-O3 -march=native -std=c++11" CACHE STRING "" FORCE) +set(CMAKE_OSX_DEPLOYMENT_TARGET "14.0" CACHE STRING "Minimum macOS deployment target") +set(CMAKE_CXX_FLAGS_DEBUG "-g -pedantic-errors -Wall -Wextra" CACHE STRING "" FORCE) +set(CMAKE_AR "ar" CACHE STRING "" FORCE) \ No newline at end of file