11from subprocess
import Popen, PIPE
17from functions_main
import PBS_Job_Parse
18from functions_main
import PBS_Benchmark_Parse
19from functions_main
import Parse_Benchmark
20from functions_main
import Parse_Nektar_Output
21from functions_main
import Parse_Nektar_CG_Benchmark_Output
22from functions_main
import Find_Nektar_Elements
23from functions_main
import Find_Nektar_Files
24from functions_main
import Find_Hardware
25from functions_main
import Find_Conditions
26from functions_main
import Filename_Generate
32from serial
import Run_Serial_Fit
38from parallel
import Run_Parallel_Model
39from parallel
import Run_Parallel_Comparison
45from error_main
import Primary_Error_Out
46from error_main
import Error_Check_Proc_Input
47from error_main
import Error_Check_Comm_Input
61Max_N_Z =
'output_72.txt'
64Conditions_File =
'conditions_80.xml'
67Scheme =
'IterativeStaticCond'
83Parallelisation =
'Hybrid_Socket'
86Compare_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)
101output_path =
'Output/Figures/'
102if 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)
108if not os.path.exists(output_path):
109 os.mkdir(output_path)
126for i
in range(0, len(Timing_Files)):
127 Timings[str(Nektar_Modes[i])] =
Parse_Nektar_Output(Loc_Serial_Timing_Files + Timing_Files[i])
145Fit =
Run_Serial_Fit(Compare_Serial, Consider_Modes, Num_Constants, P, Nektar_Serial_Elements, Nektar_Modes, Timings, Pressure, Velocity_1, Velocity_2, Velocity_3,
'IterativeStaticCond')
155(Num_Core_Per_Node, Num_Core_Per_Socket, Num_Sock_Per_Node, Error, Message) =
Find_Hardware(Node_Map)
163PROC_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)
178print(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)
202if Compare_Parallel
is False:
def Parse_Nektar_Output(Input_Filename, Skip_Steps)
def quit(self)
def del(self): """ Tell our RVP process to quit.
def Error_Check_Proc_Input(PROC_TOT, Num_Core_Per_Socket, Num_Sock_Per_Node, N_Modes)
def Primary_Error_Out(Message)
def 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)
def Find_Conditions(Input_Filename)
def Find_Hardware(Input_Filename)
def Find_Nektar_Elements(Input_Filename)
def Filename_Generate(Mesh, Max_N_Z, Conditions_File)
def PBS_Benchmark_Parse(Input_Filename)
def Parse_Nektar_CG_Benchmark_Output(Input_Filename)
def Parse_Benchmark(Input_Filename, PROC_BENCHMARK, Num_Core_Per_Socket, Num_Sock_Per_Node)
def Find_Nektar_Files(Input_Filename)
def Run_Parallel_Comparison(Loc_Parallel_Timing_Files, Parallelisation, PROC_Z, PROC_XY, Total)
def 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, 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)
def Run_Serial_Fit(Compare_Serial, Consider_Modes, Num_Constants, P, Num_Elements, Nektar_Modes, Timings, Pressure, Velocity_1, Velocity_2, Velocity_3, Scheme)