Re: [petsc-users] Petsc Draw to pixmap

2015-12-03 Thread Matthew Knepley
On Thu, Dec 3, 2015 at 2:06 AM, Sean Dettrick 
wrote:

>
> No, it is my fault, when I was unable to download from afterstep.org
> 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.
>
> But now I’ve tried to follow your advice, and have a new problem.
>
> I installed Afterimage from your suggested site, with suggested X lib
> flags:
>
>./configure --x-includes=/opt/X11/include -x-libraries=/opt/X11/lib
>

Did you check that it worked? Configure can (semi-)silently turn things off.

  Thanks,

Matt


>make
>make install
>
> No errors.  Then re-configured and built petsc:
>
>export PETSC_DIR=/Users/sdettrick/libs/petsc-3.6.1
>export PETSC_ARCH=mac-gcc-hdf5-mpich-afterimage
>   ./configure --with-afterimage --download-hdf5 --download-mpich
> --PETSC_ARCH=mac-gcc-hdf5-mpich-afterimage
> --PETSC_DIR=/Users/sdettrick/libs/petsc-3.6.1
>make PETSC_DIR=/Users/sdettrick/libs/petsc-3.6.1
> PETSC_ARCH=mac-gcc-hdf5-mpich-afterimage all
>
> No errors.  Then try to run an example with image output:
>
>cd src/dm/examples/tutorials/
>make ex5
>./ex5
>./ex5 -draw_save test.png
>
> The example generates the error you mentioned, which it didn’t before
> installing afterimage:
>
> 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:  0x40
>   Serial number of failed request:  7
>   Current serial number in output stream:  14
>
> Browsing through configure.log, it seems that petsc is using the same X11
> library.
>
> Did I miss something?
>
> Thanks!
> Sean
>
>
> On Dec 2, 2015, at 11:10 PM, Barry Smith  wrote:
>
>
>  I am such an idiot. No I did build it from source I forgot the comment in
> afterimage.py
>
>  After image is available from
> http://www.afterstep.org/afterimage/getcode.php
> #
> #  It is used by the PetscDrawSetSave() routine to save X windows graphics
> to files
> #
> #  If installing on an Apple make sure to read the details on
> PetscDrawSetSave manual
> #  page before installing
> #
>
> from that page I found
>
> If X windows generates an error message about X_CreateWindow() failing
> then Afterimage was installed without X windows. Reinstall Afterimage using
> the
>   ./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
>
> Did you try all this stuff?
>
>  Barry
>
>
> On Dec 3, 2015, at 1:00 AM, Sean Dettrick 
> wrote:
>
> Hi Barry,
>
> 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?
>
> I did find afterstep on github, but had trouble installing it on the mac.
>
> Meanwhile, a colleague has given me a python script, so I’ll probably use
> that instead for now.
>
> Thanks again,
> Sean
>
> On Dec 2, 2015, at 1:45 PM, Barry Smith  wrote:
>
>
> Sean,
>
> I have never been able to build from that source either.
>
> I used homebrew to install it and its worked for several years.
>
> 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).
>
> Barry
>
> On Dec 2, 2015, at 3:39 PM, Sean Dettrick 
> wrote:
>
> Hi,
>
> 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
> http://www.afterstep.org/afterimage/getcode.php failed, as did cvs
> checkout.  It seems the target sites may not exist at present.
>
> Is there another way to install afterstep?
>
> Alternatively, is there a way to manually redirect the X11 output using
> something like XCreatePixmap?
>
> Thanks!
> Sean Dettrick
>
>
>
>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener


Re: [petsc-users] Petsc Draw to pixmap

2015-12-03 Thread Sean Dettrick

No, it is my fault, when I was unable to download from 
afterstep.org 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.

But now I’ve tried to follow your advice, and have a new problem.

I installed Afterimage from your suggested site, with suggested X lib flags:

   ./configure --x-includes=/opt/X11/include -x-libraries=/opt/X11/lib
   make
   make install

No errors.  Then re-configured and built petsc:

   export PETSC_DIR=/Users/sdettrick/libs/petsc-3.6.1
   export PETSC_ARCH=mac-gcc-hdf5-mpich-afterimage
  ./configure --with-afterimage --download-hdf5 --download-mpich 
--PETSC_ARCH=mac-gcc-hdf5-mpich-afterimage 
--PETSC_DIR=/Users/sdettrick/libs/petsc-3.6.1
   make PETSC_DIR=/Users/sdettrick/libs/petsc-3.6.1 
PETSC_ARCH=mac-gcc-hdf5-mpich-afterimage all

No errors.  Then try to run an example with image output:

   cd src/dm/examples/tutorials/
   make ex5
   ./ex5
   ./ex5 -draw_save test.png

The example generates the error you mentioned, which it didn’t before 
installing afterimage:

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:  0x40
  Serial number of failed request:  7
  Current serial number in output stream:  14

Browsing through configure.log, it seems that petsc is using the same X11 
library.

Did I miss something?

Thanks!
Sean


On Dec 2, 2015, at 11:10 PM, Barry Smith 
> wrote:


 I am such an idiot. No I did build it from source I forgot the comment in 
afterimage.py

 After image is available from http://www.afterstep.org/afterimage/getcode.php
#
#  It is used by the PetscDrawSetSave() routine to save X windows graphics to 
files
#
#  If installing on an Apple make sure to read the details on PetscDrawSetSave 
manual
#  page before installing
#

from that page I found

If X windows generates an error message about X_CreateWindow() failing then 
Afterimage was installed without X windows. Reinstall Afterimage using the
  ./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

Did you try all this stuff?

 Barry


On Dec 3, 2015, at 1:00 AM, Sean Dettrick 
> wrote:

Hi Barry,

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?

I did find afterstep on github, but had trouble installing it on the mac.

Meanwhile, a colleague has given me a python script, so I’ll probably use that 
instead for now.

Thanks again,
Sean

On Dec 2, 2015, at 1:45 PM, Barry Smith 
> wrote:


Sean,

I have never been able to build from that source either.

I used homebrew to install it and its worked for several years.

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).

Barry

On Dec 2, 2015, at 3:39 PM, Sean Dettrick 
> wrote:

Hi,

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 
http://www.afterstep.org/afterimage/getcode.php failed, as did cvs checkout.  
It seems the target sites may not exist at present.

Is there another way to install afterstep?

Alternatively, is there a way to manually redirect the X11 output using 
something like XCreatePixmap?

Thanks!
Sean Dettrick






Re: [petsc-users] Petsc Draw to pixmap

2015-12-03 Thread Barry Smith

> On Dec 3, 2015, at 5:54 AM, Matthew Knepley  wrote:
> 
> On Thu, Dec 3, 2015 at 2:06 AM, Sean Dettrick  
> wrote:
> 
> No, it is my fault, when I was unable to download from afterstep.org 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.
> 
> But now I’ve tried to follow your advice, and have a new problem.
> 
> I installed Afterimage from your suggested site, with suggested X lib flags:
> 
>./configure --x-includes=/opt/X11/include -x-libraries=/opt/X11/lib
> 
> Did you check that it worked? Configure can (semi-)silently turn things off.

   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. 

  Barry

> 
>   Thanks,
> 
> Matt
>  
>make
>make install
> 
> No errors.  Then re-configured and built petsc:
> 
>export PETSC_DIR=/Users/sdettrick/libs/petsc-3.6.1
>export PETSC_ARCH=mac-gcc-hdf5-mpich-afterimage
>   ./configure --with-afterimage --download-hdf5 --download-mpich 
> --PETSC_ARCH=mac-gcc-hdf5-mpich-afterimage 
> --PETSC_DIR=/Users/sdettrick/libs/petsc-3.6.1 
>make PETSC_DIR=/Users/sdettrick/libs/petsc-3.6.1 
> PETSC_ARCH=mac-gcc-hdf5-mpich-afterimage all
> 
> No errors.  Then try to run an example with image output:
> 
>cd src/dm/examples/tutorials/
>make ex5
>./ex5
>./ex5 -draw_save test.png
> 
> The example generates the error you mentioned, which it didn’t before 
> installing afterimage:
> 
> 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:  0x40
>   Serial number of failed request:  7
>   Current serial number in output stream:  14
> 
> Browsing through configure.log, it seems that petsc is using the same X11 
> library.
> 
> Did I miss something?
> 
> Thanks!
> Sean
> 
> 
>> On Dec 2, 2015, at 11:10 PM, Barry Smith  wrote:
>> 
>> 
>>  I am such an idiot. No I did build it from source I forgot the comment in 
>> afterimage.py 
>> 
>>  After image is available from 
>> http://www.afterstep.org/afterimage/getcode.php
>> #
>> #  It is used by the PetscDrawSetSave() routine to save X windows graphics 
>> to files
>> #
>> #  If installing on an Apple make sure to read the details on 
>> PetscDrawSetSave manual
>> #  page before installing
>> #
>> 
>> from that page I found
>> 
>> If X windows generates an error message about X_CreateWindow() failing then 
>> Afterimage was installed without X windows. Reinstall Afterimage using the
>>   ./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
>> 
>> Did you try all this stuff?
>> 
>>  Barry
>> 
>> 
>>> On Dec 3, 2015, at 1:00 AM, Sean Dettrick  
>>> wrote:
>>> 
>>> Hi Barry,
>>> 
>>> 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? 
>>> 
>>> I did find afterstep on github, but had trouble installing it on the mac.
>>> 
>>> Meanwhile, a colleague has given me a python script, so I’ll probably use 
>>> that instead for now. 
>>> 
>>> Thanks again,
>>> Sean
>>> 
 On Dec 2, 2015, at 1:45 PM, Barry Smith  wrote:
 
 
 Sean,
 
 I have never been able to build from that source either. 
 
 I used homebrew to install it and its worked for several years.
 
 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).
 
 Barry
 
> On Dec 2, 2015, at 3:39 PM, Sean Dettrick  
> wrote:
> 
> Hi,
> 
> 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 
> http://www.afterstep.org/afterimage/getcode.php failed, as did cvs 
> checkout.  It seems the target sites may not exist at present.
> 
> Is there another way to install afterstep?
> 
> Alternatively, is there a way to manually redirect the X11 output using 
> something like XCreatePixmap?
> 
> Thanks!
> Sean Dettrick
 
>>> 
>> 
> 
> 
> 
> 
> -- 
> What most experimenters take for granted before they begin their experiments 
> is infinitely more interesting than any results to 

Re: [petsc-users] Petsc Draw to pixmap

2015-12-03 Thread Sean Dettrick

On Dec 3, 2015, at 5:01 AM, Barry Smith 
> wrote:


On Dec 3, 2015, at 5:54 AM, Matthew Knepley 
> wrote:

On Thu, Dec 3, 2015 at 2:06 AM, Sean Dettrick 
> wrote:

No, it is my fault, when I was unable to download from 
afterstep.org 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.

But now I’ve tried to follow your advice, and have a new problem.

I installed Afterimage from your suggested site, with suggested X lib flags:

  ./configure --x-includes=/opt/X11/include -x-libraries=/opt/X11/lib

Did you check that it worked? Configure can (semi-)silently turn things off.

  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.


Thanks!  The thing finally works.  I had to clean everything and do fresh 
installs, but now it is fine.

Summarizing my experience of afterimage on a mac in case anybody else wants to 
do it:

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 
http://www.afterstep.org/afterimage/getcode.php DOES work, configured as:


./configure --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib --with-x
make
make install

Then petsc is configured as:
./configure --with-afterimage --download-hdf5 --download-mpich

The example src/dm/examples/tutorials/ex5.c then works:
./ex5 -draw_save


Cheers,
Sean



 Barry


 Thanks,

   Matt

  make
  make install

No errors.  Then re-configured and built petsc:

  export PETSC_DIR=/Users/sdettrick/libs/petsc-3.6.1
  export PETSC_ARCH=mac-gcc-hdf5-mpich-afterimage
 ./configure --with-afterimage --download-hdf5 --download-mpich 
--PETSC_ARCH=mac-gcc-hdf5-mpich-afterimage 
--PETSC_DIR=/Users/sdettrick/libs/petsc-3.6.1
  make PETSC_DIR=/Users/sdettrick/libs/petsc-3.6.1 
PETSC_ARCH=mac-gcc-hdf5-mpich-afterimage all

No errors.  Then try to run an example with image output:

  cd src/dm/examples/tutorials/
  make ex5
  ./ex5
  ./ex5 -draw_save test.png

The example generates the error you mentioned, which it didn’t before 
installing afterimage:

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:  0x40
 Serial number of failed request:  7
 Current serial number in output stream:  14

Browsing through configure.log, it seems that petsc is using the same X11 
library.

Did I miss something?

Thanks!
Sean


On Dec 2, 2015, at 11:10 PM, Barry Smith 
> wrote:


I am such an idiot. No I did build it from source I forgot the comment in 
afterimage.py

After image is available from http://www.afterstep.org/afterimage/getcode.php
#
#  It is used by the PetscDrawSetSave() routine to save X windows graphics to 
files
#
#  If installing on an Apple make sure to read the details on PetscDrawSetSave 
manual
#  page before installing
#

from that page I found

If X windows generates an error message about X_CreateWindow() failing then 
Afterimage was installed without X windows. Reinstall Afterimage using the
 ./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

Did you try all this stuff?

Barry


On Dec 3, 2015, at 1:00 AM, Sean Dettrick 
> wrote:

Hi Barry,

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?

I did find afterstep on github, but had trouble installing it on the mac.

Meanwhile, a colleague has given me a python script, so I’ll probably use that 
instead for now.

Thanks again,
Sean

On Dec 2, 2015, at 1:45 PM, Barry Smith 
> wrote:


Sean,

I have never been able to build from that source either.

I used homebrew to install it and its worked for several years.

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).

Barry

On Dec 2, 2015, at 3:39 PM, Sean Dettrick 

[petsc-users] Petsc Draw to pixmap

2015-12-02 Thread Sean Dettrick
Hi,

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 
http://www.afterstep.org/afterimage/getcode.php failed, as did cvs checkout.  
It seems the target sites may not exist at present.

Is there another way to install afterstep?

Alternatively, is there a way to manually redirect the X11 output using 
something like XCreatePixmap?

Thanks!
Sean Dettrick


Re: [petsc-users] Petsc Draw to pixmap

2015-12-02 Thread Sean Dettrick
Hi Barry,

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? 

I did find afterstep on github, but had trouble installing it on the mac.

Meanwhile, a colleague has given me a python script, so I’ll probably use that 
instead for now. 

Thanks again,
Sean

> On Dec 2, 2015, at 1:45 PM, Barry Smith  wrote:
> 
> 
>   Sean,
> 
>   I have never been able to build from that source either. 
> 
>   I used homebrew to install it and its worked for several years.
> 
>   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).
> 
>   Barry
> 
>> On Dec 2, 2015, at 3:39 PM, Sean Dettrick  
>> wrote:
>> 
>> Hi,
>> 
>> 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 
>> http://www.afterstep.org/afterimage/getcode.php failed, as did cvs checkout. 
>>  It seems the target sites may not exist at present.
>> 
>> Is there another way to install afterstep?
>> 
>> Alternatively, is there a way to manually redirect the X11 output using 
>> something like XCreatePixmap?
>> 
>> Thanks!
>> Sean Dettrick
> 



Re: [petsc-users] Petsc Draw to pixmap

2015-12-02 Thread Barry Smith

  I am such an idiot. No I did build it from source I forgot the comment in 
afterimage.py 

  After image is available from http://www.afterstep.org/afterimage/getcode.php
#
#  It is used by the PetscDrawSetSave() routine to save X windows graphics to 
files
#
#  If installing on an Apple make sure to read the details on PetscDrawSetSave 
manual
#  page before installing
#

from that page I found

 If X windows generates an error message about X_CreateWindow() failing then 
Afterimage was installed without X windows. Reinstall Afterimage using the
   ./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

Did you try all this stuff?

  Barry


> On Dec 3, 2015, at 1:00 AM, Sean Dettrick  
> wrote:
> 
> Hi Barry,
> 
> 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? 
> 
> I did find afterstep on github, but had trouble installing it on the mac.
> 
> Meanwhile, a colleague has given me a python script, so I’ll probably use 
> that instead for now. 
> 
> Thanks again,
> Sean
> 
>> On Dec 2, 2015, at 1:45 PM, Barry Smith  wrote:
>> 
>> 
>>  Sean,
>> 
>>  I have never been able to build from that source either. 
>> 
>>  I used homebrew to install it and its worked for several years.
>> 
>>  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).
>> 
>>  Barry
>> 
>>> On Dec 2, 2015, at 3:39 PM, Sean Dettrick  
>>> wrote:
>>> 
>>> Hi,
>>> 
>>> 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 
>>> http://www.afterstep.org/afterimage/getcode.php failed, as did cvs 
>>> checkout.  It seems the target sites may not exist at present.
>>> 
>>> Is there another way to install afterstep?
>>> 
>>> Alternatively, is there a way to manually redirect the X11 output using 
>>> something like XCreatePixmap?
>>> 
>>> Thanks!
>>> Sean Dettrick
>> 
> 



Re: [petsc-users] Petsc Draw to pixmap

2015-12-02 Thread Barry Smith

   Sean,

   I have never been able to build from that source either. 

   I used homebrew to install it and its worked for several years.

   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).

   Barry

> On Dec 2, 2015, at 3:39 PM, Sean Dettrick  
> wrote:
> 
> Hi,
> 
> 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 
> http://www.afterstep.org/afterimage/getcode.php failed, as did cvs checkout.  
> It seems the target sites may not exist at present.
> 
> Is there another way to install afterstep?
> 
> Alternatively, is there a way to manually redirect the X11 output using 
> something like XCreatePixmap?
> 
> Thanks!
> Sean Dettrick