"Warning: udp will be removed in a future release. Use udpport instead."

24 次查看(过去 30 天)
I do not call udp directly.
This warning only appeared after upgrading to Matlab version R2022b from an earlier version.
I suspect it is related to code running inside parfor loop. When I run it in a for loop there is no warning.
The warning is not helpful in identifying the offending code.
Any ideas?
  1 个评论
Shlomo Geva
Shlomo Geva 2023-4-4
After some debugging (non interactive - yeek) I found udp call it in some community library code for a progress bar.
It had to communicate with parfor workers, so I guess that's where UDP comes in.
Not very useful when the warning is inside a parfor loop and hence you cannot interactively debug it... (or at least I don't know how to).
BTW - I tried to turn the warning off but that did not work.
warning('off','instrument:udp:ClassToBeRemoved');
... parfor code ...
warning('on');

请先登录,再进行评论。

采纳的回答

Sachin
Sachin 2023-4-12
Hi
I understand that you are getting a warning while using UDP.
I suggest you to use ‘udpport’ instead of ‘udp’. The warning that you are getting is related to the use of ‘udp’ function. In the later release of MATLAB ‘udp’ function will not support.
Since you mentioned that the warning only appeared after upgrading to MATLAB R2022b and you suspect that it is related to code running inside the ‘parfor’ loop, the issue may be related to how the ‘udp’ object is used within ‘parfor’ loop. The ‘parfor’ loop in MATLAB has some restrictions compared to the regular ‘for’ loop.
I recommend you to use ‘fclose’ to close the ‘udp’ object after using it. Also, make sure that you are not accessing the same ‘udp’ object from multiple iterations of the ‘parfor’ loop in parallel, it can cause conflicts and result in a warning.
For more information on ‘udpport’, please refer to the following documentation:

更多回答(0 个)

标签

产品


版本

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by