Filter löschen
Filter löschen

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

19 Ansichten (letzte 30 Tage)
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 Kommentar
Shlomo Geva
Shlomo Geva am 4 Apr. 2023
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');

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Sachin
Sachin am 12 Apr. 2023
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:

Weitere Antworten (0)

Kategorien

Mehr zu Parallel for-Loops (parfor) finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by