How to resolve the error of "invalid queue length for message 'xx'. queue length must be a positive scalar integer between 1 and 2^16-1"
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Here is my situation. I have a model developed in Simulink. It runs as intended on my PC. Now I have to run this model with a lot of different inputs which takes the number of simulation to tens of thousand. Thus I am using the Matlab parallel processing toolbox to run these simulations on a super computer at my university. I get the invlid queue length error for certain constant data type varaibles of a stateflow chart. I would greatly appreciate any help in resolving this error. Also, I don't understand why these constant data type variables are being treated as messages by Simulink.
4 Kommentare
Antworten (1)
Moksh
am 12 Dez. 2023
Bearbeitet: Moksh
am 12 Dez. 2023
Hi Ankur,
I understand that you are facing an invalid queue error.
The "invalid queue length for message 'xx'. queue length must be a positive scalar integer" error in Simulink when using the parallel processing toolbox can occur for a few reasons:
- Stateflow Chart Behaviour: Simulink sometimes interprets constant data type variables used within a stateflow chart as messages.
Solution:
- Move constants outside the stateflow chart: If possible, remove the constant data type variables from the stateflow chart and define them outside as global variables or model parameters. This can help avoid the misinterpretation of the variables as messages.
- Updating to the latest version of Simulink may resolve the bug.
- Queue length mismatch: When running simulations in parallel, the queue length for each message needs to be consistent across all workers.
Solution:
- Ensure that the queue length for the message "xx" is set to the same value in all model instances running on different workers. This can be done through the "Model Explorer".
- Avoid using dynamic changes to the queue length within the model during the simulation. This can lead to inconsistencies across workers and trigger the error.
- Model configuration inconsistencies: If you are running multiple variants of the same model with slightly different configurations, there might be inconsistencies in the message definitions or queue length settings across these variants.
Solution:
- Check all relevant model settings, including message definitions, queue lengths, and parameter values, to ensure they are identical across all model variants used in the parallel simulation.
- Simulink provides tools like "Model Compare" and "Merge Models" to help identify and resolve differences between model variants.
Please use the following documentation for more information about the above-mentioned tools:
- "Model Comparison": https://in.mathworks.com/help/simulink/ug/about-simulink-model-comparison.html
- "Merge Models": https://in.mathworks.com/help/simulink/ug/merge-simulink-models-from-the-comparison-report.html
Hope this information helps resolve the query.
Best Regards,
Moksh Aggarwal
0 Kommentare
Siehe auch
Kategorien
Mehr zu Simulink Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!