Getting different results when running on Windows and Linux

Numerical methods and mathematical models of Elmer
Post Reply
stroop
Posts: 26
Joined: 22 Nov 2016, 17:26
Antispam: Yes
Location: Germany

Getting different results when running on Windows and Linux

Post by stroop »

I am simulating electromagnetic waves through a waveguide that employs the VectorHelmHoltz solver and I am getting different results when I run it on Windows versus when its run on Linux. I have the latest version of both but these versions are different, that is the windows version is older but the change is ever so slight (the imaginary part of the magnetic boundary load is taken into account, that is it was changed from 'Magnetic Boundary Load im 2' to 'Magnetic Boundary Load im 2' so the extra space between Load and im was removed). So I don't see why there should be such a significant different in the values especially since my case doesn't even change or use the value of the magnetic boundary load im in it's initial conditions.

I have attached my case, the output and the data file from both systems below.

As you can see most values are just slightly different but not for the 'integral of div poynting vector' why is this?

The rest of the files are posted in the following post.
Attachments
waveguide.sif
(4.85 KiB) Downloaded 320 times
scalar_valuesWindows.dat
(134 Bytes) Downloaded 323 times
shoebox_tets.zip
(136.42 KiB) Downloaded 307 times
Last edited by stroop on 10 Mar 2017, 13:52, edited 1 time in total.
stroop
Posts: 26
Joined: 22 Nov 2016, 17:26
Antispam: Yes
Location: Germany

Re: Getting different results when running on Windows and Linux

Post by stroop »

Here are the remaining files
Attachments
scalar_values_names.dat
(303 Bytes) Downloaded 312 times
scalar_valuesLinux.dat
(133 Bytes) Downloaded 315 times
linuxOutput.txt
(15.22 KiB) Downloaded 295 times
raback
Site Admin
Posts: 4851
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Getting different results when running on Windows and Linux

Post by raback »

Hi

You could try with nightly build for Windows at:
http://www.nic.funet.fi/pub/sci/physics ... n/windows/

-Peter
stroop
Posts: 26
Joined: 22 Nov 2016, 17:26
Antispam: Yes
Location: Germany

Re: Getting different results when running on Windows and Linux

Post by stroop »

Thanks for your suggestion, I tried the following nigtly build: elmerfem-nightly_Windows-AMD64.zip
but it still doesn't match the output given by the Linux version and is the same as the old windows version.
I have attached the output and the data file produced by the new nightly build.
Attachments
windowsCMDLatestVersion.txt
(15.57 KiB) Downloaded 282 times
scalar_valuesWindowsLatestVersion.dat
(134 Bytes) Downloaded 308 times
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Getting different results when running on Windows and Linux

Post by mzenker »

Hi,

as far as I see, at least the first five digits of the numerical values in the .dat files match, except for the 5th one, which is off by a factor of two, but which is very small (1e-22). So IMHO you cannot say that there is a significant difference, unless the difference for the 5th value is your main problem.
BTW do you use the exact same mesh file for both simulations?

HTH,

Matthias
raback
Site Admin
Posts: 4851
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Getting different results when running on Windows and Linux

Post by raback »

Hi

Note also that Windows and Linux binaries are not doing bitwise the same thing. The order of some operations may vary etc. which may affect the results. This could well affect the 5th digit particularly if you're working with extreme range.

-Peter
stroop
Posts: 26
Joined: 22 Nov 2016, 17:26
Antispam: Yes
Location: Germany

Re: Getting different results when running on Windows and Linux

Post by stroop »

I thought any difference in the number was indication of a problem but since you have confirmed that it is ok I guess it's not a problem any more - Thank you for your help!
Post Reply