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

Adding mesalib does not make my vcs headless-compatible #394

Closed
jypeter opened this issue Mar 14, 2019 · 7 comments
Closed

Adding mesalib does not make my vcs headless-compatible #394

jypeter opened this issue Mar 14, 2019 · 7 comments
Milestone

Comments

@jypeter
Copy link
Member

jypeter commented Mar 14, 2019

Following @danlipsa #393 (comment), I have added mesalib to my installation with conda install -n cdatm18_py2 -c conda-forge mesalib

 >conda list |grep -i mesa
mesalib                   18.3.1               h590aaf7_0    conda-forge

Unfortunately, this does not seem to solve my problem!

If DISPLAY is set , I still get OpenGL2 related errors when executing x.plot

34: ldistance = tcoordMC.x;
35: #endif
36: vec4 vertex = vec4(vertexMC.xy, 0.0, 1.0);
37: gl_Position = vertex*MCWCMatrix*WCDCMatrix; }


ERROR: In ../Rendering/OpenGL2/vtkShaderProgram.cxx, line 447
vtkShaderProgram (0x55a621f96130): 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES

If DISPLAY is not set, vcs gives me the helpful message (Set your DISPLAY env variable or install mesalib conda package) I once requested in #211, eventhough mesalib is already installed!

 >echo $DISPLAY
localhost:39.0
(cdatm18_py2) jypeter@obelix4 - ...jypeter - 48 >unsetenv DISPLAY
(cdatm18_py2) jypeter@obelix4 - ...jypeter - 49 >echo $DISPLAY
DISPLAY: Undefined variable.
(cdatm18_py2) jypeter@obelix4 - ...jypeter - 50 >python
Python 2.7.15 | packaged by conda-forge | (default, Feb 28 2019, 04:00:11)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np, vcs
>>> id100 = np.identity(100)
>>> x = vcs.init()
>>> x.plot(id100)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/share/unix_files/cdat/miniconda3/envs/cdatm18_py2/lib/python2.7/site-packages/vcs-8.1-py3.7.egg/vcs/Canvas.py", line 2804, in plot

  File "/home/share/unix_files/cdat/miniconda3/envs/cdatm18_py2/lib/python2.7/site-packages/vcs-8.1-py3.7.egg/vcs/Canvas.py", line 4042, in __plot

  File "/home/share/unix_files/cdat/miniconda3/envs/cdatm18_py2/lib/python2.7/site-packages/vcs-8.1-py3.7.egg/vcs/VTKPlots.py", line 832, in plot
  File "/home/share/unix_files/cdat/miniconda3/envs/cdatm18_py2/lib/python2.7/site-packages/vcs-8.1-py3.7.egg/vcs/VTKPlots.py", line 639, in createRenWin
  File "/home/share/unix_files/cdat/miniconda3/envs/cdatm18_py2/lib/python2.7/site-packages/vcs-8.1-py3.7.egg/vcs/VTKPlots.py", line 749, in initialSize
RuntimeError: No DISPLAY set. Set your DISPLAY env variable or install mesalib conda package

I have tried to plot in a new canvas with bg=True, but I get the same result

>>> y = vcs.init(bg=True)
>>> y.plot(id100)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/share/unix_files/cdat/miniconda3/envs/cdatm18_py2/lib/python2.7/site-packages/vcs-8.1-py3.7.egg/vcs/Canvas.py", line 2804, in plot

  File "/home/share/unix_files/cdat/miniconda3/envs/cdatm18_py2/lib/python2.7/site-packages/vcs-8.1-py3.7.egg/vcs/Canvas.py", line 4042, in __plot

  File "/home/share/unix_files/cdat/miniconda3/envs/cdatm18_py2/lib/python2.7/site-packages/vcs-8.1-py3.7.egg/vcs/VTKPlots.py", line 832, in plot
  File "/home/share/unix_files/cdat/miniconda3/envs/cdatm18_py2/lib/python2.7/site-packages/vcs-8.1-py3.7.egg/vcs/VTKPlots.py", line 639, in createRenWin
  File "/home/share/unix_files/cdat/miniconda3/envs/cdatm18_py2/lib/python2.7/site-packages/vcs-8.1-py3.7.egg/vcs/VTKPlots.py", line 749, in initialSize
RuntimeError: No DISPLAY set. Set your DISPLAY env variable or install mesalib conda package
>>>
@jypeter
Copy link
Member Author

jypeter commented Mar 14, 2019

Just to be sure, I have also added mesalib to the remote server I mentioned in #393 (comment), and I get the same kind of errors

[much more of the same above]
32: #endif
33: #ifdef haveLines
34: ldistance = tcoordMC.x;
35: #endif
36: vec4 vertex = vec4(vertexMC.xy, 0.0, 1.0);
37: gl_Position = vertex*MCWCMatrix*WCDCMatrix; }


ERROR: In ../Rendering/OpenGL2/vtkShaderProgram.cxx, line 447
vtkShaderProgram (0x55ec673f9de0): 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES


<vcs.displayplot.Dp object at 0x7ff29c445dd0>

mesalib is installed!

(cdatm18_py2) [jypmce@ciclad-ng bin]$ conda list | grep -i mesa
mesalib                   18.3.1               h590aaf7_0    conda-forge

@doutriaux1
Copy link
Contributor

@jypeter please send em the output of:
conda list vtk

Thx

@jypeter
Copy link
Member Author

jypeter commented Mar 14, 2019

On both servers, I get

$ conda list vtk
# packages in environment at /home/share/unix_files/cdat/miniconda3/envs/cdatm18_py2:
#
# Name                    Version                   Build  Channel
vtk-cdat                  8.2.0rc2.8.1     py27h413fb2d_0    cdat/label/v81

I have not tried the headless test in the python 3 version, but I get

 >conda list -n cdatm18_py3 vtk
# packages in environment at /home/share/unix_files/cdat/miniconda3/envs/cdatm18_py3:
#
# Name                    Version                   Build  Channel
vtk-cdat                  8.2.0rc2.8.1     py36h413fb2d_0    cdat/label/v81

@doutriaux1
Copy link
Contributor

yes conda did not bring vtk-cdat to use mesalib
try:

conda install -f -c cdat/label/v81 -c conda-forge mesalib vtk-cdat

@jypeter
Copy link
Member Author

jypeter commented Mar 14, 2019

OK, I have used your install command

 >conda install -f -c cdat/label/v81 -c conda-forge mesalib vtk-cdat

WARNING: The --force flag will be removed in a future conda release.
         See 'conda install --help' for details about the --force-reinstall
         and --clobber flags.

Collecting package metadata: done
Solving environment: done

## Package Plan ##

  environment location: /home/share/unix_files/cdat/miniconda3/envs/cdatm18_py2

  added / updated specs:
    - mesalib
    - vtk-cdat

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    vtk-cdat-8.2.0rc2.8.1      |py27_mesalibh24c825c_0        41.5 MB  cdat/label/v81
    ------------------------------------------------------------
                                           Total:        41.5 MB

The following packages will be DOWNGRADED:

  vtk-cdat                      8.2.0rc2.8.1-py27h413fb2d_0 --> 8.2.0rc2.8.1-py27_mesalibh24c825c_0

Proceed ([y]/n)? y

Downloading and Extracting Packages
vtk-cdat-8.2.0rc2.8. | 41.5 MB   | ##################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

And now it works indeed! I have even cleared the canvas and plotted something else

jypeter@obelix5 - ...jypeter - 46 >python
Python 2.7.15 | packaged by conda-forge | (default, Feb 28 2019, 04:00:11)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np, vcs
>>> id100 = np.identity(100)
>>> x = vcs.init()
>>> x.plot(id100)
<vcs.displayplot.Dp object at 0x2aff4a9fccf8>
>>> x.png('test_mesalib')
>>> x.pdf('test_mesalib')
>>> x.clear()
>>> x.plot(id100[:5, :5])
<vcs.displayplot.Dp object at 0x2aff4a9fcdd0>
>>> x.pdf('test_mesalib_b')
>>> x.png('test_mesalib_b')
>>>

Works also fine when DISPLAY is not set

I see that I was using the out-of-date steps of https://github.com/CDAT/cdat/wiki/install. The page is OK now (I have refreshed it), but the page already opened in my browser was unfortunately out-of-date

@doutriaux1
Copy link
Contributor

@jypeter thans. Indeed the msalib version does NOT need a DISPALY. Glad it helps you moving forward.

@jypeter
Copy link
Member Author

jypeter commented Jul 12, 2019

I guess I can close this one

@jypeter jypeter closed this as completed Jul 12, 2019
@downiec downiec added this to the 8.2 milestone Oct 21, 2019
@downiec downiec modified the milestones: 8.2, 8.2.1 Jul 27, 2020
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

3 participants