Date: 2022-08-09T09:05:32+00:00

Actual source code: test3.c
slepc-3.17.2 2022-08-09
Report Typos and Errors

      1: /*
      2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
      4:    Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain

      6:    This file is part of SLEPc.
      7:    SLEPc is distributed under a 2-clause BSD license (see LICENSE).
      8:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      9: */

     11: static char help[] = "Tests SlepcHasExternalPackage().\n\n";

     13: #include <slepcsys.h>

     15: int main(int argc,char **argv)
     16: {
     17:   char           pkg[128] = "arpack";
     18:   PetscBool      has,flg;

     20:   SlepcInitialize(&argc,&argv,(char*)0,help);
     21:   PetscOptionsGetString(NULL,NULL,"-pkg",pkg,sizeof(pkg),NULL);
     22:   SlepcHasExternalPackage(pkg,&has);
     23:   PetscPrintf(PETSC_COMM_WORLD, "SLEPc has %s? %s\n",pkg,PetscBools[has]);
     24:   PetscStrcmp(pkg,"arpack",&flg);
     25: #if defined(SLEPC_HAVE_ARPACK)
     27: #else
     29: #endif
     30:   PetscStrcmp(pkg,"primme",&flg);
     31: #if defined(SLEPC_HAVE_PRIMME)
     33: #else
     35: #endif
     36:   SlepcFinalize();
     37:   return 0;
     38: }

     40: /*TEST

     42:    test:
     43:       suffix: arpack
     44:       args: -pkg arpack
     45:       requires: arpack
     46:    test:
     47:       suffix: no-arpack
     48:       args: -pkg arpack
     49:       requires: !arpack
     50:    test:
     51:       suffix: primme
     52:       args: -pkg primme
     53:       requires: primme
     54:    test:
     55:       suffix: no-primme
     56:       args: -pkg primme
     57:       requires: !primme

     59: TEST*/