diff --git a/.gitignore b/.gitignore index 34c84c5a4..97e8c171d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,21 @@ -# Build directories -*build*/ - -# IDE directories -.idea/* +# Build and generated directories +/build/ +/_build/ +CMakeFiles/ +CMakeCache.txt +cmake_install.cmake +compile_commands.json + +# Editors and operating systems +.idea/ +.vscode/ +.DS_Store + +# Python tooling +.pytest_cache/ +.ruff_cache/ +__pycache__/ +*.py[cod] # Prerequisites *.d @@ -36,5 +49,3 @@ *.exe *.out *.app - -__pycache__ diff --git a/ALPS_VERSION.txt b/ALPS_VERSION.txt new file mode 100644 index 000000000..3f684d2d9 --- /dev/null +++ b/ALPS_VERSION.txt @@ -0,0 +1 @@ +2.3.4 diff --git a/CITATION.md b/CITATION.md new file mode 100644 index 000000000..3fbfcf163 --- /dev/null +++ b/CITATION.md @@ -0,0 +1,11 @@ +# Citing ALPS + +If ALPS contributes to published research, cite the latest framework paper below and any method-specific paper relevant to the application you used. + +## Framework paper + +B. Bauer *et al.*, “The ALPS project release 2.0: Open source software for strongly correlated systems,” *Journal of Statistical Mechanics: Theory and Experiment* **2011**, P05001 (2011). [doi:10.1088/1742-5468/2011/05/P05001](https://doi.org/10.1088/1742-5468/2011/05/P05001) + +## Method-specific papers + +The maintained list of implementation and algorithm papers for individual ALPS applications is available on the [ALPS documentation website](https://alps.comp-phys.org/documentation/pubs/refs/). diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a7995efd..31d47fc5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. -cmake_minimum_required(VERSION 3.18.0) +cmake_minimum_required(VERSION 3.22) if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) message(FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there. You may need to remove CMakeCache.txt.") @@ -83,13 +83,17 @@ if(ALPS_BUILD_LIBS_ONLY) set(ALPS_BUILD_APPLICATIONS OFF) endif() +# Sets ALPS_VERSION_CORE from ALPS_VERSION.txt. Included by full path because +# CMAKE_MODULE_PATH is not set up until after project(). +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/ALPSVersion.cmake) + if(ALPS_BUILD_FORTRAN) - project(alps C CXX Fortran) + project(alps VERSION ${ALPS_VERSION_CORE} LANGUAGES C CXX Fortran) if (APPLE) set (CMAKE_Fortran_RUNTIME_LIBRARIES "-lgcc_s.1") endif(APPLE) else(ALPS_BUILD_FORTRAN) - project(alps C CXX) + project(alps VERSION ${ALPS_VERSION_CORE} LANGUAGES C CXX) endif(ALPS_BUILD_FORTRAN) set(CMAKE_CXX_STANDARD 14) @@ -122,7 +126,7 @@ message(STATUS "Build type: " ${CMAKE_BUILD_TYPE}) ###################################################################### # CMAKE_MODULE_PATH ###################################################################### -list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/config) +list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) ###################################################################### # set default CMAKE_INSTALL_PREFIX @@ -135,25 +139,35 @@ endif (ALPS_BUILD_PYTHON) ###################################################################### # Version information ###################################################################### -set(ALPS_YEAR 2026) -set(ALPS_VERSION_MAJOR 2) -set(ALPS_VERSION_MINOR 3) -set(ALPS_VERSION_PATCH 3) -set(ALPS_VERSION_BUILD "") - -if(ALPS_VERSION_BUILD) - set(ALPS_VERSION "${ALPS_VERSION_MAJOR}.${ALPS_VERSION_MINOR}.${ALPS_VERSION_PATCH}-${ALPS_VERSION_BUILD}") -else(ALPS_VERSION_BUILD) - set(ALPS_VERSION "${ALPS_VERSION_MAJOR}.${ALPS_VERSION_MINOR}.${ALPS_VERSION_PATCH}") -endif(ALPS_VERSION_BUILD) +# The numeric components come from project() above, which took its version from +# ALPS_VERSION.txt. Do not hardcode them here. +set(ALPS_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) +set(ALPS_VERSION_MINOR ${PROJECT_VERSION_MINOR}) +set(ALPS_VERSION_PATCH ${PROJECT_VERSION_PATCH}) + +# Prerelease label, e.g. "beta.2" for the v2.3.4-beta.2 tag. Display only: it is +# deliberately kept out of the numeric version that drives SOVERSION and +# find_package() matching. Set by the release process, not checked in. +set(ALPS_VERSION_PRERELEASE "" CACHE STRING + "Prerelease label for this build, e.g. beta.2 (affects version strings only)") +mark_as_advanced(ALPS_VERSION_PRERELEASE) + +if(ALPS_VERSION_PRERELEASE) + set(ALPS_VERSION "${ALPS_VERSION_CORE}-${ALPS_VERSION_PRERELEASE}") +else() + set(ALPS_VERSION "${ALPS_VERSION_CORE}") +endif() set(ALPS_VERSION_STRING "ALPS Libraries version ${ALPS_VERSION}") -MESSAGE(STATUS "ALPS version: ${ALPS_VERSION}") +message(STATUS "ALPS version: ${ALPS_VERSION}") + +# Derived, never hardcoded. string(TIMESTAMP) honours SOURCE_DATE_EPOCH, so +# distro and conda reproducible builds still get a stable year. +string(TIMESTAMP ALPS_YEAR "%Y" UTC) set(ALPS_CONFIG_HOST unknown) set(ALPS_CONFIG_USER unknown) set(ALPS_PREFIX "${CMAKE_INSTALL_PREFIX}") -set(ALPS_SRCDIR "${CMAKE_SOURCE_DIR}") set(libdir "${CMAKE_INSTALL_PREFIX}/lib") set(bindir "${CMAKE_INSTALL_PREFIX}/bin") @@ -436,8 +450,16 @@ if(PYTHON_LIBRARY) list(APPEND ALPS_EXTRA_LIBRARIES ${PYTHON_LIBRARY}) endif(PYTHON_LIBRARY) -configure_file(config/ALPSConfig.cmake.in ${PROJECT_BINARY_DIR}/config/ALPSConfig.cmake @ONLY) -configure_file(config/include.mk.in ${PROJECT_BINARY_DIR}/config/include.mk) +configure_file(cmake/ALPSConfig.cmake.in ${PROJECT_BINARY_DIR}/cmake/ALPSConfig.cmake @ONLY) +configure_file(cmake/include.mk.in ${PROJECT_BINARY_DIR}/cmake/include.mk) + +# Without this file find_package(ALPS ) accepts any version it finds +# and silently discards the constraint. SameMinorVersion: patch releases within +# a minor series are drop-in, a minor bump is not guaranteed to be. +include(CMakePackageConfigHelpers) +write_basic_package_version_file( + ${PROJECT_BINARY_DIR}/cmake/ALPSConfigVersion.cmake + COMPATIBILITY SameMinorVersion) # installation @@ -474,17 +496,18 @@ endif() install(DIRECTORY ${PROJECT_BINARY_DIR}/lib/xml DESTINATION ${ALPS_XML_PATH} COMPONENT xml) -add_subdirectory(config) +add_subdirectory(cmake) -install(FILES config/UseALPS.cmake - ${PROJECT_BINARY_DIR}/config/ALPSConfig.cmake - ${PROJECT_BINARY_DIR}/config/include.mk - config/run_test.cmake - config/run_test_mpi.cmake - config/add_alps_test.cmake +install(FILES cmake/UseALPS.cmake + ${PROJECT_BINARY_DIR}/cmake/ALPSConfig.cmake + ${PROJECT_BINARY_DIR}/cmake/ALPSConfigVersion.cmake + ${PROJECT_BINARY_DIR}/cmake/include.mk + cmake/run_test.cmake + cmake/run_test_mpi.cmake + cmake/add_alps_test.cmake DESTINATION share/alps COMPONENT build) -install(FILES LICENSE.txt README.md +install(FILES CITATION.md LICENSE.txt README.md DESTINATION share/alps COMPONENT libraries) if(ALPS_BUILD_PYTHON AND ALPS_PYTHON_LIB_DEST_ROOT) string(CONFIGURE [[ diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 000000000..512f514ea --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,33 @@ +{ + "version": 3, + "cmakeMinimumRequired": { + "major": 3, + "minor": 22, + "patch": 0 + }, + "configurePresets": [ + { + "name": "default", + "displayName": "Default release build", + "binaryDir": "${sourceDir}/_build/default", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + } + ], + "buildPresets": [ + { + "name": "default", + "configurePreset": "default" + } + ], + "testPresets": [ + { + "name": "default", + "configurePreset": "default", + "output": { + "outputOnFailure": true + } + } + ] +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a6565acac..d7f1a1636 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,13 +50,13 @@ Before opening a new issue, please search existing issues to avoid duplicates. ### Prerequisites -- CMake ≥ 3.18 +- CMake ≥ 3.22 - A C++17-capable compiler (GCC, Clang, Intel, or Fujitsu) -- Boost (bundled copy included; or provide your own with `-DALPS_USE_SYSTEM_BOOST=ON`) +- Boost (downloaded automatically during configuration; or use a system install with `-DALPS_USE_SYSTEM_BOOST=ON`) - For Fortran bindings: gfortran (or compatible Fortran compiler) -- For Python bindings: Python ≥ 3.9, plus `numpy` and `scipy` +- For Python bindings: Python ≥ 3.10, plus `numpy` and `scipy` -See the [installation page](https://alps.comp-phys.org/documentation/install/) for full platform-specific instructions. +See the [installation page](https://alps.comp-phys.org/install/) for full platform-specific instructions. ### Fork and clone @@ -79,12 +79,16 @@ cmake .. -DCMAKE_BUILD_TYPE=Release make -j$(nproc) ``` -To build with Python bindings: +Alternatively, use the bundled CMake preset: ```bash -pip install scikit-build-core numpy scipy -pip install --no-build-isolation -e . +cmake --preset default +cmake --build --preset default ``` +The Python bindings are a separate `scikit-build-core` project that builds +against an installed ALPS C++ SDK; see the +[`pyalps` build instructions](bindings/python/pyalps/README.md). + ### Run the tests From the build directory: @@ -173,7 +177,7 @@ If you are contributing a new simulation application or library, the Governing C ### CMake -- CMake ≥ 3.18 features are acceptable. +- CMake ≥ 3.22 features are acceptable. - Use target-based linking (`target_link_libraries`, `target_include_directories`) rather than directory-level commands. --- diff --git a/CTestConfig.cmake b/CTestConfig.cmake deleted file mode 100644 index 16bb958cd..000000000 --- a/CTestConfig.cmake +++ /dev/null @@ -1,14 +0,0 @@ -## This file should be placed in the root directory of your project. -## Then modify the CMakeLists.txt file in the root directory of your -## project to incorporate the testing dashboard. -## # The following are required to uses Dart and the Cdash dashboard -## ENABLE_TESTING() -## INCLUDE(CTest) - -set(CTEST_PROJECT_NAME "ALPS") -set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") - -set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "alps.comp-phys.org") -set(CTEST_DROP_LOCATION "/cdash/submit.php?project=ALPS") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/README-package.txt b/README-package.txt deleted file mode 100644 index ffb6aefec..000000000 --- a/README-package.txt +++ /dev/null @@ -1,123 +0,0 @@ -The ALPS project (Algorithms and Libraries for Physics Simulations) aims at providing generic parallel algorithms for classical and quantum lattice models and provides utility classes and algorithm for many other problems. It strives to increase software reuse in the physics community. - -The ALPS Libraries are distributed under the MIT License. - -The full license text is provided in LICENSE.txt and is also available at -https://github.com/ALPSim/ALPS/blob/master/LICENSE.txt. - -The software is provided without warranty; see LICENSE.txt for the complete -terms. - -If you use one of the following libraries in a publication, please acknowledge -the ALPS libraries and cite the papers listed below: - -When alps/model.h or any header in alps/model was used: -reference the web page https://alps.comp-phys.org/ and cite the publication: -A.F. Albuquerque et al., J. of Magn. and Magn. Materials 310, 1187 (2007) -B. Bauer et al., J. Stat. Mech. (2011) P05001 - -When alps/lattice.h or any header in alps/lattice was used: -reference the web page https://alps.comp-phys.org/ and cite the publication: -A.F. Albuquerque et al., J. of Magn. and Magn. Materials 310, 1187 (2007) -B. Bauer et al., J. Stat. Mech. (2011) P05001 - -When alps/alea.h or any header in alps/alea was used: -reference the web page https://alps.comp-phys.org/ and cite the publications: -A.F. Albuquerque et al., J. of Magn. and Magn. Materials 310, 1187 (2007) -B. Bauer et al., J. Stat. Mech. (2011) P05001 - -When alps/scheduler.h or any header in alps/scheduler was used: -reference the web page https://alps.comp-phys.org/ and cite the publications: -A.F. Albuquerque et al., J. of Magn. and Magn. Materials 310, 1187 (2007) -B. Bauer et al., J. Stat. Mech. (2011) P05001 -M. Troyer et al., Lecture Notes in Computer Science, Vol. 1505, p. 191 (1998). - -The use of any other library, in particular those with headers in the -subdirectories alps/parser, alps/osiris, alps/random do not carry any -citation requirement but acknowledgment of the ALPS project is encouraged. - -* When the SSE quantum Monte Carlo program sse or sse_mpi was used: - - reference the ALPS web page https://alps.comp-phys.org/ - - and cite the publications: - A.F. Albuquerque et al., J. of Magn. and Magn. Materials 310, 1187 (2007). - B. Bauer et al., J. Stat. Mech. (2011) P05001 - -* When the loop quantum Monte Carlo program loop or loop_mpi was used: - - reference the ALPS and ALPS/looper web pages - https://alps.comp-phys.org/ - http://wistaria.comp-phys.org/alps-looper/ - - and cite the publications: - S. Todo and K. Kato, Phys. Rev. Lett. 87 047203 (2001). - A.F. Albuquerque et al., J. of Magn. and Magn. Materials 310, 1187 (2007). - B. Bauer et al., J. Stat. Mech. (2011) P05001 - -* When the classical Monte Carlo program spinmc or spinmc_mpi was - used: - - reference the ALPS web page https://alps.comp-phys.org/ - - and cite the publications: - A.F. Albuquerque et al., J. of Magn. and Magn. Materials 310, 1187 (2007). - B. Bauer et al., J. Stat. Mech. (2011) P05001 - -* When the diagonalization programs fulldiag, sparsediag or fulldiag_mpi was - used: - - reference the ALPS web page https://alps.comp-phys.org/ - - and cite the publications: - A.F. Albuquerque et al., J. of Magn. and Magn. Materials 310, 1187 (2007). - B. Bauer et al., J. Stat. Mech. (2011) P05001 - -* When the worm quantum Monte Carlo program is used: - - reference the ALPS web page https://alps.comp-phys.org/ - - and cite the publications: - A.F. Albuquerque et al., J. of Magn. and Magn. Materials 310, 1187 (2007). - B. Bauer et al., J. Stat. Mech. (2011) P05001 - -* When the quantum Wang-Landau program is used: - - reference the ALPS web page https://alps.comp-phys.org/ - - and cite the publications: - M. Troyer, S. Wessel, and F. Alet, Phys. Rev. Lett. 90, 120201 (2003). - A.F. Albuquerque et al., J. of Magn. and Magn. Materials 310, 1187 (2007). - B. Bauer et al., J. Stat. Mech. (2011) P05001 - -* When the Continuous-Time quantum Monte Carlo impurity solver programs or the DMFT framework are used: - - cite the publication: - A.F. Albuquerque et al., J. of Magn. and Magn. Materials 310, 1187 (2007). - B. Bauer et al., J. Stat. Mech. (2011) P05001 - - cite the ALPS DMFT publication (contact the authors for a current reference): - E. Gull, P. Werner, S. Fuchs, B. Surer, T. Pruschke, and M. Troyer, submitted to Computer Physics Communications. - -Since some of the references are to preprints we would like to ask you -to check the ALPS web page https://alps.comp-phys.org/ for updates. - ------------------------------------- -This binary installer package comes with other libraries distributed under their own license terms: - -The version of Szip distributed with HDF products is free for non-commercial use. - -lp_solve is distributed under the LPGL, shown on the license page. - -------------------------------------- - -HDF5 (Hierarchical Data Format 5) Software Library and Utilities -Copyright 2006-2009 by The HDF Group. - -NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities -Copyright 1998-2006 by the Board of Trustees of the University of Illinois. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted for any purpose (including commercial purposes) provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or materials provided with the distribution. -In addition, redistributions of modified forms of the source or binary code must carry prominent notices stating that the original code was changed and the date of the change. -All publications or advertising materials mentioning features or use of this software are asked, but not required, to acknowledge that it was developed by The HDF Group and by the National Center for Supercomputing Applications at the University of Illinois at Urbana-Champaign and credit the contributors. -Neither the name of The HDF Group, the name of the University, nor the name of any Contributor may be used to endorse or promote products derived from this software without specific prior written permission from The HDF Group, the University, or the Contributor, respectively. -DISCLAIMER: THIS SOFTWARE IS PROVIDED BY THE HDF GROUP AND THE CONTRIBUTORS "AS IS" WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. In no event shall The HDF Group or the Contributors be liable for any damages suffered by the users arising out of the use of this software, even if advised of the possibility of such damage. - - -Portions of HDF5 were developed with support from the University of California, Lawrence Livermore National Laboratory (UC LLNL). The following statement applies to those portions of the product and must be retained in any redistribution of source code, binaries, documentation, and/or accompanying materials: - -This work was partially produced at the University of California, Lawrence Livermore National Laboratory (UC LLNL) under contract no. W-7405-ENG-48 (Contract 48) between the U.S. Department of Energy (DOE) and The Regents of the University of California (University) for the operation of UC LLNL. -DISCLAIMER: This work was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately- owned rights. Reference herein to any specific commercial products, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. - -------------------------------------- diff --git a/README-py.md b/README-py.md index 4bd2da976..25cf9467d 100644 --- a/README-py.md +++ b/README-py.md @@ -16,7 +16,7 @@ pip install pyalps ### Installation instruction from sources 1. Prerequisites - - CMake > 3.18 + - CMake >= 3.22 - Boost sources >= 1.76 - BLAS/LAPACK - HDF5 diff --git a/README.md b/README.md index b49b867bf..c4eee2653 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,21 @@ -[![ALPS CI/CD](https://github.com/ALPSim/legacy/actions/workflows/build.yml/badge.svg)](https://github.com/ALPSim/legacy/actions/workflows/build.yml) +[![Build](https://github.com/ALPSim/ALPS/actions/workflows/build.yml/badge.svg)](https://github.com/ALPSim/ALPS/actions/workflows/build.yml) +[![Python wheels](https://github.com/ALPSim/ALPS/actions/workflows/build_wheels.yml/badge.svg)](https://github.com/ALPSim/ALPS/actions/workflows/build_wheels.yml) +[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.txt) -## Algorithms and Libraries for Physics Simulations (ALPS) +# ALPS — Algorithms and Libraries for Physics Simulations The ALPS software package aims to provide a set of well tested, robust, and standardized components for numerical simulations of condensed matter systems, including bosonic, fermionic, and spin systems. They consist of a set of components that are used in state-of-the-art high performance codes. -## Installation Instruction +**Project website:** [alps.comp-phys.org](https://alps.comp-phys.org/) -We support both binary and source installations. For details, please check out our [installation webpage](https://alps.comp-phys.org/documentation/install/). +## Installation + +For current binary, source, and Spack installation instructions, see the [ALPS installation website](https://alps.comp-phys.org/install/). + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) for development and contribution guidance. + +## License and citations + +ALPS is distributed under the terms in [LICENSE.txt](LICENSE.txt). See [CITATION.md](CITATION.md) for citation guidance. diff --git a/README.txt b/README.txt deleted file mode 100644 index b0c6280be..000000000 --- a/README.txt +++ /dev/null @@ -1 +0,0 @@ -The ALPS software package aims to provide a set of well tested, robust, and standardized components for numerical simulations of condensed matter systems, including bosonic, fermionic, and spin systems. They consist of a set of components that are used in state-of-the-art high performance codes. diff --git a/Welcome.txt b/Welcome.txt deleted file mode 100644 index bf440f686..000000000 --- a/Welcome.txt +++ /dev/null @@ -1,4 +0,0 @@ -ALPS Project - -The ALPS project (Algorithms and Libraries for Physics Simulations) aims at providing generic parallel algorithms for classical and quantum lattice models and provides utility classes and algorithm for many other problems. It strives to increase software reuse in the physics community. - diff --git a/config/ALPSBuildname.cmake b/cmake/ALPSBuildname.cmake similarity index 100% rename from config/ALPSBuildname.cmake rename to cmake/ALPSBuildname.cmake diff --git a/config/ALPSConfig.cmake.in b/cmake/ALPSConfig.cmake.in similarity index 94% rename from config/ALPSConfig.cmake.in rename to cmake/ALPSConfig.cmake.in index 4436acd40..fdb794cd7 100644 --- a/config/ALPSConfig.cmake.in +++ b/cmake/ALPSConfig.cmake.in @@ -20,11 +20,14 @@ set(ALPS_LIBRARY_DIRS "@ALPS_LIBRARY_DIRS_CONFIG@") # of runtime binaries for each configuration type. set(ALPS_RUNTIME_LIBRARY_DIRS "@ALPS_RUNTIME_LIBRARY_DIRS_CONFIG@") -# The ALPS version number. +# The ALPS version number. ALPS_VERSION carries the prerelease label when there +# is one; ALPS_VERSION_CORE is always plain MAJOR.MINOR.PATCH and is what +# ALPSConfigVersion.cmake compares against. SET(ALPS_VERSION_MAJOR "@ALPS_VERSION_MAJOR@") SET(ALPS_VERSION_MINOR "@ALPS_VERSION_MINOR@") SET(ALPS_VERSION_PATCH "@ALPS_VERSION_PATCH@") -SET(ALPS_VERSION_BUILD "@ALPS_VERSION_BUILD@") +SET(ALPS_VERSION_PRERELEASE "@ALPS_VERSION_PRERELEASE@") +SET(ALPS_VERSION_CORE "@ALPS_VERSION_CORE@") SET(ALPS_VERSION "@ALPS_VERSION@") # The location of the UseALPS.cmake file. diff --git a/config/ALPSCore.cmake b/cmake/ALPSCore.cmake similarity index 100% rename from config/ALPSCore.cmake rename to cmake/ALPSCore.cmake diff --git a/config/ALPSTesting.cmake b/cmake/ALPSTesting.cmake similarity index 100% rename from config/ALPSTesting.cmake rename to cmake/ALPSTesting.cmake diff --git a/cmake/ALPSVersion.cmake b/cmake/ALPSVersion.cmake new file mode 100644 index 000000000..d14bb0fe9 --- /dev/null +++ b/cmake/ALPSVersion.cmake @@ -0,0 +1,41 @@ +# Copyright ALPS collaboration 2026. +# Distributed under the MIT licence; see LICENSE.txt. +# +# Single source of truth for the ALPS release version. +# +# ALPS_VERSION.txt holds the numeric release core (MAJOR.MINOR.PATCH) and +# nothing else. Two constraints force that: +# +# * project(VERSION ...) rejects anything non-numeric, so "2.4.0-beta.1" +# fails to configure. +# * find_package() version matching and the library SOVERSION have no notion +# of prerelease ordering. +# +# A prerelease label such as "beta.2" therefore lives in ALPS_VERSION_PRERELEASE +# (see the version block in the top-level CMakeLists.txt), where it affects the +# display string only -- never the numeric version used for ABI and +# find_package() decisions. +# +# This file is included by full path before project(), so it cannot rely on +# CMAKE_MODULE_PATH or PROJECT_SOURCE_DIR. + +set(_alps_version_file "${CMAKE_CURRENT_LIST_DIR}/../ALPS_VERSION.txt") + +if(NOT EXISTS "${_alps_version_file}") + message(FATAL_ERROR "Cannot read the ALPS version file: ${_alps_version_file}") +endif() + +file(STRINGS "${_alps_version_file}" ALPS_VERSION_CORE LIMIT_COUNT 1) +string(STRIP "${ALPS_VERSION_CORE}" ALPS_VERSION_CORE) + +# Fail loudly here rather than letting project() emit "VERSION format invalid", +# which gives no hint about which file is at fault. +if(NOT ALPS_VERSION_CORE MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+$") + message(FATAL_ERROR + "${_alps_version_file} must contain exactly MAJOR.MINOR.PATCH, but reads " + "'${ALPS_VERSION_CORE}'. Prerelease labels belong in " + "ALPS_VERSION_PRERELEASE, and the leading 'v' of a release tag is not " + "part of the version.") +endif() + +unset(_alps_version_file) diff --git a/config/BoostUtils.cmake b/cmake/BoostUtils.cmake similarity index 100% rename from config/BoostUtils.cmake rename to cmake/BoostUtils.cmake diff --git a/config/CMakeLists.txt b/cmake/CMakeLists.txt similarity index 100% rename from config/CMakeLists.txt rename to cmake/CMakeLists.txt diff --git a/config/Compilers.cmake b/cmake/Compilers.cmake similarity index 100% rename from config/Compilers.cmake rename to cmake/Compilers.cmake diff --git a/config/Distribution.xml.in b/cmake/Distribution.xml.in similarity index 100% rename from config/Distribution.xml.in rename to cmake/Distribution.xml.in diff --git a/config/FindBoostForALPS.cmake b/cmake/FindBoostForALPS.cmake similarity index 100% rename from config/FindBoostForALPS.cmake rename to cmake/FindBoostForALPS.cmake diff --git a/config/FindBoostSrc.cmake b/cmake/FindBoostSrc.cmake similarity index 100% rename from config/FindBoostSrc.cmake rename to cmake/FindBoostSrc.cmake diff --git a/config/FindDocbookDtd.cmake b/cmake/FindDocbookDtd.cmake similarity index 100% rename from config/FindDocbookDtd.cmake rename to cmake/FindDocbookDtd.cmake diff --git a/config/FindDocbookXsl.cmake b/cmake/FindDocbookXsl.cmake similarity index 100% rename from config/FindDocbookXsl.cmake rename to cmake/FindDocbookXsl.cmake diff --git a/config/FindFop.cmake b/cmake/FindFop.cmake similarity index 100% rename from config/FindFop.cmake rename to cmake/FindFop.cmake diff --git a/config/FindLPSolve.cmake b/cmake/FindLPSolve.cmake similarity index 100% rename from config/FindLPSolve.cmake rename to cmake/FindLPSolve.cmake diff --git a/config/FindLapack.cmake b/cmake/FindLapack.cmake similarity index 100% rename from config/FindLapack.cmake rename to cmake/FindLapack.cmake diff --git a/config/FindMPIForALPS.cmake b/cmake/FindMPIForALPS.cmake similarity index 100% rename from config/FindMPIForALPS.cmake rename to cmake/FindMPIForALPS.cmake diff --git a/config/FindPythonMod.cmake b/cmake/FindPythonMod.cmake similarity index 100% rename from config/FindPythonMod.cmake rename to cmake/FindPythonMod.cmake diff --git a/config/FindSQLite.cmake b/cmake/FindSQLite.cmake similarity index 100% rename from config/FindSQLite.cmake rename to cmake/FindSQLite.cmake diff --git a/config/FindSZIP.cmake b/cmake/FindSZIP.cmake similarity index 100% rename from config/FindSZIP.cmake rename to cmake/FindSZIP.cmake diff --git a/config/FindSphinx.cmake b/cmake/FindSphinx.cmake similarity index 100% rename from config/FindSphinx.cmake rename to cmake/FindSphinx.cmake diff --git a/config/FindXsltproc.cmake b/cmake/FindXsltproc.cmake similarity index 100% rename from config/FindXsltproc.cmake rename to cmake/FindXsltproc.cmake diff --git a/config/UseALPS.cmake b/cmake/UseALPS.cmake similarity index 100% rename from config/UseALPS.cmake rename to cmake/UseALPS.cmake diff --git a/config/add_alps_test.cmake b/cmake/add_alps_test.cmake similarity index 91% rename from config/add_alps_test.cmake rename to cmake/add_alps_test.cmake index 36e7c79cc..8c8d459bf 100644 --- a/config/add_alps_test.cmake +++ b/cmake/add_alps_test.cmake @@ -53,15 +53,15 @@ macro(add_alps_test) if(RUN_TEST_DIR AND EXISTS ${RUN_TEST_DIR}/run_test.cmake) set(RUN_TEST ${RUN_TEST_DIR}/run_test.cmake) else(RUN_TEST_DIR AND EXISTS ${RUN_TEST_DIR}/run_test.cmake) - if(EXISTS ${PROJECT_SOURCE_DIR}/config/run_test.cmake) - set(RUN_TEST ${PROJECT_SOURCE_DIR}/config/run_test.cmake) - else(EXISTS ${PROJECT_SOURCE_DIR}/config/run_test.cmake) + if(EXISTS ${PROJECT_SOURCE_DIR}/cmake/run_test.cmake) + set(RUN_TEST ${PROJECT_SOURCE_DIR}/cmake/run_test.cmake) + else(EXISTS ${PROJECT_SOURCE_DIR}/cmake/run_test.cmake) if(EXISTS ${ALPS_ROOT_DIR}/share/alps/run_test.cmake) set(RUN_TEST ${ALPS_ROOT_DIR}/share/alps/run_test.cmake) else(EXISTS ${ALPS_ROOT_DIR}/share/alps/run_test.cmake) set(RUN_TEST ${CMAKE_INSTALL_PREFIX}/share/alps/run_test.cmake) endif(EXISTS ${ALPS_ROOT_DIR}/share/alps/run_test.cmake) - endif(EXISTS ${PROJECT_SOURCE_DIR}/config/run_test.cmake) + endif(EXISTS ${PROJECT_SOURCE_DIR}/cmake/run_test.cmake) endif(RUN_TEST_DIR AND EXISTS ${RUN_TEST_DIR}/run_test.cmake) add_test(${name} @@ -138,15 +138,15 @@ macro(add_alps_test_mpi) if(RUN_TEST_DIR AND EXISTS ${RUN_TEST_DIR}/run_test_mpi.cmake) set(RUN_TEST ${RUN_TEST_DIR}/run_test_mpi.cmake) else(RUN_TEST_DIR AND EXISTS ${RUN_TEST_DIR}/run_test_mpi.cmake) - if(EXISTS ${PROJECT_SOURCE_DIR}/config/run_test_mpi.cmake) - set(RUN_TEST ${PROJECT_SOURCE_DIR}/config/run_test_mpi.cmake) - else(EXISTS ${PROJECT_SOURCE_DIR}/config/run_test_mpi.cmake) + if(EXISTS ${PROJECT_SOURCE_DIR}/cmake/run_test_mpi.cmake) + set(RUN_TEST ${PROJECT_SOURCE_DIR}/cmake/run_test_mpi.cmake) + else(EXISTS ${PROJECT_SOURCE_DIR}/cmake/run_test_mpi.cmake) if(EXISTS ${ALPS_ROOT_DIR}/share/alps/run_test_mpi.cmake) set(RUN_TEST ${ALPS_ROOT_DIR}/share/alps/run_test_mpi.cmake) else(EXISTS ${ALPS_ROOT_DIR}/share/alps/run_test_mpi.cmake) set(RUN_TEST ${CMAKE_INSTALL_PREFIX}/share/alps/run_test_mpi.cmake) endif(EXISTS ${ALPS_ROOT_DIR}/share/alps/run_test_mpi.cmake) - endif(EXISTS ${PROJECT_SOURCE_DIR}/config/run_test_mpi.cmake) + endif(EXISTS ${PROJECT_SOURCE_DIR}/cmake/run_test_mpi.cmake) endif(RUN_TEST_DIR AND EXISTS ${RUN_TEST_DIR}/run_test_mpi.cmake) add_test(${name}-np${procs} diff --git a/config/alps_logo.png b/cmake/alps_logo.png similarity index 100% rename from config/alps_logo.png rename to cmake/alps_logo.png diff --git a/config/include.mk.in b/cmake/include.mk.in similarity index 100% rename from config/include.mk.in rename to cmake/include.mk.in diff --git a/config/make_package.sh.in b/cmake/make_package.sh.in similarity index 100% rename from config/make_package.sh.in rename to cmake/make_package.sh.in diff --git a/config/passthru.py b/cmake/passthru.py similarity index 100% rename from config/passthru.py rename to cmake/passthru.py diff --git a/config/py-compile b/cmake/py-compile similarity index 100% rename from config/py-compile rename to cmake/py-compile diff --git a/config/run_test.cmake b/cmake/run_test.cmake similarity index 100% rename from config/run_test.cmake rename to cmake/run_test.cmake diff --git a/config/run_test_mpi.cmake b/cmake/run_test_mpi.cmake similarity index 100% rename from config/run_test_mpi.cmake rename to cmake/run_test_mpi.cmake diff --git a/config/debian/sid/.bzr-builddeb/default.conf b/config/debian/sid/.bzr-builddeb/default.conf deleted file mode 100644 index 99317c03e..000000000 --- a/config/debian/sid/.bzr-builddeb/default.conf +++ /dev/null @@ -1,3 +0,0 @@ -[BUILDDEB] -merge = True -export-upstream = https://rigarash@alps.comp-phys.org/svn/alps1/trunk/alps diff --git a/config/debian/sid/.bzrignore b/config/debian/sid/.bzrignore deleted file mode 100644 index 2dee1753e..000000000 --- a/config/debian/sid/.bzrignore +++ /dev/null @@ -1 +0,0 @@ -debian diff --git a/config/debian/sid/README.source b/config/debian/sid/README.source deleted file mode 100644 index d2958fe42..000000000 --- a/config/debian/sid/README.source +++ /dev/null @@ -1,6 +0,0 @@ -This package uses quilt to manage all modifications to the upstream source. -Changes are stored in the source package as diffs in debian/patches and -applied during the build. - -See /usr/share/doc/quilt/README.source for a detailed explanation. - diff --git a/config/debian/sid/alps-applications.install b/config/debian/sid/alps-applications.install deleted file mode 100644 index e4c894bcb..000000000 --- a/config/debian/sid/alps-applications.install +++ /dev/null @@ -1,17 +0,0 @@ -debian/tmp/usr/bin/dirloop_sse usr/bin/ -debian/tmp/usr/bin/dmft usr/bin/ -debian/tmp/usr/bin/dmrg usr/bin/ -debian/tmp/usr/bin/dwa usr/bin/ -debian/tmp/usr/bin/fulldiag usr/bin/ -debian/tmp/usr/bin/fulldiag_evaluate usr/bin/ -debian/tmp/usr/bin/hirschfye usr/bin/ -debian/tmp/usr/bin/hybridization usr/bin/ -debian/tmp/usr/bin/interaction usr/bin/ -debian/tmp/usr/bin/loop usr/bin/ -debian/tmp/usr/bin/qwl usr/bin/ -debian/tmp/usr/bin/qwl_evaluate usr/bin/ -debian/tmp/usr/bin/sparsediag usr/bin/ -debian/tmp/usr/bin/spinmc usr/bin/ -debian/tmp/usr/bin/spinmc_evaluate usr/bin/ -debian/tmp/usr/bin/worm usr/bin/ -debian/tmp/usr/bin/worm_evaluate usr/bin/ diff --git a/config/debian/sid/alps-tutorials.install b/config/debian/sid/alps-tutorials.install deleted file mode 100644 index faf00cddc..000000000 --- a/config/debian/sid/alps-tutorials.install +++ /dev/null @@ -1 +0,0 @@ -debian/tmp/usr/tutorials usr/share/alps/ diff --git a/config/debian/sid/changelog b/config/debian/sid/changelog deleted file mode 100644 index 9280183b7..000000000 --- a/config/debian/sid/changelog +++ /dev/null @@ -1,61 +0,0 @@ -alps (1:20150402~r7566-1) wheezy; urgency=low - - * New upstream snapshot (20150402-r7566). - - -- Synge Todo Thu, 02 Apr 2015 16:43:40 +0900 - -alps (1:20140623~r7482-1) wheezy; urgency=low - - * New upstream snapshot (20140623-r7482). - - -- Synge Todo Fri, 04 Jul 2014 09:18:02 +0900 - -alps (1:20140309~r7370-1) wheezy; urgency=low - - * New upstream snapshot (20140309-r7370). - - -- Synge Todo Sun, 09 Mar 2014 19:24:10 +0900 - -alps (1:20130626~r6962-1) wheezy; urgency=low - - * New upstream snapshot (20130626-r6962). - * Renamed alps2* as alps*. - * Introduced task-alps meta package. - - -- Synge Todo Mon, 01 Jul 2013 21:24:31 +0900 - -alps (2.0.0~rc4-1) unstable; urgency=low - - * New upstream release (2.0.0rc4). - * Add dirloop_sse to build. - * Remove "-Wl,--no-undefined" flag, since it causes build failure. - - -- Ryo IGARASHI Mon, 13 Dec 2010 17:21:37 +0900 - -alps (2.0.0~rc3-1) unstable; urgency=low - - * New upstream release (2.0.0rc3). - * Add "-Wl,--no-undefined" and "-Wl,--as-needed" option - for reducing binary size. - - -- Ryo IGARASHI Mon, 29 Nov 2010 10:17:44 +0900 - -alps (2.0.0~rc2-2) unstable; urgency=low - - * Add TEBD application to build. - - -- Ryo IGARASHI Thu, 25 Nov 2010 20:23:13 +0900 - -alps (2.0.0~rc2-1) unstable; urgency=low - - * New upstream release (2.0.0rc2). - * Switch to dpkg-source 3.0 (quilt) format. - - -- Ryo IGARASHI Thu, 25 Nov 2010 09:54:24 +0900 - -alps (2.0.0~b4-1) unstable; urgency=low - - * Initial release for 2.0.0b4. (Closes: #317973) - * lintian-clean (except for binary-without-manpage). - - -- Ryo IGARASHI Tue, 02 Nov 2010 16:42:13 +0900 diff --git a/config/debian/sid/compat b/config/debian/sid/compat deleted file mode 100644 index 7ed6ff82d..000000000 --- a/config/debian/sid/compat +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/config/debian/sid/control b/config/debian/sid/control deleted file mode 100644 index 4bf945e1d..000000000 --- a/config/debian/sid/control +++ /dev/null @@ -1,121 +0,0 @@ -Source: alps -Section: non-free -Priority: extra -Maintainer: Ryo IGARASHI and Synge Todo -Build-Depends: cdbs, debhelper (>= 7.0.50~), cmake, - libboost-date-time-dev (>= 1.47.0), libboost-filesystem-dev (>= - 1.47.0), libboost-mpi-dev (>= 1.47.0), libboost-program-options-dev - (>= 1.47.0), libboost-python-dev (>= 1.47.0), libboost-regex-dev (>= - 1.47.0), libboost-serialization-dev (>= 1.47.0), libboost-system-dev - (>= 1.47.0), libboost-thread-dev (>= 1.47.0), libhdf5-serial-dev | - libhdf5-dev, mpi-default-dev, libsqlite3-dev, python-matplotlib, - liblapack-dev, gfortran -Standards-Version: 3.9.1 -Homepage: http://alps.comp-phys.org/ -Vcs-Svn: https://rigarash@alps.comp-phys.org/svn/alps1/trunk/alps -Vcs-Browser: https://alps.comp-phys.org/trac/browser - -Package: task-alps -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, alps-applications, alps-tutorials, libalps, libalps-bin, libalps-dbg, libalps-dev, libboost-numeric-bindings-dev, python-pyalps -Description: The ALPS project - Libraries, Applications, and Tutorials - The ALPS project (Algorithms and Libraries for Physics Simulations) - is an open source effort aiming at providing high-end simulation - codes for strongly correlated quantum mechanical systems as well as - C++ libraries for simplifying the development of such code. ALPS - strives to increase software reuse in the physics community. - This package installs all the ALPS libraries, applications, and tutorials. - -Package: libalps -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: The ALPS project - Library - The ALPS project (Algorithms and Libraries for Physics Simulations) - is an open source effort aiming at providing high-end simulation - codes for strongly correlated quantum mechanical systems as well as - C++ libraries for simplifying the development of such code. ALPS - strives to increase software reuse in the physics community. - This package contains shared library of ALPS Library. - -Package: libalps-dbg -Architecture: any -Depends: libalps (= ${binary:Version}), ${misc:Depends} -Description: The ALPS project - Library with debugging symbols - The ALPS project (Algorithms and Libraries for Physics Simulations) - is an open source effort aiming at providing high-end simulation - codes for strongly correlated quantum mechanical systems as well as - C++ libraries for simplifying the development of such code. ALPS - strives to increase software reuse in the physics community. - This package contains debugging symbols of ALPS Library. - -Package: libalps-dev -Architecture: any -Depends: libalps (= ${binary:Version}), - libboost-numeric-bindings-dev, ${misc:Depends} -Recommends: libalps-bin (= ${binary:Version}) -Description: The ALPS project - Development files - The ALPS project (Algorithms and Libraries for Physics Simulations) - is an open source effort aiming at providing high-end simulation - codes for strongly correlated quantum mechanical systems as well as - C++ libraries for simplifying the development of such code. ALPS - strives to increase software reuse in the physics community. - This package contains development files of ALPS Library. - -Package: libboost-numeric-bindings-dev -Architecture: any -Depends: ${misc:Depends} -Description: Numeric Bindings Library for Linear Algebra - This package forms part of the Boost C++ Libraries (Sandbox) - collections. - -Package: libalps-bin -Architecture: any -Depends: libalps (= ${binary:Version}), ${shlibs:Depends}, - ${misc:Depends} -Description: The ALPS project - Miscellaneous tools - The ALPS project (Algorithms and Libraries for Physics Simulations) - is an open source effort aiming at providing high-end simulation - codes for strongly correlated quantum mechanical systems as well as - C++ libraries for simplifying the development of such code. ALPS - strives to increase software reuse in the physics community. - This package contains miscellaneous tools of ALPS Library. - -Package: alps-applications -Architecture: any -Depends: libalps (= ${binary:Version}), ${shlibs:Depends}, - ${misc:Depends} -Recommends: libalps-bin (= ${binary:Version}), python-pyalps (= - ${binary:Version}) -Description: The ALPS project - Application binaries - The ALPS project (Algorithms and Libraries for Physics Simulations) - is an open source effort aiming at providing high-end simulation - codes for strongly correlated quantum mechanical systems as well as - C++ libraries for simplifying the development of such code. ALPS - strives to increase software reuse in the physics community. - This package contains application binary. - -Package: python-pyalps -Architecture: any -Depends: libalps (= ${binary:Version}), python2.7, python-numpy, - python-matplotlib, ${shlibs:Depends}, - ${misc:Depends} -Description: The ALPS project - python modules - The ALPS project (Algorithms and Libraries for Physics Simulations) - is an open source effort aiming at providing high-end simulation - codes for strongly correlated quantum mechanical systems as well as - C++ libraries for simplifying the development of such code. ALPS - strives to increase software reuse in the physics community. - This package contains python module. - -Package: alps-tutorials -Architecture: any -Depends: alps-applications (= ${binary:Version}), python-pyalps (= - ${binary:Version}), libalps-bin (= ${binary:Version}), - ${misc:Depends} -Description: The ALPS project - tutorials - The ALPS project (Algorithms and Libraries for Physics Simulations) - is an open source effort aiming at providing high-end simulation - codes for strongly correlated quantum mechanical systems as well as - C++ libraries for simplifying the development of such code. ALPS - strives to increase software reuse in the physics community. - This package contains tutorials for applications. diff --git a/config/debian/sid/copyright b/config/debian/sid/copyright deleted file mode 100644 index e833a804c..000000000 --- a/config/debian/sid/copyright +++ /dev/null @@ -1,27 +0,0 @@ -This work was packaged for Debian by: - - Ryo IGARASHI on Sun, 02 May 2010 12:17:02 +0900 - Synge Todo Mon, 01 Jul 2013 21:24:31 +0900 - -It was downloaded from: - - - -Upstream Author(s): - - ALPS Collaboration - -Copyright: - - Copyright (C) 1994-2015 ALPS Collaboration - -License: - - MIT - See LICENSE.txt. - -The Debian packaging is: - - Copyright (C) 2010-2015 Ryo IGARASHI and - Synge Todo - and is licensed under the MIT License. diff --git a/config/debian/sid/libalps-bin.install b/config/debian/sid/libalps-bin.install deleted file mode 100644 index 3b6601fd2..000000000 --- a/config/debian/sid/libalps-bin.install +++ /dev/null @@ -1,35 +0,0 @@ -debian/tmp/usr/bin/archive usr/bin/ -debian/tmp/usr/bin/archivecat usr/bin/ -debian/tmp/usr/bin/checksign usr/bin/ -debian/tmp/usr/bin/compactrun usr/bin/ -debian/tmp/usr/bin/convert2html usr/bin/ -debian/tmp/usr/bin/convert2text usr/bin/ -debian/tmp/usr/bin/convert2xml usr/bin/ -debian/tmp/usr/bin/extractgp usr/bin/ -debian/tmp/usr/bin/extracthtml usr/bin/ -debian/tmp/usr/bin/extractmpl usr/bin/ -debian/tmp/usr/bin/extracttext usr/bin/ -debian/tmp/usr/bin/extractxmgr usr/bin/ -debian/tmp/usr/bin/fleas_correlated usr/bin/ -debian/tmp/usr/bin/fleas_direct usr/bin/ -debian/tmp/usr/bin/fleas_independent usr/bin/ -debian/tmp/usr/bin/fleas_simpleminded usr/bin/ -debian/tmp/usr/bin/fleas_uncorrelated usr/bin/ -debian/tmp/usr/bin/lattice2xml usr/bin/ -debian/tmp/usr/bin/maxent usr/bin/ -debian/tmp/usr/bin/p2h5 usr/bin/ -debian/tmp/usr/bin/parameter2hdf5 usr/bin/ -debian/tmp/usr/bin/parameter2xml usr/bin/ -debian/tmp/usr/bin/pconfig usr/bin/ -debian/tmp/usr/bin/pevaluate usr/bin/ -debian/tmp/usr/bin/plot2gp usr/bin/ -debian/tmp/usr/bin/plot2html usr/bin/ -debian/tmp/usr/bin/plot2mpl usr/bin/ -debian/tmp/usr/bin/plot2text usr/bin/ -debian/tmp/usr/bin/plot2xmgr usr/bin/ -debian/tmp/usr/bin/poutput usr/bin/ -debian/tmp/usr/bin/printgraph usr/bin/ -debian/tmp/usr/bin/txt2archive usr/bin/ -debian/tmp/usr/bin/use_local_stylesheet usr/bin/ -debian/tmp/usr/bin/xml2archive usr/bin/ -debian/tmp/usr/bin/xslttransform usr/bin/ diff --git a/config/debian/sid/libalps-dev.install b/config/debian/sid/libalps-dev.install deleted file mode 100644 index 43bf07321..000000000 --- a/config/debian/sid/libalps-dev.install +++ /dev/null @@ -1,5 +0,0 @@ -debian/tmp/usr/include/alps/* usr/include/alps/ -debian/tmp/usr/include/ietl/* usr/include/ietl/ -debian/tmp/usr/include/boost/*.hpp usr/include/boost/ -debian/tmp/usr/lib/libalps.so usr/lib/ -debian/tmp/usr/share/alps/* usr/share/alps/ diff --git a/config/debian/sid/libalps-dev.links b/config/debian/sid/libalps-dev.links deleted file mode 100644 index 69fa28ff6..000000000 --- a/config/debian/sid/libalps-dev.links +++ /dev/null @@ -1 +0,0 @@ -usr/share/alps usr/share/cmake-2.8/ALPS diff --git a/config/debian/sid/libalps.install b/config/debian/sid/libalps.install deleted file mode 100644 index 20660f2e0..000000000 --- a/config/debian/sid/libalps.install +++ /dev/null @@ -1,2 +0,0 @@ -debian/tmp/usr/lib/libalps.so.* usr/lib/ -debian/tmp/usr/lib/xml/* usr/lib/xml/ diff --git a/config/debian/sid/libboost-numeric-bindings-dev.install b/config/debian/sid/libboost-numeric-bindings-dev.install deleted file mode 100644 index c4ba43e72..000000000 --- a/config/debian/sid/libboost-numeric-bindings-dev.install +++ /dev/null @@ -1 +0,0 @@ -debian/tmp/usr/include/boost/numeric/* usr/include/boost/numeric/ diff --git a/config/debian/sid/python-pyalps.install b/config/debian/sid/python-pyalps.install deleted file mode 100644 index 5e9b297bb..000000000 --- a/config/debian/sid/python-pyalps.install +++ /dev/null @@ -1,3 +0,0 @@ -debian/tmp/usr/lib/pyalps/*.py usr/lib/python2.7/dist-packages/pyalps/ -debian/tmp/usr/lib/pyalps/*.so usr/lib/python2.7/dist-packages/pyalps/ -debian/tmp/usr/lib/python/alps usr/lib/python2.7/dist-packages/ diff --git a/config/debian/sid/rules b/config/debian/sid/rules deleted file mode 100755 index 61935cd9a..000000000 --- a/config/debian/sid/rules +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/make -f - -include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/cdbs/1/class/cmake.mk - -# Add here any variable or target overrides you need. - -# Extra flags passed to cmake. -# ALPS specific options -DEB_CMAKE_EXTRA_FLAGS = \ - -DALPS_BUILD_APPLICATIONS:BOOL=ON \ - -DALPS_ENABLE_OPENMP:BOOL=ON \ - -DALPS_BUILD_FORTRAN:BOOL=OFF \ - -DCMAKE_Fortran_FLAGS:STRING=-fopenmp - -# Linker flags for reduce binary size -DEB_CMAKE_EXTRA_FLAGS += \ - -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed" \ - -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed" \ - -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed" - -# Allow parallel builds -DEB_BUILD_PARALLEL = yes diff --git a/config/debian/sid/source/format b/config/debian/sid/source/format deleted file mode 100644 index 163aaf8d8..000000000 --- a/config/debian/sid/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/src/alps/version.h.in b/src/alps/version.h.in index fd3ade28a..a498990c4 100644 --- a/src/alps/version.h.in +++ b/src/alps/version.h.in @@ -15,34 +15,46 @@ #ifndef ALPS_VERSION_H #define ALPS_VERSION_H +// Plain #define for everything the build always sets: the cmakedefine directive +// emits an "undef" when its value is false-y, and CMake counts 0 as false-y, so +// a zero component (2.4.0) would vanish. It is used below only where the macro +// is genuinely optional. (configure_file matches that directive even inside a +// comment, hence no leading '#' on it here.) + // ALPS version -#cmakedefine ALPS_VERSION "@ALPS_VERSION@" +#define ALPS_VERSION "@ALPS_VERSION@" + +#define ALPS_VERSION_MAJOR @ALPS_VERSION_MAJOR@ +#define ALPS_VERSION_MINOR @ALPS_VERSION_MINOR@ +#define ALPS_VERSION_PATCH @ALPS_VERSION_PATCH@ -#cmakedefine ALPS_VERSION_MAJOR @ALPS_VERSION_MAJOR@ -#cmakedefine ALPS_VERSION_MINOR @ALPS_VERSION_MINOR@ -#cmakedefine ALPS_VERSION_PATCH @ALPS_VERSION_PATCH@ -#cmakedefine ALPS_SVN_REVISION @ALPS_WC_REVISION@ +// ALPS version as a single integer, for preprocessor comparisons: +// #if ALPS_VERSION_NUMBER >= ALPS_VERSION_NUM(2, 3, 4) +#define ALPS_VERSION_NUM(major, minor, patch) \ + ((major) * 100000 + (minor) * 100 + (patch)) +#define ALPS_VERSION_NUMBER \ + ALPS_VERSION_NUM(ALPS_VERSION_MAJOR, ALPS_VERSION_MINOR, ALPS_VERSION_PATCH) // ALPS version (full string) -#cmakedefine ALPS_VERSION_STRING "@ALPS_VERSION_STRING@" +#define ALPS_VERSION_STRING "@ALPS_VERSION_STRING@" // latest publish year of ALPS -#cmakedefine ALPS_YEAR "@ALPS_YEAR@" +#define ALPS_YEAR "@ALPS_YEAR@" // install path of ALPS -#cmakedefine ALPS_PREFIX "@ALPS_PREFIX@" - -// source directory of ALPS -#cmakedefine ALPS_SRCDIR "@ALPS_SRCDIR@" +#define ALPS_PREFIX "@ALPS_PREFIX@" // XSLT PATH -#cmakedefine ALPS_XML_DIR "@ALPS_XML_DIR@" +#define ALPS_XML_DIR "@ALPS_XML_DIR@" + +// Optional Windows fallback for the 32/64-bit "Program Files" split. Never set +// by the build, and guarded by #ifdef in parser/xslt_path.C. #cmakedefine ALPS_XML_ALTERNATE_DIR "@ALPS_XML_ALTERNATE_DIR@" // hostname where configure script was executed -#cmakedefine ALPS_CONFIG_HOST "@ALPS_CONFIG_HOST@" +#define ALPS_CONFIG_HOST "@ALPS_CONFIG_HOST@" // username who executed configure script -#cmakedefine ALPS_CONFIG_USER "@ALPS_CONFIG_USER@" +#define ALPS_CONFIG_USER "@ALPS_CONFIG_USER@" #endif // ALPS_VERSION_H diff --git a/test/hdf5/CMakeLists.txt b/test/hdf5/CMakeLists.txt index 54cd3f7dc..d6b24daae 100644 --- a/test/hdf5/CMakeLists.txt +++ b/test/hdf5/CMakeLists.txt @@ -38,6 +38,11 @@ FOREACH (name hdf5_complex hdf5_copy hdf5_real_complex_vec hdf5_real_complex_mat set_property(TEST ${name} PROPERTY LABELS hdf5) ENDFOREACH(name) +# Reads a reference .h5 file from the source tree; see the note in +# test/numeric/CMakeLists.txt. +target_compile_definitions(hdf5_fortran_string + PRIVATE ALPS_SRCDIR="${PROJECT_SOURCE_DIR}") + IF (ALPS_ENABLE_OPENMP AND OPENMP_FOUND) add_executable(hdf5_omp hdf5_omp.cpp) add_dependencies(hdf5_omp alps) diff --git a/test/numeric/CMakeLists.txt b/test/numeric/CMakeLists.txt index 32d13d304..41d9c5df8 100644 --- a/test/numeric/CMakeLists.txt +++ b/test/numeric/CMakeLists.txt @@ -30,5 +30,12 @@ if(LAPACK_FOUND) add_alps_test(${name}) set_property(TEST ${name} PROPERTY LABELS numeric) ENDFOREACH(name) + + # This test reads a reference .h5 file from the source tree. That path is a + # property of this build, not of the installed library, so it is a private + # definition on the one target that needs it rather than a macro in the + # installed alps/version.h. + target_compile_definitions(matrix_deprecated_hdf5_format_test + PRIVATE ALPS_SRCDIR="${PROJECT_SOURCE_DIR}") endif(LAPACK_FOUND) diff --git a/tool/pconfig.C b/tool/pconfig.C index 1c189734e..698589743 100644 --- a/tool/pconfig.C +++ b/tool/pconfig.C @@ -20,7 +20,6 @@ int main() { std::cout << "ALPS version: " << alps::version() << std::endl << "Boost version: " << BOOST_LIB_VERSION << std::endl - << "source directory: " << ALPS_SRCDIR << std::endl << "installed at: " << ALPS_PREFIX << std::endl << "configured on: " << alps::config_host() << std::endl << "configured by: " << alps::config_user() << std::endl diff --git a/tutorials/alpsize-01-cmake/CMakeLists.txt b/tutorials/alpsize-01-cmake/CMakeLists.txt index 08a7f6bec..c88de950d 100644 --- a/tutorials/alpsize-01-cmake/CMakeLists.txt +++ b/tutorials/alpsize-01-cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(alpsize NONE) # find ALPS Library diff --git a/tutorials/alpsize-02-original-c/CMakeLists.txt b/tutorials/alpsize-02-original-c/CMakeLists.txt index 4f4b8a271..bd133b065 100644 --- a/tutorials/alpsize-02-original-c/CMakeLists.txt +++ b/tutorials/alpsize-02-original-c/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(alpsize NONE) # enable C and C++ compilers diff --git a/tutorials/alpsize-03-basic-cpp/CMakeLists.txt b/tutorials/alpsize-03-basic-cpp/CMakeLists.txt index 406566506..da0773fcb 100644 --- a/tutorials/alpsize-03-basic-cpp/CMakeLists.txt +++ b/tutorials/alpsize-03-basic-cpp/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(alpsize NONE) # enable C and C++ compilers diff --git a/tutorials/alpsize-04-stl/CMakeLists.txt b/tutorials/alpsize-04-stl/CMakeLists.txt index 406566506..da0773fcb 100644 --- a/tutorials/alpsize-04-stl/CMakeLists.txt +++ b/tutorials/alpsize-04-stl/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(alpsize NONE) # enable C and C++ compilers diff --git a/tutorials/alpsize-05-boost/CMakeLists.txt b/tutorials/alpsize-05-boost/CMakeLists.txt index 461872150..572fb6c00 100644 --- a/tutorials/alpsize-05-boost/CMakeLists.txt +++ b/tutorials/alpsize-05-boost/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(alpsize NONE) # find ALPS Library diff --git a/tutorials/alpsize-06-parameters/CMakeLists.txt b/tutorials/alpsize-06-parameters/CMakeLists.txt index 328b5703b..0d59f06a7 100644 --- a/tutorials/alpsize-06-parameters/CMakeLists.txt +++ b/tutorials/alpsize-06-parameters/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(alpsize NONE) # find ALPS Library diff --git a/tutorials/alpsize-07-alea/CMakeLists.txt b/tutorials/alpsize-07-alea/CMakeLists.txt index 328b5703b..0d59f06a7 100644 --- a/tutorials/alpsize-07-alea/CMakeLists.txt +++ b/tutorials/alpsize-07-alea/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(alpsize NONE) # find ALPS Library diff --git a/tutorials/alpsize-08-lattice/CMakeLists.txt b/tutorials/alpsize-08-lattice/CMakeLists.txt index ecf65578e..51c07e9b9 100644 --- a/tutorials/alpsize-08-lattice/CMakeLists.txt +++ b/tutorials/alpsize-08-lattice/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(alpsize NONE) # find ALPS Library diff --git a/tutorials/alpsize-09-scheduler/CMakeLists.txt b/tutorials/alpsize-09-scheduler/CMakeLists.txt index cd9f8cc4e..ea503b5cd 100644 --- a/tutorials/alpsize-09-scheduler/CMakeLists.txt +++ b/tutorials/alpsize-09-scheduler/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(alpsize NONE) # find ALPS Library diff --git a/tutorials/alpsize-10-fortran-scheduler/CMakeLists.txt b/tutorials/alpsize-10-fortran-scheduler/CMakeLists.txt index 0fe965108..b68a64f4f 100644 --- a/tutorials/alpsize-10-fortran-scheduler/CMakeLists.txt +++ b/tutorials/alpsize-10-fortran-scheduler/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(alpsize NONE) # find ALPS Library diff --git a/tutorials/alpsize-11-fortran-ising/CMakeLists.txt b/tutorials/alpsize-11-fortran-ising/CMakeLists.txt index 82950f8ba..c2e2dcc69 100644 --- a/tutorials/alpsize-11-fortran-ising/CMakeLists.txt +++ b/tutorials/alpsize-11-fortran-ising/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(alpsize NONE) # find ALPS Library diff --git a/tutorials/code-06-mcmain-c++/CMakeLists.txt b/tutorials/code-06-mcmain-c++/CMakeLists.txt index 10e3c8104..3c2cc0c8e 100644 --- a/tutorials/code-06-mcmain-c++/CMakeLists.txt +++ b/tutorials/code-06-mcmain-c++/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(alpsize NONE) # find ALPS Library diff --git a/tutorials/code-07-mcmain-mcbase/CMakeLists.txt b/tutorials/code-07-mcmain-mcbase/CMakeLists.txt index 5dddd97e8..1de3e807f 100644 --- a/tutorials/code-07-mcmain-mcbase/CMakeLists.txt +++ b/tutorials/code-07-mcmain-mcbase/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(alpsize NONE) # find ALPS Library diff --git a/tutorials/code-07-mcmain-mcbase/heisenberg/1d_lattice/CMakeLists.txt b/tutorials/code-07-mcmain-mcbase/heisenberg/1d_lattice/CMakeLists.txt index 6546fbac7..54fc1ec20 100644 --- a/tutorials/code-07-mcmain-mcbase/heisenberg/1d_lattice/CMakeLists.txt +++ b/tutorials/code-07-mcmain-mcbase/heisenberg/1d_lattice/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(heisenberg NONE) # find ALPS Library diff --git a/tutorials/code-07-mcmain-mcbase/heisenberg/nd_lattice/CMakeLists.txt b/tutorials/code-07-mcmain-mcbase/heisenberg/nd_lattice/CMakeLists.txt index 368003174..3d8641b39 100644 --- a/tutorials/code-07-mcmain-mcbase/heisenberg/nd_lattice/CMakeLists.txt +++ b/tutorials/code-07-mcmain-mcbase/heisenberg/nd_lattice/CMakeLists.txt @@ -1,8 +1,6 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(heisenberg NONE) -set(ALPS_ROOT_DIR /Users/ricoh/Applications/alps) - # find ALPS Library find_package(ALPS REQUIRED PATHS ${ALPS_ROOT_DIR} $ENV{ALPS_HOME} NO_SYSTEM_ENVIRONMENT_PATH) message(STATUS "Found ALPS: ${ALPS_ROOT_DIR} (revision: ${ALPS_VERSION})") diff --git a/tutorials/code-07-mcmain-mcbase/heisenberg/o_n_model/CMakeLists.txt b/tutorials/code-07-mcmain-mcbase/heisenberg/o_n_model/CMakeLists.txt index 584178bb0..c76d63126 100644 --- a/tutorials/code-07-mcmain-mcbase/heisenberg/o_n_model/CMakeLists.txt +++ b/tutorials/code-07-mcmain-mcbase/heisenberg/o_n_model/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22) project(ndim_spin NONE) # find ALPS Library