Skip to content

Commit dbb8459

Browse files
committed
added runtime folder
1 parent 07cf17d commit dbb8459

File tree

7 files changed

+132
-3
lines changed

7 files changed

+132
-3
lines changed

RunTimeTests/MeanTimeData

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Viscous
2+
0.00018558695652173907
3+
0.00020577826086956504
4+
0.0035785804347826084
5+
0.00452261956521739
6+
0.0037711695652173907
7+
0.0046880260869565215
8+
0.09709701956521741
9+
0.13853727391304346
10+
0.153668252173913
11+
0.21701702391304342
12+
Monopole
13+
0.0006033239130434785
14+
0.0006059804347826085
15+
0.0003294130434782607
16+
0.0007314065217391305
17+
0.005524604347826086
18+
0.010737452173913042
19+
0.0073501434782608675
20+
0.007414117391304346
21+
0.004163260869565218
22+
0.009179697826086953
23+
0.05305613913043479
24+
0.09925884130434783
25+
0.10973742826086959
26+
0.06566204130434782
27+
0.142803347826087
28+
1.3211132347826084
29+
0.7312944891304348

RunTimeTests/testRuntime.py

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import os
2+
3+
ViscousJobs = [ ['C79E1D3C', 'CD9D3050'], \
4+
['9CB03CEF', 'D6BAC936', 'FB822062', 'B3AAC9C8'], \
5+
['1C0780C8', '2060F55A', '07C33719', '939D6718']]
6+
7+
MonopoleJobs = [['EF54219C', '7FC6826B', '59D05DE9', '6B22A317', 'AF46C382', '46AA7AF8'], \
8+
['34DBFE14', '14B6198D', 'AE37D842', 'CC4F7C44', '66CFF8CC', '303B925A'], \
9+
['AD63A4A5', '8A341282', '622DEC78', 'AB04C64D', '63850240' ]]
10+
11+
12+
itr = 10
13+
vTimes = [[0 for x in range(10)] for y in range(itr)]
14+
mTimes = [[0 for x in range(17)] for y in range(itr)]
15+
16+
# Viscous Tests
17+
for k in range(0,itr):
18+
os.system("rm -rf RunTimeTests/ViscousTests/*")
19+
for i in ViscousJobs:
20+
for j in i:
21+
os.system("cp tests/" + j + "/case.py RunTimeTests/ViscousTests/case" + j + ".py")
22+
os.system("./mfc.sh run RunTimeTests/ViscousTests/case" + j + ".py")
23+
24+
f = open("RunTimeTests/ViscousTests/time_data.dat")
25+
print(f)
26+
for m in range(0, 10):
27+
vTimes[k][m] = float(f.readline().split()[1])
28+
29+
meanVTimes = []
30+
for m in range(0,10):
31+
testSum = 0
32+
for j in range(0, itr):
33+
testSum = testSum + vTimes[j][m]
34+
meanVTimes.append(testSum/itr)
35+
36+
# Monopole Tests
37+
for k in range(0,itr):
38+
os.system("rm -rf RunTimeTests/MonopoleTests/*")
39+
for i in MonopoleJobs:
40+
for j in i:
41+
os.system("cp tests/" + j + "/case.py RunTimeTests/MonopoleTests/case" + j + ".py")
42+
os.system("./mfc.sh run RunTimeTests/MonopoleTests/case" + j + ".py")
43+
44+
f = open("RunTimeTests/MonopoleTests/time_data.dat")
45+
for m in range(0, 17):
46+
mTimes[k][m] = float(f.readline().split()[1])
47+
48+
meanMTimes = []
49+
for m in range(0,17):
50+
testSum = 0
51+
for j in range(0, itr):
52+
testSum = testSum + mTimes[j][m]
53+
meanMTimes.append(testSum/itr)
54+
55+
f = open("RunTimeTests/MeanTimeData", 'x')
56+
f.write("Viscous\n")
57+
for i in range(0,10):
58+
f.write(str(meanVTimes[i]) + "\n")
59+
f.write("Monopole\n")
60+
for i in range(0,17):
61+
f.write(str(meanMTimes[i]) + "\n")
62+
f.close()

jobs.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Viscous:
2+
C79E1D3C
3+
CD9D3050
4+
9CB03CEF
5+
D6BAC936
6+
FB822062
7+
B3AAC9C8
8+
1C0780C8
9+
2060F55A
10+
07C33719
11+
939D6718
12+
13+
Monopole:
14+
EF54219C
15+
7FC6826B
16+
59D05DE9
17+
6B22A317
18+
AF46C382
19+
46AA7AF8
20+
34DBFE14
21+
14B6198D
22+
AE37D842
23+
CC4F7C44
24+
66CFF8CC
25+
303B925A
26+
AD63A4A5
27+
8A341282
28+
622DEC78
29+
AB04C64D
30+
63850240

src/simulation/m_global_parameters.fpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ module m_global_parameters
3030

3131
implicit none
3232

33+
real(kind(0d0)) :: time = 0
34+
3335
! Logistics ================================================================
3436
integer :: num_procs !< Number of processors
3537
integer, parameter :: num_stcls_min = 5 !< Mininum # of stencils

src/simulation/m_time_steppers.f90

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ subroutine s_1st_order_tvd_rk(t_step, time_avg) ! ------------------------------
231231

232232
call cpu_time(finish)
233233

234+
time = time + (finish - start)
235+
234236
if (t_step >= 4) then
235237
time_avg = (abs(finish - start) + (t_step - 4)*time_avg)/(t_step - 3)
236238
else
@@ -313,6 +315,8 @@ subroutine s_2nd_order_tvd_rk(t_step, time_avg) ! ------------------------------
313315

314316
call cpu_time(finish)
315317

318+
time = time + (finish - start)
319+
316320
if (t_step >= 4) then
317321
time_avg = (abs(finish - start) + (t_step - 4)*time_avg)/(t_step - 3)
318322
else
@@ -422,6 +426,8 @@ subroutine s_3rd_order_tvd_rk(t_step, time_avg) ! ------------------------------
422426

423427
call cpu_time(finish)
424428

429+
time = time + (finish - start)
430+
425431
if (t_step >= 4) then
426432
time_avg = (abs(finish - start) + (t_step - 4)*time_avg)/(t_step - 3)
427433
else

src/simulation/m_viscous.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,8 +1376,8 @@ subroutine s_reconstruct_cell_boundary_values_visc(v_vf, vL_x_flat, vL_y_flat, v
13761376
end subroutine s_reconstruct_cell_boundary_values_visc ! --------------------
13771377

13781378
subroutine s_finalize_viscous_module()
1379-
deallocate (gammas, pi_infs)
1380-
deallocate (Res(1:2, 1:maxval(Re_size)))
1379+
!deallocate (gammas, pi_infs)
1380+
!deallocate (Res(1:2, 1:maxval(Re_size)))
13811381
end subroutine s_finalize_viscous_module
13821382

13831383
end module m_viscous

src/simulation/p_main.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ program p_main
256256
call s_mpi_barrier()
257257

258258
if (num_procs > 1) then
259-
call mpi_bcast_time_step_values(proc_time, time_avg)
259+
call mpi_bcast_time_step_values(proc_time, time)
260260

261261
call mpi_bcast_time_step_values(io_proc_time, io_time_avg)
262262
end if

0 commit comments

Comments
 (0)