Paraview error when installing OpenFoam12 on Ubuntu

Hello. Brand new user here. My OS is Ubuntu 24.04 (noble). I am following the instructions on how to install openfoam12 here (after other failed attempts at installing openfoam and paraview separately, which I have since attempted to uninstall): Download v12 | Ubuntu | OpenFOAM

When at this step:
sudo apt -y install openfoam12

I get the following:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libboost-atomic1.83-dev libboost-atomic1.83.0 libboost-chrono1.83-dev
  libboost-chrono1.83.0t64 libboost-date-time1.83-dev libboost-date-time1.83.0
  libboost-dev libboost-program-options-dev libboost-program-options1.83-dev
  libboost-program-options1.83.0 libboost-serialization1.83-dev
  libboost-serialization1.83.0 libboost-system-dev libboost-system1.83-dev
  libboost-system1.83.0 libboost-thread-dev libboost-thread1.83-dev
  libboost1.83-dev libcgal-dev libgmp-dev libgmpxx4ldbl libmpfr-dev
  libptscotch-7.0 libptscotch-dev libscotch-7.0 libscotch-dev mpi-default-dev
  nvidia-firmware-535-535.171.04 openfoam-selector openfoam2412
  openfoam2412-common openfoam2412-dev openfoam2412-source openfoam2412-tools
  openfoam2412-tutorials python3-netifaces
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  paraview python3-paraview
Suggested packages:
  hdf5-tools h5utils
The following NEW packages will be installed:
  openfoam12 paraview python3-paraview
0 upgraded, 3 newly installed, 0 to remove and 85 not upgraded.
Need to get 187 MB of archives.
After this operation, 1,073 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu noble/universe amd64 paraview amd64 5.11.2+dfsg-6build5 [63.4 MB]
Get:2 http://downloads.sourceforge.net/project/foam/foam/ubuntu noble/main amd64 openfoam12 amd64 20250206 [113 MB]
Get:3 http://archive.ubuntu.com/ubuntu noble/universe amd64 python3-paraview amd64 5.11.2+dfsg-6build5 [11.1 MB]
Fetched 187 MB in 9min 1s (346 kB/s)                                           
Selecting previously unselected package openfoam12.
(Reading database ... 320925 files and directories currently installed.)
Preparing to unpack .../openfoam12_20250206_amd64.deb ...
Unpacking openfoam12 (20250206) ...
Selecting previously unselected package paraview.
Preparing to unpack .../paraview_5.11.2+dfsg-6build5_amd64.deb ...
Unpacking paraview (5.11.2+dfsg-6build5) ...
Selecting previously unselected package python3-paraview.
Preparing to unpack .../python3-paraview_5.11.2+dfsg-6build5_amd64.deb ...
Unpacking python3-paraview (5.11.2+dfsg-6build5) ...
Setting up paraview (5.11.2+dfsg-6build5) ...
Setting up openfoam12 (20250206) ...

** To use OpenFOAM please add
**
**    . /opt/openfoam12/etc/bashrc
**
** To your ~/.bashrc

Setting up python3-paraview (5.11.2+dfsg-6build5) ...
/usr/lib/python3/dist-packages/paraview/benchmark/logparser.py:11: SyntaxWarning
: invalid escape sequence '\d'
  _timere = '([-+]?\d*\.?\d+([eE][-+]?\d+)?) +seconds'
/usr/lib/python3/dist-packages/paraview/benchmark/logparser.py:12: SyntaxWarning
: invalid escape sequence '\w'
  _match_filter = re.compile('Execute (\w+) id: +(\d+), +' + _timere)
/usr/lib/python3/dist-packages/paraview/benchmark/logparser.py:13: SyntaxWarning
: invalid escape sequence '\w'
  _match_vfilter = re.compile('Execute (\w+) *, +' + _timere)
/usr/lib/python3/dist-packages/paraview/benchmark/logparser.py:16: SyntaxWarning
: invalid escape sequence '\d'
  'TreeComp (Send|Receive) (\d+) (to|from) (\d+) uchar (\d+), +' + _timere)
/usr/lib/python3/dist-packages/paraview/benchmark/logparser.py:22: SyntaxWarning
: invalid escape sequence '\w'
  _match_render = re.compile('(\w+|\w+ Dev) Render, +' + _timere)
/usr/lib/python3/dist-packages/paraview/smtesting.py:88: SyntaxWarning: invalid 
escape sequence '\$'
  regExp = re.compile("\${DataDir}")
/usr/lib/python3/dist-packages/paraview/smtrace.py:357: SyntaxWarning: invalid e
scape sequence '\g'
  gid = re.sub(regex, "\g<2>", arrayName)
/usr/lib/python3/dist-packages/paraview/smtrace.py:361: SyntaxWarning: invalid e
scape sequence '\g'
  arrayName = re.sub(regex, "\g<3>", arrayName)
/usr/lib/python3/dist-packages/paraview/tpl/cinemasci/cis/cisview.py:268: Syntax
Warning: "is not" with 'str' literal. Did you mean "!="?
  if not results[0][0] is "":
/usr/lib/python3/dist-packages/paraview/tpl/cinemasci/cis/imageview.py:208: Synt
axWarning: "is" with 'str' literal. Did you mean "=="?
  if params["type"] is "url":
/usr/lib/python3/dist-packages/vtkmodules/util/vtkMethodParser.py:304: SyntaxWar
ning: invalid escape sequence '\S'
  patn = re.compile ("  \S")
/usr/lib/python3/dist-packages/vtkmodules/web/testing.py:687: SyntaxWarning: inv
alid escape sequence '\.'
  fnamePattern = re.compile("([^\.\/\\\]+)\.py")
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1.1ubuntu3) ...
Processing triggers for libc-bin (2.39-0ubuntu8.4) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for desktop-file-utils (0.27-2build1) ...

I proceed to include the necessary line in my .bashrc file.
OpenFoam seems to be working properly, as foamRun -help produces:

Usage: foamRun [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -fileHandler <handler>
                    override the fileHandler
  -hostRoots <((host1 dir1) .. (hostN dirN))>
                    slave root directories (per host) for distributed running
  -libs '("lib1.so" ... "libN.so")'
                    pre-load libraries
  -noFunctionObjects
                    do not execute functionObjects
  -parallel         run in parallel
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -solver <name>    Solver name
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

Using: OpenFOAM-12 (see https://openfoam.org)
Build: 12-86e126a7bc4d

Which, according to the install instructions, means that OpenFoam is installed correctly.
However, when I try to run paraview in the terminal, I get:

(   3.223s) [paraview        ]vtkXOpenGLRenderWindow.:654    ERR| vtkXOpenGLRenderWindow (0x5c41acaf3ca0): Cannot create GLX context.  Aborting.

Loguru caught a signal: SIGABRT
Stack trace:
42      0x5c41862f0b05 paraview(+0x9b05) [0x5c41862f0b05]
41      0x79bc6fc2a28b __libc_start_main + 139
40      0x79bc6fc2a1ca /usr/lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca) [0x79bc6fc2a1ca]
39      0x5c41862f8332 paraview(+0x11332) [0x5c41862f8332]
38      0x5c41862f951c paraview(+0x1251c) [0x5c41862f951c]
37      0x5c41862f718d paraview(+0x1018d) [0x5c41862f718d]
36      0x79bc6f6f6712 pqParaViewBehaviors::pqParaViewBehaviors(QMainWindow*, QObject*) + 784
35      0x79bc6f6c15af pqAlwaysConnectedBehavior::pqAlwaysConnectedBehavior(QObject*) + 527
34      0x79bc6f727ea9 pqAlwaysConnectedBehavior::serverCheck() + 135
33      0x79bc6f727d87 /usr/lib/x86_64-linux-gnu/libpqApplicationComponents-pv5.11.so.1(+0x127d87) [0x79bc6f727d87]
32      0x79bc6e562f87 pqObjectBuilder::createServer(pqServerResource const&, int, vtkNetworkAccessManager::ConnectionResult&) + 591
31      0x79bc6d295597 vtkSMSession::ConnectToSelf() + 49
30      0x79bc6ceb27b1 vtkProcessModule::RegisterSession(vtkSession*) + 173
29      0x79bc66f7e21d vtkObject::InvokeEvent(unsigned long, void*) + 65
28      0x79bc66f7dc0b /usr/lib/x86_64-linux-gnu/libvtkCommonCore-pv5.11.so.1(+0x97dc0b) [0x79bc66f7dc0b]
27      0x79bc66d96843 vtkCallbackCommand::Execute(vtkObject*, unsigned long, void*) + 75
26      0x79bc6e7bf6fc /usr/lib/x86_64-linux-gnu/libvtkGUISupportQt-pv5.11.so.1(+0x676fc) [0x79bc6e7bf6fc]
25      0x79bc6e7bf773 /usr/lib/x86_64-linux-gnu/libvtkGUISupportQt-pv5.11.so.1(+0x67773) [0x79bc6e7bf773]
24      0x79bc6e782092 /usr/lib/x86_64-linux-gnu/libvtkGUISupportQt-pv5.11.so.1(+0x2a092) [0x79bc6e782092]
23      0x79bc6d912dbf /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x312dbf) [0x79bc6d912dbf]
22      0x79bc6e4abf08 /usr/lib/x86_64-linux-gnu/libpqCore-pv5.11.so.1(+0xabf08) [0x79bc6e4abf08]
21      0x79bc6e5b9393 pqServerManagerObserver::connectionCreated(vtkObject*, unsigned long, void*, void*) + 555
20      0x79bc6e4ac792 pqServerManagerObserver::connectionCreated(long long) + 98
19      0x79bc6d912dbf /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x312dbf) [0x79bc6d912dbf]
18      0x79bc6e4a94c8 /usr/lib/x86_64-linux-gnu/libpqCore-pv5.11.so.1(+0xa94c8) [0x79bc6e4a94c8]
17      0x79bc6e5b5338 pqServerManagerModel::onConnectionCreated(long long) + 740
16      0x79bc6e4aa88e pqServerManagerModel::serverAdded(pqServer*) + 98
15      0x79bc6d912dbf /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x312dbf) [0x79bc6d912dbf]
14      0x79bc6f712dc9 /usr/lib/x86_64-linux-gnu/libpqApplicationComponents-pv5.11.so.1(+0x112dc9) [0x79bc6f712dc9]
13      0x79bc6f7ac6bd pqDefaultViewBehavior::onServerCreation(pqServer*) + 117
12      0x79bc6d0e037f vtkPVSessionBase::GatherInformation(unsigned int, vtkPVInformation*, unsigned int) + 71
11      0x79bc6d0e5675 vtkPVSessionCore::GatherInformation(unsigned int, vtkPVInformation*, unsigned int) + 523
10      0x79bc6d0e5124 vtkPVSessionCore::GatherInformationInternal(vtkPVInformation*, unsigned int) + 96
9       0x79bc646f0c75 vtkPVRenderingCapabilitiesInformation::CopyFromObject(vtkObject*) + 25
8       0x79bc646f0ada vtkPVRenderingCapabilitiesInformation::GetLocalCapabilities() + 222
7       0x79bc6c1f8d05 vtkOpenGLRenderWindow::SupportsOpenGL() + 269
6       0x79bc6c3098d4 vtkXOpenGLRenderWindow::Initialize() + 60
5       0x79bc6c309805 vtkXOpenGLRenderWindow::WindowInitialize() + 41
4       0x79bc6c308bf4 vtkXOpenGLRenderWindow::CreateAWindow() + 5268
3       0x79bc6fc288ff abort + 223
2       0x79bc6fc4527e gsignal + 30
1       0x79bc6fc9eb2c pthread_kill + 284
0       0x79bc6fc45330 /usr/lib/x86_64-linux-gnu/libc.so.6(+0x45330) [0x79bc6fc45330]
(   3.223s) [paraview        ]                       :0     FATL| Signal: SIGABRT
Aborted (core dumped)

I hope I have included the necessary details. Thank you for your help. Cheers

Are you able to run glxinfo ?

Thank you for your response.
when I run glxinfo I get:

name of display: :1
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  71
  Current serial number in output stream:  72

Which is obviously a problem.

When I do:
ubuntu-drivers devices
I get:

== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd000025BAsv00001028sd00000B1Abc03sc02i00
vendor   : NVIDIA Corporation
model    : GA107GLM [RTX A2000 8GB Laptop GPU]
driver   : nvidia-driver-550 - distro non-free
driver   : nvidia-driver-535-open - distro non-free
driver   : nvidia-driver-570 - distro non-free recommended
driver   : nvidia-driver-470-server - distro non-free
driver   : nvidia-driver-570-server - distro non-free
driver   : nvidia-driver-570-server-open - distro non-free
driver   : nvidia-driver-470 - distro non-free
driver   : nvidia-driver-535 - distro non-free
driver   : nvidia-driver-535-server - distro non-free
driver   : nvidia-driver-570-open - distro non-free
driver   : nvidia-driver-550-open - distro non-free
driver   : nvidia-driver-535-server-open - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

So I have installed nvidia-driver-570. still, after running glxinfo, I get:


name of display: :1
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  156 (NV-GLX)
  Minor opcode of failed request:  6 ()
  Value in failed request:  0x0
  Serial number of failed request:  96
  Current serial number in output stream:  96

I’m thinking that the 570 driver is not actually the correct one.

So nothing seems to have been solved.
I do think I have an X server running:
echo $XDG_SESSION_TYPE x11

Cheers

Do you use Xorg or Wayland ?

I use X11.
Do you suggest Wayland?
When I sign in after booting, the small gear icon gives the following options:

  • Ubuntu on Wayland
  • Ubuntu
  • OpenBox

I chose Ubuntu.

Then glxinfo should work, if it does not, then you have issues to fix that are not related to ParaView

Do you suggest Wayland?

That may be a workaroud, make sure to install Xwayland though.

OK, thanks. Yes, it seems the issue isn’t ParaView in the end, sorry about that. Do you have any more glxinfo advice though? I am currently out of my depths (but searching a lot on the internet).

Ok, now I have tried logging into my computer using Ubuntu on Wayland, and when I type glxinfo
into the terminal I get a huge output, it is attached. Thoughts about this? Thanks
glxinfo_1.txt (78.5 KB)

You can use ParaView now :slight_smile:

Oh wow. You are right. I had found a post from you in another thread showing the ideal output of glxinfo, and mine was not the same. But indeed, paraview works now. Thank you kindly for your help and patience!!

1 Like

The solution was to use Ubuntu on Wayland.
If I figure out how to use X11 at a later time, I’ll comment on this post for to clarify for future readers.