Skip to content

Commit 5ffb5ab

Browse files
committed
Update installation guide.
1 parent 6e8b4f6 commit 5ffb5ab

File tree

4 files changed

+26
-20
lines changed

4 files changed

+26
-20
lines changed

DoxygenLayout.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
</tab>
3838
<tab type="examples" visible="yes" title="" intro=""/>
3939
<tab type="user" visible="yes" title="version log" url="@ref version_log"/>
40-
<tab type="user" visible="yes" title="User Guide" url="https://cytnx-dev.github.io/Cytnx_doc"/>
40+
<tab type="user" visible="yes" title="User Guide" url="../build/html/index.html"/>
4141
</navindex>
4242

4343
<!-- Layout definition for a class page -->

docs/source/adv_install.rst

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,11 @@ In addition, you might want to install the following optional dependencies if yo
3434
* Nvidia cuTensor library
3535
* Nvidia cuQuantum library
3636

37-
[MAGMA]
38-
39-
* MAGMA 2.7 currently required strict cuda version v11.8
40-
4137

4238
[Python API]
4339

44-
* python >= 3.6
45-
* pybind11
40+
* python >= 3.9
41+
* pybind11 >= 3.0.0
4642
* python-graphviz
4743
* graphviz
4844
* numpy
@@ -73,7 +69,7 @@ There are two methods how you can set-up all the dependencies before starting th
7369
.. code-block:: shell
7470
7571
$conda config --add channels conda-forge
76-
$conda create --name cytnx python=3.8 _openmp_mutex=*=*_llvm
72+
$conda create --name cytnx python=3.9 _openmp_mutex=*=*_llvm
7773
$conda activate cytnx
7874
$conda upgrade --all
7975
@@ -83,21 +79,21 @@ There are two methods how you can set-up all the dependencies before starting th
8379
.. code-block:: shell
8480
8581
$conda config --add channels conda-forge
86-
$conda create --name cytnx python=3.8 llvm-openmp
82+
$conda create --name cytnx python=3.9 llvm-openmp
8783
$conda activate cytnx
8884
$conda upgrade --all
8985
9086
.. Note::
9187

92-
1. The python=3.8 indicates the Python version you want to use. Generally, Cytnx is tested with 3.7/3.8/3.9. You can replace this with the version you want to use.
88+
1. The python=3.9 indicates the Python version you want to use. Generally, Cytnx is tested with 3.9+. You can replace this with the version you want to use.
9389
2. The last line is updating all the libraries such that they are all dependent on the conda-forge channel.
9490

9591

9692
2. Install the following dependencies:
9793

9894
.. code-block:: shell
9995
100-
$conda install cmake make boost libboost git compilers numpy openblas arpack pybind11 beartype
96+
$conda install cmake make boost libboost git compilers numpy openblas arpack pybind11 beartype arpack
10197
10298
10399
.. Note::
@@ -107,7 +103,7 @@ There are two methods how you can set-up all the dependencies before starting th
107103

108104
.. code-block:: shell
109105
110-
$conda install cmake make boost libboost git compilers numpy mkl mkl-include mkl-service arpack pybind11 libblas=*=*mkl beartype
106+
$conda install cmake make boost libboost git compilers numpy mkl mkl-include mkl-service arpack pybind11 libblas=*=*mkl beartype arpack
111107
112108
3. After the installation, an automated test based on gtest and benchmark can be run. This option needs to be activated in the install script. In this case, gtest needs to be installed as well:
113109

@@ -167,13 +163,22 @@ Compiling process
167163
-------------------
168164
Once you installed all the dependencies, it is time to start building the Cytnx source code.
169165

170-
**Option A. Compiling with script**
166+
**Option A. Using cmake preset**
167+
168+
We support the ``cmake-presets`` tool for building the library starting from version
169+
v1.1.0. You can find the configuration file in ``CMakePresets.json``. For example,
170+
if you choose the ``openblas-cpu`` preset, use the following command to build:
171171

172-
Starting from v0.7.6a, Cytnx provides a shell script **Install.sh**, which contains all the cmake arguments as a check list. To install, edit the script, un-comment and modify custom parameters in the corresponding lines. Then, simply execute this script:
173172

174173
.. code-block:: shell
175174
176-
$sh Install.sh
175+
$cmake --preset openblas-cpu
176+
$cmake --build --preset openblas-cpu
177+
.. note::
178+
179+
If you are using Visual Studio Code, you can also take advantage of the
180+
*CMake Tools* extension, which provides built-in support for selecting and
181+
running CMake presets directly from the editor.
177182

178183

179184
**Option B. Using cmake install**
@@ -185,7 +190,7 @@ Please see the following steps for the standard cmake compiling process and all
185190

186191
.. code-block:: shell
187192
188-
$make build
193+
$mkdir build
189194
$cd build
190195
191196
2. Use cmake to automatically generate compiling files:
@@ -199,7 +204,7 @@ The following are the available compiling option flags that you can specify in *
199204
+------------------------+-------------------+------------------------------------+
200205
| options | default | description |
201206
+------------------------+-------------------+------------------------------------+
202-
| -DCMAME_INSTALL_PREFIX | /usr/local/cytnx | Install destination of the library |
207+
| -DCMAKE_INSTALL_PREFIX | /usr/local/cytnx | Install destination of the library |
203208
+------------------------+-------------------+------------------------------------+
204209
| -DBUILD_PYTHON | ON | Compile and install Python API |
205210
+------------------------+-------------------+------------------------------------+
@@ -290,7 +295,7 @@ In the case that Cytnx is installed locally from binary build, not from anaconda
290295

291296
Generate API documentation
292297
*************************************
293-
An API documentation can be generated from the source code of Cytnx by using doxygen. The documentation is accessible online at <https://kaihsinwu.gitlab.io/cytnx_api/>. To create it locally, make sure that doxygen is installed:
298+
An API documentation can be generated from the source code of Cytnx by using doxygen. The documentation is accessible online at `here <../api_build/html/index.html>`__. To create it locally, make sure that doxygen is installed:
294299

295300
.. code-block:: shell
296301

docs/source/guide/linalg.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Linear algebra
22
===============
33

4-
Currently, Cytnx supports the following linear algebra functions. See https://kaihsin.github.io/Cytnx/docs/html/index.html for further documentation.
4+
Currently, Cytnx supports the following linear algebra functions. See A for further documentation.
55

66
+-----------------------------------------------------------------------+---------+-----+------+-------------+----+----------------+
77
| func | Inplace | CPU | GPU | Called by Tn| Tn | CyTn (xlinalg) |

docs/source/install.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ In the following we show how to install Cytnx with conda.
3737
:linenos:
3838
3939
$conda config --add channels conda-forge
40-
$conda create --channel conda-forge --name cytnx python=3.8 llvm-openmp
40+
$conda create --channel conda-forge --name cytnx python=3.9 llvm-openmp
4141

4242

4343
.. note::
@@ -124,6 +124,7 @@ Let us consider the same example as before for Python. Here, we want to compile
124124
#include "cytnx.hpp"
125125
#include <iostream>
126126
using namespace std;
127+
using namespace cytnx;
127128

128129
int main(){
129130
auto A = zeros(4);

0 commit comments

Comments
 (0)