Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
yomichi committed Sep 19, 2021
1 parent f8d7fe6 commit 66dc2e9
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 44 deletions.
30 changes: 21 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,27 @@ include_directories(${CMAKE_SOURCE_DIR}/thirdparty/cpplapack/include)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
#endif(OPENMP_FOUND)

#Find BLAS
find_package(BLAS REQUIRED)

#Find LAPACK
find_package(LAPACK REQUIRED)

#Find FFTW3
find_package(FFTW REQUIRED)
include_directories(${FFTW_INCLUDE_DIRS})
if(USE_MKL)
if(NOT MKLROOT)
set(MKLROOT $ENV{MKLROOT})
endif()
if(NOT MKLROOT)
message(FATAL "MKLROOT is not set")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mkl")
include_directories(${MKLROOT}/include/fftw)
else()
#Find BLAS
find_package(BLAS REQUIRED)

#Find LAPACK
find_package(LAPACK REQUIRED)

#Find FFTW3
find_package(FFTW REQUIRED)
include_directories(${FFTW_INCLUDE_DIRS})
endif()

# Build and enable tests
# testing setup
Expand Down
64 changes: 29 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# SpM

SPM
====
[![Build Status](https://travis-ci.org/SpM-lab/SpM.svg?branch=master)](https://travis-ci.org/SpM-lab/SpM)

Sparse Modeling tool for analytical continuation.
Sparse Modeling tool for analytical continuation from the imaginary-time Green's function to real-requency spectral function.

The algorithm is presented in the article

Expand All @@ -15,68 +12,65 @@ The algorithm is presented in the article

This package is distributed under GNU General Public License version 3 ([GPL v3](http://www.gnu.org/licenses/gpl-3.0.en.html)).

We kindly ask you to cite the article above
We kindly ask you to cite the below articles
in publications that include results obtained using this package.

## Author
Junya Otsuki, Kazuyoshi Yoshimi, Hiroshi Shinaoka, Masayuki Ohzeki
* The article about original algorithm
* J. Otsuki, M. Ohzeki, H. Shinaoka, K. Yoshimi,
"Sparse modeling approach to analytical continuation of imaginary-time quantum Monte Carlo data"
[Phys. Rev. E 95, 061302(R) (2017).](https://doi.org/10.1103/PhysRevE.95.061302)
* The article about this package
* K. Yoshimi, J. Otsuki, Y. Motoyama, M. Ohzeki, and H. Shinaoka, "SpM: Sparse modeling tool for analytic continuation of imaginary-time Green's function" [Comput. Phys. Commun. 244, 319-323 (2019)](https://www.sciencedirect.com/science/article/pii/S0010465519302103).
* The article about the SpM-Pade method (please cite if you use)
* Y. Motoyama, K. Yoshimi, and J. Otsuki, "Robust analytic continuation combining the advantages of the sparse modeling approach and Pade approximation" arXiv:2109.XXXXX

## Authors

Junya Otsuki, Kazuyoshi Yoshimi, Yuichi Motoyama, Hiroshi Shinaoka, Masayuki Ohzeki

## Requirement

* LAPACK, BLAS
* FFTW3
* cpplapack (included in this package)


## How to build

### Getting the source codes

Download the latest source codes by

$ git clone https://github.com/j-otsuki/SpM.git spm.src
$ git clone https://github.com/j-otsuki/SpM.git spm.src

Then, the source codes are downloaded in the directory ``spm.src``.
Then, the source codes are downloaded in the directory `spm.src`.

### Using Cmake

Build with cmake command is done in a separate directory, e.g. ``spm.build``.
Build with cmake command is done in a separate directory, e.g. `spm.build`.
Type the following commands:

$ mkdir spm.build && cd spm.build
$ cmake ../spm.src
$ make
$ mkdir spm.build && cd spm.build
$ cmake ../spm.src
$ make

Then, the executable file ``SpM.out`` is created in directory ``spm.build/src``.
Then, the executable file `SpM.out` is created in directory `spm.build/src`.

## Sample scripts

Some sample data are provided in ``samples`` directory:
Some sample data are provided in `samples` directory:

* ``samples/fermion`` # sample for fermionic spectrum (data in the article)
* ``samples/boson`` # sample for bosonic spectrum
* `samples/fermion` # sample for fermionic spectrum (data in the article)
* `samples/boson` # sample for bosonic spectrum

A script file, `run.sh`, is provided to run through the program.
Enter into the directory `samples/fermion`, and execute the script by

$ ./run.sh

You may need to change the path to ``SpM.out`` in the script.
If succeeded, results including graphs in eps format are created in ``output`` directory.
You may need to change the path to `SpM.out` in the script.
If succeeded, results including graphs in eps format are created in `output` directory.
For details, see the document linked below.


## Directories
The configuration of the directories is shown below.

```
.
├── c++ # source files of the SpM program
├── cmake # cmake files
├── docs # source files of the document page
├── samples # sample scripts
├── test # files for `make test`
└── thirdparty # CPPLAPACK headers
```

## Official page

The official page of the SpM is [here](https://spm-lab.github.io/SpM/manual/build/html/index.html).

0 comments on commit 66dc2e9

Please sign in to comment.