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

Build conda packages for Python 3.8 - 3.11 #44

Merged
merged 56 commits into from
Apr 22, 2024
Merged

Build conda packages for Python 3.8 - 3.11 #44

merged 56 commits into from
Apr 22, 2024

Conversation

kwabenantim
Copy link
Member

@kwabenantim kwabenantim commented Sep 14, 2023

@kwabenantim kwabenantim added the enhancement New feature or request label Sep 14, 2023
@kwabenantim kwabenantim self-assigned this Sep 14, 2023
@kwabenantim
Copy link
Member Author

Failure to resolve conda build dependencies
The minimum version of petsc4py on conda-forge that supports Python 3.11 is petsc4py 3.17.4 which depends on:

libgcc-ng >=12, libgfortran-ng, libgfortran5 >=10.4.0, mpich >=4.0.2,<5.0a0, numpy >=1.21.6,<2.0a0, 
petsc >=3.17.4,<3.18.0a0 real_*, python >=3.10,<3.11.0a0, python >=3.10,<3.11.0a0 *_cpython, python_abi 3.10.* *_cp310

In turn, petsc 3.17.4 from conda-forge depends on:

fftw * mpi_openmpi_*, hdf5 * mpi_openmpi_*, hdf5 >=1.12.2,<1.12.3.0a0 mpi_openmpi_*, 
hypre >=2.25.0,<2.25.1.0a0, libblas >=3.9.0,<4.0a0, libcblas >=3.9.0,<4.0a0, libgcc-ng >=12, 
libgfortran-ng, libgfortran5 >=10.4.0, liblapack >=3.9.0,<4.0a0, libstdcxx-ng >=12, 
metis >=5.1.0,<5.2.0a0, mumps-mpi >=5.2.1,<5.2.2.0a0, openmpi >=4.1.4,<5.0a0, 
parmetis >=4.0.3,<4.1.0a0, ptscotch >=6.0.9,<6.0.10.0a0, scalapack >=2.2.0,<2.3.0a0, 
scotch >=6.0.9,<6.0.10.0a0, suitesparse >=5.10.1,<5.11.0a0, superlu, superlu_dist >=7.1.1,<8.0a0, 
yaml >=0.2.5,<0.3.0a0

However, Chaste does not yet support hdf5 1.12.

@kwabenantim kwabenantim changed the title Build VTK for Python 3.11 Build VTK 7 for Python 3.11 Sep 14, 2023
@kwabenantim kwabenantim added the ci:off Skip CI testing label Sep 14, 2023
@bdevans
Copy link
Member

bdevans commented Sep 15, 2023

Ok, good investigating! Maybe time to open an issue in the main repo to add support for hdf5>=1.12 then?

@kwabenantim
Copy link
Member Author

The investigation for supporting HDF 1.12 had already started on an old trac ticket (now a github issue):

@kwabenantim kwabenantim mentioned this pull request Sep 18, 2023
2 tasks
@kwabenantim kwabenantim removed the ci:off Skip CI testing label Oct 2, 2023
@kwabenantim kwabenantim marked this pull request as ready for review October 2, 2023 14:05
@kwabenantim kwabenantim changed the title Build VTK 7 for Python 3.11 Build VTK 7 and PyChaste for Python 3.11 Oct 2, 2023
@kwabenantim
Copy link
Member Author

We now have vtk 7.1.1 built for Python 3.11 (https://anaconda.org/PyChaste/vtk/files).
Next step is to build PyChaste for Python 3.11.

@kwabenantim
Copy link
Member Author

The VTK conda build has some fixed paths in its generated CMake configuration that need fixing.

make[3]: *** No rule to make target 
'/home/conda/feedstock_root/build_artifacts/vtk_1696254766018/_build_env/x86_64-conda-linux-gnu/sysroot/usr/lib/libSM.so', 
needed by 'projects/PyChaste/libchaste_project_PyChaste.so'.  Stop.

@kwabenantim
Copy link
Member Author

Fixes

VTKConfig.cmake

-if (VTK_USE_CXX11_FEATURES)
-  if (CMAKE_VERSION VERSION_LESS "3.1")
-    message(FATAL_ERROR "VTK was built with C++11 features using CMake's CXX_STANDARD_REQUIRED feature.  Configuring projects this way requires a newer version of CMake.  Please update to CMake 3.1 or newer")
-  endif()
-  set(CMAKE_CXX_STANDARD 11)
-  set(CMAKE_CXX_STANDARD_REQUIRED 11)
-endif()

VTKTargets.cmake
Remove /home/conda/feedstock_root/build_artifacts/vtk_1696254766018/_build_env/x86_64-conda-linux-gnu/sysroot/usr/lib/ from all paths passed to the linker.

@kwabenantim
Copy link
Member Author

Need to update build scripts to narrow down dependencies due to installation issues:

@kwabenantim kwabenantim linked an issue Apr 16, 2024 that may be closed by this pull request
6 tasks
@kwabenantim kwabenantim changed the title Build VTK 7 and PyChaste for Python 3.11 Build VTK 7 and PyChaste for Python 3.8 - 3.11 Apr 16, 2024
@kwabenantim kwabenantim linked an issue Apr 16, 2024 that may be closed by this pull request
@kwabenantim
Copy link
Member Author

kwabenantim commented Apr 18, 2024

Conda Builds for PyChaste and VTK

  • Python 3.8
  • Python 3.9
  • Python 3.10
  • Python 3.11
  • Python 3.12 (skipped)

@kwabenantim
Copy link
Member Author

Colab Notebook for Immersed Boundary tutorial working okay.

@kwabenantim kwabenantim changed the title Build conda packages for Python 3.8 - 3.12 Build conda packages for Python 3.8 - 3.11 Apr 19, 2024
@kwabenantim
Copy link
Member Author

Skipping Python 3.12 as vtk 7 python wrapping contains deprecated functionality. Support for newer vtk versions should fix this in #23 and #24

@kwabenantim kwabenantim marked this pull request as ready for review April 19, 2024 19:48
@kwabenantim kwabenantim merged commit 27f9c30 into develop Apr 22, 2024
7 checks passed
@kwabenantim kwabenantim deleted the vtk_py311 branch April 22, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release PyChaste 2024.1 Build conda packages for Python 3.8 - 3.12 Custom conda XSD packages
2 participants