There is some issue on creating png figures using *.vs3 vapor script.
The example vs3 name is “side.vs3” and its result looks like the figure above.
I made it in the vapor of window version(v 3.8.1).
And I would like to produce the figures by each timesteps.
But, my python script seems not to work in “vapor_python” which is installed in the supercomputer.
-------- the example of my python script for producing single snapshot (png format) ----------------
from vapor import session, renderer, dataset,camera, utils
from matplotlib import pyplot as plt
ses1 = session.Session()
ses1.Load(“/h3/home/nimr/dwyi/muklimo/vapor_python/side.vs3”)
cam1 = ses1.GetCamera()
dir1 = cam1.GetDirection()
pos1 = cam1.GetPosition()
up1 = cam1.GetUp()
#ses1.GetCamera().ViewAll()
cam1.SetPosition([pos1[0],pos1[0],pos1[0]])
cam1.SetDirection([dir1[0],dir1[0],dir1[0]])
cam1.SetUp([up1[0],up1[0],up1[0]])
print(“hello”)
ses1.Render(“png/image_1.png”)
plt.savefig(‘png/image_3.png’)
There must be a correct way to save a snapshot after loading the vs3 script.
Please anyone help me. I have struggling with this issue for a long time.
FYI, some error messages when I run the python script in linux system. It seems that the version needs to be changed, but I can’t help that. therefore, I would know the way without change the version of GLSL.
Thanks
------------------ examples of error messages [1] -------------------------------
Your device appears to either not have hardware graphics support, or not have graphics drivers configured correctly for your device.
Rendering performance may be significantly diminished, or in the case of some renderers, may not function at all.
--------------- Shader Compilation Failed ---------------
0:1(10): error: GLSL 4.10 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 1.00 ES, 3.00 ES, and 3.10 ES
Shader “FlowLine.vert” failed to compile
--------------- Shader Compilation Failed ---------------
0:1(10): error: GLSL 4.10 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 1.00 ES, 3.00 ES, and 3.10 ES
Shader “FlowLine.frag” failed to compile
Failed to link shader:
Cannot link because shader failed to compile
Resource does not exist and unable to load by name
Failed to initialize renderer sfc_flow
Visualizer (Visualizer_No._0) failed to paint and thus not capturing image.
(vapor_python)
------------------ examples of error messages [2] -------------------------------
Sender: LSF System lsfadmin@pmaru54.maru
Subject: Job 230934: <vapor_n10> in cluster Done
Job <vapor_n10> was submitted from host by user in cluster at Tue Mar 19 05:46:00 2024
Job was executed on host(s) <10*pmaru54>, in queue <normal_p>, as user in cluster at Tue Mar 19 05:46:02 2024
</h3/home/nimr/dwyi> was used as the home directory.
</h3/home/nimr/dwyi/muklimo/vapor_python> was used as the working directory.
Started at Tue Mar 19 05:46:02 2024
Terminated at Tue Mar 19 05:50:53 2024
Results reported at Tue Mar 19 05:50:53 2024
Your job looked like:
LSBATCH: User input
./test.sh
Successfully completed.
Resource usage summary:
CPU time : 10.19 sec.
Max Memory : 367 MB
Average Memory : 135.31 MB
Total Requested Memory : 102400.00 MB
Delta Memory : 102033.00 MB
Max Swap : -
Max Processes : 8
Max Threads : 100
Run time : 290 sec.
Turnaround time : 293 sec.
The output (if any) follows:
[GLContextProviderNvidia.cpp:20] Could not load EGL
[GLContextProviderEGL.cpp:27] Could not load EGL
[GLContextProvider.cpp:28] Could not get an OpenGL context from the display manager. Is one running?
[GLContextProvider.cpp:29] Falling back to software rendering
Vapor 3.9.0
Python 3.9.18 (/h3/home/nimr/dwyi/miniforge3/envs/vapor_python)
OpenGL 3.3 (Core Profile) Mesa 21.2.5
hihi
Dataset: ‘all.202310300000to202311090800.nc’
[RenderManager.cpp:222] Paint Failed