Commit 4c2540cb authored by Luigi Sbailo's avatar Luigi Sbailo
Browse files

Removed submodules

parent cf9dba20
[submodule "tutorials/analytics-compressed-sensing"]
path = tutorials/analytics-compressed-sensing
url = https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-compressed-sensing.git
[submodule "tutorials/analytics-decision-tree"]
path = tutorials/analytics-decision-tree
url = https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-decision-tree.git
[submodule "tutorials/analytics-krr4mat"]
path = tutorials/analytics-krr4mat
url = https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-krr4mat.git
[submodule "3rdparty/quip"]
path = 3rdparty/quip
url = https://github.com/libAtoms/QUIP.git
[submodule "3rdparty/qmmlpack"]
path = 3rdparty/qmmlpack
url = https://gitlab.com/qmml/qmmlpack.git
image: gitlab-registry.mpcdf.mpg.de/mpcdf/module-image
stages:
- build
- test
build-intel:
stage: build
script:
- module load intel impi/2018.4 mkl cmake anaconda/3/2019.03 mpi4py git
- module load svn
- mkdir build_intel/
- cd build_intel/
- conda create -p sisso/ python=3.7 mkl numpy scipy pandas pytest seaborn
- export PATH=`pwd`/sisso/bin/:$PATH
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MKLROOT/lib/intel64/:`pwd`/sisso/lib/
- cmake -C ../cmake/toolchains/intel_py.cmake ../
- make
- make install
- cd ../
- pytest tests
- cd tests/exec_test/
- mpiexec -n 2 ../../bin/sisso++
- python check_model.py
tags:
- docker
build-gnu:
stage: build
script:
- module load gcc impi/2018.4 intel mkl cmake anaconda/3/2019.03 mpi4py git
- mkdir build_gcc/
- cd build_gcc/
- conda create -p sisso/ python=3.7 mkl numpy scipy pandas pytest seaborn
- export PATH=`pwd`/sisso/bin/:$PATH
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MKLROOT/lib/intel64/:`pwd`/sisso/lib/
- cmake -C ../cmake/toolchains/gnu_py.cmake ../
- make
- make install
- cd ../
- pytest tests
- cd tests/exec_test/
- ../../bin/sisso++
- python check_model.py
tags:
- docker
cmake_minimum_required(VERSION 3.10)
# Include External Project options
include( ExternalProject )
# set the project name
project(sisso++ VERSION 0.1 LANGUAGES CXX)
# Cmake modules/macros are in a subdirectory to keep this file cleaner
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
enable_testing()
# Compiler tests
include(CheckCXXCompilerFlag)
# Check for C++14 standard
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# compiler options
option(EXTERNAL_BOOST "Use an external boost library" OFF)
option(USE_PYTHON "Whether to compile with python binding support" ON)
if(USE_PYTHON)
message(STATUS "USE PYTHON True")
set(USE_PYTHON TRUE)
else(USE_PYTHON)
message(STATUS "USE PYTHON False")
set(USE_PYTHON FALSE)
endif()
if(EXTERNAL_BOOST)
message(STATUS "Using external boost")
set(EXTERNAL_BOOST TRUE)
else(EXTERNAL_BOOST)
if(NOT DEFINED BOOST_BUILD_N_PROCS)
set(BOOST_BUILD_N_PROCS 1 CACHE STRING "Number of processes to use when building Boost")
endif()
message(STATUS "Building boost wth ${BOOST_BUILD_N_PROCS} process(es)")
include( ExternalProject )
set(EXTERNAL_BOOST FALSE)
endif()
if(USE_PYTHON)
# Check python settings
find_package(PythonInterp 3 REQUIRED)
execute_process(
COMMAND ${PYTHON_EXECUTABLE}
-c "import distutils.sysconfig as cg; print(cg.get_python_inc())"
OUTPUT_VARIABLE PYTHON_INCLUDE_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(PYTHON_INCLUDE_PATH ${PYTHON_INCLUDE_PATH} CACHE PATH "Python Include Directory")
mark_as_advanced(PYTHON_INCLUDE_PATH)
include_directories(${PYTHON_INCLUDE_PATH})
if(NOT PYTHON_INSTDIR)
execute_process(
COMMAND ${PYTHON_EXECUTABLE}
-c "import distutils.sysconfig as cg; print(cg.get_python_lib(1,0))"
OUTPUT_VARIABLE PYTHON_INSTDIR OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif()
execute_process(
COMMAND ${PYTHON_EXECUTABLE}
-c "import sys; print('{}{}'.format(sys.version_info[0], sys.version_info[1]))"
OUTPUT_VARIABLE BOOST_PYTHON_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND ${PYTHON_EXECUTABLE}
-c "import sys; print(sys.version[:3])"
OUTPUT_VARIABLE PYTHON_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND ${PYTHON_EXECUTABLE}
-c "import distutils.sysconfig as cg; print(cg.get_config_var('LIBDIR'))"
OUTPUT_VARIABLE PYTHON_LIBDIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND ${PYTHON_EXECUTABLE}
-c "import distutils.sysconfig as cg; print(cg.PREFIX)"
OUTPUT_VARIABLE PYTHON_PREFIX
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message(STATUS "PYTHON_LIBDIR = ${PYTHON_LIBDIR}")
message(STATUS "PYTHON_INSTDIR = ${PYTHON_INSTDIR}")
find_library(
PYTHON_LIBRARIES
NAMES python${PYTHON_VERSION}m
PATHS ${PYTHON_LIBDIR}
)
if(NOT PYTHON_LIBRARIES)
message(FATAL_ERROR "Python libraries not found!")
endif(NOT PYTHON_LIBRARIES)
message(STATUS "PYTHON_LIBRARIES = ${PYTHON_LIBRARIES}")
mark_as_advanced(PYTHON_INCLUDE_PATH PYTHON_LIBRARIES)
endif()
# Check for Boost
if(EXTERNAL_BOOST)
find_package(Boost REQUIRED COMPONENTS filesystem system mpi serialization)
set(Boost_LIBS ${Boost_LIBRARIES})
if(USE_PYTHON)
if(${Boost_VERSION} VERSION_LESS 106700)
find_package(Boost ${NEEDED_Boost_VERSION} REQUIRED COMPONENTS python3 numpy3)
else()
find_package(Boost ${NEEDED_Boost_VERSION} REQUIRED COMPONENTS python${BOOST_PYTHON_VERSION} numpy${BOOST_PYTHON_VERSION})
endif()
# Append Python library to the list of Boost libraries.
set(Boost_PYTHON_LIBRARIES ${Boost_LIBRARIES})
set(Boost_LIBRARIES ${Boost_LIBS})
endif()
if(NOT Boost_FOUND)
message(FATAL_ERROR "Boost not found.")
endif(NOT Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
else(EXTERNAL_BOOST)
set(Boost_URL "https://sourceforge.net/projects/boost/files/boost/1.68.0/boost_1_68_0.tar.bz2/download")
set(Boost_SHA1 "18863a7cae4d58ae85eb63d400f774f60a383411")
set(Boost_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/external/boost)
set(Boost_INCLUDE_DIRS ${Boost_INSTALL_DIR}/include)
set(Boost_LIBRARY_DIRS ${Boost_INSTALL_DIR}/lib)
set(ENV{BOOST_ROOT} ${Boost_INSTALL_DIR})
string(COMPARE EQUAL ${CMAKE_CXX_COMPILER_ID} "AppleClang" AP_CLANG_COMP)
string(COMPARE EQUAL ${CMAKE_CXX_COMPILER_ID} "Clang" CLANG_COMP)
string(COMPARE EQUAL ${CMAKE_CXX_COMPILER_ID} "Borland" BORLAND_COMP)
string(COMPARE EQUAL ${CMAKE_CXX_COMPILER_ID} "GNU" GNU_COMP)
string(COMPARE EQUAL ${CMAKE_CXX_COMPILER_ID} "MSVC" MSVC_COMP)
string(COMPARE EQUAL ${CMAKE_CXX_COMPILER_ID} "Intel" INTEL_COMP)
string(COMPARE EQUAL ${CMAKE_CXX_COMPILER_ID} "PGI" PGI_COMP)
string(COMPARE EQUAL ${CMAKE_CXX_COMPILER_ID} "PathScale" PS_COMP)
string(COMPARE EQUAL ${CMAKE_CXX_COMPILER_ID} "XL" IBM_COMP)
string(COMPARE EQUAL ${CMAKE_CXX_COMPILER_ID} "VisualAge" IBM_COMP)
string(COMPARE EQUAL ${CMAKE_CXX_COMPILER_ID} "zOS" IMP_COMP)
string(COMPARE EQUAL ${CMAKE_CXX_COMPILER_ID} "XLClang" IBM_CLANG_COMP)
string(COMPARE EQUAL ${CMAKE_SYSTEM_NAME} "Darwin" DARWIN_COMP)
string(COMPARE EQUAL ${CMAKE_SYSTEM_NAME} "Linux" LINUX_COMP)
if(HP_COMP)
set(Boost_TOOLSET acc)
elseif(BORLAND_COMP)
set(Boost_TOOLSET borland)
elseif(GNU_COMP)
set(Boost_TOOLSET gcc)
elseif(INTEL_COMP)
if(DARWIN_COMP)
set(Boost_TOOLSET intel-darwin)
elseif(LINUX_COMP)
set(Boost_TOOLSET intel-linux)
else()
message(FATAL_ERROR "Could not find correct build toolset for boost with system ${CMAKE_SYSTEM_NAME}")
endif()
elseif(MSVC_COMP)
set(Boost_TOOLSET "msvc-${CMAKE_CXX_COMPILER_VERSION")
elseif(IBM_COMP)
set(Boost_TOOLSET vacpp)
elseif(PGI_COMP)
set(Boost_TOOLSET pgi)
elseif(PS_COMP)
set(Boost_TOOLSET pathscale)
elseif(CLANG_COMP)
set(Boost_TOOLSET clang)
elseif(AP_CLANG_COMP)
set(Boost_TOOLSET darwin)
else()
message(FATAL_ERROR "Could not find correct build toolset for boost")
endif()
message(STATUS "building boost with toolset: ${Boost_TOOLSET}")
set(Boost_CONFIGURE_COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/cmake/boost/boost_configure.sh ${Boost_INSTALL_DIR} ${Boost_TOOLSET})
if(USE_PYTHON)
set(Boost_CONFIGURE_COMMAND ${Boost_CONFIGURE_COMMAND} ${PYTHON_VERSION} ${PYTHON_PREFIX} ${PYTHON_INCLUDE_PATH} ${PYTHON_LIBDIR})
endif()
# set(Boost_CONFIGURE_COMMAND "${Boost_CONFIGURE_COMMAND} echo using mpi\;>>project_config.jam\;")
# if(USE_PYTHON)
# set(Boost_CONFIGURE_COMMAND "${Boost_CONFIGURE_COMMAND} echo -e \'import python \;\\nif ! [ python.configured ]\\n{\\n using python : ${PYTHON_VERSION} : ${PYTHON_PREFIX} : ${PYTHON_INCLUDE_PATH} : ${PYTHON_LIBDIR} \; \\n}\' >> project_config.jam")
# endif()
ExternalProject_Add( external_boost
PREFIX boost
URL ${Boost_URL}
URL_HASH SHA1=${Boost_SHA1}
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ${Boost_CONFIGURE_COMMAND}
BUILD_COMMAND
./b2 -j ${BOOST_BUILD_N_PROCS}
INSTALL_COMMAND ./b2 -j ${BOOST_BUILD_N_PROCS} install
INSTALL_DIR ${Boost_INSTALL_DIR}
)
include_directories(${Boost_INCLUDE_DIRS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
set( Boost_LIBRARY_SUFFIX .so )
set( Boost_LIBRARY_PREFIX lib )
add_library( boost::mpi SHARED IMPORTED )
set_property( TARGET boost::mpi PROPERTY IMPORTED_LOCATION ${Boost_LIBRARY_DIRS}/${Boost_LIBRARY_PREFIX}boost_mpi${Boost_LIBRARY_SUFFIX} )
set_property( TARGET boost::mpi PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS} )
ExternalProject_Add_StepDependencies( external_boost boost::mpi )
add_library( boost::serialization SHARED IMPORTED )
set_property( TARGET boost::serialization PROPERTY IMPORTED_LOCATION ${Boost_LIBRARY_DIRS}/${Boost_LIBRARY_PREFIX}boost_serialization${Boost_LIBRARY_SUFFIX} )
set_property( TARGET boost::serialization PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS} )
ExternalProject_Add_StepDependencies( external_boost boost::serialization )
add_library( boost::system SHARED IMPORTED )
set_property( TARGET boost::system PROPERTY IMPORTED_LOCATION ${Boost_LIBRARY_DIRS}/${Boost_LIBRARY_PREFIX}boost_system${Boost_LIBRARY_SUFFIX} )
set_property( TARGET boost::system PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS} )
ExternalProject_Add_StepDependencies( external_boost boost::system )
add_library( boost::filesystem SHARED IMPORTED )
set_property( TARGET boost::filesystem PROPERTY IMPORTED_LOCATION ${Boost_LIBRARY_DIRS}/${Boost_LIBRARY_PREFIX}boost_filesystem${Boost_LIBRARY_SUFFIX} )
set_property( TARGET boost::filesystem PROPERTY INTERFACE_LINK_LIBRARIES boost::system )
set_property( TARGET boost::filesystem PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS} )
ExternalProject_Add_StepDependencies( external_boost boost::filesystem )
set(Boost_LIBRARIES ${Boost_LIBRARY_DIRS}/${Boost_LIBRARY_PREFIX}boost_mpi${Boost_LIBRARY_SUFFIX})
list(APPEND Boost_LIBRARIES ${Boost_LIBRARY_DIRS}/${Boost_LIBRARY_PREFIX}boost_serialization${Boost_LIBRARY_SUFFIX})
list(APPEND Boost_LIBRARIES ${Boost_LIBRARY_DIRS}/${Boost_LIBRARY_PREFIX}boost_system${Boost_LIBRARY_SUFFIX})
list(APPEND Boost_LIBRARIES ${Boost_LIBRARY_DIRS}/${Boost_LIBRARY_PREFIX}boost_filesystem${Boost_LIBRARY_SUFFIX})
if(USE_PYTHON)
add_library( boost::python${BOOST_PYTHON_VERSION} SHARED IMPORTED )
set_property( TARGET boost::python${BOOST_PYTHON_VERSION} PROPERTY IMPORTED_LOCATION ${Boost_LIBRARY_DIRS}/${Boost_LIBRARY_PREFIX}boost_python${BOOST_PYTHON_VERSION}${Boost_LIBRARY_SUFFIX} )
set_property( TARGET boost::python${BOOST_PYTHON_VERSION} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS} )
ExternalProject_Add_StepDependencies( external_boost boost::python${BOOST_PYTHON_VERSION} )
add_library( boost::numpy${BOOST_PYTHON_VERSION} SHARED IMPORTED )
set_property( TARGET boost::numpy${BOOST_PYTHON_VERSION} PROPERTY IMPORTED_LOCATION ${Boost_LIBRARY_DIRS}/${Boost_LIBRARY_PREFIX}boost_numpy${BOOST_PYTHON_VERSION}${Boost_LIBRARY_SUFFIX} )
set_property( TARGET boost::numpy${BOOST_PYTHON_VERSION} PROPERTY INTERFACE_LINK_LIBRARIES boost::system )
set_property( TARGET boost::numpy${BOOST_PYTHON_VERSION} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS} )
ExternalProject_Add_StepDependencies( external_boost boost::numpy${BOOST_PYTHON_VERSION} )
set(Boost_PYTHON_LIBRARIES ${Boost_LIBRARY_DIRS}/${Boost_LIBRARY_PREFIX}boost_python${BOOST_PYTHON_VERSION}${Boost_LIBRARY_SUFFIX})
list(APPEND Boost_PYTHON_LIBRARIES ${Boost_LIBRARY_DIRS}/${Boost_LIBRARY_PREFIX}boost_numpy${BOOST_PYTHON_VERSION}${Boost_LIBRARY_SUFFIX})
endif()
endif()
# Check BLAS/LAPACK
set(BLA_VENDOR Intel10_64lp_seq)
find_package(LAPACK)
if(NOT LAPACK_FOUND)
set(BLA_VENDOR All)
find_package(LAPACK REQUIRED)
endif()
list(GET LAPACK_LIBRARIES 0 LAPACK_LIBRARY)
get_filename_component(LAPACK_DIR ${LAPACK_LIBRARY} DIRECTORY)
message(STATUS "LAPACK_LIBRARIES = ${LAPACK_LIBRARIES}")
# Check MPI
find_package(MPI REQUIRED)
include_directories(${MPI_CXX_INCLUDE_DIRS})
set(MPI_LIBRARIES, ${MPI_CXX_LIBRARIES})
list(GET MPI_CXX_LIBRARIES 0 MPI_LIBRARY)
get_filename_component(MPI_DIR ${MPI_LIBRARY} DIRECTORY)
# Coin-Clp for linear programing
set(COIN_CLP_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/external/coin-Clp/build/")
set(COIN_CLP_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/external/coin-Clp/bin/")
set(COIN_CLP_INCLUDE_DIRS "${COIN_CLP_INSTALL_DIR}/include/;${COIN_CLP_INSTALL_DIR}/include/coin")
set(COIN_CLP_LIBRARY_DIRS "${COIN_CLP_INSTALL_DIR}/lib")
set(COIN_CLP_BLAS_LAPACK_LIBS "-L${LAPACK_DIR}")
set(COIN_CLP_URL "https://www.coin-or.org/download/source/Clp/Clp-1.17.6.tgz")
foreach(LAPACK_LIB_FILE IN LISTS LAPACK_LIBRARIES)
get_filename_component(LAPACK_LIB ${LAPACK_LIB_FILE} NAME_WE)
string(REPLACE "lib" "-l" LAPACK_LIB ${LAPACK_LIB})
set(COIN_CLP_BLAS_LAPACK_LIBS "${COIN_CLP_BLAS_LAPACK_LIBS} ${LAPACK_LIB}")
endforeach()
set(COIN_CLP_BLAS_LAPACK_LIBS "${COIN_CLP_BLAS_LAPACK_LIBS}")
message(STATUS "COIN_CLP_BLAS_LAPACK_LIBS = ${COIN_CLP_BLAS_LAPACK_LIBS}")
set(COIN_CLP_CONFIGURE_COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/cmake/coin-Clp/clp_configure.sh ${COIN_CLP_INSTALL_DIR} ${COIN_CLP_BLAS_LAPACK_LIBS} ${CMAKE_CXX_COMPILER})
ExternalProject_Add(
external_Clp
PREFIX "external/coin-Clp"
URL ${COIN_CLP_URL}
# SVN_REPOSITORY "https://projects.coin-or.org/svn/Clp/stable/1.17"
# BUILD_IN_SOURCE 1
# CONFIGURE_COMMAND "${CMAKE_CURRENT_BINARY_DIR}/external/coin-Clp/src/external_Clp/configure"
CONFIGURE_COMMAND "${COIN_CLP_CONFIGURE_COMMAND}"
BUILD_COMMAND make -j ${BOOST_BUILD_N_PROCS}
INSTALL_COMMAND make install
BINARY_DIR "${COIN_CLP_BUILD_DIR}"
INSTALL_DIR "${COIN_CLP_INSTALL_DIR}"
)
add_library( Clp SHARED IMPORTED )
set_property( TARGET Clp PROPERTY IMPORTED_LOCATION ${COIN_CLP_LIBRARY_DIRS}/libClp.so )
set_property( TARGET Clp PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${COIN_CLP_INCLUDE_DIRS} )
ExternalProject_Add_StepDependencies(external_Clp Clp)
add_library( CoinUtils SHARED IMPORTED )
set_property( TARGET CoinUtils PROPERTY IMPORTED_LOCATION ${COIN_CLP_LIBRARY_DIRS}/libCoinUtils.so )
set_property( TARGET CoinUtils PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${COIN_CLP_INCLUDE_DIRS} )
ExternalProject_Add_StepDependencies(external_Clp CoinUtils)
set(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY_DIRS}/libClp.so;${COIN_CLP_LIBRARY_DIRS}/libCoinUtils.so")
include_directories(${COIN_CLP_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_LIST_DIR}/src)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/src)
Thomas A. R. Purcell
\ No newline at end of file
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2020 Thomas Purcell
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
C++ Implementation of SISSO
===
## Overview
This package provides a C++ implementation of SISSO with built in Python bindings for an efficient python interface.
Future work will expand the python interface to include more postporcessing analysis tools.
## Installation
The package uses a CMake build system, and compatible all versions of the C++ standard library after C++ 14.
### Prerequisites
To install the sisso++ the following packages are needed:
- CMake version 3.10 and up
- A C++ complier (compatible with C++ 14 and later)
- BLAS/LAPACK (Architecture specific compilations like MKL or ACML are recommended)
- MPI
- Boost with the following libraries compiled (mpi, serialization, system, and filesystem)
To build the optional python bindings the following are also needed:
- Python 3 interpreter
- Boost with the python and numpy libraries compiled
### Install `sisso++`
`sisso++` is installed using a cmake build system, with some basic configuration files stored in `cmake/toolchains/`
As an example here is an `initial_config.cmake` file used to construct `sisso++` and the python bindings using the gnu compiler.
```
###############
# Basic Flags #
###############
set(CMAKE_CXX_COMPILER g++ CACHE STRING "")
set(CMAKE_CXX_FLAGS "-O2" CACHE STRING "")
#################