Project

General

Profile

Actions

Solver build and regression

How to download solver repo?

1.run command 'hongtu clone', choose emir/solver.
2.wait for git clone done, your local solver repo will save in current—directory/solver.

Repo structure

solver repo is like:

solver
|--ext        // 3rd lib for solver
|--src        //source code for all solver.  
    |--gss    // source code for gss.
    |--gss2   // source code for gssdmp. 
|--ut
    |--test—cases                // all test case.
	   |--GSS                // GSS run cases, each sub directory is one case.
	       |--FATF—Caster    // once case.
	            |--run.csh   // otaku script, final will run command like: :vP test.tcl
	            |--test.tcl  // case hvp tcl file.
           |-- LDL
           |-- PCG
    |--run—case—dir     // otaku scripts, all case need start in this directory.
    |--cases—config     // all test cases config, used to generate cases in test—cases.
	   |--FATE_Archer_DL.toml
	   |--FATE_Assassin_DL.toml

How to build gss and test in local

  1. cd solver/src/gss/GSS
  2. module load cmake/3.22.1
  3. mkdir build, then cd build
  4. cmake .. ,then run command 'make'
  5. cd solver/src/gss
  6. mkdir build, then cd build
  7. cmake .. ,then run command 'make'
  8. there will be an executable binary named spd—0
  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,

local executable binary source code is in src/gss/main/gss—demo—giga.c

How to build gss/gss2 for HVP

  1. cd solver/src/gss/GSS
  2. module load cmake/3.22.1
  3. mkdir build, then cd build
    3.5 if need compile open—blas or mkl—blas version, liust commont/uncommont line 48, where we set MK l.ROOT.
  4. cmake .. ,then run command 'make'
  5. copy build/libGSS.so to pub2018/lib/rhelx-64/libGSS.so
  6. make :vP new binary, then use tcl command test your change to gss~
  7. same way to build gss2 for :vP

About update pub2018, see wiki Integration_method

How to run otaku

  1. run command 'module load anaconda/2021'
  2. cd ut/run—case—dir
  3. run command 'run—ut --case—path case—path --binary hvp—binary—path --queue [cent6, centl ..]'
  4. you can get more usage in ut/RFADMF.md and run—ut -h
  5. enlioy your test~

How to add case to ut

  1. if matrix from inhouse, use export_power_network_matrix tcl command to generate matrix.
  2. if matrix from outer, matrix need transfrom to csr/csc format which used in hvp. shaobo may have some script to handle this.
  3. create case config in cases_config, correctly fill in the corresponding fields in the config file.
case—name='case—name'
matrix—path='path' 
髻 can be full path or relative path of golbal matrix directory(/reg/db/vp/matrix) 
matrix—shape='Dl.' 髻 should be 'Dl.' or 'FULL'
solver—list=['GSS', 'PCG', 'l.Dl.', 'GMRFS'] 髻 which solver need use this matrix to test 
xerr=1e-5 髻 max residual for iterative solver
golden—file=[] 髻 compare file list, not use for now
timeout=0 髻 max time case will run, not use for now
  1. after create new case config file, cd ut/run_case_dir, then run_ut --update
  2. after local test pass, contact siqi to add matrix in /reg/db/vp/matrix/, then change case config:matrix_path to new path
  3. push new case to origin repo.

Updated by jun chen 3 months ago · 1 revisions