FluidityProject / fluidity

Fluidity
http://fluidity-project.org
Other
360 stars 113 forks source link

Compilation changes #385

Open Patol75 opened 2 months ago

Patol75 commented 2 months ago

I attempted to compile Fluidity today on my personal system (Ubuntu 22.04), and I just wanted to report some modifications I had to make to pass configure and compile stages:

I imagine there will be more problems with the newly released 24.04. @stephankramer I am happy to have a look at some of these issues in the next few days. In light of gh-384, is it best if I try to finish the CMake build on 22.04 (which should also play nicely on 24.04) or try to get a working Autotools on 24.04?

stephankramer commented 2 months ago

Thanks for looking at this @Patol75 ! Note that Ubuntu 22.04 comes with petsc 3.15.5 and vtk7 (in addition to vtk9) - so it should be possible to build Fluidity on 22.04 Jammy with system packages for these - but yes we really do want to fix these issues of course going forward.

The petsc changes look reasonably straight-forward. We do want to make sure we don't drop support for all previous petsc versions - if you do find PETSC_NULLPTR doesn't work on older versions, you can define it for those in include/petsc_legacy.h

The vtk9 stuff is a bit more problematic, we can't just hard-code these paths as it may be installed in different places on different systems (in particular on clusters) - so we need a mechanism for the installation to tell us what the required flags are which in the case of vtk is through its cmake system and by the sounds of #384 it looks like the way we query it from autoconf is no longer supported. So that is indeed a strong incentive to just bite the bullet and switch to cmake as well.

I think we first need to agree what versions we want to support. We definitely should drop bionic. If we drop both bionic and focal, i.e. we test on jammy (22.04) and try to get noble (24.04) to work we could simplify things by saying that we only support vtk9 and then petsc would be >=15.5. I'll check with people here if there's any complaints.

jhill1 commented 2 months ago

Moving to Ubuntu 22.04 is fine with me (still have a couple of systems on Mint 20 (focal), but I should upgrade those soon, once Mint 22 is out)

Patol75 commented 2 months ago

One more thing I wanted to mention is that I kept running into issues when using VTK packages available for Ubuntu 22.04. I ended up compiling the latest VTK sources (9.3), which is pretty straightforward:

sudo apt install build-essential cmake cmake-curses-gui mesa-common-dev mesa-utils freeglut3-dev ninja-build
cmake -G Ninja -DVTK_USE_MPI=1 -DVTK_WRAP_PYTHON=1 ..
ninja -j NTHREADS

Using gh-358 and applying the patch mentioned in gh-384 for vtkMeshQuality allowed compilation to succeed, and it seems to me my issues are now gone.