<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 3, 2015, at 5:01 AM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov" class="">bsmith@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class=""><blockquote type="cite" class="">On Dec 3, 2015, at 5:54 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:<br class=""><br class="">On Thu, Dec 3, 2015 at 2:06 AM, Sean Dettrick <<a href="mailto:sdettrick@trialphaenergy.com" class="">sdettrick@trialphaenergy.com</a>> wrote:<br class=""><br class="">No, it is my fault, when I was unable to download from <a href="http://afterstep.org" class="">afterstep.org</a> earlier I didn’t realize that it was probably my work firewall blocking me.  Thus sending me on a wild goose chase with macports and home-brew and github version, which didn’t compile.<br class=""><br class="">But now I’ve tried to follow your advice, and have a new problem.<br class=""><br class="">I installed Afterimage from your suggested site, with suggested X lib flags:<br class=""><br class="">   ./configure --x-includes=/opt/X11/include -x-libraries=/opt/X11/lib<br class=""><br class="">Did you check that it worked? Configure can (semi-)silently turn things off.<br class=""></blockquote><br class="">   Yes, I think Matt is right. This is the error message you get if afterimage was installed without X. Check through all the logs and build stuff of afterimage. <br class=""></div></blockquote><div><br class=""></div><div><br class=""></div>Thanks!  The thing finally works.  I had to clean everything and do fresh installs, but now it is fine.</div><div><br class=""></div><div>Summarizing my experience of afterimage on a mac in case anybody else wants to do it:</div><div><br class=""></div><div>Afterimage on the mac is in theory available via macports as part of the afterstep package, but it failed to build on my Mac (Yosemite).  It is not available in home-brew.  The current github version of afterimage failed to build on my mac.  The version from <a href="http://www.afterstep.org/afterimage/getcode.php" class="">http://www.afterstep.org/afterimage/getcode.php</a> DOES work, configured as:</div><div><br class=""></div><div><br class=""></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">./configure --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib --with-x</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">make</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">make install</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">Then petsc is configured as:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><div style="margin: 0px;" class="">./configure --with-afterimage --download-hdf5 --download-mpich </div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">The example src/dm/examples/tutorials/ex5.c then works:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><div style="margin: 0px;" class="">./ex5 -draw_save</div><div style="margin: 0px;" class=""><br class=""></div><div style="margin: 0px;" class=""><br class=""></div><div style="margin: 0px;" class="">Cheers,</div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><div style="margin: 0px;" class=""><div class="">Sean</div><div class=""><br class=""></div><div class=""><br class=""></div></div></div><blockquote type="cite" class=""><div class=""><br class="">  Barry<br class=""><br class=""><blockquote type="cite" class=""><br class="">  Thanks,<br class=""><br class="">    Matt<br class=""><br class="">   make<br class="">   make install<br class=""><br class="">No errors.  Then re-configured and built petsc:<br class=""><br class="">   export PETSC_DIR=/Users/sdettrick/libs/petsc-3.6.1<br class="">   export PETSC_ARCH=mac-gcc-hdf5-mpich-afterimage<br class="">  ./configure --with-afterimage --download-hdf5 --download-mpich --PETSC_ARCH=mac-gcc-hdf5-mpich-afterimage --PETSC_DIR=/Users/sdettrick/libs/petsc-3.6.1 <br class="">   make PETSC_DIR=/Users/sdettrick/libs/petsc-3.6.1 PETSC_ARCH=mac-gcc-hdf5-mpich-afterimage all<br class=""><br class="">No errors.  Then try to run an example with image output:<br class=""><br class="">   cd src/dm/examples/tutorials/<br class="">   make ex5<br class="">   ./ex5<br class="">   ./ex5 -draw_save test.png<br class=""><br class="">The example generates the error you mentioned, which it didn’t before installing afterimage:<br class=""><br class="">X Error of failed request:  BadValue (integer parameter out of range for operation)<br class="">  Major opcode of failed request:  1 (X_CreateWindow)<br class="">  Value in failed request:  0x40<br class="">  Serial number of failed request:  7<br class="">  Current serial number in output stream:  14<br class=""><br class="">Browsing through configure.log, it seems that petsc is using the same X11 library.<br class=""><br class="">Did I miss something?<br class=""><br class="">Thanks!<br class="">Sean<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Dec 2, 2015, at 11:10 PM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov" class="">bsmith@mcs.anl.gov</a>> wrote:<br class=""><br class=""><br class=""> I am such an idiot. No I did build it from source I forgot the comment in afterimage.py <br class=""><br class=""> After image is available from <a href="http://www.afterstep.org/afterimage/getcode.php" class="">http://www.afterstep.org/afterimage/getcode.php</a><br class="">#<br class="">#  It is used by the PetscDrawSetSave() routine to save X windows graphics to files<br class="">#<br class="">#  If installing on an Apple make sure to read the details on PetscDrawSetSave manual<br class="">#  page before installing<br class="">#<br class=""><br class="">from that page I found<br class=""><br class="">If X windows generates an error message about X_CreateWindow() failing then Afterimage was installed without X windows. Reinstall Afterimage using the<br class="">  ./configure flags --x-includes=/pathtoXincludes --x-libraries=/pathtoXlibraries   For example under Mac OS X Mountain Lion --x-includes=/opt/X11/include -x-libraries=/opt/X11/lib<br class=""><br class="">Did you try all this stuff?<br class=""><br class=""> Barry<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Dec 3, 2015, at 1:00 AM, Sean Dettrick <<a href="mailto:sdettrick@trialphaenergy.com" class="">sdettrick@trialphaenergy.com</a>> wrote:<br class=""><br class="">Hi Barry,<br class=""><br class="">Thanks for the amazingly fast reply.  I installed home-brew but then was unable to find afterstep available as a package.  The closest thing I could find was asterm (after step terminal emulator.  Do you remember if you installed it from a canonical repo? <br class=""><br class="">I did find afterstep on github, but had trouble installing it on the mac.<br class=""><br class="">Meanwhile, a colleague has given me a python script, so I’ll probably use that instead for now. <br class=""><br class="">Thanks again,<br class="">Sean<br class=""><br class=""><blockquote type="cite" class="">On Dec 2, 2015, at 1:45 PM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov" class="">bsmith@mcs.anl.gov</a>> wrote:<br class=""><br class=""><br class="">Sean,<br class=""><br class="">I have never been able to build from that source either. <br class=""><br class="">I used homebrew to install it and its worked for several years.<br class=""><br class="">I also tried to see if one could pull the image from the X pixel map and it looked like a huge project (the pixmap stuff is not as trivial as one would think it would be) so I gave up on that and started using afterimage (which essentially does all the for you).<br class=""><br class="">Barry<br class=""><br class=""><blockquote type="cite" class="">On Dec 2, 2015, at 3:39 PM, Sean Dettrick <<a href="mailto:sdettrick@trialphaenergy.com" class="">sdettrick@trialphaenergy.com</a>> wrote:<br class=""><br class="">Hi,<br class=""><br class="">I’d like to have petsc draw output to a pixmap, but have been unable to install afterstep on my Mac.  Direct download of the tar files from <a href="http://www.afterstep.org/afterimage/getcode.php" class="">http://www.afterstep.org/afterimage/getcode.php</a> failed, as did cvs checkout.  It seems the target sites may not exist at present.<br class=""><br class="">Is there another way to install afterstep?<br class=""><br class="">Alternatively, is there a way to manually redirect the X11 output using something like XCreatePixmap?<br class=""><br class="">Thanks!<br class="">Sean Dettrick<br class=""></blockquote><br class=""></blockquote><br class=""></blockquote><br class=""></blockquote><br class=""><br class=""><br class=""><br class="">-- <br class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener<br class=""></blockquote><br class=""></div></blockquote></div><br class=""></body></html>