Skip to content

Commit cbcedd6

Browse files
authored
Tuo modules and template (MFlowCode#1103)
1 parent b02e7f2 commit cbcedd6

File tree

11 files changed

+82
-20
lines changed

11 files changed

+82
-20
lines changed

src/common/m_compute_levelset.fpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,9 +609,8 @@ contains
609609
end if
610610
else
611611
levelset%sf(i, j, k, ib_patch_id) = dist_surface
612-
613612
xyz_local = xyz_local*dist_surface_vec
614-
xyz_local = xyz_local/norm2(xyz_local)
613+
xyz_local = xyz_local/max(norm2(xyz_local), sgm_eps)
615614
levelset_norm%sf(i, j, k, ib_patch_id, :) = matmul(rotation, xyz_local)
616615
end if
617616
end do

src/common/m_model.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ contains
678678
do i = 1, boundary_edge_count
679679
boundary_edge(1) = boundary_v(i, 2, 1) - boundary_v(i, 1, 1)
680680
boundary_edge(2) = boundary_v(i, 2, 2) - boundary_v(i, 1, 2)
681-
edgetan = boundary_edge(1)/boundary_edge(2)
681+
edgetan = boundary_edge(1)/sign(max(sgm_eps, abs(boundary_edge(2))), boundary_edge(2))
682682

683683
if (abs(boundary_edge(2)) < threshold_vector_zero) then
684684
if (edgetan > 0._wp) then

src/common/m_variables_conversion.fpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,8 +1377,7 @@ contains
13771377

13781378
#ifndef MFC_PRE_PROCESS
13791379
subroutine s_compute_speed_of_sound(pres, rho, gamma, pi_inf, H, adv, vel_sum, c_c, c, qv)
1380-
$:GPU_ROUTINE(function_name='s_compute_speed_of_sound', &
1381-
& parallelism='[seq]', cray_inline=True)
1380+
$:GPU_ROUTINE(parallelism='[seq]')
13821381

13831382
real(wp), intent(in) :: pres
13841383
real(wp), intent(in) :: rho, gamma, pi_inf, qv

src/simulation/m_data_output.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,9 +1233,9 @@ contains
12331233
q_cons_vf(mom_idx%beg)%sf(j - 2, k, l), G_local)
12341234
else
12351235
call s_compute_pressure( &
1236-
q_cons_vf(1)%sf(j - 2, k, l), &
1236+
q_cons_vf(E_idx)%sf(j - 2, k, l), &
12371237
q_cons_vf(alf_idx)%sf(j - 2, k, l), &
1238-
dyn_p, pi_inf, gamma, rho, qv, rhoYks(:), pres, T)
1238+
dyn_p, pi_inf, gamma, rho, qv, rhoYks, pres, T)
12391239
end if
12401240

12411241
if (model_eqns == 4) then

src/simulation/m_derived_variables.fpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ module m_derived_variables
1919

2020
use m_data_output !< Data output module
2121

22-
use m_time_steppers !< Time-stepping algorithms
23-
2422
use m_compile_specific
2523

2624
use m_helper
@@ -120,9 +118,11 @@ contains
120118

121119
!> Writes coherent body information, communication files, and probes.
122120
!! @param t_step Current time-step
123-
subroutine s_compute_derived_variables(t_step)
121+
subroutine s_compute_derived_variables(t_step, q_cons_vf, q_prim_ts1, q_prim_ts2)
124122

125123
integer, intent(in) :: t_step
124+
type(scalar_field), dimension(:), intent(inout) :: q_cons_vf
125+
type(vector_field), dimension(:), intent(inout) :: q_prim_ts1, q_prim_ts2
126126
integer :: i, j, k !< Generic loop iterators
127127

128128
if (probe_wrt) then
@@ -169,7 +169,7 @@ contains
169169

170170
call s_derive_center_of_mass(q_prim_ts2(2)%vf, c_mass)
171171

172-
call s_write_probe_files(t_step, q_cons_ts(1)%vf, accel_mag)
172+
call s_write_probe_files(t_step, q_cons_vf, accel_mag)
173173

174174
call s_write_com_files(t_step, c_mass)
175175
end if

src/simulation/m_start_up.fpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,11 +1123,6 @@ contains
11231123
end do
11241124
end if
11251125

1126-
call s_compute_derived_variables(t_step)
1127-
1128-
#ifdef DEBUG
1129-
print *, 'Computed derived vars'
1130-
#endif
11311126
mytime = mytime + dt
11321127

11331128
! Total-variation-diminishing (TVD) Runge-Kutta (RK) time-steppers
@@ -1138,7 +1133,6 @@ contains
11381133
if (relax) call s_infinite_relaxation_k(q_cons_ts(1)%vf)
11391134

11401135
! Time-stepping loop controls
1141-
11421136
t_step = t_step + 1
11431137

11441138
end subroutine s_perform_time_step

src/simulation/m_time_steppers.fpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ module m_time_steppers
4646

4747
use m_body_forces
4848

49+
use m_derived_variables
50+
4951
implicit none
5052

5153
type(vector_field), allocatable, dimension(:) :: q_cons_ts !<
@@ -533,6 +535,7 @@ contains
533535

534536
if (probe_wrt) then
535537
call s_time_step_cycling(t_step)
538+
call s_compute_derived_variables(t_step, q_cons_ts(1)%vf, q_prim_ts1, q_prim_ts2)
536539
end if
537540

538541
if (cfl_dt) then

toolchain/bootstrap/modules.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,14 @@ done
3939
if [ -v $u_c ]; then
4040
log "Select a system:"
4141
log "$G""ORNL$W: Ascent (a) | Frontier (f) | Summit (s) | Wombat (w)"
42+
log "$B""LLNL $W: Tuolumne (tuo)"
4243
log "$C""ACCESS$W: Bridges2 (b) | Expanse (e) | Delta (d) | DeltaAI (dai)"
4344
log "$Y""Gatech$W: Phoenix (p)"
4445
log "$R""Caltech$W: Richardson (r)"
45-
log "$BR""Brown$W: Oscar (o)"
46+
log "$BR""Brown$W: Oscar (o)"
4647
log "$B""DoD$W: Carpenter Cray (cc) | Carpenter GNU (c) | Nautilus (n)"
4748
log "$OR""Florida$W: HiPerGator (h)"
48-
log_n "($G""a$W/$G""f$W/$G""s$W/$G""w$W/$C""b$W/$C""e$CR/$C""d/$C""dai$CR/$Y""p$CR/$R""r$CR/$B""cc$CR/$B""c$CR/$B""n$CR/$BR""o"$CR"/$OR""h"$CR"): "
49+
log_n "($G""a$W/$G""f$W/$G""s$W/$G""w$W/$B""tuo$W/$C""b$W/$C""e$CR/$C""d/$C""dai$CR/$Y""p$CR/$R""r$CR/$B""cc$CR/$B""c$CR/$B""n$CR/$BR""o"$CR"/$OR""h"$CR"): "
4950
read u_c
5051
log
5152
fi

toolchain/dependencies/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ if (MFC_HIPFORT)
130130
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray")
131131
ExternalProject_Add(hipfort
132132
GIT_REPOSITORY "https://github.com/ROCmSoftwarePlatform/hipfort"
133-
GIT_TAG rocm-6.0.2
133+
GIT_TAG rocm-6.3.1
134134
GIT_SHALLOW ON
135135
GIT_PROGRESS ON
136136
CMAKE_ARGS "-DHIPFORT_COMPILER=${CMAKE_Fortran_COMPILER}"

toolchain/modules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ f-all cpe/25.03 rocm/6.3.1
4545
f-all cray-fftw cray-hdf5 python cmake
4646
f-gpu python craype-accel-amd-gfx90a rocprofiler-compute/3.0.0
4747

48+
tuo OLCF Tuolumne
49+
tuo-all cpe/25.03 rocm/6.3.1
50+
tuo-all cray-fftw/3.3.10.9 cray-hdf5 python/3.12.2 cmake
51+
tuo-gpu craype-accel-amd-gfx942
52+
tuo-gpu HSA_XNACK=0
53+
4854
d NCSA Delta
4955
d-all python/3.11.6
5056
d-cpu gcc/11.4.0 openmpi

0 commit comments

Comments
 (0)