Skip to content

Commit

Permalink
Merge pull request #381 from FluidityProject/omp_fixes
Browse files Browse the repository at this point in the history
Some fixes for OMP that were removed in 5963c4c

Also add CI test build with OMP
  • Loading branch information
stephankramer committed Jun 21, 2023
2 parents aedd3df + f7cbe76 commit 854eb4f
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
name: [ "Build Bionic", "Build Focal", "Build Jammy" ]
name: [ "Build Bionic", "Build Focal", "Build Jammy", "Build Jammy OMP" ]
include:

- name: "Build Bionic"
Expand All @@ -29,6 +29,9 @@ jobs:
- name: "Build Jammy"
release: jammy

- name: "Build Jammy OMP"
release: jammy-omp

steps:

- name: Check Out Repo
Expand Down
5 changes: 5 additions & 0 deletions assemble/Advection_Diffusion_CG.F90
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,11 @@ subroutine assemble_advection_diffusion_cg(t, matrix, rhs, state, dt, velocity_n
integer :: clr, nnid, len, ele
integer :: num_threads, thread_num

#ifdef _OPENMP
!! Did we successfully prepopulate the transform_to_physical_cache?
logical :: cache_valid
#endif

type(element_type), dimension(:), allocatable :: supg_element

ewrite(1, *) "In assemble_advection_diffusion_cg"
Expand Down
5 changes: 5 additions & 0 deletions assemble/Advection_Diffusion_FV.F90
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ subroutine assemble_advection_diffusion_fv(t, matrix, rhs, state)
integer :: clr, nnid, len, ele
integer :: thread_num

#ifdef _OPENMP
!! Did we successfully prepopulate the transform_to_physical_cache?
logical :: cache_valid
#endif

ewrite(1,*) "In assemble_advection_diffusion_fv"

coordinate => extract_vector_field(state, "Coordinate")
Expand Down
27 changes: 27 additions & 0 deletions docker/actions/Dockerfile.actions.jammy-omp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM fluidity/baseimages:jammy

USER root

RUN apt-get -y update && \
apt-get -y dist-upgrade && \
apt-get -y install sudo && \
rm -rf /var/cache/apt/archives && \
rm -rf /var/lib/apt/lists

RUN adduser fluidity sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

COPY . /home/fluidity
RUN chown -R fluidity /home/fluidity

USER fluidity

RUN ./configure --enable-2d-adaptivity --enable-omp
RUN make makefiles
RUN test -z "$(git status --porcelain */Makefile.dependencies)"
RUN make
RUN make fltools
RUN make manual

# Python module 'assess' is required for some longtests
RUN python3 -m pip install assess
7 changes: 7 additions & 0 deletions femtools/Colouring.F90
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ subroutine get_mesh_colouring(state, mesh, colouring_type, colouring)
type(integer_set), dimension(:), pointer, intent(out) :: colouring
type(mesh_type), pointer :: topology
integer :: i
#ifdef _OPENMP
type(csr_sparsity), pointer :: sparsity
type(mesh_type) :: p0_mesh
integer :: ncolours
integer :: stat
type(scalar_field) :: element_colours
#endif

topology => extract_mesh(state, topology_mesh_name)

Expand Down

0 comments on commit 854eb4f

Please sign in to comment.