Skip to content

Commit 854eb4f

Browse files
Merge pull request #381 from FluidityProject/omp_fixes
Some fixes for OMP that were removed in 5963c4c Also add CI test build with OMP
2 parents aedd3df + f7cbe76 commit 854eb4f

File tree

5 files changed

+48
-1
lines changed

5 files changed

+48
-1
lines changed

.github/workflows/ubuntu.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
name: [ "Build Bionic", "Build Focal", "Build Jammy" ]
20+
name: [ "Build Bionic", "Build Focal", "Build Jammy", "Build Jammy OMP" ]
2121
include:
2222

2323
- name: "Build Bionic"
@@ -29,6 +29,9 @@ jobs:
2929
- name: "Build Jammy"
3030
release: jammy
3131

32+
- name: "Build Jammy OMP"
33+
release: jammy-omp
34+
3235
steps:
3336

3437
- name: Check Out Repo

assemble/Advection_Diffusion_CG.F90

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,11 @@ subroutine assemble_advection_diffusion_cg(t, matrix, rhs, state, dt, velocity_n
256256
integer :: clr, nnid, len, ele
257257
integer :: num_threads, thread_num
258258

259+
#ifdef _OPENMP
260+
!! Did we successfully prepopulate the transform_to_physical_cache?
261+
logical :: cache_valid
262+
#endif
263+
259264
type(element_type), dimension(:), allocatable :: supg_element
260265

261266
ewrite(1, *) "In assemble_advection_diffusion_cg"

assemble/Advection_Diffusion_FV.F90

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ subroutine assemble_advection_diffusion_fv(t, matrix, rhs, state)
171171
integer :: clr, nnid, len, ele
172172
integer :: thread_num
173173

174+
#ifdef _OPENMP
175+
!! Did we successfully prepopulate the transform_to_physical_cache?
176+
logical :: cache_valid
177+
#endif
178+
174179
ewrite(1,*) "In assemble_advection_diffusion_fv"
175180

176181
coordinate => extract_vector_field(state, "Coordinate")
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM fluidity/baseimages:jammy
2+
3+
USER root
4+
5+
RUN apt-get -y update && \
6+
apt-get -y dist-upgrade && \
7+
apt-get -y install sudo && \
8+
rm -rf /var/cache/apt/archives && \
9+
rm -rf /var/lib/apt/lists
10+
11+
RUN adduser fluidity sudo
12+
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
13+
14+
COPY . /home/fluidity
15+
RUN chown -R fluidity /home/fluidity
16+
17+
USER fluidity
18+
19+
RUN ./configure --enable-2d-adaptivity --enable-omp
20+
RUN make makefiles
21+
RUN test -z "$(git status --porcelain */Makefile.dependencies)"
22+
RUN make
23+
RUN make fltools
24+
RUN make manual
25+
26+
# Python module 'assess' is required for some longtests
27+
RUN python3 -m pip install assess

femtools/Colouring.F90

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ subroutine get_mesh_colouring(state, mesh, colouring_type, colouring)
8989
type(integer_set), dimension(:), pointer, intent(out) :: colouring
9090
type(mesh_type), pointer :: topology
9191
integer :: i
92+
#ifdef _OPENMP
93+
type(csr_sparsity), pointer :: sparsity
94+
type(mesh_type) :: p0_mesh
95+
integer :: ncolours
96+
integer :: stat
97+
type(scalar_field) :: element_colours
98+
#endif
9299

93100
topology => extract_mesh(state, topology_mesh_name)
94101

0 commit comments

Comments
 (0)