Actual source code: ex62.c


  2: static char help[] = "Test Matrix products for AIJ matrices\n\
  3: Input arguments are:\n\
  4:   -fA <input_file> -fB <input_file> -fC <input_file>: file to load\n\n";
  5: /* Example of usage:
  6:    ./ex62 -fA <A_binary> -fB <B_binary>
  7:    mpiexec -n 3 ./ex62 -fA medium -fB medium
  8: */

 10: #include <petscmat.h>

 12: /*
 13:      B = A - B
 14:      norm = norm(B)
 15: */
 16: PetscErrorCode MatNormDifference(Mat A,Mat B,PetscReal *norm)
 17: {

 21:   MatAXPY(B,-1.0,A,DIFFERENT_NONZERO_PATTERN);
 22:   MatNorm(B,NORM_FROBENIUS,norm);
 23:   return(0);
 24: }

 26: int main(int argc,char **args)
 27: {
 28:   Mat            A,A_save,B,C,P,C1,R;
 29:   PetscViewer    viewer;
 31:   PetscMPIInt    size,rank;
 32:   PetscInt       i,j,*idxn,PM,PN = PETSC_DECIDE,rstart,rend;
 33:   PetscReal      norm;
 34:   PetscRandom    rdm;
 35:   char           file[2][PETSC_MAX_PATH_LEN] = { "", ""};
 36:   PetscScalar    *a,rval,alpha;
 37:   PetscBool      Test_MatMatMult=PETSC_TRUE,Test_MatTrMat=PETSC_TRUE,Test_MatMatTr=PETSC_TRUE;
 38:   PetscBool      Test_MatPtAP=PETSC_TRUE,Test_MatRARt=PETSC_TRUE,flg,seqaij,flgA,flgB;
 39:   MatInfo        info;
 40:   PetscInt       nzp  = 5; /* num of nonzeros in each row of P */
 41:   MatType        mattype;
 42:   const char     *deft = MATAIJ;
 43:   char           A_mattype[256], B_mattype[256];
 44:   PetscInt       mcheck = 10;

 46:   PetscInitialize(&argc,&args,(char*)0,help);if (ierr) return ierr;
 47:   MPI_Comm_size(PETSC_COMM_WORLD,&size);
 48:   MPI_Comm_rank(PETSC_COMM_WORLD,&rank);

 50:   /*  Load the matrices A_save and B */
 51:   PetscOptionsBegin(PETSC_COMM_WORLD,"","","");
 52:   PetscOptionsBool("-test_rart","Test MatRARt","",Test_MatRARt,&Test_MatRARt,NULL);
 53:   PetscOptionsInt("-PN","Number of columns of P","",PN,&PN,NULL);
 54:   PetscOptionsInt("-mcheck","Number of matmult checks","",mcheck,&mcheck,NULL);
 55:   PetscOptionsString("-fA","Path for matrix A","",file[0],file[0],sizeof(file[0]),&flg);
 56:   if (!flg) SETERRQ(PETSC_COMM_WORLD,PETSC_ERR_USER_INPUT,"Must indicate a file name for matrix A with the -fA option.");
 57:   PetscOptionsString("-fB","Path for matrix B","",file[1],file[1],sizeof(file[1]),&flg);
 58:   PetscOptionsFList("-A_mat_type","Matrix type","MatSetType",MatList,deft,A_mattype,256,&flgA);
 59:   PetscOptionsFList("-B_mat_type","Matrix type","MatSetType",MatList,deft,B_mattype,256,&flgB);
 60:   PetscOptionsEnd();

 62:   PetscViewerBinaryOpen(PETSC_COMM_WORLD,file[0],FILE_MODE_READ,&viewer);
 63:   MatCreate(PETSC_COMM_WORLD,&A_save);
 64:   MatLoad(A_save,viewer);
 65:   PetscViewerDestroy(&viewer);

 67:   if (flg) {
 68:     PetscViewerBinaryOpen(PETSC_COMM_WORLD,file[1],FILE_MODE_READ,&viewer);
 69:     MatCreate(PETSC_COMM_WORLD,&B);
 70:     MatLoad(B,viewer);
 71:     PetscViewerDestroy(&viewer);
 72:   } else {
 73:     PetscObjectReference((PetscObject)A_save);
 74:     B = A_save;
 75:   }

 77:   if (flgA) {
 78:     MatConvert(A_save,A_mattype,MAT_INPLACE_MATRIX,&A_save);
 79:   }
 80:   if (flgB) {
 81:     MatConvert(B,B_mattype,MAT_INPLACE_MATRIX,&B);
 82:   }
 83:   MatSetFromOptions(A_save);
 84:   MatSetFromOptions(B);

 86:   MatGetType(B,&mattype);

 88:   PetscMalloc(nzp*(sizeof(PetscInt)+sizeof(PetscScalar)),&idxn);
 89:   a    = (PetscScalar*)(idxn + nzp);

 91:   PetscRandomCreate(PETSC_COMM_WORLD,&rdm);
 92:   PetscRandomSetFromOptions(rdm);

 94:   /* 1) MatMatMult() */
 95:   /* ----------------*/
 96:   if (Test_MatMatMult) {
 97:     MatDuplicate(A_save,MAT_COPY_VALUES,&A);

 99:     /* (1.1) Test developer API */
100:     MatProductCreate(A,B,NULL,&C);
101:     MatSetOptionsPrefix(C,"AB_");
102:     MatProductSetType(C,MATPRODUCT_AB);
103:     MatProductSetAlgorithm(C,MATPRODUCTALGORITHM_DEFAULT);
104:     MatProductSetFill(C,PETSC_DEFAULT);
105:     MatProductSetFromOptions(C);
106:     /* we can inquire about MATOP_PRODUCTSYMBOLIC even if the destination matrix type has not been set yet */
107:     MatHasOperation(C,MATOP_PRODUCTSYMBOLIC,&flg);
108:     MatProductSymbolic(C);
109:     MatProductNumeric(C);
110:     MatMatMultEqual(A,B,C,mcheck,&flg);
111:     if (!flg) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_PLIB,"Error in C=A*B");

113:     /* Test reuse symbolic C */
114:     alpha = 0.9;
115:     MatScale(A,alpha);
116:     MatProductNumeric(C);

118:     MatMatMultEqual(A,B,C,mcheck,&flg);
119:     if (!flg) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_PLIB,"Error in C=A*B");
120:     MatDestroy(&C);

122:     /* (1.2) Test user driver */
123:     MatMatMult(A,B,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&C);

125:     /* Test MAT_REUSE_MATRIX - reuse symbolic C */
126:     alpha = 1.0;
127:     for (i=0; i<2; i++) {
128:       alpha -= 0.1;
129:       MatScale(A,alpha);
130:       MatMatMult(A,B,MAT_REUSE_MATRIX,PETSC_DEFAULT,&C);
131:     }
132:     MatMatMultEqual(A,B,C,mcheck,&flg);
133:     if (!flg) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_PLIB,"Error: MatMatMult()");
134:     MatDestroy(&A);

136:     /* Test MatProductClear() */
137:     MatProductClear(C);
138:     MatDestroy(&C);

140:     /* Test MatMatMult() for dense and aij matrices */
141:     PetscObjectTypeCompareAny((PetscObject)A,&flg,MATSEQAIJ,MATMPIAIJ,"");
142:     if (flg) {
143:       MatConvert(A_save,MATDENSE,MAT_INITIAL_MATRIX,&A);
144:       MatMatMult(A,B,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&C);
145:       MatDestroy(&C);
146:       MatDestroy(&A);
147:     }
148:   }

150:   /* Create P and R = P^T  */
151:   /* --------------------- */
152:   MatGetSize(B,&PM,NULL);
153:   if (PN < 0) PN = PM/2;
154:   MatCreate(PETSC_COMM_WORLD,&P);
155:   MatSetSizes(P,PETSC_DECIDE,PETSC_DECIDE,PM,PN);
156:   MatSetType(P,MATAIJ);
157:   MatSeqAIJSetPreallocation(P,nzp,NULL);
158:   MatMPIAIJSetPreallocation(P,nzp,NULL,nzp,NULL);
159:   MatGetOwnershipRange(P,&rstart,&rend);
160:   for (i=0; i<nzp; i++) {
161:     PetscRandomGetValue(rdm,&a[i]);
162:   }
163:   for (i=rstart; i<rend; i++) {
164:     for (j=0; j<nzp; j++) {
165:       PetscRandomGetValue(rdm,&rval);
166:       idxn[j] = (PetscInt)(PetscRealPart(rval)*PN);
167:     }
168:     MatSetValues(P,1,&i,nzp,idxn,a,ADD_VALUES);
169:   }
170:   MatAssemblyBegin(P,MAT_FINAL_ASSEMBLY);
171:   MatAssemblyEnd(P,MAT_FINAL_ASSEMBLY);

173:   MatTranspose(P,MAT_INITIAL_MATRIX,&R);
174:   MatConvert(P,mattype,MAT_INPLACE_MATRIX,&P);
175:   MatConvert(R,mattype,MAT_INPLACE_MATRIX,&R);
176:   MatSetFromOptions(P);
177:   MatSetFromOptions(R);

179:   /* 2) MatTransposeMatMult() */
180:   /* ------------------------ */
181:   if (Test_MatTrMat) {
182:     /* (2.1) Test developer driver C = P^T*B */
183:     MatProductCreate(P,B,NULL,&C);
184:     MatSetOptionsPrefix(C,"AtB_");
185:     MatProductSetType(C,MATPRODUCT_AtB);
186:     MatProductSetAlgorithm(C,MATPRODUCTALGORITHM_DEFAULT);
187:     MatProductSetFill(C,PETSC_DEFAULT);
188:     MatProductSetFromOptions(C);
189:     MatHasOperation(C,MATOP_PRODUCTSYMBOLIC,&flg);
190:     if (flg) { /* run tests if supported */
191:       MatProductSymbolic(C); /* equivalent to MatSetUp() */
192:       MatSetOption(C,MAT_USE_INODES,PETSC_FALSE); /* illustrate how to call MatSetOption() */
193:       MatProductNumeric(C);
194:       MatProductNumeric(C); /* test reuse symbolic C */

196:       MatTransposeMatMultEqual(P,B,C,mcheck,&flg);
197:       if (!flg) SETERRQ(PETSC_COMM_WORLD,PETSC_ERR_PLIB,"Error: developer driver C = P^T*B");
198:       MatDestroy(&C);

200:       /* (2.2) Test user driver C = P^T*B */
201:       MatTransposeMatMult(P,B,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&C);
202:       MatTransposeMatMult(P,B,MAT_REUSE_MATRIX,PETSC_DEFAULT,&C);
203:       MatGetInfo(C,MAT_GLOBAL_SUM,&info);
204:       MatProductClear(C);

206:       /* Compare P^T*B and R*B */
207:       MatMatMult(R,B,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&C1);
208:       MatNormDifference(C,C1,&norm);
209:       if (norm > PETSC_SMALL) SETERRQ1(PETSC_COMM_WORLD,PETSC_ERR_PLIB,"Error in MatTransposeMatMult(): %g",(double)norm);
210:       MatDestroy(&C1);

212:       /* Test MatDuplicate() of C=P^T*B */
213:       MatDuplicate(C,MAT_COPY_VALUES,&C1);
214:       MatDestroy(&C1);
215:     } else {
216:       PetscPrintf(PETSC_COMM_WORLD,"MatTransposeMatMult not supported\n");
217:     }
218:     MatDestroy(&C);
219:   }

221:   /* 3) MatMatTransposeMult() */
222:   /* ------------------------ */
223:   if (Test_MatMatTr) {
224:     /* C = B*R^T */
225:     PetscObjectBaseTypeCompare((PetscObject)B,MATSEQAIJ,&seqaij);
226:     if (seqaij) {
227:       MatMatTransposeMult(B,R,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&C);
228:       MatSetOptionsPrefix(C,"ABt_"); /* enable '-ABt_' for matrix C */
229:       MatGetInfo(C,MAT_GLOBAL_SUM,&info);

231:       /* Test MAT_REUSE_MATRIX - reuse symbolic C */
232:       MatMatTransposeMult(B,R,MAT_REUSE_MATRIX,PETSC_DEFAULT,&C);

234:       /* Check */
235:       MatMatMult(B,P,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&C1);
236:       MatNormDifference(C,C1,&norm);
237:       if (norm > PETSC_SMALL) SETERRQ1(PETSC_COMM_WORLD,PETSC_ERR_PLIB,"Error in MatMatTransposeMult() %g",(double)norm);
238:       MatDestroy(&C1);
239:       MatDestroy(&C);
240:     }
241:   }

243:   /* 4) Test MatPtAP() */
244:   /*-------------------*/
245:   if (Test_MatPtAP) {
246:     MatDuplicate(A_save,MAT_COPY_VALUES,&A);

248:     /* (4.1) Test developer API */
249:     MatProductCreate(A,P,NULL,&C);
250:     MatSetOptionsPrefix(C,"PtAP_");
251:     MatProductSetType(C,MATPRODUCT_PtAP);
252:     MatProductSetAlgorithm(C,MATPRODUCTALGORITHM_DEFAULT);
253:     MatProductSetFill(C,PETSC_DEFAULT);
254:     MatProductSetFromOptions(C);
255:     MatProductSymbolic(C);
256:     MatProductNumeric(C);
257:     MatPtAPMultEqual(A,P,C,mcheck,&flg);
258:     if (!flg) SETERRQ(PETSC_COMM_WORLD,PETSC_ERR_PLIB,"Error in MatProduct_PtAP");
259:     MatProductNumeric(C); /* reuse symbolic C */

261:     MatPtAPMultEqual(A,P,C,mcheck,&flg);
262:     if (!flg) SETERRQ(PETSC_COMM_WORLD,PETSC_ERR_PLIB,"Error in MatProduct_PtAP");
263:     MatDestroy(&C);

265:     /* (4.2) Test user driver */
266:     MatPtAP(A,P,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&C);

268:     /* Test MAT_REUSE_MATRIX - reuse symbolic C */
269:     alpha = 1.0;
270:     for (i=0; i<2; i++) {
271:       alpha -= 0.1;
272:       MatScale(A,alpha);
273:       MatPtAP(A,P,MAT_REUSE_MATRIX,PETSC_DEFAULT,&C);
274:     }
275:     MatPtAPMultEqual(A,P,C,mcheck,&flg);
276:     if (!flg) SETERRQ(PETSC_COMM_WORLD,PETSC_ERR_PLIB,"Error in MatPtAP");

278:     /* 5) Test MatRARt() */
279:     /* ----------------- */
280:     if (Test_MatRARt) {
281:       Mat RARt;

283:       /* (5.1) Test developer driver RARt = R*A*Rt */
284:       MatProductCreate(A,R,NULL,&RARt);
285:       MatSetOptionsPrefix(RARt,"RARt_");
286:       MatProductSetType(RARt,MATPRODUCT_RARt);
287:       MatProductSetAlgorithm(RARt,MATPRODUCTALGORITHM_DEFAULT);
288:       MatProductSetFill(RARt,PETSC_DEFAULT);
289:       MatProductSetFromOptions(RARt);
290:       MatHasOperation(RARt,MATOP_PRODUCTSYMBOLIC,&flg);
291:       if (flg) {
292:         MatProductSymbolic(RARt); /* equivalent to MatSetUp() */
293:         MatSetOption(RARt,MAT_USE_INODES,PETSC_FALSE); /* illustrate how to call MatSetOption() */
294:         MatProductNumeric(RARt);
295:         MatProductNumeric(RARt); /* test reuse symbolic RARt */
296:         MatDestroy(&RARt);

298:         /* (2.2) Test user driver RARt = R*A*Rt */
299:         MatRARt(A,R,MAT_INITIAL_MATRIX,2.0,&RARt);
300:         MatRARt(A,R,MAT_REUSE_MATRIX,2.0,&RARt);

302:         MatNormDifference(C,RARt,&norm);
303:         if (norm > PETSC_SMALL) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_PLIB,"|PtAP - RARt| = %g",(double)norm);
304:       } else {
305:         PetscPrintf(PETSC_COMM_WORLD,"MatRARt not supported\n");
306:       }
307:       MatDestroy(&RARt);
308:     }

310:     MatDestroy(&A);
311:     MatDestroy(&C);
312:   }

314:   /* Destroy objects */
315:   PetscRandomDestroy(&rdm);
316:   PetscFree(idxn);

318:   MatDestroy(&A_save);
319:   MatDestroy(&B);
320:   MatDestroy(&P);
321:   MatDestroy(&R);

323:   PetscFinalize();
324:   return ierr;
325: }

327: /*TEST
328:    test:
329:      suffix: 1
330:      requires: datafilespath !complex double !defined(PETSC_USE_64BIT_INDICES)
331:      args: -fA ${DATAFILESPATH}/matrices/medium -fB ${DATAFILESPATH}/matrices/medium
332:      output_file: output/ex62_1.out

334:    test:
335:      suffix: 2_ab_scalable
336:      requires: datafilespath !complex double !defined(PETSC_USE_64BIT_INDICES)
337:      args: -fA ${DATAFILESPATH}/matrices/medium -fB ${DATAFILESPATH}/matrices/medium -AB_matproduct_ab_via scalable -matmatmult_via scalable -AtB_matproduct_atb_via outerproduct -mattransposematmult_via outerproduct
338:      output_file: output/ex62_1.out

340:    test:
341:      suffix: 3_ab_scalable_fast
342:      requires: datafilespath !complex double !defined(PETSC_USE_64BIT_INDICES)
343:      args: -fA ${DATAFILESPATH}/matrices/medium -fB ${DATAFILESPATH}/matrices/medium -AB_matproduct_ab_via scalable_fast -matmatmult_via scalable_fast -matmattransmult_via color
344:      output_file: output/ex62_1.out

346:    test:
347:      suffix: 4_ab_heap
348:      requires: datafilespath !complex double !defined(PETSC_USE_64BIT_INDICES)
349:      args: -fA ${DATAFILESPATH}/matrices/medium -fB ${DATAFILESPATH}/matrices/medium -AB_matproduct_ab_via heap -matmatmult_via heap -PtAP_matproduct_ptap_via rap -matptap_via rap
350:      output_file: output/ex62_1.out

352:    test:
353:      suffix: 5_ab_btheap
354:      requires: datafilespath !complex double !defined(PETSC_USE_64BIT_INDICES)
355:      args: -fA ${DATAFILESPATH}/matrices/medium -fB ${DATAFILESPATH}/matrices/medium -AB_matproduct_ab_via btheap -matmatmult_via btheap -matrart_via r*art
356:      output_file: output/ex62_1.out

358:    test:
359:      suffix: 6_ab_llcondensed
360:      requires: datafilespath !complex double !defined(PETSC_USE_64BIT_INDICES)
361:      args: -fA ${DATAFILESPATH}/matrices/medium -fB ${DATAFILESPATH}/matrices/medium -AB_matproduct_ab_via llcondensed -matmatmult_via llcondensed -matrart_via coloring_rart
362:      output_file: output/ex62_1.out

364:    test:
365:      suffix: 7_ab_rowmerge
366:      requires: datafilespath !complex double !defined(PETSC_USE_64BIT_INDICES)
367:      args: -fA ${DATAFILESPATH}/matrices/medium -fB ${DATAFILESPATH}/matrices/medium -AB_matproduct_ab_via rowmerge -matmatmult_via rowmerge
368:      output_file: output/ex62_1.out

370:    test:
371:      suffix: 8_ab_hypre
372:      requires: hypre datafilespath !complex double !defined(PETSC_USE_64BIT_INDICES)
373:      args: -fA ${DATAFILESPATH}/matrices/medium -fB ${DATAFILESPATH}/matrices/medium -AB_matproduct_ab_via hypre -matmatmult_via hypre -PtAP_matproduct_ptap_via hypre -matptap_via hypre
374:      output_file: output/ex62_1.out

376:    test:
377:      suffix: hypre_medium
378:      nsize: {{1 3}}
379:      requires: hypre datafilespath !complex double !defined(PETSC_USE_64BIT_INDICES)
380:      args: -fA ${DATAFILESPATH}/matrices/medium -fB ${DATAFILESPATH}/matrices/medium -A_mat_type hypre -B_mat_type hypre -test_rart 0
381:      output_file: output/ex62_hypre.out

383:    test:
384:      suffix: hypre_tiny
385:      nsize: {{1 3}}
386:      requires: hypre !complex double !defined(PETSC_USE_64BIT_INDICES)
387:      args: -fA ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system -fB ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system -A_mat_type hypre -B_mat_type hypre -test_rart 0
388:      output_file: output/ex62_hypre.out

390:    test:
391:      suffix: 9_mkl
392:      TODO: broken MatScale?
393:      requires: mkl datafilespath !complex double !defined(PETSC_USE_64BIT_INDICES)
394:      args: -fA ${DATAFILESPATH}/matrices/medium -fB ${DATAFILESPATH}/matrices/medium -A_mat_type aijmkl -B_mat_type aijmkl
395:      output_file: output/ex62_1.out

397:    test:
398:      suffix: 10
399:      requires: datafilespath !complex double !defined(PETSC_USE_64BIT_INDICES)
400:      nsize: 3
401:      args: -fA ${DATAFILESPATH}/matrices/medium -fB ${DATAFILESPATH}/matrices/medium
402:      output_file: output/ex62_1.out

404:    test:
405:      suffix: 10_backend
406:      requires: datafilespath !complex double !defined(PETSC_USE_64BIT_INDICES)
407:      nsize: 3
408:      args: -fA ${DATAFILESPATH}/matrices/medium -AB_matproduct_ab_via backend -matmatmult_via backend -AtB_matproduct_atb_via backend -mattransposematmult_via backend -PtAP_matproduct_ptap_via backend -matptap_via backend
409:      output_file: output/ex62_1.out

411:    test:
412:      suffix: 11_ab_scalable
413:      requires: datafilespath !complex double !defined(PETSC_USE_64BIT_INDICES)
414:      nsize: 3
415:      args: -fA ${DATAFILESPATH}/matrices/medium -fB ${DATAFILESPATH}/matrices/medium -AB_matproduct_ab_via scalable -matmatmult_via scalable -AtB_matproduct_atb_via scalable -mattransposematmult_via scalable
416:      output_file: output/ex62_1.out

418:    test:
419:      suffix: 12_ab_seqmpi
420:      requires: datafilespath !complex double !defined(PETSC_USE_64BIT_INDICES)
421:      nsize: 3
422:      args: -fA ${DATAFILESPATH}/matrices/medium -fB ${DATAFILESPATH}/matrices/medium -AB_matproduct_ab_via seqmpi -matmatmult_via seqmpi -AtB_matproduct_atb_via at*b -mattransposematmult_via at*b
423:      output_file: output/ex62_1.out

425:    test:
426:      suffix: 13_ab_hypre
427:      requires: hypre datafilespath !complex double !defined(PETSC_USE_64BIT_INDICES)
428:      nsize: 3
429:      args: -fA ${DATAFILESPATH}/matrices/medium -fB ${DATAFILESPATH}/matrices/medium -AB_matproduct_ab_via hypre -matmatmult_via hypre -PtAP_matproduct_ptap_via hypre -matptap_via hypre
430:      output_file: output/ex62_1.out

432:    test:
433:      suffix: 14_seqaij
434:      requires: !complex double !defined(PETSC_USE_64BIT_INDICES)
435:      args: -fA ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system -fB ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system
436:      output_file: output/ex62_1.out

438:    test:
439:      suffix: 14_seqaijcusparse
440:      requires: cuda !complex double !defined(PETSC_USE_64BIT_INDICES)
441:      args: -A_mat_type aijcusparse -B_mat_type aijcusparse -mat_form_explicit_transpose -fA ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system -fB ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system
442:      output_file: output/ex62_1.out

444:    test:
445:      suffix: 14_seqaijcusparse_cpu
446:      requires: cuda !complex double !defined(PETSC_USE_64BIT_INDICES)
447:      args: -A_mat_type aijcusparse -B_mat_type aijcusparse -mat_form_explicit_transpose -fA ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system -fB ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system -AB_matproduct_ab_backend_cpu -matmatmult_backend_cpu -PtAP_matproduct_ptap_backend_cpu -matptap_backend_cpu -RARt_matproduct_rart_backend_cpu -matrart_backend_cpu
448:      output_file: output/ex62_1.out

450:    test:
451:      suffix: 14_mpiaijcusparse_seq
452:      nsize: 1
453:      requires: cuda !complex double !defined(PETSC_USE_64BIT_INDICES)
454:      args: -A_mat_type mpiaijcusparse -B_mat_type mpiaijcusparse -mat_form_explicit_transpose -fA ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system -fB ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system
455:      output_file: output/ex62_1.out

457:    test:
458:      suffix: 14_mpiaijcusparse_seq_cpu
459:      nsize: 1
460:      requires: cuda !complex double !defined(PETSC_USE_64BIT_INDICES)
461:      args: -A_mat_type mpiaijcusparse -B_mat_type mpiaijcusparse -mat_form_explicit_transpose -fA ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system -fB ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system -AB_matproduct_ab_backend_cpu -matmatmult_backend_cpu -PtAP_matproduct_ptap_backend_cpu -matptap_backend_cpu
462:      output_file: output/ex62_1.out

464:    test:
465:      suffix: 14_mpiaijcusparse
466:      nsize: 3
467:      requires: cuda !complex double !defined(PETSC_USE_64BIT_INDICES)
468:      args: -A_mat_type mpiaijcusparse -B_mat_type mpiaijcusparse -mat_form_explicit_transpose -fA ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system -fB ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system
469:      output_file: output/ex62_1.out

471:    test:
472:      suffix: 14_mpiaijcusparse_cpu
473:      nsize: 3
474:      requires: cuda !complex double !defined(PETSC_USE_64BIT_INDICES)
475:      args: -A_mat_type mpiaijcusparse -B_mat_type mpiaijcusparse -mat_form_explicit_transpose -fA ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system -fB ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system -AB_matproduct_ab_backend_cpu -matmatmult_backend_cpu -PtAP_matproduct_ptap_backend_cpu -matptap_backend_cpu
476:      output_file: output/ex62_1.out

478:    test:
479:      suffix: 14_seqaijkokkos
480:      requires: kokkos_kernels !complex double !defined(PETSC_USE_64BIT_INDICES)
481:      args: -A_mat_type aijkokkos -B_mat_type aijkokkos -fA ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system -fB ${wPETSC_DIR}/share/petsc/datafiles/matrices/tiny_system
482:      output_file: output/ex62_1.out

484:    # these tests use matrices with many zero rows
485:    test:
486:      suffix: 15_seqaijcusparse
487:      requires: cuda !complex double !defined(PETSC_USE_64BIT_INDICES) datafilespath
488:      args: -A_mat_type aijcusparse -mat_form_explicit_transpose -fA ${DATAFILESPATH}/matrices/matmatmult/A4.BGriffith
489:      output_file: output/ex62_1.out

491:    test:
492:      suffix: 15_mpiaijcusparse_seq
493:      nsize: 1
494:      requires: cuda !complex double !defined(PETSC_USE_64BIT_INDICES) datafilespath
495:      args: -A_mat_type mpiaijcusparse -mat_form_explicit_transpose -fA ${DATAFILESPATH}/matrices/matmatmult/A4.BGriffith
496:      output_file: output/ex62_1.out

498:    test:
499:      nsize: 3
500:      suffix: 15_mpiaijcusparse
501:      requires: cuda !complex double !defined(PETSC_USE_64BIT_INDICES) datafilespath
502:      args: -A_mat_type mpiaijcusparse -mat_form_explicit_transpose -fA ${DATAFILESPATH}/matrices/matmatmult/A4.BGriffith
503:      output_file: output/ex62_1.out

505: TEST*/