README.md 3.22 KB
Newer Older
mashun1's avatar
veros  
mashun1 committed
1
2
# veros

mashun1's avatar
mashun1 committed
3
4
一个从 Fortran 语言转换为 Python 语言的通用循环海洋模型。

mashun1's avatar
veros  
mashun1 committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
## 论文

**Veros v0.1 – a fast and versatile ocean simulator in pure Python**

* https://gmd.copernicus.org/articles/11/3299/2018/

## 环境配置

### Docker(方法一)
    
    docker pull image.sourcefind.cn:5000/dcu/admin/base/jax:0.4.23-ubuntu20.04-dtk24.04.1-py3.10

    docker run --shm-size 10g --network=host --name=veros --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v 项目地址(绝对路径):/home/ -v /opt/hyhal:/opt/hyhal:ro -it <your IMAGE ID> bash

mashun1's avatar
mashun1 committed
19
    pip install -r requirements_extra.txt
mashun1's avatar
veros  
mashun1 committed
20
21
22
23
24
25
26
27
28
29

    python setup.py develop


### Dockerfile(方法二)

    docker build -t <IMAGE_NAME>:<TAG> .

    docker run --shm-size 10g --network=host --name=idmvton --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v 项目地址(绝对路径):/home/ -v /opt/hyhal:/opt/hyhal:ro -it <your IMAGE ID> bash

mashun1's avatar
mashun1 committed
30
31
    pip install -r requirements_extra.txt

mashun1's avatar
veros  
mashun1 committed
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
    python setup.py develop


### Anaconda (方法三)

1、关于本项目DCU显卡所需的特殊深度学习库可从光合开发者社区下载安装:
https://developer.hpccube.com/tool/

    DTK驱动:dtk24.04
    python:python3.10
    jax: 0.4.23

Tips:以上dtk驱动、python、torch等DCU相关工具版本需要严格一一对应

2、其它非特殊库参照requirements.txt安装

mashun1's avatar
mashun1 committed
48
    pip install -r requirements_extra.txt
mashun1's avatar
veros  
mashun1 committed
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86

    python setup.py develop

## 数据集



## 推理

### 快速应用

    # 以下是两个基本使用方法,可以查看`veros/setups`中的文件并对命令行进行相应的修改
    veros copy-setup acc 
    veros run acc/acc.py -b jax --device gpu --float-type float32

    veros copy-setup global_4deg
    veros run global_4deg/global_4deg.py -b jax --device gpu --float-type float32

注意:更多使用方法参考`https://veros.readthedocs.io/en/latest/introduction/introduction.html`

### benchmark

    cd benchmarks

    python acc_benchmark.py --timesteps 100 --size 30 42 15 -b jax --device gpu --float-type float32

    python isoneutral_benchmark.py --timesteps 100 --size 30 42 15 -b jax --device gpu --float-type float32

    python pressure_solver_benchmark.py --timesteps 100 --size 30 42 15 -b jax --device gpu --float-type float32

    python streamfunction_solver_benchmark.py --timesteps 100 --size 30 42 15 -b jax --device gpu --float-type float32

    python tdma_benchmark.py --timesteps 100 --size 30 42 15 -b jax --device gpu --float-type float32

### 数据分析

    analyze.ipynb

mashun1's avatar
mashun1 committed
87
注意:需运行`pip install jupyter`安装依赖并执行`jupyter notebook --no-browser --ip=0.0.0.0 --allow-root`启动服务以运行该程序。
mashun1's avatar
veros  
mashun1 committed
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115


## result

||psi|salt|temp|vsf_depth|
|:---:|:---:|:---:|:---:|:---:|
|K100_AI|![alt text](readme_imgs/image.png)|![alt text](readme_imgs/image-3.png)|![alt text](readme_imgs/image-5.png)|![alt text](readme_imgs/image-7.png)|


### 精度



## 应用场景

`海洋模拟`

### 热点应用行业

`气象,能源,海洋`

## 源码仓库及问题反馈

* https://developer.hpccube.com/codes/modelzoo/veros_jax

## 参考资料

* https://github.com/team-ocean/veros