Parallel task with mapping
I noticed that when using the parallel tasks profile one can provide a mapping into the description of the job (and not the profile).
The mapping is used by batsim to map the activities of the parallel task to the executors chosen by the scheduler.
In the current implementation, if a mapping is provided with the job it changes the number of resources Batsim expects for the job.
This number becomes the total of different executors.
The res
attribute needs to match the computation vector size (and the square root of the communication matrix).
The following workload illustrates the issue, Batsim expects the job 0 to have only 1 resource allocated, instead of 2 as specified by the res
attribute.
In my scheduler, I have to loop through the whole mapping object and count the number of different executors in order to provide to Batsim the number it expects.
{
"jobs": [
{
"id": "0",
"mapping": {
"0": "0",
"1": "0",
},
"profile": "ptask",
"res": 2,
"subtime": 0
}
],
"profiles": {
"ptask": {
"com": [ 0, 0, 0, 0],
"cpu": [ 0, 0 ],
"type": "parallel"
}
}
}
This not a big deal, but I wanted to write down this behavior.
If it is what we want, I think it is worth to be documented. In the other case, we can use this thread to find how to improve this.