[petsc-users] Save matrix view to postscript?

Barry Smith bsmith at mcs.anl.gov
Wed Aug 1 12:53:44 CDT 2012


  Switching discussion to petsc-maint at mcs.anl.gov so we can track down the problem.

  Does this error come up even without -draw_save and -draw_save_movie options?

  If yes then please create a new PETSC_ARCH with the exact same ./configure options but NO --with-afterimage.   Does this PETSC_ARCH correctly draw X windows without the error?

   Barry



On Aug 1, 2012, at 12:07 PM, Ronald M. Caplan <caplanr at predsci.com> wrote:

> After configuring with --with-afterimage I now cannot even get eh x-windows to show the matrix at all.  I get the following error:
> 
> X Error of failed request:  BadValue (integer parameter out of range for operation)
>   Major opcode of failed request:  1 (X_CreateWindow)
>   Value in failed request:  0xae
>   Serial number of failed request:  7
>   Current serial number in output stream:  14
> 
>  - Ron
> 
> 
> 
> On Tue, Jul 31, 2012 at 4:20 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> On Tue, Jul 31, 2012 at 4:13 PM, Ronald M. Caplan <caplanr at predsci.com> wrote:
> Thanks!
> 
> I can't seem to get it to work though.  
> When I configure --with-afterimage it says that I need to download it.  When I use --download-afterimage it says:
> "External package afterimage does not support --download-afterimage"
> 
> I am using a MAC with OS X.   Where can I download afterimage?
> 
> http://www.afterstep.org/afterimage/
>  
> 
> Also, in general, if I want to add a configure to petsc with ./configure, do I have to run ./configure with ALL my options, or just with the new ones I want to add/change?  Will it save my previous configure?
> 
> Run $PETSC_ARCH/conf/reconfigure-*.py --new-options
>  
> 
>  Thanks again for your rapid responses!
> 
>  - Ron C
> 
> 
> On Tue, Jul 31, 2012 at 3:23 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 
>   Sorry the postscript never really worked and then the world went PDF.
> 
>   You can do what you want in PETSc 3.3 with
> 
>     ierr = PetscOptionsBool("-draw_save_movie","Make a movie from the images saved","PetscDrawSetSave",movie,&movie,PETSC_NULL);CHKERRQ(ierr);
>     ierr = PetscOptionsString("-draw_save","Save graphics to file","PetscDrawSetSave",filename,filename,PETSC_MAX_PATH_LEN,&save);CHKERRQ(ierr);
> 
> /*@C
>    PetscDrawSave - Saves images produced in a PetscDraw into a file as a Gif file using AfterImage
> 
>    Collective on PetscDraw
> 
>    Input Parameter:
> +  draw      - the graphics context
> .  filename  - name of the file, if PETSC_NULL uses name of draw object
> -  movie - produce a movie of all the images
> 
>    Options Database Command:
> +  -draw_save  <filename>
> -  -draw_save_movie
> 
>    Level: intermediate
> 
>    Concepts: X windows^graphics
>    Concepts: drawing^postscript
>    Concepts: postscript^graphics
>    Concepts: drawing^Microsoft Windows
> 
>    Notes: Requires that PETSc be configured with the option --with-afterimage
> 
> 
> .seealso: PetscDrawSetFromOptions(), PetscDrawCreate(), PetscDrawDestroy(), PetscDrawSave()
> 
>   Please report any problems to petsc-maint at mcs.anl.gov
> 
>   Note that you must make sure the windows being saved are not covered by other windows.
> 
>    Barry
> 
> 
> On Jul 31, 2012, at 3:17 PM, "Ronald M. Caplan" <caplanr at predsci.com> wrote:
> 
> > Hi,
> >
> > I saw online that back in 2006 there was a way to tell PETSc to save the image in -mat_view_draw into a postscript file.  Is there anyway to still do this?  Or to same the image into any format?  Or to save a movie of the residual images in ksp?
> >
> > Thanks,
> >
> > Ron C.
> 
> 
> 
> 



More information about the petsc-users mailing list