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

Compilation changes #385

Open
Patol75 opened this issue Apr 30, 2024 · 3 comments
Open

Compilation changes #385

Patol75 opened this issue Apr 30, 2024 · 3 comments

Comments

@Patol75
Copy link
Contributor

Patol75 commented Apr 30, 2024

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:

  • PETSc Using PETSc 3.21.1, I believe rules becomes rules_util.mk in petsc_makefile. Another thing to note is that PETSC_NULL is deprecated and should be replaced by PETSC_NULLPTR (test_main.cpp files and preprocessor/fluidity_check_options.cpp)
  • VTK Using VTK 9.1, I had to supply VTK_FLAGS="-I/usr/include/vtk-9.1" and VTK_LIBS="-L/usr/lib/x86_64-linux-gnu -lvtkCommonCore-9.1 -lvtkCommonDataModel-9.1 -lvtkIOXML-9.1 -lvtkIOCore-9.1 -lvtkCommonExecutionModel-9.1 -lvtkParallelMPI-9.1 -lvtkIOLegacy-9.1 -lvtkFiltersVerdict-9.1 -lvtkIOParallelXML-9.1 -lvtkFiltersGeneral-9.1 -lvtksys-9.1 -lvtkloguru-9.1 -lvtkCommonTransforms-9.1 -lvtkCommonMisc-9.1 -lvtkCommonSystem-9.1 -lvtkCommonMath-9.1 -lvtkIOXMLParser-9.1 -lvtkParallelCore-9.1 -lvtkverdict-9.1 -lvtkFiltersCore-9.1 -lvtkCommonComputationalGeometry-9.1". Additionally, I modified the line this_vtk_version=$(grep -E 'VTK_MAJOR_VERSION\s[0-9]+' $i/vtkVersionMacros.h | sed 's/#define VTK_MAJOR_VERSION //') to account for the fact that VTK_MAJOR_VERSION appears twice now in vtkVersionMacros.h.

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
Copy link
Contributor

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
Copy link
Member

jhill1 commented May 1, 2024

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
Copy link
Contributor Author

Patol75 commented May 6, 2024

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.

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