Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -36,5 +49,3 @@
*.exe
*.out
*.app

__pycache__
1 change: 1 addition & 0 deletions ALPS_VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.3.4
11 changes: 11 additions & 0 deletions CITATION.md
Original file line number Diff line number Diff line change
@@ -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
Comment thread
skilledwolf marked this conversation as resolved.

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/).
77 changes: 50 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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")

Expand Down Expand Up @@ -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 <version>) 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
Expand Down Expand Up @@ -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 [[
Expand Down
33 changes: 33 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -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
}
}
]
}
20 changes: 12 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand Down Expand Up @@ -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.

---
Expand Down
14 changes: 0 additions & 14 deletions CTestConfig.cmake

This file was deleted.

123 changes: 0 additions & 123 deletions README-package.txt

This file was deleted.

Loading
Loading