How do I suppress this warning from spmd?
Show older comments
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 Comments
Niklas Nylén
on 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
on 14 Jan 2014
Niklas Nylén
on 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.
Accepted Answer
More Answers (2)
Ammar
on 21 Apr 2017
0 votes
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
on 20 Mar 2022
0 votes
Try to add
warning('off','all')
after
spmd
but not before it. This works for me.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!