-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_petscinv
executable file
·73 lines (66 loc) · 2.3 KB
/
run_petscinv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
# Solves precomputed tomography matrices using our new petsc solver
mpirun -n 6 ./petscinv \
-matrix_schedule 'samples/schedule' \
-inparam_file 'samples/inparam' \
-inversion_parameters 'vsh,vsv' \
-reference_model 'prem_ani' \
-number_of_layers 21 \
-equatorial_increment 5.0 \
-project_id 'my_inversion' \
-output_format 'ascii_rtpv' \
-solution_type 'normal' \
-ksp_monitor \
-grouped_varr \
-ksp_type gmres
#
# SOME NOTES:
#
# * Be aware that the rtol=the relative convergence tolerance
# (i.e. the relative decrease in the residual norm) value is
# set based on the experience that for tomographic linear
# systems nothing significantly changes beyond this criteria
# One may need to check whether this is really the case before
# defining a final model
#
# * If you want to run a synthetic test just add the line. You
# can either read models parameterized in the actual tomography
# parameterization or as pointclouds
# -synthetic_model 'samples/synth.pcn' \
# -synthetic_model 'samples/synth_rtpv.pcn' \
# -synthetic_model 'samples/synth_checkerboard.pcn' \
#
# * You can also just test variance reduction using a synthetic
# input model, as a simple hypothesis test using
# -varr_model_array 'samples/model_array.in' \
#
# * In case of an adaptive grid add the command line arguments
# -grid_info 'grid/grid.info.rit.S.d' \
# -adaptive_grid \
#
# * If you want to store grouped variance reductions for subsets
# of data, just append the following
# -grouped_varr \
#
# * You could think about playing around with the preconditioning
# -pc_type jacobi
#
# * To use LSQR on the rectangular system just set
# -type to 'lsqr' or 'rect'
#
# * To get some additional info on the matrix you invert add the flags
# -info -mat_view_info -log_summary
#
# * For testing you can specify a maximum number of iterations
# -ksp_max_it 1000
#
# * Alternatively you can release the convergence criteria with
# -ksp_rtol 0.0001 \
# -ksp_atol 0.0001 \
#
# * In the case of -type 'normal' please try different solvers
# as gmres, bicg, cg, symmlq, minres using -ksp_type *
#
# * In case you want to use a 3D reference model, add the following
# you need a file regions in the same folder
# -reference_model './samples/prem_ani_crust_2.0/' \