Actual source code: rosenbrock4cu.cu

  1: const char help[] = "CUDA backend of rosenbrock4cu.cu\n";

  3: /* ------------------------------------------------------------------------

  5:   Copy of rosenbrock1.c.
  6:   Once petsc test harness supports conditional linking, we can remove this duplicate.
  7:   See https://gitlab.com/petsc/petsc/-/issues/1173
  8:   ------------------------------------------------------------------------- */

 10: #include "rosenbrock4.h"

 12: int main(int argc, char **argv)
 13: {
 14:   /* Initialize TAO and PETSc */
 15:   PetscFunctionBeginUser;
 16:   PetscCall(PetscInitialize(&argc, &argv, NULL, help));
 17:   PetscCall(RosenbrockMain());
 18:   PetscCall(PetscFinalize());
 19:   return 0;
 20: }

 22: /*TEST

 24:   build:
 25:     requires: !complex cuda !single !__float128 !defined(PETSC_USE_65BIT_INDICES)

 27:   test:
 28:     suffix: 1
 29:     nsize: {{1 2 3}}
 30:     args: -mat_type aijcusparse -tao_monitor_short -tao_type nls -tao_gatol 1.e-4 -tao_nls_pc_type pbjacobi
 31:     requires: !single
 32:     output_file: output/rosenbrock1_1.out

 34:   test:
 35:     suffix: 2
 36:     args: -mat_type aijcusparse -tao_monitor_short -tao_type lmvm -tao_gatol 1.e-3
 37:     output_file: output/rosenbrock1_2.out

 39:   test:
 40:     suffix: 3
 41:     args: -mat_type aijcusparse -tao_monitor_short -tao_type ntr -tao_gatol 1.e-4
 42:     requires: !single
 43:     output_file: output/rosenbrock1_3.out

 45:   test:
 46:     suffix: 5
 47:     args: -mat_type aijcusparse -tao_monitor_short -tao_type bntr -tao_gatol 1.e-4
 48:     output_file: output/rosenbrock1_5.out

 50:   test:
 51:     suffix: 6
 52:     args: -mat_type aijcusparse -tao_monitor_short -tao_type bntl -tao_gatol 1.e-4
 53:     output_file: output/rosenbrock1_6.out

 55:   test:
 56:     suffix: 7
 57:     args: -mat_type aijcusparse -tao_monitor_short -tao_type bnls -tao_gatol 1.e-4
 58:     output_file: output/rosenbrock1_7.out

 60:   test:
 61:     suffix: 8
 62:     args: -mat_type aijcusparse -tao_monitor_short -tao_type bntr -tao_bnk_max_cg_its 3 -tao_gatol 1.e-4
 63:     output_file: output/rosenbrock1_8.out

 65:   test:
 66:     suffix: 9
 67:     args: -mat_type aijcusparse -tao_monitor_short -tao_type bntl -tao_bnk_max_cg_its 3 -tao_gatol 1.e-4
 68:     output_file: output/rosenbrock1_9.out

 70:   test:
 71:     suffix: 10
 72:     args: -mat_type aijcusparse -tao_monitor_short -tao_type bnls -tao_bnk_max_cg_its 3 -tao_gatol 1.e-4
 73:     output_file: output/rosenbrock1_10.out

 75:   test:
 76:     suffix: 11
 77:     args: -mat_type aijcusparse -test_lmvm -tao_type bqnktr -tao_max_it 10 -tao_bqnk_mat_type lmvmbroyden
 78:     output_file: output/rosenbrock1_11.out

 80:   test:
 81:     suffix: 12
 82:     args: -mat_type aijcusparse -test_lmvm -tao_type bqnktr -tao_max_it 10 -tao_bqnk_mat_type lmvmbadbroyden
 83:     output_file: output/rosenbrock1_12.out

 85:   test:
 86:     suffix: 13
 87:     args: -mat_type aijcusparse -test_lmvm -tao_type bqnktr -tao_max_it 10 -tao_bqnk_mat_type lmvmsymbroyden
 88:     output_file: output/rosenbrock1_13.out

 90:   test:
 91:     suffix: 14
 92:     args: -mat_type aijcusparse -test_lmvm -tao_type bqnktr -tao_max_it 10 -tao_bqnk_mat_type lmvmbfgs
 93:     output_file: output/rosenbrock1_14.out

 95:   test:
 96:     suffix: 15
 97:     args: -mat_type aijcusparse -test_lmvm -tao_type bqnktr -tao_max_it 10 -tao_bqnk_mat_type lmvmdfp
 98:     output_file: output/rosenbrock1_15.out

100:   test:
101:     suffix: 16
102:     args: -mat_type aijcusparse -test_lmvm -tao_type bqnktr -tao_max_it 10 -tao_bqnk_mat_type lmvmsr1
103:     output_file: output/rosenbrock1_16.out

105:   test:
106:     suffix: 17
107:     args: -mat_type aijcusparse -tao_monitor_short -tao_gatol 1e-4 -tao_type bqnls
108:     output_file: output/rosenbrock1_17.out

110:   test:
111:     suffix: 18
112:     args: -mat_type aijcusparse -tao_monitor_short -tao_gatol 1e-4 -tao_type blmvm
113:     output_file: output/rosenbrock1_18.out

115:   test:
116:     suffix: 19
117:     args: -mat_type aijcusparse -tao_monitor_short -tao_gatol 1e-4 -tao_type bqnktr -tao_bqnk_mat_type lmvmsr1
118:     output_file: output/rosenbrock1_19.out

120:   test:
121:     suffix: 20
122:     args: -mat_type aijcusparse -tao_monitor -tao_gatol 1e-4 -tao_type blmvm -tao_ls_monitor
123:     output_file: output/rosenbrock1_20.out

125:   test:
126:     suffix: 21
127:     args: -mat_type aijcusparse -test_lmvm -tao_type bqnktr -tao_max_it 10 -tao_bqnk_mat_type lmvmsymbadbroyden
128:     output_file: output/rosenbrock1_21.out

130:   test:
131:     suffix: 22
132:     args: -mat_type aijcusparse -tao_max_it 1 -tao_converged_reason
133:     output_file: output/rosenbrock1_22.out

135:   test:
136:     suffix: 23
137:     args: -mat_type aijcusparse -tao_max_funcs 0 -tao_converged_reason
138:     output_file: output/rosenbrock1_23.out

140:   test:
141:     suffix: 24
142:     args: -mat_type aijcusparse -tao_gatol 10 -tao_converged_reason
143:     output_file: output/rosenbrock1_24.out

145:   test:
146:     suffix: 25
147:     args: -mat_type aijcusparse -tao_grtol 10 -tao_converged_reason
148:     output_file: output/rosenbrock1_25.out

150:   test:
151:     suffix: 26
152:     args: -mat_type aijcusparse -tao_gttol 10 -tao_converged_reason
153:     output_file: output/rosenbrock1_26.out

155:   test:
156:     suffix: 27
157:     args: -mat_type aijcusparse -tao_steptol 10 -tao_converged_reason
158:     output_file: output/rosenbrock1_27.out

160:   test:
161:     suffix: 28
162:     args: -mat_type aijcusparse -tao_fmin 10 -tao_converged_reason
163:     output_file: output/rosenbrock1_28.out

165:   test:
166:     suffix: test_dbfgs
167:     nsize: {{1 2 3}}
168:     output_file: output/rosenbrock1_14.out
169:     args: -mat_type aijcusparse -n 10 -tao_type bqnktr -test_lmvm -tao_max_it 10 -tao_bqnk_mat_type lmvmdbfgs -tao_bqnk_mat_lmvm_scale_type none -tao_bqnk_mat_lbfgs_type {{inplace reorder}} -tao_bqnk_mat_lbfgs_recursive {{0 1}}

171:   test:
172:     suffix: test_ddfp
173:     nsize: {{1 2 3}}
174:     output_file: output/rosenbrock1_14.out
175:     args: -mat_type aijcusparse -n 10 -tao_type bqnktr -test_lmvm -tao_max_it 10 -tao_bqnk_mat_type lmvmddfp -tao_bqnk_mat_lmvm_scale_type none -tao_bqnk_mat_ldfp_type {{inplace reorder}} -tao_bqnk_mat_ldfp_recursive {{0 1}}

177:   test:
178:     suffix: test_dqn_1
179:     nsize: 1
180:     output_file: output/rosenbrock1_29.out
181:     args: -mat_type aijcusparse -n 10 -tao_type bqnktr -test_lmvm -tao_max_it 10 -tao_bqnk_mat_type lmvmdqn -tao_bqnk_mat_lmvm_scale_type none -tao_bqnk_mat_lqn_type {{inplace reorder}}

183:   test:
184:     suffix: test_dqn_2
185:     nsize: 2
186:     output_file: output/rosenbrock1_30.out
187:     args: -mat_type aijcusparse -n 10 -tao_type bqnktr -test_lmvm -tao_max_it 10 -tao_bqnk_mat_type lmvmdqn -tao_bqnk_mat_lmvm_scale_type none -tao_bqnk_mat_lqn_type {{inplace reorder}}

189:   test:
190:     suffix: test_dqn_3
191:     nsize: 3
192:     output_file: output/rosenbrock1_31.out
193:     args: -mat_type aijcusparse -n 10 -tao_type bqnktr -test_lmvm -tao_max_it 10 -tao_bqnk_mat_type lmvmdqn -tao_bqnk_mat_lmvm_scale_type none -tao_bqnk_mat_lqn_type {{inplace reorder}}

195: TEST*/