11 from subprocess
import Popen, PIPE
17 from functions_main
import PBS_Job_Parse
18 from functions_main
import PBS_Benchmark_Parse
19 from functions_main
import Parse_Benchmark
20 from functions_main
import Parse_Nektar_Output
21 from functions_main
import Parse_Nektar_CG_Benchmark_Output
22 from functions_main
import Find_Nektar_Elements
23 from functions_main
import Find_Nektar_Files
24 from functions_main
import Find_Hardware
25 from functions_main
import Find_Conditions
26 from functions_main
import Filename_Generate
32 from serial
import Run_Serial_Fit
38 from parallel
import Run_Parallel_Model
39 from parallel
import Run_Parallel_Comparison
45 from error_main
import Primary_Error_Out
46 from error_main
import Error_Check_Proc_Input
47 from error_main
import Error_Check_Comm_Input
58 Mesh =
'cyl-small.xml'
61 Max_N_Z =
'output_72.txt'
64 Conditions_File =
'conditions_80.xml'
67 Scheme =
'IterativeStaticCond'
77 Compare_Serial =
False
83 Parallelisation =
'Hybrid_Socket'
86 Compare_Parallel =
True
95 (Mesh_File, Input_Nektar_Max, Conditions, Loc_Serial_Timing_Files, Loc_Parallel_Timing_Files, Benchmark_PBS, MPI_Benchmark, Node_Map) =
Filename_Generate(Mesh, Max_N_Z, Conditions_File)
101 output_path =
'Output/Figures/'
102 if os.path.exists(output_path):
103 cmd_string_clear =
'rm -r Output/Figures/ \n'
104 process = Popen([cmd_string_clear],shell=
True, stdout=PIPE, stdin=PIPE)
106 os.mkdir(output_path)
108 if not os.path.exists(output_path):
109 os.mkdir(output_path)
126 for i
in range(0, len(Timing_Files)):
127 Timings[str(Nektar_Modes[i])] =
Parse_Nektar_Output(Loc_Serial_Timing_Files + Timing_Files[i])
145 Fit =
Run_Serial_Fit(Compare_Serial, Consider_Modes, Num_Constants, P, Nektar_Serial_Elements, Nektar_Modes, Timings, Pressure, Velocity_1, Velocity_2, Velocity_3,
'IterativeStaticCond')
148 if Parallel
is False:
155 (Num_Core_Per_Node, Num_Core_Per_Socket, Num_Sock_Per_Node, Error, Message) =
Find_Hardware(Node_Map)
163 PROC_TOT = Num_Core_Per_Node * Num_Node
176 (BW_Node_To_Node, LAT_Node_To_Node, BW_Socket_To_Socket, LAT_Socket_To_Socket, BW_Core_To_Core, LAT_Core_To_Core) =
Parse_Benchmark(MPI_Benchmark, PROC_BENCHMARK, Num_Core_Per_Socket, Num_Sock_Per_Node)
178 print(BW_Node_To_Node, LAT_Node_To_Node, BW_Socket_To_Socket, LAT_Socket_To_Socket, BW_Core_To_Core, LAT_Core_To_Core)
192 (Error, Message) =
Error_Check_Comm_Input(BW_Node_To_Node, LAT_Node_To_Node, BW_Socket_To_Socket, LAT_Socket_To_Socket, BW_Core_To_Core, LAT_Core_To_Core)
199 (PROC_Z, PROC_XY, Total) =
Run_Parallel_Model(Parallelisation, Scheme, Mesh_File, Num_Modes, P, Num_Constants, Fit, BW_Node_To_Node, LAT_Node_To_Node, BW_Socket_To_Socket,
200 LAT_Socket_To_Socket, BW_Core_To_Core, LAT_Core_To_Core, Num_Core_Per_Socket, Num_Sock_Per_Node, PROC_TOT, Pressure, Velocity_1, Velocity_2, Velocity_3)
202 if Compare_Parallel
is False:
def Parse_Nektar_CG_Benchmark_Output
def quit
def del(self): """ Tell our RVP process to quit.
def Error_Check_Comm_Input
def Run_Parallel_Comparison
def Error_Check_Proc_Input