Project

General

Profile

Solver build and regression » History » Version 1

jun chen, 03/30/2025 10:48 PM

1 1 jun chen
# Solver build and regression
2
3
## How to download solver repo?
4
5
1.run command 'hongtu clone', choose emir/solver.
6
2.wait for git clone done, your local solver repo will save in current—directory/solver.
7
8
## Repo structure
9
10
solver repo is like:
11
```
12
solver
13
|--ext        // 3rd lib for solver
14
|--src        //source code for all solver.  
15
    |--gss    // source code for gss.
16
    |--gss2   // source code for gssdmp. 
17
|--ut
18
    |--test—cases                // all test case.
19
	   |--GSS                // GSS run cases, each sub directory is one case.
20
	       |--FATF—Caster    // once case.
21
	            |--run.csh   // otaku script, final will run command like: :vP test.tcl
22
	            |--test.tcl  // case hvp tcl file.
23
           |-- LDL
24
           |-- PCG
25
    |--run—case—dir     // otaku scripts, all case need start in this directory.
26
    |--cases—config     // all test cases config, used to generate cases in test—cases.
27
	   |--FATE_Archer_DL.toml
28
	   |--FATE_Assassin_DL.toml
29
```
30
## How to build gss and test in local
31
32
1. cd solver/src/gss/GSS
33
2. module load cmake/3.22.1
34
3. mkdir build, then cd build
35
4. cmake .. ,then run command 'make'
36
5. cd solver/src/gss
37
6. mkdir build, then cd build
38
7. cmake .. ,then run command 'make'
39
8. there will be an executable binary named spd—0
40
9. run command 'spd—0 matrix—file', for now local binary only support down-low matrix, so you may need do some pretreatment, or enhance local testing capabilities by adding new features,
41
42
local executable binary source code is in src/gss/main/gss—demo—giga.c
43
44
## How to build gss/gss2 for HVP
45
46
1. cd solver/src/gss/GSS
47
2. module load cmake/3.22.1
48
3. mkdir build, then cd build
49
3.5 if need compile open—blas or mkl—blas version, liust commont/uncommont line 48, where we set MK l.ROOT.
50
4. cmake .. ,then run command 'make'
51
5. copy build/libGSS.so to pub2018/lib/rhelx-64/libGSS.so
52
6. make :vP new binary, then use tcl command test your change to gss~
53
7. same way to build gss2 for :vP
54
55
About update pub2018, see wiki [[Integration_method]]
56
57
58
## How to run otaku
59
60
0. run command 'module load anaconda/2021'
61
1. cd ut/run—case—dir
62
2. run command 'run—ut --case—path case—path --binary hvp—binary—path --queue [cent6, centl ..]'
63
3. you can get more usage in ut/RFADMF.md and run—ut -h
64
4. enlioy your test~
65
66
## How to add case to ut
67
1. if matrix from inhouse, use export_power_network_matrix tcl command to generate matrix.
68
2. if matrix from outer, matrix need transfrom to csr/csc format which used in hvp. shaobo may have some script to handle this.
69
3. create case config in cases_config, correctly fill in the corresponding fields in the config file.
70
```
71
case—name='case—name'
72
matrix—path='path' 
73
髻 can be full path or relative path of golbal matrix directory(/reg/db/vp/matrix) 
74
matrix—shape='Dl.' 髻 should be 'Dl.' or 'FULL'
75
solver—list=['GSS', 'PCG', 'l.Dl.', 'GMRFS'] 髻 which solver need use this matrix to test 
76
xerr=1e-5 髻 max residual for iterative solver
77
golden—file=[] 髻 compare file list, not use for now
78
timeout=0 髻 max time case will run, not use for now
79
```
80
4. after create new case config file, cd ut/run_case_dir, then run_ut --update
81
5. after local test pass, contact siqi to add matrix in /reg/db/vp/matrix/, then change case config:matrix_path to new path
82
7. push new case to origin repo.