Open durack1 opened 7 years ago
@danlipsa @doutriaux1 this is even better, when I change the:
canvas = vcs.init(size=2)
to
canvas = vcs.init(size=2,bg=True)
I then get:
@durack1 Do you have the huss_Amon_HadGEM2-AO_historical_r1i1p1_186001-200512.nc file? @aashish24 @doutriaux1 We should add the examples to the test suite, maybe as a separate section to be able to run them automatically. I think the black PNG is what we have seen before - VNC does not support OpenGL. Our suggestion was to run VNC through Virtual GL.
Dan with recent updates my ubunutu seems to seg fault instantly via x forwarding. RH6 has been sending black png for a while now via x forwarding. @durack1 use the nox version, I know it sucks but that one works.
@danlipsa this file is 187MB, it's got all the timesteps 186101 to 200512. I've pulled out a single timestep in the linked file (102KB) let me know if this isn't suitable: huss_Amon_HadGEM2-AO_historical_r1i1p1_186001.nc.zip
How do I run VNC through Virtual GL?
@doutriaux1 just confirming to install the *-nox
I need the following conda command right?
conda create -n uvcdat280-nox -c conda-forge -c uvcdat uvcdat vcs-nox
Is that right? How about the vtk-cdat-nox
? Or is that magically also grabbed as a dependency of vcs-nox
?
@doutriaux1 is it right that both the vcs
AND the vcs-nox
versions (along with their dependencies) are being installed? Seems like this is going to cause me a lot of problems..?
[duro@ocean 090605_FLR2_sptp]$ conda create -n uvcdat280nox -c conda-forge -c uvcdat uvcdat vcs-nox
Fetching package metadata .............
Solving package specifications: .
Package plan for installation in environment /export/durack1/anaconda2/envs/uvcdat280nox:
The following NEW packages will be INSTALLED:
...
dv3d: 2.8-py27_2 uvcdat
dv3d-nox: 2.8-py27_2 uvcdat
...
vcs: 2.8-py27_2 uvcdat
vcs-nox: 2.8-py27_2 uvcdat
vcsaddons: 2.8-py27_2 uvcdat
vcsaddons-nox: 2.8-py27_2 uvcdat
vistrails: 2.8-2 uvcdat
vtk-cdat: 7.1.0.2.8-py27_2 uvcdat
vtk-cdat-nox: 7.1.0.2.8-py27_2 uvcdat
...
@durack1 you want: conda create -n uvcdat280nox -c conda-forge -c uvcdat uvcdat-nox
@doutriaux1 perfect, I'll give that a spin
@doutriaux1 unfortunately no luck, I successfully installed uvcdat-nox
which only had the appropriate *-nox
versions and this is still the output:
@danlipsa this might be bad then! @durack1 try with a slightly more recent vcs
conda create -n uvcdat280nox -c conda-forge -c uvcdat/label/nightly -c uvcdat uvcdat-nox
@doutriaux1 ok so installed the nightly
uvcdat-nox
(after fixing spaces in the command) and now I get:
(uvcdatNightlyNox) duro@ocean:[170118_PaperPlots_input4MIPs]:[2307]> python make_paperplots.py
Traceback (most recent call last):
File "make_paperplots.py", line 9, in <module>
import vcs
File "/export/duro/anaconda2/envs/uvcdatNightlyNox/lib/python2.7/site-packages/vcs/__init__.py", line 57, in <module>
from utils import * # noqa
File "/export/duro/anaconda2/envs/uvcdatNightlyNox/lib/python2.7/site-packages/vcs/utils.py", line 6, in <module>
import boxfill
File "/export/duro/anaconda2/envs/uvcdatNightlyNox/lib/python2.7/site-packages/vcs/boxfill.py", line 25, in <module>
import VCS_validation_functions
File "/export/duro/anaconda2/envs/uvcdatNightlyNox/lib/python2.7/site-packages/vcs/VCS_validation_functions.py", line 5, in <module>
import genutil
File "/export/duro/anaconda2/envs/uvcdatNightlyNox/lib/python2.7/site-packages/genutil/__init__.py", line 5, in <module>
from grower import grower
File "/export/duro/anaconda2/envs/uvcdatNightlyNox/lib/python2.7/site-packages/genutil/grower.py", line 4, in <module>
import cdms2 as cdms
File "/export/duro/anaconda2/envs/uvcdatNightlyNox/lib/python2.7/site-packages/cdms2/__init__.py", line 33, in <module>
from dataset import createDataset, openDataset, useNetcdf3, \
File "/export/duro/anaconda2/envs/uvcdatNightlyNox/lib/python2.7/site-packages/cdms2/dataset.py", line 6, in <module>
import Cdunif
ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /export/duro/anaconda2/envs/uvcdatNightlyNox/lib/python2.7/site-packages/cdms2/Cdunif.so)
ok... so let's try this one on the bleeding edge:
conda create -n uvcdat280nox -c conda-forge -c uvcdat/label/patterns -c uvcdat uvcdat-nox
@doutriaux1 the only patterns
sourced package is vtk-cdat-nox
should I proceed?
yes, that's all you need.
@danlipsa that's a problem. @durack1 ok then you need to set your LD_LIBRARY_PATH unfortunately
export LD_LIBRARY_PATH=/export/duro/anaconda2/envs/uvcdatNightlyNox/lib/
let me know.
@doutriaux1 doesn't help, same output:
(uvcdatPatternsNox) duro@ocean:[170118_PaperPlots_input4MIPs]:[2308]> python make_paperplots.py
(uvcdatPatternsNox) duro@ocean:[170118_PaperPlots_input4MIPs]:[2308]> export LD_LIBRARY_PATH=/export/duro/anaconda2/envs/uvcdatPatternsNox/lib/
(uvcdatPatternsNox) duro@ocean:[170118_PaperPlots_input4MIPs]:[2309]> python make_paperplots.py
hum... can you post:
ls /export/duro/anaconda2/envs/uvcdatPatternsNox/lib
ls /export/duro/anaconda2/lib
works for me on oceanonly
(PATT)doutriaux1@oceanonly:[~]:[1709]> python
Python 2.7.11 |Continuum Analytics, Inc.| (default, Dec 6 2015, 18:08:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> x.plot(s)
<vcs.displayplot.Dp object at 0x7f99c80b8050>
>>>
(PATT)doutriaux1@oceanonly:[~]:[1709]> which python
/usr/local/anaconda2/envs/PATT/bin/python
(PATT)doutriaux1@oceanonly:[~]:[1707]> conda create -n PATT -c conda-forge -c uvcdat/label/patterns -c uvcdat uvcdat-nox
@doutriaux1 it doesn't work, you don't get Rather you get If you're lucky
@doutriaux1 ok, so if I run uvcdatPatternsNox
with bg=False
then I get:
ok that makes sense (sort of) @danlipsa we should look into why bg=True freaks out on mesa builds. But we could also always turn bg to True on mesa builds
thanks @durack1
@doutriaux1 I can also confirm a similar (but not identically sized output file) png is generated with uvcdat280nox
and bg=False
And why not, here 'tis:
@danlipsa how do I go about running VNC through Virtual GL? While I can get graphics to write out to a file with these *-nox
builds, I can't see anything interactively and that's a pretty horrible user experience
@durack1 Here are the instructions I followed to setup vnc/virtual GL on my ubuntu and connect from my mac. I used the latest version for vnc/Virtual GL rather the version specified in the instructions. I think you'll need root access on the linux machine.
I mostly followed instructions from http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html#!/guide/virtualgl_turbovnc_howto
with help from: https://cdn.rawgit.com/VirtualGL/virtualgl/2.5.1/doc/index.html
Make sure you install the 64 bit versions for virtualgl and turbovnc. Otherwise they won't work! I know because I did this first! :-(
When I start the vnc server I run /opt/TurboVNC/bin/vncserver -geometry 1440x900 -xstartup ~/.vnc/xstartup
You can do this from ssh and pass the geometry for your own client.
Where xtartup contains:
unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS startxfce4 &
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
On the mac client I run: open vnc://galati:5901
When running an OpenGL application instead of:
# ./app
type
# vglrun app
@doutriaux1 Do you install the gcc 4.8.4 package when installing cdat? This should take care of the missing symbol and will remove the need for LD_LIBRARY_PATH.
@danlipsa I think we're good now, @durack1 was able to run the nox version so I think we do not need the LD_LIBRARY_PATH thing.
@durack1 Thanks for the nc file. The example runs fine using direct access to OpenGL (I have cdat installed on my machine). So indeed the issue is accessing cdat remotely. Neither X forwarding or VNC work well with OpenGL. VNC + Virtual GL works best in my experience but requires installing Virtual GL on the server and of course a working OpenGL on the server as well.
I think we're good now, @durack1 was able to run the nox version so I think we do not need the LD_LIBRARY_PATH thing.
@doutriaux1 Great!
actually today I can't run it anymore!
doutriaux1@crunchy:[Patterns]:[11545]> python patterns.py
Traceback (most recent call last):
File "patterns.py", line 10, in <module>
import cdms2 as cdms
File "/export/doutriaux1/anaconda2/envs/Patterns_New-nox/lib/python2.7/site-packages/cdms2/__init__.py", line 33, in <module>
from dataset import createDataset, openDataset, useNetcdf3, \
File "/export/doutriaux1/anaconda2/envs/Patterns_New-nox/lib/python2.7/site-packages/cdms2/dataset.py", line 6, in <module>
import Cdunif
ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /export/doutriaux1/anaconda2/envs/Patterns_New-nox/lib/python2.7/site-packages/cdms2/Cdunif.so)
But I think it's because the nighlty cdms2 is built against another gcc.... I will update cdms to be built using gcc from conda
@danlipsa @doutriaux1 I just tried this with the vtk-cdat: 7.1.0.2017.3.23.73fb094d17ccdd594a6abf9ff8732149c88dc2e6-py27_0 uvcdat/label/nightly
and still get the same blank image for an active VNC session.. I suppose this bug is kinda similar to the #119 and #130 issues - maybe they are dupes of one another
@durack1 so if this is specific to VNC setup, did we setup virtual GL option? as described by @danlipsa earlier in this thread?
@aashish24 I haven't tried to configure the virtualgl
as described above by @danlipsa, rather I've moved to the *-nox
builds and have given up on the interactive use for now.. I'll have to get back to the virtualgl
configuration to test it out and see if it works.. I note that RHEL6
comes pre-installed with tigervnc
, rather than turbovnc
as described above, so I'd hope it works alongside this vncserver just as well.. I'll ping back here once I've managed to get this virtualgl
tested..
@danlipsa @doutriaux1 bad news.. I just tried to open a python instance and save a png using vglrun, and it didn't work - still got a black png ☹️
The versions: tigervnc 1.7.1 and VirtualGL 2.4
This is likely relevant to the failure I hit above found here:
The TigerVNC Project was founded by some of the former TightVNC developers, Red Hat, and The
VirtualGL Project in early 2009, with the goal of providing a high-performance VNC solution based
on the RealVNC 4 and X.org code bases. Throughout 2010 and 2011, The VirtualGL Project
contributed many hours of labor (probably half of them pro bono) to the development of TigerVNC,
in hopes of turning TigerVNC into "TurboVNC 2.0." Ultimately, however, it became apparent that,
both from a technological and a political point of view, making TigerVNC into a TurboVNC work-alike
was going to be like fitting a square peg into a round hole. Unlike TurboVNC, TigerVNC is not
focused on 3D and video applications, so its developers were not generally very concerned with
making such applications performant by default. Further, there was resistance to including some of
TurboVNC's 3D-specific features, such as automatic lossless refresh, in TigerVNC. In general, there
was also just an irreconcilable clash of project management styles. Thus, with the release of
TigerVNC 1.2.0, The VirtualGL Project stepped down as a contributor and supporter of TigerVNC in
order to focus on moving TurboVNC forward.
@durack1 @doutriaux1 @aashish24 I run the vcs tests using my tubovnc+virtualgl setup. Only these tests fail: tests/test_vcs_png_window_resize.py tests/test_vcs_antialiasing.py window_resize fails using direct access as well (because of window size), only the antialiasing test fails because of virtualgl.
(nightly-20170424) [~/projects/vcs/src (master $%=)]$ vglrun nosetests -s tests/test_vcs_antialiasing.py F ====================================================================== FAIL: testAntiAliasing (test_vcs_antialiasing.TestVCSAntialias) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/danlipsa/projects/vcs/src/tests/test_vcs_antialiasing.py", line 10, in testAntiAliasing self.assertEqual(x.getantialiasing(),8) AssertionError: 0 != 8
@danlipsa and you are not using the nox version? That's great news!
@doutriaux1 Yes, this is the onscreen version run through turbovnc + virtualgl. Note that on mac I used the mac vnc client (start this with open vnc://servername:5901) but I don't think this matter.
@doutriaux1 although I am not using TurboVNC
this example provides a test case with the RHEL6.9
standard library tigervnc
, and I thought it worth documenting..
(uvcdat280) duro@ocean:[WOD13]:[4246]> vglrun -d :1.0 python
Python 2.7.13 | packaged by conda-forge | (default, Mar 20 2017, 14:04:17)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import vcs
>>> x = vcs.init()
>>> x.plot([1,2,3,4])
<vcs.displayplot.Dp object at 0x7f58a1cf7398>
>>> x.png('merde')
Yields:
For completeness I am using:
vglrun vglclient --help - > VirtualGL Client 64-bit v2.4 (Build 20150505)
This is a fair way behind the latest 2.5.2, 20170302
release
tigervnc
Xvnc TigerVNC 1.7.1 - built Jan 19 2017 18:38:20
Copyright (C) 1999-2016 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 11704000, The X.Org Foundation
btw, I'm also getting black png (but OK pdf) when running 2.8.0 on a remote server (you know, close to the data) in my old Fedora Core running in a VB.
I get a normal png if I use x.plot(..., bg=1), but that's not compatible with interactive/exploratory work
If this does not work out of the box, all the 'tricks' and 'nox' stuff should be correctly explained on an easy-to-find web page
We had a quick talk about this with @chaosphere2112 during the ESGF meeting (#108)
@jypeter Did you try turbovnc + virtualgl instructions earlier in this post. That setup works well on my ubuntu 16.04.
@sankhesh can we put these instructions on wiki somewhere? @doutriaux1 @williams13 what would be a good location now to put instructions? ReadTheDocs or Wiki or Website.
@sankhesh wiki
is best for now. What we really need as well is a script that the user can run. Maybe we can even integrate the script as part of the conda activate
step. @doutriaux1 can take care of this once the script is ready.
@doutriaux1 @aashish24
I added instructions for VirtualGL + TurboVNC setup to the wiki:
Also, added a link to the Home page.
@sankhesh Did you run through the instructions? Does it work for you?
@sankhesh just stopped by and confirmed that indeed the VirtualGL+ TurboVNC works for him as well.
Great I'll try it now.
I'm going to try this with mesa tomorrow to see if that works too.
@doutriaux1 I can write a script that starts the vncserver and changes to the right DISPLAY automatically and runs the script with vglrun but VirtualGL and TurboVNC would have to be setup before that can work.
@sankhesh I think that would be awesome.
@danlipsa @doutriaux1 I just ran the demo script BlueMarble_huss_satellite_view.html and received the appropriate graphic on the active VNC screen. What was saved to the png is below, and is certainly not what I was expecting: This is certainly not the expected behavior. What additional information do you require to better replicate the issue: