Date: 2022-10-01T06:39:41+00:00

Actual source code: ex33.c
slepc-3.18.0 2022-10-01
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[] = "Demonstrates SlepcGetVersionNumber().\n\n";

     13: #include <slepcsys.h>

     15: int main(int argc,char **argv)
     16: {
     17:   char           version[128];
     18:   PetscInt       major,minor,subminor;
     19:   PetscBool      verbose;

     22:   SlepcInitialize(&argc,&argv,(char*)0,help);
     23:   PetscPrintf(PETSC_COMM_WORLD,"Checking SLEPc version.\n");

     25:   SlepcGetVersion(version,sizeof(version));
     26:   PetscOptionsHasName(NULL,NULL,"-verbose",&verbose);
     27:   if (verbose) PetscPrintf(PETSC_COMM_WORLD,"Version information:\n%s\n",version);

     29:   SlepcGetVersionNumber(&major,&minor,&subminor,NULL);

     34:   SlepcFinalize();
     35:   return 0;
     36: }

     38: /*TEST

     40:    test:
     41:       suffix: 1

     43: TEST*/