-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6d3915a
Showing
193 changed files
with
62,195 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 7539d2c8f641b42fd2325aae7eb56113 | ||
tags: d77d1c0d9ca2f4c8421862c7c5a0d620 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[oneAPI] | ||
name=Intel(R) oneAPI repository | ||
baseurl=https://yum.repos.intel.com/oneapi | ||
enabled=1 | ||
gpgcheck=1 | ||
repo_gpgcheck=1 | ||
gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB |
18 changes: 18 additions & 0 deletions
18
_downloads/358f8a6762fae43b5eed5dad1b72f08f/fk3.4-v20220730.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/Makefile b/Makefile | ||
index 5676245..11aac94 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -1,9 +1,10 @@ | ||
+FC=gfortran | ||
optimize=-O | ||
-FFLAGS=$(optimize) -ffpe-trap=overflow,invalid,denormal | ||
+FFLAGS=$(optimize) -ffpe-trap=overflow,invalid,denormal -ffixed-line-length-none | ||
CFLAGS=$(optimize) | ||
#if SAC library has been installed, uncomment the next two lines | ||
-#CFLAGS=$(optimize) -DSAC_LIB | ||
-#SACLIB=-L$(SACHOME)/lib -lsac -lsacio | ||
+CFLAGS=$(optimize) -DSAC_LIB | ||
+SACLIB=-L$(SACHOME)/lib -lsac -lsacio | ||
# | ||
|
||
SUBS = fft.o Complex.o sacio.o |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
# Anaconda/Miniconda | ||
|
||
- 本节贡献者: {{田冬冬}}(作者)、{{姚家园}}(审稿) | ||
- 最近更新时间:2023-04-30 | ||
|
||
--- | ||
|
||
[Anaconda](https://www.anaconda.com/download/) 是一个跨平台的、用于科学计算的 Python 发行版, | ||
其提供了 Python、包管理器 `conda` 并内置了几百个科学计算相关的软件包。 | ||
[Miniconda](https://docs.conda.io/en/latest/miniconda.html) 可以看做是 | ||
Anaconda 的精简版,其只提供了 Python、包管理器 `conda` 以及相关的必须依赖包。 | ||
|
||
与 Anaconda 相比,Miniconda 安装包更小,安装速度更快,且安装后占用的硬盘空间更小。 | ||
Anaconda 内置的数百个软件包也都可以很容易通过 `conda` 安装。因而, | ||
**建议所有 Python 用户使用 Miniconda,而非 Linux 或 macOS 系统自带的 Python。** | ||
|
||
## 安装 | ||
|
||
1. 下载 Miniconda | ||
|
||
根据自己使用的系统,从 [Miniconda 官方下载页面](https://docs.conda.io/en/latest/miniconda.html#latest-miniconda-installer-links) | ||
或 [清华大学 Miniconda 镜像](https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/) 下载对应的安装包。 | ||
|
||
- Linux 64 位系统: | ||
[官方链接](https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh) | | ||
[清华镜像](https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh) | ||
- Windows 64 位系统: | ||
[官方链接](https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe) | | ||
[清华镜像](https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Windows-x86_64.exe) | ||
- macOS (Intel 芯片): | ||
[官方链接](https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh) | | ||
[清华镜像](https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-MacOSX-x86_64.sh) | ||
- macOS (M1 芯片): | ||
[官方链接](https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh) | ||
[清华镜像](https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-MacOSX-arm64.sh) | ||
|
||
2. 安装 Miniconda | ||
|
||
::::{tab-set} | ||
|
||
:::{tab-item} Windows | ||
直接双击安装包即可安装。 | ||
::: | ||
|
||
:::{tab-item} Linux | ||
``` | ||
$ bash Miniconda3-latest-Linux-x86_64.sh | ||
``` | ||
::: | ||
:::{tab-item} macOS | ||
``` | ||
# Intel 芯片 | ||
$ bash Miniconda3-latest-MacOSX-x86_64.sh | ||
# M1 芯片 | ||
$ bash Miniconda3-latest-MacOSX-arm64.sh | ||
``` | ||
::: | ||
:::: | ||
Miniconda 默认会安装到 {file}`${HOME}/miniconda3` 下,在安装过程中可以 | ||
设置为其他路径。 | ||
安装通常只需要十几秒,在安装的最后会出现: | ||
``` | ||
Do you wish the installer to initialize Miniconda3 by running conda init? [yes|no] | ||
[yes] >>> | ||
``` | ||
建议输入 `yes`,此时安装包会向当前 SHELL 的配置文件(如 {file}`~/.bashrc` | ||
或 {file}`~/.zshrc`)中写入 `conda` 初始化语句。 | ||
3. 测试安装 | ||
打开一个新的终端,在终端中输入 `python`,输出中看到 **Anaconda, Inc.** | ||
字样即代表安装完成: | ||
``` | ||
$ python | ||
Python 3.8.5 (default, Sep 4 2020, 02:22:02) | ||
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin | ||
Type "help", "copyright", "credits" or "license" for more information. | ||
>>> | ||
``` | ||
# 配置 `conda` | ||
Anaconda/Miniconda 中提供的 `conda` 命令可以用于安装 Python 包、管理虚拟环境, | ||
此外,也可以使用 Python 自带的工具 `pip` 来安装 Python 包,其详细用法见 | ||
[pip 官方文档](https://pip.pypa.io/en/stable/)。我们建议尽可能使用 `conda` 来安装 Python 包, | ||
仅在 conda 没有提供需要的程序包时才使用 `pip` 来安装。 | ||
在使用 `conda` 前需要对 `conda` 做简单的配置。 | ||
[conda-forge](https://conda-forge.org/) 是一个由社区维护的大量 Python 包的通道。 | ||
为 conda 增加 conda-forge 通道,可以安装更多的软件包: | ||
``` | ||
$ conda config --add channels conda-forge | ||
``` | ||
设置通道优先级为 strict。当一个包同时位于 conda-forge 和 main 通道时,总是使用 conda-forge 提供的包, | ||
以避免混用 conda-forge 和 main 通道导致环境依赖关系解析变慢: | ||
``` | ||
$ conda config --set channel_priority true | ||
``` | ||
显示通道 URL,以更清楚地知道每个包是从哪个通道安装的: | ||
``` | ||
$ conda config --set show_channel_urls true | ||
``` | ||
配置使用国内清华源以加快软件包下载速度: | ||
``` | ||
$ conda config --add default_channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main | ||
$ conda config --set 'custom_channels.conda-forge' https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud | ||
``` | ||
设置 `conda` 使用更快的 libmamab solver: | ||
``` | ||
$ conda install -n base conda-libmamba-solver | ||
$ conda config --set solver libmamba | ||
``` | ||
## 使用 conda | ||
以下仅介绍一些 `conda` 的常用命令,其详细用法见 | ||
[conda 官方文档](https://docs.conda.io/projects/conda/en/latest/index.html)。 | ||
创建虚拟环境: | ||
``` | ||
# 虚拟环境名为 seismo-learn,初始 Python 版本与 base 环境相同 | ||
$ conda create --name seismo-learn | ||
``` | ||
激活虚拟环境: | ||
``` | ||
# 激活名为 seismo-learn 的虚拟环境 | ||
$ conda activate seismo-learn | ||
``` | ||
取消激活当前虚拟环境: | ||
``` | ||
$ conda deactivate | ||
``` | ||
:::{note} | ||
安装 Anaconda/Miniconda 后,打开终端默认会激活 base 环境。不经常使用 | ||
Python 的读者可以通过如下命令取消此默认设置: | ||
``` | ||
$ conda config --set auto_activate_base False | ||
``` | ||
取消后,可以临时激活 base 环境: | ||
``` | ||
$ conda activate base | ||
``` | ||
重新激活此默认设置: | ||
``` | ||
$ conda config --set auto_activate_base True | ||
``` | ||
::: | ||
搜索模块: | ||
``` | ||
$ conda search numpy | ||
``` | ||
安装模块: | ||
``` | ||
$ conda install numpy | ||
``` | ||
更新模块: | ||
``` | ||
$ conda update numpy | ||
``` | ||
使用 pip 安装模块: | ||
``` | ||
$ pip install numpy | ||
``` | ||
## 参考文档 | ||
- <https://docs.anaconda.com/anaconda/install/> | ||
- <https://conda.io/projects/conda/en/latest/user-guide/install/index.html> | ||
- <https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html> | ||
- <https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/> | ||
- <https://mirrors.tuna.tsinghua.edu.cn/help/pypi/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# CPS | ||
|
||
- 软件名称: Computer Programs in Seismology | ||
- 作者: [Robert B. Herrmann](https://www.eas.slu.edu/People/RBHerrmann/) | ||
- 主页: <http://www.eas.slu.edu/eqc/eqccps.html> | ||
- 官方文档: <http://www.eas.slu.edu/eqc/eqc_cps/CPS/CPS330.html> | ||
- 最新版本: v3.30 (2022-11-08) | ||
- 适用平台: {{Linux}} {{macOS}} {{Windows}} | ||
- 编程语言: Fortran、C | ||
- 许可协议: 未知 | ||
|
||
--- | ||
|
||
:::{note} | ||
CPS 在十几年前就发布了 3.30 版本,之后不断修复程序错误和更新代码,但并未更新版本号。 | ||
因而 CPS v3.30 实际上有多个不同的小版本。 | ||
|
||
本教程仅在 Linux 和 macOS 系统下使用 v3.30 (2022-11-08) | ||
测试通过,其余版本或系统可能有所差异。 | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# 安装 | ||
|
||
- 本节贡献者: {{田冬冬}}(作者)、 {{姚家园}}(审稿) | ||
- 最近更新日期: 2021-01-26 | ||
|
||
--- | ||
|
||
{{ install_notes }} | ||
|
||
1. 下载: | ||
|
||
CPS 源码需要先填写申请表格才可以下载。 | ||
在 <http://www.eas.slu.edu/eqc/eqc_cps/CPS/cpslisc.html> 填写表格并提交。 | ||
|
||
% CPS 的源码也可以直接 http://www.eas.slu.edu/eqc/eqc_cps/ 的 download 目录下载 | ||
|
||
2. 解压: | ||
|
||
``` | ||
$ tar -xvf NP330.Nov-08-2022.tgz | ||
``` | ||
将解压得到的 {file}`PROGRAMS.330` 文件夹移至 {file}`~/src/` 目录下,并重命名为 {file}`CPS` | ||
``` | ||
$ mkdir -p ~/src/ | ||
$ mv PROGRAMS.330 ~/src/CPS | ||
``` | ||
3. 安装依赖 | ||
::::{tab-set} | ||
:::{tab-item} Fedora | ||
``` | ||
$ sudo dnf install libX11-devel | ||
``` | ||
::: | ||
:::{tab-item} Ubuntu/Debian | ||
``` | ||
$ sudo apt install libx11-dev | ||
``` | ||
::: | ||
:::{tab-item} macOS | ||
``` | ||
# macOS 安装 XQuartz 后需要重启方可生效 | ||
$ brew install --cask xquartz | ||
``` | ||
:::: | ||
4. 配置: | ||
若使用的是 Linux 系统,首先需要确认当前系统是 32 还是 64 位。 | ||
终端键入 `uname -a`,若输出中包含 `x86_64` 则是 64 位,若输出包含类似 | ||
`i686` 则是 32 位。 | ||
进入源码目录: | ||
``` | ||
$ cd ~/src/CPS | ||
``` | ||
::::{tab-set} | ||
:::{tab-item} 64 位 Linux 系统 | ||
``` | ||
$ ./Setup LINUX6440 | ||
``` | ||
::: | ||
:::{tab-item} 32 位 Linux 系统 | ||
``` | ||
$ ./Setup LINUX40 | ||
``` | ||
::: | ||
:::{tab-item} macOS 系统 | ||
``` | ||
$ ./Setup OSX40 | ||
``` | ||
::: | ||
:::: | ||
:::{note} | ||
终端键入 `./Setup` 可查询全部选项。 | ||
::: | ||
5. 编译: | ||
``` | ||
$ ./C | ||
``` | ||
接下来会编译一段时间,最终在 bin 目录下应该生成一百多个可执行文件。 | ||
6. 修改环境变量,将 CPS 的 bin 路径添加到环境变量 **PATH** 中: | ||
``` | ||
$ echo 'export PATH=${HOME}/src/CPS/bin:${PATH}' >> ~/.bashrc | ||
$ source ~/.bashrc | ||
``` | ||
7. 检查安装是否成功 | ||
终端键入一些 CPS 的命令,比如 `sdisp96 -h`,若出现该命令的使用选项则表示安装成功。 |
Oops, something went wrong.