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):
123
124
125 check = True
126
127
128 error_path = 'Error'
129 if not os.path.exists(error_path):
130 os.mkdir(error_path)
131
132
133 error_txt = open('Error/error_comm_input.txt', 'w')
134
135
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')
139 check = False
140
141
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')
145 check = False
146
147
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')
151 check = False
152
153
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')
157 check = False
158
159
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')
163 check = False
164
165
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')
169 check = False
170
171
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')
175 check = False
176
177
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')
181 check = False
182
183
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')
187 check = False
188
189
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')
193 check = False
194
195
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')
199 check = False
200
201
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')
205 check = False
206
207 if(check is True):
208 return(check, 'No errors in Processor, Element and Mode inputs')
209 if(check is False):
210 return(check, 'Errors found in Communication inputs - Please see Error/error_comm_input.txt')
211
212
213
214
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)