I am getting strange behavior with PetscOptionsTail.  I have this code: 

 /* instantiate derived type */
  ierr = PetscOptionsHead("GAMG options"); CHKERRQ(ierr);
  {
    char tname[256] = GAMGAGG;
    ierr = PetscOptionsList("-pc_gamg_type","Type of GAMG 
method","PCGAMGSetType",
                            GAMGList, tname, tname, sizeof(tname), PETSC_NULL );
    CHKERRQ(ierr);
    ierr = PCGAMGSetType( pc, tname ); CHKERRQ(ierr);
  }
PetscPrintf(wcomm,"******* [%d]%s 5555\n",0,__FUNCT__);
  ierr = PetscOptionsTail();   CHKERRQ(ierr);
PetscPrintf(wcomm,"******* [%d]%s 6666\n",0,__FUNCT__);

and this last line does not get executed.  It is as if CHKERRQ is silently 
returning.  I see the usage in KSPSetFromOptions_GMRES has this code 
(PetscOptionsTail) at the very end and so this behavior  would not be noticed.

Mark

Reply via email to