Clear Filters
Clear Filters

Running same code, same Matlab version (2021b) on difference computers (8 different types) 7 produce same results only one is different.

16 views (last 30 days)
Hi,
I am running same code, same Matlab version (2021b) on difference computers (8 different types) 7 produce same results (difference about 3 digits after '.') only one is different. I can not find any consistent difference between them. All have different CPU generations (no consistency there), speed etc. All windows 10 or 11 64 bit, Matlab is 64 bit in all. I do not use parallel computing toolbox.I have checked all possible ideas raised in previousdiscussions including checking BLAS libraries.
Does anyone have any idea what other features may affect precision of results?
Any help will be much appreciated:)
  2 Comments
Bruno Luong
Bruno Luong on 15 Aug 2023
"(difference about 3 digits after '.')"
I'm not sure what kind of simulation you are doing but at the first glance this is pretty poor for a stable simulation.
That certainly doesn't help for the duck PC that is totally off.
dpb
dpb on 15 Aug 2023
My initial reaction, too, Bruno, but that would depend on how many digits are to the left of the decimal point as well, so could well be within single precision tolerances.
And, of course, there's nothing indicated by OP that it is a 100% deterministic model -- although there's nothing that says it isn't, either.

Sign in to comment.

Answers (2)

Richard Burnside
Richard Burnside on 14 Aug 2023
Could this be the different handling of floating point precision.? Most modern processors are compliant with IEEE 754 floating point representation but older machines may not be compliant.

dpb
dpb on 14 Aug 2023
There may yet be differences in the supporting runtime libraries that have been loaded on various machines by different software installed on any given machine that may not be on the others or the version of Java or any number of such things including the OS update levels.
While somewhat dated now, https://hal.science/file/index/docid/281429/filename/floating-point-article.pdf gives a good overview discussion of some of the issues that can arise.
Modern CPU architecture can also affect operation order/pipelining and such seemingly trivial details can, on occasion, be sufficient as to create noticeable differences. It may be that somesuch operation also created an edge case of rounding that is unique to that particular combination of all these variables.
  1 Comment
dpb
dpb on 15 Aug 2023
Of course, there have been chipsets with issues in the past; although I'm unaware of any current ones, was just reminded that, for example, the Intel compilers are/contain optimizations specific for Intel chipsets -- if one happened to have a support library using such a toolset and running on an AMD chipset, would it be guaranteed to fail or could one silently obtain a different result? I dunno...
Any of this using video accelerators or the like...no chance of debugging this remotely; you might consider if the app isn't proprietary and can be packaged conveniently uploading a test case and let folks here try it on a "veritable plethora" of machines and releases and see if that could pinpoint any common factors amongst the results.
Failing that, only other suggestion I'd have would be to contact TMW support and see if they can provide further guidance.

Sign in to comment.

Categories

Find more on MATLAB in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!