25 if not os.path.exists(error_path):
28 error_txt = open(
'Error/error_proc_input.txt',
'w')
30 for i
in range(0, len(Message)):
31 error_txt.write(Message[i])
49 if not os.path.exists(error_path):
53 error_txt = open(
'Error/error_proc_input.txt',
'w')
56 if(type(PROC_TOT)
is not int):
57 error_txt.write(
"Please input an integer for the number of Processors")
63 error_txt.write(
"Please give a positive number of Processors")
68 if(PROC_TOT % 2 != 0):
69 error_txt.write(
"Odd Number of Processors Provided, Povide an Even Number")
74 if(type(Num_Core_Per_Socket)
is not int):
75 error_txt.write(
"Please input an integer for the number of Cores Per Socket")
80 if(Num_Core_Per_Socket <= 0):
81 error_txt.write(
"Please give a positive number of Cores Per Socket")
86 if(type(Num_Sock_Per_Node)
is not int):
87 error_txt.write(
"Please input an integer for the number of Sockets Per Node")
92 if(Num_Sock_Per_Node <= 0):
93 error_txt.write(
"Please give a positive number of Sockets Per Node")
98 if(type(N_Modes)
is not int):
99 error_txt.write(
"Please input an integer for the number of Modes")
100 error_txt.write(
'\n')
105 error_txt.write(
"Please give a positive number of Modes")
106 error_txt.write(
'\n')
113 return(check,
'No errors in Processor, Element and Mode inputs')
115 return(check,
'Errors found in Processor, Element and Mode inputs - Please see Error/error_proc_input.txt')
122def 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):
129 if not os.path.exists(error_path):
133 error_txt = open(
'Error/error_comm_input.txt',
'w')
136 if(type(BW_Node_To_Node)
is not float):
137 error_txt.write(
"Please input an float for Bandwith Node To Node")
138 error_txt.write(
'\n')
142 if(BW_Node_To_Node <= 0):
143 error_txt.write(
"Please give a positive number for Bandwith Node To Node")
144 error_txt.write(
'\n')
148 if(type(LAT_Node_To_Node)
is not float):
149 error_txt.write(
"Please input an float for Latency Node To Node")
150 error_txt.write(
'\n')
154 if(LAT_Node_To_Node <= 0):
155 error_txt.write(
"Please give a positive number for Latency Node To Node")
156 error_txt.write(
'\n')
160 if(type(BW_Socket_To_Socket)
is not float):
161 error_txt.write(
"Please input an float for Bandwith Socket To Socket")
162 error_txt.write(
'\n')
166 if(BW_Socket_To_Socket <= 0):
167 error_txt.write(
"Please give a positive number for Bandwith Socket To Socket")
168 error_txt.write(
'\n')
172 if(type(LAT_Socket_To_Socket)
is not float):
173 error_txt.write(
"Please input an float for Latency Socket To Socket")
174 error_txt.write(
'\n')
178 if(LAT_Socket_To_Socket <= 0):
179 error_txt.write(
"Please give a positive number for Latency Socket To Socket")
180 error_txt.write(
'\n')
184 if(type(BW_Core_To_Core)
is not float):
185 error_txt.write(
"Please input an float for Bandwith Core To Core")
186 error_txt.write(
'\n')
190 if(BW_Core_To_Core <= 0):
191 error_txt.write(
"Please give a positive number for Bandwith Core To Core")
192 error_txt.write(
'\n')
196 if(type(LAT_Core_To_Core)
is not float):
197 error_txt.write(
"Please input an float for Latency Core To Core")
198 error_txt.write(
'\n')
202 if(LAT_Core_To_Core <= 0):
203 error_txt.write(
"Please give a positive number for Latency Core To Core")
204 error_txt.write(
'\n')
208 return(check,
'No errors in Processor, Element and Mode inputs')
210 return(check,
'Errors found in Communication inputs - Please see Error/error_comm_input.txt')
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)