Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XQuartz version and numpy? #44

Open
chaosphere2112 opened this issue Nov 23, 2016 · 18 comments
Open

XQuartz version and numpy? #44

chaosphere2112 opened this issue Nov 23, 2016 · 18 comments
Milestone

Comments

@chaosphere2112
Copy link
Contributor

  1. VCS not opening xwindow for Mac terminal when XQuartz 2.7.9 or higher version.
  2. Loading variable returns error message which I've not seen before.
>>> import vcs, cdms2
>>> f=cdms2.open('clt.nc')
>>> d=f('clt')

/export_backup/lee1043/anaconda2/lib/python2.7/site-packages/numpy/ma/core.py:2761: DeprecationWarning: Non-string object detected for the array ordering. Please pass in 'C', 'F', 'A', or 'K' instead
order=order, subok=True, ndmin=ndmin)

>>> x=vcs.init()
>>> x.plot(d)

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 149 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 42
Current serial number in output stream: 43

Migrated from: CDAT/cdat#2132

@doutriaux1 doutriaux1 modified the milestone: 3.0 May 5, 2017
@doutriaux1 doutriaux1 modified the milestones: 3.0, post 3.0 Mar 29, 2018
@doutriaux1 doutriaux1 modified the milestones: 8.1, 8.2 Mar 27, 2019
@doutriaux1
Copy link
Contributor

@scottwittenburg @danlipsa

I get:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
ERROR: In ../Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 761
vtkXOpenGLRenderWindow (0x55ec3e3c17e0): Unable to find a valid OpenGL 3.2 or later implementation. Please update your video card driver to the latest version. If you are using Mesa please make sure you have version 11.2 or later and make sure your driver in Mesa supports OpenGL 3.2 such as llvmpipe or openswr. If you are on windows and using Microsoft remote desktop note that it only supports OpenGL 3.2 with nvidia quadro cards. You can use other remoting software such as nomachine to avoid this issue.

Nothing to do about it except nox version, correct?

@durack1
Copy link
Member

durack1 commented Dec 19, 2019

@scottwittenburg @danlipsa @doutriaux1 @downiec @forsyth2 @muryanto1 I am hunting around for a solution to #430 and it seems that the only "solution" is to use the mesa build, which defeats the purpose of what I am trying to use vcs for, interactive plotting of in memory objects whilst debugging a script. It really would be great if a solution is available for interactive plotting. The environment I am using is RHEL7 and VNC

@doutriaux1
Copy link
Contributor

jupyter-notebook are not the best, but a great way around when using mesa. They will show you the picture.

@durack1
Copy link
Member

durack1 commented Dec 19, 2019

@doutriaux1 thanks, I am trying to debug a script which is not implemented in a jupyter notebook, rather I am just running this (with pdb) in the terminal. It would be preferable to me if I can just enable VCS interactively, however it that's not possible I'll just have to forget about vcs altogether and go to matplotlib or equivalent. It's a pity though, as VCS deals with CMIP5/6/ ocean grids far better than other packages

@doutriaux1
Copy link
Contributor

you do know you can copy/paste your script into a new notebook? Then use split cell to run only the buggy section of your script. It's actually faster than regular prompt debugging.

@durack1
Copy link
Member

durack1 commented Dec 19, 2019

@doutriaux1 I know this exists somewhere, but how do I initialize a jupyter notebook on one of our workstations?

Is there a better way than:

(cdat82Py3) bash-4.2$ jupyter-notebook
[I 14:03:53.960 NotebookApp] [nb_conda_kernels] enabled, 3 kernels found
[I 14:03:53.965 NotebookApp] Writing notebook server cookie secret to ~/.local/share/jupyter/runtime/notebook_cookie_secret
[I 14:03:54.150 NotebookApp] [nb_conda] enabled
[I 14:03:54.150 NotebookApp] Serving notebooks from local directory: /export/durack1
[I 14:03:54.150 NotebookApp] The Jupyter Notebook is running at:
[I 14:03:54.150 NotebookApp] http://localhost:8888/?token=cea46eeb925008ffd92dfb02929fec0dcf297
[I 14:03:54.150 NotebookApp]  or http://127.0.0.1:8888/?token=cea46eeb925008ffd92dfb02929fec0dcf297
[I 14:03:54.150 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 14:03:54.195 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///export/durack1/.local/share/jupyter/runtime/nbserver-113648-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=cea46eeb925008ffd92dfb02929fec0dcf297
     or http://127.0.0.1:8888/?token=cea46eeb925008ffd92dfb02929fec0dcf297

@doutriaux1
Copy link
Contributor

@downiec has it setup . It's our vcdat. You can specify any kernel you want once you're at the url. @downiec what's the URL for jupyter-vcdat on Paul's machines

@downiec
Copy link
Contributor

downiec commented Dec 19, 2019

@doutriaux1 Are you talking about jupyter-vcdat setup in Jupyterhub which is hosted on nimbus?

@downiec
Copy link
Contributor

downiec commented Dec 19, 2019

I don't have vcdat setup/installed on other machines right now, but if the machine has docker available, there's a docker image that can be run which has vcdat, jupyterlab and notebooks setup in it.

@doutriaux1
Copy link
Contributor

nimbus should work for @durack1 he wants to be able to connect to a jupyterlab running on a remote machine from his local machine.

@downiec
Copy link
Contributor

downiec commented Dec 19, 2019

@doutriaux1 Yes, in that I can add him to the group on github so he can access it. @durack1 I set you an invitation to the group and will email you how to access it.

@durack1
Copy link
Member

durack1 commented Dec 19, 2019

@doutriaux1 is this what you'd expect with a cdat82py3 instance that has not enabled mesa on env creation:
Screen Shot 2019-12-19 at 3 20 12 PM

@durack1
Copy link
Member

durack1 commented Dec 19, 2019

@doutriaux1 it seems that there is a vcs graphics object created, but I just can't see it, no matter how I try and go about using it..

@doutriaux1
Copy link
Contributor

try this

from IPython.core.display import display
d = x.plot(climSlice)
display(d)

@doutriaux1
Copy link
Contributor

of course with pdb, you're interupting before anything is drawn so you can't see an image yet.

@doutriaux1
Copy link
Contributor

but the dispaly will force ipython to dispaly the object, otherwise it only disaplys it if it's the last thing in the cell, which it is not here since pdb is asking you a question

@durack1
Copy link
Member

durack1 commented Dec 19, 2019

@doutriaux1 I was hoping this would work, but no cigar:
Screen Shot 2019-12-19 at 3 45 42 PM

@doutriaux1
Copy link
Contributor

maybe display is used by pdb. try

from IPython.core.display import display as display_ipython
...
display_ipython(d)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants