简介
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.
ALPS项目(Algorithms and Libraries for Physics Simulations)是一个开源项目,旨在为强相关的量子力学系统提供高端模拟代码,以及简化此类代码开发的C++库。ALPS致力于提高物理学界的软件重用率。
conda 安装
如果系统中环境比较简单,建议使用 conda 来安装,方便快捷
conda create -n alps conda activate alps conda install -c conda-forge alps
讯享网
源码编译安装
如果机器不能联网,或者 conda 环境有冲突时就需要从源代码安装
下载源代码
官网下载你需要的版本
这里我选用的是 alps-2.3.0-src-with-boost.tar.gz ,不建议使用 不带 boost 的版本,因为一般系统中会自带某个版本的 boost ,一是与 alps 不兼容,二是在编译时需要指定很多选项,容易出错,不如直接选择带 boost 版本的 alps
其他依赖库说明
- python 3
- ipython
- numpy
- mpich
- HDF5
- ZLIB
- gcc > 5
- 数学库 FFTW、LAPACK、BLAS 或者 INTEL MKL
安装
这里提示一下,安装 alps 还需要 python 3 以及 numpy 等一些必须的库和 HDF5 环境,这里建议提前安装好,避免后面出错,具体可以查看。下面我们正式开始安装:
讯享网cd /path/to/alps-2.3.0-src-with-boost/alps mkdir _build cd _build cmake .. -DCMAKE_INSTALL_PREFIX=/path/you/want/to/install -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DBoost_DIR:PATH=/path/to/alps-2.3.0-src-with-boost/boost make -j 8(根据自己的电脑 CPU 而定) make install
验证安装( python 环境)
export PATH=/path/you/want/to/install/bin:$PATH export LD_LIBRARY_PATH=/path/you/want/to/install/bin:$LD_LIBRARY_PATH alpspython import pyalps
没有报错即安装成功

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/21726.html