Skip to content

Commit af39e3c

Browse files
authored
DOC: use term "pre-built" (#100)
1 parent 59f33e8 commit af39e3c

File tree

3 files changed

+27
-17
lines changed

3 files changed

+27
-17
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
✔️ **MacOS**
3434
✔️ **Windows**
3535

36-
+ **PyGRT is extremely easy to install** by distributing precompiled binary files.
36+
+ **PyGRT is extremely easy to install** by distributing pre-built binary files.
3737

3838
+ **PyGRT now supports the model with liquid layers.**
3939

@@ -54,7 +54,7 @@
5454
Clean and organized code structure, making it easy to extend and maintain.
5555

5656
- **Compatibility**:
57-
**PyGRT provides pre-compiled static files**, ensuring ease of installation, usage, and portability across different systems.
57+
**PyGRT provides pre-built static files**, ensuring ease of installation, usage, and portability across different systems.
5858

5959
<p align="center">
6060
<img src="./figs/diagram_cut.png" alt="Image 2" width="100%" />

docs/compile.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
chmod +x *.sh
44

5-
# 先在线编译PyGRT
5+
# 先在线构建PyGRT
66
cd ../pygrt/C_extension
77
make
88
cd -

docs/source/install.rst

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@
1313
依赖
1414
------------
1515

16-
+ 如果你想使用C程序 :command:`grt` ,你需要 `Seismic Analysis Code (SAC) <http://www.iris.edu/ds/nodes/dmc/forms/sac/>`_ ,因为C程序以二进制的SAC格式输出波形。
17-
+ 如果你想以Python脚本形式使用,依赖已在 :file:`setup.py` 中写好,直接使用 :command:`pip` 安装即可。
16+
如果想使用 C 程序 :command:`grt` ,
1817

18+
+ `FFTW <https://www.fftw.org/>`_ ,其静态库已链接到预构建版本
19+
+ `NetCDF <https://www.unidata.ucar.edu/software/netcdf>`_ ,其静态库已链接到预构建版本
20+
+ `Seismic Analysis Code (SAC) <http://www.iris.edu/ds/nodes/dmc/forms/sac/>`_ ,需在对应网址申请下载。
21+
用于用户进一步处理 SAC 格式的输出波形。
1922

20-
免编译安装
23+
如果你想以Python脚本形式使用,依赖已在 :file:`setup.py` 中写好,直接使用 :command:`pip` 安装即可。
24+
25+
26+
安装预构建版本
2127
------------
2228

23-
+ 目前 **PyGRT** 已分发内置预编译二进制文件的安装包,用户仅需运行以下命令即可(建议使用 `Anaconda <https://anaconda.org>`_ 虚拟环境)
29+
+ 目前 **PyGRT** 已分发内置预构建二进制文件的安装包,用户仅需运行以下命令即可(建议使用 `Anaconda <https://anaconda.org>`_ 虚拟环境)
2430

2531
.. code-block:: bash
2632
@@ -32,12 +38,14 @@
3238
3339
pip install .
3440
35-
+ 如果你不想使用Python,只想使用传统的命令行形式运行C程序,也可从 |gr| 中下载最新版本的程序压缩包(符合自己的操作系统),解压,其中 :rst:dir:`pygrt/C_extension/bin` 和 :rst:dir:`pygrt/C_extension/lib` 为预编译好的可执行文件目录和动态/静态库目录,按自己习惯配置环境变量 :envvar:`PATH` 即可(详见下方)。
41+
+ 如果你不想使用Python,只想使用传统的命令行形式运行C程序,也可从 |gr| 中下载最新版本的程序压缩包(符合自己的操作系统),
42+
解压,其中 :rst:dir:`pygrt/C_extension/bin` 和 :rst:dir:`pygrt/C_extension/lib` 为预构建好的可执行文件目录和动态/静态库目录,
43+
按自己习惯配置环境变量 :envvar:`PATH` 即可(详见下方)。
3644

3745

3846
环境变量配置
3947
-------------
40-
+ 如果你使用 :command:`pip` 安装后,想使用编译好的C程序 :command:`grt` ,需配置环境变量 :envvar:`PATH` 。运行以下命令
48+
+ 如果你使用 :command:`pip` 安装后,想使用构建好的C程序 :command:`grt` ,需配置环境变量 :envvar:`PATH` 。运行以下命令
4149

4250
.. code-block:: bash
4351
@@ -53,19 +61,21 @@
5361
5462
将其中的 “PyGRT executable file directory” 路径添加到环境变量 :envvar:`PATH` 中即可。
5563

56-
+ 如果是从 |gr| 上直接下载的程序,指向使用,则只需将解压后的 :rst:dir:`bin/` 路径添加到环境变量 :envvar:`PATH` 中即可。
64+
+ 如果是从 |gr| 上直接下载的压缩包,则只需将解压后的 :rst:dir:`bin/` 路径添加到环境变量 :envvar:`PATH` 中即可。
5765

5866
C程序 :command:`grt` 的运行独立于Python,每个C程序可使用 ``-h`` 查看帮助。
5967

6068

61-
从源码编译安装
69+
从源码构建安装
6270
---------------------
6371

64-
如果安装好预编译版本后,运行 C 或 Python 提示 “GLIBC” 版本缺失以及其它库的版本问题,可尝试从源码从头编译二进制库文件和可执行文件
72+
如果安装好预构建版本后,运行 C 或 Python 提示 “GLIBC” 版本缺失以及其它库的版本问题,可尝试从源码从头构建二进制库文件和可执行文件
6573

6674
1. 安装程序开发所需的基本工具,如 :command:`gcc` 编译器, :command:`make` 工具等。
6775

68-
2. 安装 `FFTW <https://www.fftw.org/>`_ 。
76+
2. 安装 `NetCDF <https://www.unidata.ucar.edu/software/netcdf>`_ 。
77+
78+
3. 安装 `FFTW <https://www.fftw.org/>`_ 。
6979

7080
要求安装双精度和单精度两个版本,且要求编译出静态库,并要求在环境变量 :envvar:`LIBRARY_PATH` 中配置静态库路径。如果从源码编译安装 FFTW ,通常在其目录下运行以下命令即可安装+配置路径成功(以 Ubuntu 系统为例):
7181

@@ -81,26 +91,26 @@ C程序 :command:`grt` 的运行独立于Python,每个C程序可使用 ``-h``
8191
make
8292
make install
8393
84-
3. 编译 **PyGRT** 。
94+
4. 构建 **PyGRT** 。
8595

8696
切换到 **PyGRT** 程序目录(不论是使用 :command:`pip` 安装的还是从 |gr| 下载的),切换到 :rst:dir:`pygrt/C_extension` ,运行
8797

8898
.. code-block:: bash
8999
90100
make
91101
92-
进行编译。编译成功后会在 :rst:dir:`bin/` 和 :rst:dir:`lib/` 路径下看到新编译出来的可执行文件和库文件。如果正确配置了 :envvar:`PATH` 可尝试运行 :command:`grt -h` 看能否正常打印帮助文档。再运行
102+
进行构建。成功后会在 :rst:dir:`bin/` 和 :rst:dir:`lib/` 路径下看到新构建出来的可执行文件和库文件。如果正确配置了 :envvar:`PATH` 可尝试运行 :command:`grt -h` 看能否正常打印帮助文档。再运行
93103

94104
.. code-block:: bash
95105
96106
make cleanbuild
97107
98-
可清理编译过程产生的中间文件夹 :rst:dir:`build/` 。
108+
可清理构建过程产生的中间文件夹 :rst:dir:`build/` 。
99109

100110
常见问题
101111
------------
102112
+ 如果运行报错,提示缺少依赖(常见于MacOS),这通常是缺少 ``OpenMP`` 库。尝试安装 :command:`gcc` 编译器,其中会自带 ``OpenMP``。
103-
+ “GLIBC” 版本缺失:请尝试从源码编译
113+
+ “GLIBC” 版本缺失:请尝试从源码构建
104114

105115

106116

0 commit comments

Comments
 (0)