Skip to content

Commit 886ed61

Browse files
committed
Merge remote-tracking branch 'upstream/master' into MovingBubblesFresh-clean
2 parents dcfe689 + ab146e9 commit 886ed61

8 files changed

Lines changed: 29 additions & 166 deletions

File tree

.coderabbit.yaml

Lines changed: 0 additions & 64 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ exit 0
643643
target_compile_options(${a_target} PRIVATE -fopenmp)
644644
target_link_options(${a_target} PRIVATE -fopenmp)
645645
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
646-
target_compile_options(${a_target} PRIVATE -fopenmp --offload-arch=gfx90a -fopenmp-target-fast -fopenmp-assume-threads-oversubscription -fopenmp-assume-teams-oversubscription)
646+
target_compile_options(${a_target} PRIVATE -fopenmp --offload-arch=gfx90a -O3 -fopenmp-assume-threads-oversubscription -fopenmp-assume-teams-oversubscription)
647647
target_link_options(${a_target} PRIVATE -fopenmp --offload-arch=gfx90a -flto-partitions=${MFC_BUILD_JOBS})
648648
endif()
649649
endif()

benchmarks/igr/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
json.dumps(
5050
{
5151
# Logistics
52-
"run_time_info": "T",
52+
"run_time_info": "F",
5353
# Computational Domain Parameters
5454
"x_domain%beg": -math.pi * L,
5555
"x_domain%end": math.pi * L,

src/common/m_checker_common.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ contains
5454
#:if not MFC_CASE_OPTIMIZATION
5555
@:PROHIBIT(num_fluids > 3, "num_fluids <= 3 for AMDFLang when Case optimization is off")
5656
@:PROHIBIT((bubbles_euler .or. bubbles_lagrange) .and. nb > 3, "nb <= 3 for AMDFLang when Case optimization is off")
57-
@:PROHIBIT(chemistry .and. num_species /= 10, "num_species = 10 for AMDFLang when Case optimization is off")
57+
@:PROHIBIT(chemistry .and. num_species > 10, "num_species > 10 for AMDFLang when Case optimization is off")
5858
#:endif
5959

6060
end subroutine s_check_amd

src/common/m_chemistry.fpp

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ module m_chemistry
1818

1919
implicit none
2020

21-
#:if USING_AMD
22-
real(wp) :: molecular_weights_nonparameter(10) = (/2.016, 1.008, 15.999, 31.998, 17.007, 18.015, 33.006, 34.014, 39.95, &
23-
& 28.014/)
24-
$:GPU_DECLARE(create='[molecular_weights_nonparameter]')
25-
#:endif
26-
2721
type(int_bounds_info) :: isc1, isc2, isc3
2822
$:GPU_DECLARE(create='[isc1, isc2, isc3]')
2923
integer, dimension(3) :: offsets
@@ -143,12 +137,7 @@ contains
143137

144138
$:GPU_LOOP(parallelism='[seq]')
145139
do eqn = eqn_idx%species%beg, eqn_idx%species%end
146-
#:if USING_AMD
147-
omega_m = molecular_weights_nonparameter(eqn - eqn_idx%species%beg + 1)*omega(eqn &
148-
& - eqn_idx%species%beg + 1)
149-
#:else
150-
omega_m = molecular_weights(eqn - eqn_idx%species%beg + 1)*omega(eqn - eqn_idx%species%beg + 1)
151-
#:endif
140+
omega_m = molecular_weights(eqn - eqn_idx%species%beg + 1)*omega(eqn - eqn_idx%species%beg + 1)
152141
rhs_vf(eqn)%sf(x, y, z) = rhs_vf(eqn)%sf(x, y, z) + omega_m
153142
end do
154143
end do
@@ -259,17 +248,10 @@ contains
259248
! Calculate species properties and gradients
260249
$:GPU_LOOP(parallelism='[seq]')
261250
do i = eqn_idx%species%beg, eqn_idx%species%end
262-
#:if USING_AMD
263-
h_l(i - eqn_idx%species%beg + 1) = h_l(i - eqn_idx%species%beg + 1) &
264-
& *gas_constant*T_L/molecular_weights_nonparameter(i - eqn_idx%species%beg + 1)
265-
h_r(i - eqn_idx%species%beg + 1) = h_r(i - eqn_idx%species%beg + 1) &
266-
& *gas_constant*T_R/molecular_weights_nonparameter(i - eqn_idx%species%beg + 1)
267-
#:else
268-
h_l(i - eqn_idx%species%beg + 1) = h_l(i - eqn_idx%species%beg + 1) &
269-
& *gas_constant*T_L/molecular_weights(i - eqn_idx%species%beg + 1)
270-
h_r(i - eqn_idx%species%beg + 1) = h_r(i - eqn_idx%species%beg + 1) &
271-
& *gas_constant*T_R/molecular_weights(i - eqn_idx%species%beg + 1)
272-
#:endif
251+
h_l(i - eqn_idx%species%beg + 1) = h_l(i - eqn_idx%species%beg + 1) &
252+
& *gas_constant*T_L/molecular_weights(i - eqn_idx%species%beg + 1)
253+
h_r(i - eqn_idx%species%beg + 1) = h_r(i - eqn_idx%species%beg + 1) &
254+
& *gas_constant*T_R/molecular_weights(i - eqn_idx%species%beg + 1)
273255
Xs_cell(i - eqn_idx%species%beg + 1) = 0.5_wp*(Xs_L(i - eqn_idx%species%beg + 1) + Xs_R(i &
274256
& - eqn_idx%species%beg + 1))
275257
h_k(i - eqn_idx%species%beg + 1) = 0.5_wp*(h_l(i - eqn_idx%species%beg + 1) + h_r(i &
@@ -294,15 +276,9 @@ contains
294276

295277
$:GPU_LOOP(parallelism='[seq]')
296278
do eqn = eqn_idx%species%beg, eqn_idx%species%end
297-
#:if USING_AMD
298-
Mass_Diffu_Flux(eqn - eqn_idx%species%beg + 1) = rho_cell*mass_diffusivities_mixavg_Cell(eqn &
299-
& - eqn_idx%species%beg + 1)*molecular_weights_nonparameter(eqn &
300-
& - eqn_idx%species%beg + 1)/MW_cell*dXk_dxi(eqn - eqn_idx%species%beg + 1)
301-
#:else
302-
Mass_Diffu_Flux(eqn - eqn_idx%species%beg + 1) = rho_cell*mass_diffusivities_mixavg_Cell(eqn &
303-
& - eqn_idx%species%beg + 1)*molecular_weights(eqn - eqn_idx%species%beg + 1) &
304-
& /MW_cell*dXk_dxi(eqn - eqn_idx%species%beg + 1)
305-
#:endif
279+
Mass_Diffu_Flux(eqn - eqn_idx%species%beg + 1) = rho_cell*mass_diffusivities_mixavg_Cell(eqn &
280+
& - eqn_idx%species%beg + 1)*molecular_weights(eqn - eqn_idx%species%beg + 1) &
281+
& /MW_cell*dXk_dxi(eqn - eqn_idx%species%beg + 1)
306282
rho_Vic = rho_Vic + Mass_Diffu_Flux(eqn - eqn_idx%species%beg + 1)
307283
Mass_Diffu_Energy = Mass_Diffu_Energy + h_k(eqn - eqn_idx%species%beg + 1)*Mass_Diffu_Flux(eqn &
308284
& - eqn_idx%species%beg + 1)

src/simulation/include/inline_riemann.fpp

Lines changed: 16 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -33,51 +33,28 @@
3333
eps = 0.001_wp
3434
call get_species_enthalpies_rt(T_L, h_iL)
3535
call get_species_enthalpies_rt(T_R, h_iR)
36-
#:if USING_AMD
37-
h_iL = h_iL*gas_constant/molecular_weights_nonparameter*T_L
38-
h_iR = h_iR*gas_constant/molecular_weights_nonparameter*T_R
39-
#:else
40-
h_iL = h_iL*gas_constant/molecular_weights*T_L
41-
h_iR = h_iR*gas_constant/molecular_weights*T_R
42-
#:endif
36+
h_iL = h_iL*gas_constant/molecular_weights*T_L
37+
h_iR = h_iR*gas_constant/molecular_weights*T_R
4338
call get_species_specific_heats_r(T_L, Cp_iL)
4439
call get_species_specific_heats_r(T_R, Cp_iR)
4540

4641
h_avg_2 = (sqrt(rho_L)*h_iL + sqrt(rho_R)*h_iR)/(sqrt(rho_L) + sqrt(rho_R))
4742
Yi_avg = (sqrt(rho_L)*Ys_L + sqrt(rho_R)*Ys_R)/(sqrt(rho_L) + sqrt(rho_R))
4843
T_avg = (sqrt(rho_L)*T_L + sqrt(rho_R)*T_R)/(sqrt(rho_L) + sqrt(rho_R))
49-
#:if USING_AMD
50-
if (abs(T_L - T_R) < eps) then
51-
! Case when T_L and T_R are very close
52-
Cp_avg = sum(Yi_avg(:)*(0.5_wp*Cp_iL(:) + 0.5_wp*Cp_iR(:))*gas_constant/molecular_weights_nonparameter(:))
53-
Cv_avg = sum(Yi_avg(:)*((0.5_wp*Cp_iL(:) + 0.5_wp*Cp_iR(:))*gas_constant/molecular_weights_nonparameter(:) &
54-
& - gas_constant/molecular_weights_nonparameter(:)))
55-
else
56-
! Normal calculation when T_L and T_R are sufficiently different
57-
Cp_avg = sum(Yi_avg(:)*(h_iR(:) - h_iL(:))/(T_R - T_L))
58-
Cv_avg = sum(Yi_avg(:)*((h_iR(:) - h_iL(:))/(T_R - T_L) - gas_constant/molecular_weights_nonparameter(:)))
59-
end if
60-
gamma_avg = Cp_avg/Cv_avg
61-
62-
Phi_avg(:) = (gamma_avg - 1._wp)*(vel_avg_rms/2.0_wp - h_avg_2(:)) &
63-
& + gamma_avg*gas_constant/molecular_weights_nonparameter(:)*T_avg
64-
c_sum_Yi_Phi = sum(Yi_avg(:)*Phi_avg(:))
65-
#:else
66-
if (abs(T_L - T_R) < eps) then
67-
! Case when T_L and T_R are very close
68-
Cp_avg = sum(Yi_avg(:)*(0.5_wp*Cp_iL(:) + 0.5_wp*Cp_iR(:))*gas_constant/molecular_weights(:))
69-
Cv_avg = sum(Yi_avg(:)*((0.5_wp*Cp_iL(:) + 0.5_wp*Cp_iR(:))*gas_constant/molecular_weights(:) &
70-
& - gas_constant/molecular_weights(:)))
71-
else
72-
! Normal calculation when T_L and T_R are sufficiently different
73-
Cp_avg = sum(Yi_avg(:)*(h_iR(:) - h_iL(:))/(T_R - T_L))
74-
Cv_avg = sum(Yi_avg(:)*((h_iR(:) - h_iL(:))/(T_R - T_L) - gas_constant/molecular_weights(:)))
75-
end if
76-
gamma_avg = Cp_avg/Cv_avg
77-
78-
Phi_avg(:) = (gamma_avg - 1._wp)*(vel_avg_rms/2.0_wp - h_avg_2(:)) + gamma_avg*gas_constant/molecular_weights(:)*T_avg
79-
c_sum_Yi_Phi = sum(Yi_avg(:)*Phi_avg(:))
80-
#:endif
44+
if (abs(T_L - T_R) < eps) then
45+
! Case when T_L and T_R are very close
46+
Cp_avg = sum(Yi_avg(:)*(0.5_wp*Cp_iL(:) + 0.5_wp*Cp_iR(:))*gas_constant/molecular_weights(:))
47+
Cv_avg = sum(Yi_avg(:)*((0.5_wp*Cp_iL(:) + 0.5_wp*Cp_iR(:))*gas_constant/molecular_weights(:) &
48+
& - gas_constant/molecular_weights(:)))
49+
else
50+
! Normal calculation when T_L and T_R are sufficiently different
51+
Cp_avg = sum(Yi_avg(:)*(h_iR(:) - h_iL(:))/(T_R - T_L))
52+
Cv_avg = sum(Yi_avg(:)*((h_iR(:) - h_iL(:))/(T_R - T_L) - gas_constant/molecular_weights(:)))
53+
end if
54+
gamma_avg = Cp_avg/Cv_avg
55+
56+
Phi_avg(:) = (gamma_avg - 1._wp)*(vel_avg_rms/2.0_wp - h_avg_2(:)) + gamma_avg*gas_constant/molecular_weights(:)*T_avg
57+
c_sum_Yi_Phi = sum(Yi_avg(:)*Phi_avg(:))
8158
end if
8259
#:enddef roe_avg
8360

toolchain/dependencies/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ if (MFC_FFTW)
3838
CMAKE_ARGS -DBUILD_TESTS=OFF
3939
-DBUILD_SHARED_LIBS=OFF
4040
"-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}"
41+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
4142
)
4243
else()
4344
message(WARNING "The Fortran compiler vendor is Cray so FFTW3 will not be built. We will use cray-fftw instead.")
@@ -95,11 +96,9 @@ if (MFC_SILO)
9596

9697
ExternalProject_Add(silo
9798
GIT_REPOSITORY "https://github.com/LLNL/Silo"
98-
GIT_TAG 4.12.0
99+
GIT_TAG 4.12.1-pre1
99100
GIT_SHALLOW ON
100101
GIT_PROGRESS ON
101-
PATCH_COMMAND "${GIT_EXECUTABLE}" stash
102-
&& "${GIT_EXECUTABLE}" apply "${CMAKE_SOURCE_DIR}/Silo.patch"
103102
CMAKE_ARGS -DSILO_ENABLE_SHARED=OFF
104103
-DSILO_ENABLE_SILOCK=OFF
105104
-DSILO_ENABLE_BROWSER=OFF

toolchain/dependencies/Silo.patch

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)