You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for (constauto& partition : _partitions) partitionNameSet.insert(partition->getName());
@@ -239,9 +221,9 @@ class Deployment final
239
221
inputSet.insert(input);
240
222
241
223
// Check the task that contains the user interface input does not receive any other inputs
242
-
if (input == _settings.userInterface.input) userInterfaceInputPartition = partition;
243
-
if (input == _settings.userInterface.output) HICR_THROW_LOGIC("Deployment specifies task '%s' with user interface output '%s' which is being used as input\n", task->getFunctionName(), input.c_str());
244
-
if (input == _settings.userInterface.input && task->getInputs().size() > 1) HICR_THROW_LOGIC("Deployment specifies task '%s' with user interface input '%s' which is not the only input of that task\n", task->getFunctionName(), input.c_str());
224
+
if (input == requestManagerInputEdge) userInterfaceInputPartition = partition;
225
+
if (input == requestManagerOutputEdge) HICR_THROW_LOGIC("Deployment specifies task '%s' with user interface output '%s' which is being used as input\n", task->getFunctionName(), input.c_str());
226
+
if (input == requestManagerInputEdge && task->getInputs().size() > 1) HICR_THROW_LOGIC("Deployment specifies task '%s' with user interface input '%s' which is not the only input of that task\n", task->getFunctionName(), input.c_str());
245
227
}
246
228
247
229
// Make sure all tasks have at least one output
@@ -256,18 +238,18 @@ class Deployment final
256
238
outputSet.insert(output);
257
239
258
240
// Check the task that contains the user interface input does not receive any other inputs
259
-
if (output == _settings.userInterface.output) userInterfaceOutputPartition = partition;
260
-
if (output == _settings.userInterface.input) HICR_THROW_LOGIC("Deployment specifies task '%s' with user interface input '%s' which is being used as output\n", task->getFunctionName(), output.c_str());
261
-
if (output == _settings.userInterface.output && task->getOutputs().size() > 1) HICR_THROW_LOGIC("Deployment specifies task '%s' with user interface output '%s' which is not the only output of task\n", task->getFunctionName(), output.c_str());
241
+
if (output == requestManagerOutputEdge) userInterfaceOutputPartition = partition;
242
+
if (output == requestManagerInputEdge) HICR_THROW_LOGIC("Deployment specifies task '%s' with user interface input '%s' which is being used as output\n", task->getFunctionName(), output.c_str());
243
+
if (output == requestManagerOutputEdge && task->getOutputs().size() > 1) HICR_THROW_LOGIC("Deployment specifies task '%s' with user interface output '%s' which is not the only output of task\n", task->getFunctionName(), output.c_str());
262
244
}
263
245
}
264
246
265
247
// Check whether all edges have consumer+producer partitions that do exist
266
248
for (constauto& edge : _edges)
267
249
{
268
250
constauto& edgeName = edge->getName();
269
-
if (edgeName != _settings.userInterface.input)
270
-
if (edgeName != _settings.userInterface.output)
251
+
if (edgeName != requestManagerInputEdge)
252
+
if (edgeName != requestManagerOutputEdge)
271
253
if (consumerPartitionMap.contains(edgeName) == false || producerPartitionMap.contains(edgeName) == false)
272
254
HICR_THROW_LOGIC("Deployment specifies edge '%s' but it is either not used as input or output (or neither)\n", edge->getName().c_str());
273
255
@@ -284,40 +266,40 @@ class Deployment final
284
266
}
285
267
286
268
// Make sure all inputs are also used as outputs, as long as it is not the user interface input
287
-
for (constauto& input : inputSet) if (input != _settings.userInterface.input) if (outputSet.contains(input) == false) HICR_THROW_LOGIC("Deployment input '%s' is not associated to any output\n", input.c_str());
288
-
for (constauto& output : outputSet) if (output != _settings.userInterface.output) if (inputSet.contains(output) == false) HICR_THROW_LOGIC("Deployment output '%s' is not associated to any input\n", output.c_str());
269
+
for (constauto& input : inputSet) if (input != requestManagerInputEdge) if (outputSet.contains(input) == false) HICR_THROW_LOGIC("Deployment input '%s' is not associated to any output\n", input.c_str());
270
+
for (constauto& output : outputSet) if (output != requestManagerOutputEdge) if (inputSet.contains(output) == false) HICR_THROW_LOGIC("Deployment output '%s' is not associated to any input\n", output.c_str());
289
271
290
272
// Check the user interface input/output are being used
291
-
if (userInterfaceInputPartition == nullptr) HICR_THROW_LOGIC("User interface input '%s' is not associated to any partition\n", _settings.userInterface.input.c_str());
292
-
if (userInterfaceOutputPartition == nullptr) HICR_THROW_LOGIC("User interface output '%s' is not associated to any partition\n", _settings.userInterface.output.c_str());
273
+
if (userInterfaceInputPartition == nullptr) HICR_THROW_LOGIC("User interface input '%s' is not associated to any partition\n", requestManagerInputEdge.c_str());
274
+
if (userInterfaceOutputPartition == nullptr) HICR_THROW_LOGIC("User interface output '%s' is not associated to any partition\n", requestManagerOutputEdge.c_str());
293
275
294
276
// Make sure the partition which contains the user interface input does not contain any cross-partition inputs
295
277
for (constauto& task : userInterfaceInputPartition->getTasks())
296
278
for (constauto& input : task->getInputs())
297
-
if (input != _settings.userInterface.input)
279
+
if (input != requestManagerInputEdge)
298
280
if (producerPartitionMap.at(input) != userInterfaceInputPartition->getName())
299
-
HICR_THROW_LOGIC("Partition %s consumes the user interface input '%s' but also has other inter-partition inputs (e.g.,: '%s')\n", userInterfaceInputPartition->getName().c_str(), _settings.userInterface.input.c_str(), input.c_str());
281
+
HICR_THROW_LOGIC("Partition %s consumes the user interface input '%s' but also has other inter-partition inputs (e.g.,: '%s')\n", userInterfaceInputPartition->getName().c_str(), requestManagerInputEdge.c_str(), input.c_str());
300
282
301
283
// Make sure the partition which contains the user interface output does not contain any cross-partition outputs
302
284
for (constauto& task : userInterfaceOutputPartition->getTasks())
303
285
for (constauto& output : task->getOutputs())
304
-
if (output != _settings.userInterface.output)
286
+
if (output != requestManagerOutputEdge)
305
287
if (consumerPartitionMap.at(output) != userInterfaceOutputPartition->getName())
306
-
HICR_THROW_LOGIC("Partition %s produces the user interface output '%s' but also has other inter-partition inputs (e.g.,: '%s')\n", userInterfaceOutputPartition->getName().c_str(), _settings.userInterface.output.c_str(), output.c_str());
288
+
HICR_THROW_LOGIC("Partition %s produces the user interface output '%s' but also has other inter-partition inputs (e.g.,: '%s')\n", userInterfaceOutputPartition->getName().c_str(), requestManagerOutputEdge.c_str(), output.c_str());
307
289
308
290
// Setting producer partition for user interface input to be the same as the consumer
if (js.contains("Instance Id")) _instanceId = hicr::json::getNumber<HiCR::Instance::instanceId_t>(js, "Instance Id"); // Optional, as it is determined at runtime
0 commit comments