1c4762a1bSJed Brown 2c4762a1bSJed Brown static char help[] = "Illustrates creating an options database.\n\n"; 3c4762a1bSJed Brown 4c4762a1bSJed Brown /*T 5c4762a1bSJed Brown Concepts: introduction to PETSc; 6c4762a1bSJed Brown Concepts: printing^in parallel 7c4762a1bSJed Brown Processors: n 8c4762a1bSJed Brown T*/ 9c4762a1bSJed Brown 10c4762a1bSJed Brown #include <petscsys.h> 11c4762a1bSJed Brown #include <petscviewer.h> 12c4762a1bSJed Brown int main(int argc,char **argv) 13c4762a1bSJed Brown { 14c4762a1bSJed Brown PetscOptions options; 15c4762a1bSJed Brown 16*b122ec5aSJacob Faibussowitsch CHKERRQ(PetscInitialize(&argc,&argv,(char*)0,help)); 17c4762a1bSJed Brown CHKERRQ(PetscOptionsCreate(&options)); 18c4762a1bSJed Brown CHKERRQ(PetscOptionsInsert(options,&argc,&argv,"optionsfile")); 19c4762a1bSJed Brown CHKERRQ(PetscOptionsInsertString(options,"-option1 value1 -option2 -option3 value3")); 20c4762a1bSJed Brown CHKERRQ(PetscOptionsView(options,PETSC_VIEWER_STDOUT_WORLD)); 21c4762a1bSJed Brown CHKERRQ(PetscOptionsDestroy(&options)); 22*b122ec5aSJacob Faibussowitsch CHKERRQ(PetscFinalize()); 23*b122ec5aSJacob Faibussowitsch return 0; 24c4762a1bSJed Brown } 25c4762a1bSJed Brown 26c4762a1bSJed Brown /*TEST 27c4762a1bSJed Brown 28c4762a1bSJed Brown test: 29c4762a1bSJed Brown localrunfiles: optionsfile 30362febeeSStefano Zampini filter: egrep -v "(malloc|nox|display|saws_port|vecscatter|options_left|check_pointer_intensity|cuda_initialize|error_output_stdout|use_gpu_aware_mpi|checkstack)" 31c4762a1bSJed Brown 32c4762a1bSJed Brown TEST*/ 33