Skip to content

Commit e4b8976

Browse files
authored
fix linter for double precision mpi intrinsicts and the offenders (#766)
1 parent 1d58b45 commit e4b8976

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.github/workflows/lint-source.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ jobs:
3636

3737
- name: No double precision intrinsics
3838
run: |
39-
! grep -iR 'dsqrt\|dexp\|dlog\|dble\|dabs\|double\ precision\|real(8)\|real(4)\|dprod\|dmin\|dmax\|dfloat\|dreal\|dcos\|dsin\|dtan\|dsign\|dtanh\|dsinh\|dcosh\|d0' --exclude-dir=syscheck --exclude="*nvtx*" ./src/*
39+
! grep -iR 'double_precision\|dsqrt\|dexp\|dlog\|dble\|dabs\|double\ precision\|real(8)\|real(4)\|dprod\|dmin\|dmax\|dfloat\|dreal\|dcos\|dsin\|dtan\|dsign\|dtanh\|dsinh\|dcosh\|d0' --exclude-dir=syscheck --exclude="*nvtx*" --exclude="*precision_select*" ./src/*
4040

src/common/m_mpi_common.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ contains
244244
end do
245245
246246
allocate (gathered_vector(sum(recounts)))
247-
call MPI_GATHERV(my_vector, counts, MPI_DOUBLE_PRECISION, gathered_vector, recounts, displs, MPI_DOUBLE_PRECISION, &
247+
call MPI_GATHERV(my_vector, counts, mpi_p, gathered_vector, recounts, displs, mpi_p, &
248248
root, MPI_COMM_WORLD, ierr)
249249
#endif
250250
end subroutine s_mpi_gather_data

src/pre_process/m_mpi_proxy.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ contains
9191
#:endfor
9292
9393
#:for VAR in [ '2', '3', '4', '5', '6', '7', '8', '9']
94-
call MPI_BCAST(patch_icpp(i)%a(${VAR}$), 1, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
94+
call MPI_BCAST(patch_icpp(i)%a(${VAR}$), 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
9595
#:endfor
9696
9797
call MPI_BCAST(patch_icpp(i)%model_filepath, len(patch_icpp(i)%model_filepath), MPI_CHARACTER, 0, MPI_COMM_WORLD, ierr)
@@ -106,7 +106,7 @@ contains
106106
! Broadcast IB variables
107107
call MPI_BCAST(patch_ib(i)%geometry, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
108108
call MPI_BCAST(patch_ib(i)%model_filepath, len(patch_ib(i)%model_filepath), MPI_CHARACTER, 0, MPI_COMM_WORLD, ierr)
109-
call MPI_BCAST(patch_ib(i)%model_threshold, 1, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
109+
call MPI_BCAST(patch_ib(i)%model_threshold, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
110110
call MPI_BCAST(patch_ib(i)%model_spc, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
111111
112112
#:for VAR in [ 'x_centroid', 'y_centroid', 'z_centroid', &
@@ -115,7 +115,7 @@ contains
115115
#:endfor
116116
117117
#:for VAR in [ 'model_translate', 'model_scale', 'model_rotate']
118-
call MPI_BCAST(patch_ib(i)%${VAR}$, size(patch_ib(i)%${VAR}$), MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
118+
call MPI_BCAST(patch_ib(i)%${VAR}$, size(patch_ib(i)%${VAR}$), mpi_p, 0, MPI_COMM_WORLD, ierr)
119119
#:endfor
120120
end do
121121

src/simulation/m_mpi_proxy.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,13 @@ contains
218218
& 'x_domain%beg', 'x_domain%end', 'y_domain%beg', 'y_domain%end', &
219219
& 'z_domain%beg', 'z_domain%end', 'x_a', 'x_b', 'y_a', 'y_b', 'z_a', &
220220
& 'z_b', 't_stop', 't_save', 'cfl_target' ]
221-
call MPI_BCAST(${VAR}$, 1, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
221+
call MPI_BCAST(${VAR}$, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
222222
#:endfor
223223
224224
do i = 1, 3
225225
#:for VAR in [ 'bc_x%vel_in', 'bc_x%vel_out', 'bc_y%vel_in', 'bc_y%vel_out', &
226226
& 'bc_z%vel_in', 'bc_z%vel_out']
227-
call MPI_BCAST(${VAR}$ (i), 1, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
227+
call MPI_BCAST(${VAR}$ (i), 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
228228
#:endfor
229229
end do
230230
@@ -248,7 +248,7 @@ contains
248248
249249
do i = 1, num_fluids_max
250250
#:for VAR in ['bc_x%alpha_rho_in','bc_x%alpha_in','bc_y%alpha_rho_in','bc_y%alpha_in','bc_z%alpha_rho_in','bc_z%alpha_in']
251-
call MPI_BCAST(${VAR}$ (i), 1, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
251+
call MPI_BCAST(${VAR}$ (i), 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
252252
#:endfor
253253
end do
254254

0 commit comments

Comments
 (0)