How do I suppress this warning from spmd?
Ältere Kommentare anzeigen
I have an spmd statement running in a loop where one worker will use labBroadcast to send a message to the other workers. Occasionally the other workers will finish what they're doing before they receive the message. This isn't a problem except that when spmd finishes Matlab gives an warning of the form:
Lab 1:
Warning: An incoming message was discarded from lab 2 (tag: 400003)
I've tried using lastwarn to identify the warning after stopping execution, but it gives no output. I've also tried
pctRunOnAll warning('off','all')
outside the spmd statement and warning('off','all') inside the statement and yet the warning keeps being thrown. Because the spmd statement is in a loop, this message can appear hundreds of times during the execution of the script. How do I suppress these warnings?
3 Kommentare
Niklas Nylén
am 14 Jan. 2014
Is the warning displayed like an actual warning, in orange text? Otherwise it may just be a text output that starts with the word 'Warning'.
What is the output if you run this command?
warning('query','last')
Dom
am 14 Jan. 2014
Niklas Nylén
am 14 Jan. 2014
I also run 2011b and warnings appear in orange text. You can set the color in the matlab preferences.
By the looks of the output you provided, the message is not a usual matlab warning, and even if it is it does not have an identifier, which means you can not turn it off, if it does not work with the 'all' input.
Akzeptierte Antwort
Weitere Antworten (2)
Ammar
am 21 Apr. 2017
0 Stimmen
Hi guys, I have the same problem, any suggestion ?
This is the message:
Warning: An incoming message was discarded from lab 3 (tag: 0)
Kind regards Ammar
Peiyuan Zhai
am 20 Mär. 2022
0 Stimmen
Try to add
warning('off','all')
after
spmd
but not before it. This works for me.
Kategorien
Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!