Different output from ucover and musyn on different computers
Hello
I am working on control design using ucover and musyn functions with a colleague, and we are sharing scripts to generate controllers. We see that the same script does not produce the same controller on our computers, even though all inputs and Matlab versions are identical (24.2.0.2923080 (R2024b) Update 6).
Basically, we input FRD objects into ucover, which outputs an uncertainty model, which is processed and in turn fed into musyn, whcih outputs the controller.
I’ve found that the output from musyn is different, even if I fetch all inputs to musyn from my colleagues workspace. So the difference is introduced in the function itself, likely related to some optimization or floating point processing.
I’ve seen some other posts dealing with this, for example this one:
https://se.mathworks.com/matlabcentral/answers/130493-how-come-i-get-different-output-answers-with-the-same-matlab-version-the-same-code-installed-on-two?s_tid=ta_ans_results
We both get the same output from this prompt, so I assume differing BLAS versions is not a problem (both apparently use AVX2):
>> version(‘-blas’)
ans =
‘Intel(R) oneAPI Math Kernel Library Version 2024.1-Product Build 20240215 for Intel(R) 64 architecture applications (CNR branch AVX2)’
I’ve also found that, if we restrict MATALB to 1 CPU by running
maxNumCompThreads(1)
the output from the ucover function becomes identical (at least for our test case). But the output from musyn is still different on our computers, even with identical input. The difference is large enough to be very significant from a control design perspective, so this is a bit frustrating since we want to be able to reproduce the same controllers in the future, using the script as a recipe (for tracability).
Any tips are greatly appreciated, thanks!Hello
I am working on control design using ucover and musyn functions with a colleague, and we are sharing scripts to generate controllers. We see that the same script does not produce the same controller on our computers, even though all inputs and Matlab versions are identical (24.2.0.2923080 (R2024b) Update 6).
Basically, we input FRD objects into ucover, which outputs an uncertainty model, which is processed and in turn fed into musyn, whcih outputs the controller.
I’ve found that the output from musyn is different, even if I fetch all inputs to musyn from my colleagues workspace. So the difference is introduced in the function itself, likely related to some optimization or floating point processing.
I’ve seen some other posts dealing with this, for example this one:
https://se.mathworks.com/matlabcentral/answers/130493-how-come-i-get-different-output-answers-with-the-same-matlab-version-the-same-code-installed-on-two?s_tid=ta_ans_results
We both get the same output from this prompt, so I assume differing BLAS versions is not a problem (both apparently use AVX2):
>> version(‘-blas’)
ans =
‘Intel(R) oneAPI Math Kernel Library Version 2024.1-Product Build 20240215 for Intel(R) 64 architecture applications (CNR branch AVX2)’
I’ve also found that, if we restrict MATALB to 1 CPU by running
maxNumCompThreads(1)
the output from the ucover function becomes identical (at least for our test case). But the output from musyn is still different on our computers, even with identical input. The difference is large enough to be very significant from a control design perspective, so this is a bit frustrating since we want to be able to reproduce the same controllers in the future, using the script as a recipe (for tracability).
Any tips are greatly appreciated, thanks! Hello
I am working on control design using ucover and musyn functions with a colleague, and we are sharing scripts to generate controllers. We see that the same script does not produce the same controller on our computers, even though all inputs and Matlab versions are identical (24.2.0.2923080 (R2024b) Update 6).
Basically, we input FRD objects into ucover, which outputs an uncertainty model, which is processed and in turn fed into musyn, whcih outputs the controller.
I’ve found that the output from musyn is different, even if I fetch all inputs to musyn from my colleagues workspace. So the difference is introduced in the function itself, likely related to some optimization or floating point processing.
I’ve seen some other posts dealing with this, for example this one:
https://se.mathworks.com/matlabcentral/answers/130493-how-come-i-get-different-output-answers-with-the-same-matlab-version-the-same-code-installed-on-two?s_tid=ta_ans_results
We both get the same output from this prompt, so I assume differing BLAS versions is not a problem (both apparently use AVX2):
>> version(‘-blas’)
ans =
‘Intel(R) oneAPI Math Kernel Library Version 2024.1-Product Build 20240215 for Intel(R) 64 architecture applications (CNR branch AVX2)’
I’ve also found that, if we restrict MATALB to 1 CPU by running
maxNumCompThreads(1)
the output from the ucover function becomes identical (at least for our test case). But the output from musyn is still different on our computers, even with identical input. The difference is large enough to be very significant from a control design perspective, so this is a bit frustrating since we want to be able to reproduce the same controllers in the future, using the script as a recipe (for tracability).
Any tips are greatly appreciated, thanks! ucover, musyn, avx2 MATLAB Answers — New Questions