← カタログに戻る

libsparseir-fortran-test

SpM-lab / libsparseir-fortran-test

【テスト】Fortran から libsparseir(スパース中間表現(IR)ライブラリ)を利用するためのテストプロジェクト

強相関電子系・有効模型Fortran
1更新: 2025-05-26

概要

(説明は未登録です)

Quick Start

Quickstart は現在用意されていません。

README

libsparseir-fortran-test

A test project for using libsparseir from Fortran.

Overview

This repository provides a CMake-based setup for testing and using the libsparseir C++ library from Fortran code. The libsparseir library implements the sparse intermediate representation (IR) for correlation functions, providing efficient routines for:

  • On-the-fly computation of basis functions for arbitrary cutoff Λ
  • High-precision basis functions and singular values
  • Sparse sampling routines

Prerequisites

  • CMake (>= 3.10)
  • Fortran compiler (gfortran, ifort, etc.)
  • C++ compiler with C++11 support
  • Git (for fetching libsparseir)

Quick Start

1. Clone and Build
git clone https://github.com/SpM-lab/libsparseir-fortran-test.git
cd libsparseir-fortran-test
./build.sh
2. Run Tests
cd build
ctest

Build Options

The build script supports several options:

# Basic build (Release mode)
./build.sh

# Debug build with clean
./build.sh --debug --clean

# Build without tests
./build.sh --no-tests

# Use system-installed libsparseir (if available)
./build.sh --system-libsparseir

# Custom install prefix
./build.sh --install-prefix /usr/local

# Show all options
./build.sh --help

Manual CMake Build

If you prefer to use CMake directly:

mkdir build
cd build

# Configure
cmake .. -DCMAKE_BUILD_TYPE=Release

# Build
cmake --build .

# Run tests
ctest

# Install (optional)
cmake --install .

CMake Options

  • BUILD_TESTING: Enable/disable building tests (default: ON)
  • USE_SYSTEM_LIBSPARSEIR: Use system-installed libsparseir instead of fetching from source (default: OFF)
  • CMAKE_BUILD_TYPE: Build type (Release/Debug)
  • CMAKE_INSTALL_PREFIX: Installation prefix

Project Structure

libsparseir-fortran-test/
├── CMakeLists.txt          # Main CMake configuration
├── build.sh                # Build script
├── test/
│   └── test_sparseir.f90   # Test program
└── README.md               # This file

Usage in Your Project

To use this setup in your own project:

  1. Copy CMakeLists.txt to your project
  2. Modify the executable targets to match your source files
  3. Adjust the libsparseir dependency configuration as needed

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use sparse-ir in your research, please cite:

  • Hiroshi Shinaoka et al., Phys. Rev. B 96, 035147 (2017)
  • Jia Li et al., Phys. Rev. B 101, 035144 (2020)
  • Markus Wallerberger et al., SoftwareX 21, 101266 (2023)

出典: https://github.com/SpM-lab/libsparseir-fortran-test の README

充実度

低調最終更新: 2025-05-26 ()

充実度 = ドキュメント(docs)・サンプル(examples)・テスト(tests)の3項目の整備状況を★3で表示します(1星=1項目/下のチェックリストが内訳)。リポジトリ情報を取得していない(手動で登録した)ソフトウェアは自動評価の対象外で、充実度の絞り込み(1 以上)では表示されません。

情報

主要言語
Fortran
言語
Fortran, CMake, Makefile, Shell
ライセンス
—
提供元
github

問い合わせ・貢献