fmincon different result different machine

We have an existing desktop app (.net 4.6.1) Windows 10 which is using a compiled matlab dll (.net assembly) v 9.3.
We are changing the architecture to host the same matlab dll 9.3 assembly on Win Server 2016 Standard IIS using minmal web api .Net 6.
The existing desktop app fconmin produces consistent weights given the same inputs/constraints.
In Development - the server app was also producing the same weights (matching the desktop app) running on Win 10 Desktop using IIS Express Visual Studio 2022/.Net 6.
The minute the api/matlab is deployed to Win Server 2016 hosted in IIS with .Net 6, fconmin now produces a different set of weights - these weights are consistent for the same inputs/constraints even across dev/test servers, but they are different to when run on Win 10. Both solution weights sum to 100 perent but allocations differe eg. where one asset might get 11 percent on desktop the server side deployment gives it 15 percent (ie quite significant).
All the runtimes are all 9.3, there is no randomization going on, inputs/constraints are identical, the hosts are all x64. I even took the locally built Win 10 dlls and put them on the 2016 dev server , the exact same assemblies then produce the weights consistent with a 2016 deployment.
Why are the fmincon weights different the when the identical code is hosted in IIS Win 2016 server Vs Win10 desktop?

3 comentarios

Torsten
Torsten el 14 de Dic. de 2021
And the objective function gives the same value for both weight vectors ?
Walter Roberson
Walter Roberson el 14 de Dic. de 2021
Do the systems have the same kind of CPU? In particular does one happen to have AMD ?
Adam Archibald
Adam Archibald el 14 de Dic. de 2021
Both Intel. Desktop is Intel Core i7-7700 3.6Ghz. Servers are Intel Xeon Gold 5217 CPU 3Ghz Quad

Iniciar sesión para comentar.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 14 de Dic. de 2021

0 votos

The Gold has AVX512 instruction set, and BLAS chooses different instruction flows for AVX512, sometimes giving different results.

3 comentarios

Adam Archibald
Adam Archibald el 14 de Dic. de 2021
Hey thanks - I just wanted to run "version -blas" to verify the difference.
Are you aware of how to do this when only the runtime 9.3 is installed on Windows. Cannot seem to find any exes that would help me ie version.exe or matlab.exe
Walter Roberson
Walter Roberson el 15 de Dic. de 2021
I suspect it might be easiest to spin up a new .exe that just queried the blas information from a .m file, as you would want to be sure that you are querying the same blas that would be used by MCR.
Adam Archibald
Adam Archibald el 19 de Dic. de 2021
Thanks for your advice - haven't had a chance to verify it yet but will accept answer.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB Compiler SDK en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 14 de Dic. de 2021

Comentada:

el 19 de Dic. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by