Different results LINUX x Windows

Discussion of numerical issues which are not directly linked to specific applications
Post Reply
vmattosferreir
Posts: 11
Joined: Tue May 12, 2020 1:42 pm
anti_bot: 333

Different results LINUX x Windows

Post by vmattosferreir » Wed Nov 16, 2022 8:05 am

Dear all,

I am recently trying to run some simulations using Linux and I noticed that the results that I obtain are very much different when compared with the simulations I ran in Windows. The reason why I am running simulations in Linux is to run multiple parallel simulations using the cluster.
I checked the log files and apparently, the main difference lies in the linearization parameters, see the picture below.
If we check the phase file we can see that nucleation occurs in different locations depending on which system we run the simulation and that influence substantially the end result (see graph below).
Thank you in advance.
Kind regards,
Vitoria.
Attachments
Graph.png
Graph.png (25.15 KiB) Viewed 19529 times
Picture1.png
Picture1.png (1014.08 KiB) Viewed 19529 times

Bernd
Posts: 1504
Joined: Mon Jun 23, 2008 9:29 pm

Re: Different results LINUX x Windows

Post by Bernd » Fri Nov 18, 2022 1:01 pm

Dear Vitoria,

This unfortunately is true, because the Windows and Linux operation systems use different random generators, and random numbers are used in MICRESS to create random seed distributions as well as random noise on the critical nucleation undercooling (if requested).

However, your experience also shows that the simulation results are not representative, if the nucleation position (which in reality probably is also random or uncontrolled) significantly changes the results. You should take that seriously!

A technical work-around would be to fix the nucleation position by hand by using nucleation in (a) small "region(s)" and to remove any "nucleation noise" on the critical undercooling.

Bernd

vmattosferreir
Posts: 11
Joined: Tue May 12, 2020 1:42 pm
anti_bot: 333

Re: Different results LINUX x Windows

Post by vmattosferreir » Mon Nov 21, 2022 11:15 am

Dear Bernd,

thank you for your reply.
Actually, I think that the issue might not be related only with the actual nucleation sites but with the nuclei that are not growing as well.
I have three seed types:
seed type 1: can nucleate since the beginning of the simulation at the colony boundaries
seed type 2: nucleates only after 1018K within the pearlite colony
seed type 3: same as 1 but nucleates after 1018K

However, as you can see from the results below, the three nuclei belonging to seed type 2 nucleate at 1018K but only grow when the temperature reaches 1042 K even if the undercooling of these seeds was quite high. The opposite doesn't happen for seed type 3 which nucleated at the same moment.
Do you know what might be the case here?
Attachments
1042K.JPG
1042K.JPG (69.88 KiB) Viewed 19493 times
1018K.JPG
1018K.JPG (171.29 KiB) Viewed 19493 times
cb-10Cs-07.log
(105.07 KiB) Downloaded 178 times

Bernd
Posts: 1504
Joined: Mon Jun 23, 2008 9:29 pm

Re: Different results LINUX x Windows

Post by Bernd » Mon Nov 21, 2022 5:30 pm

Dear Vitoria,

That is difficult to say, because the different phases have different orientations which are not visible here. And from the .log-fie I see that you have blocked various misorientations, so it is clear that the different nucleation types, having different parent-relations and acting on different colonies, can easily behave differently.

However, what I did not understand is what is the different behaviour here between Windows and Linux?

Bernd

vmattosferreir
Posts: 11
Joined: Tue May 12, 2020 1:42 pm
anti_bot: 333

Re: Different results LINUX x Windows

Post by vmattosferreir » Tue Nov 22, 2022 10:37 am

Dear Bernd,

it is difficult to explain here what's happening but basically, I have different results in Windows and Linux which are apparently expected.
However, now that I know that it should behave differently I still can't understand why some of my seeds (seed 2) nucleate at the beginning of the simulation (as expected) but it does not grow until it reaches a temperature of 1042K. The same behavior is not seen in Windows (see attached pdf) nor in any of my previous simulations.
I tried checking the undercooling but it is pretty high so I guess it is not related to that but still I can't understand what might be causing this issue. And the fact that these nuclei don't grow influences my final kinetics as less pearlite and more pro-eutectoid ferrite are being consumed.

Kind regards,
Vitoria.
Attachments
micress issue.pdf
(772.67 KiB) Downloaded 149 times

Bernd
Posts: 1504
Joined: Mon Jun 23, 2008 9:29 pm

Re: Different results LINUX x Windows

Post by Bernd » Tue Nov 22, 2022 11:13 pm

Dear Vitoria,

It would be interesting to know if the orientations of the grains are the same in both cases, or whether different misorientation relations are there. This should be visible in the graphical .orie-output. Further, as a consequence, the interface mobility (.mueS) should also be the same. If this is not the case, it would be a clear indication where the differences come from.

A further question is: Are the version numbers of the Windows and Linux executables identical?

Bernd

vmattosferreir
Posts: 11
Joined: Tue May 12, 2020 1:42 pm
anti_bot: 333

Re: Different results LINUX x Windows

Post by vmattosferreir » Wed Nov 23, 2022 2:06 pm

Dear Bernd,

the orientations and interface energy seem to be the same.
Also, the MICRESS versions are the same.

Kind regards,
Vitoria.
Attachments
micress version.JPG
micress version.JPG (129.98 KiB) Viewed 19476 times
micress issue_2.pdf
(309.39 KiB) Downloaded 169 times

Bernd
Posts: 1504
Joined: Mon Jun 23, 2008 9:29 pm

Re: Different results LINUX x Windows

Post by Bernd » Thu Nov 24, 2022 12:05 am

Dear Vitoria,

It is really difficult to find a reason for the different behaviour, which obviously can be boiled down to seed-type 2, where fcc-phase is nucleated to the bcc/cementite interface, and which appear to grow systematically slower in the Linux case.

Of course, we cannot rule out completely that there may be errors in the compilers or in the slightly different versions of the TQ-libraries having different compilation dates. However, typically, if small noise (which of course is different between the operation systems - not only due to the random numbers) has a strong effect, it looks like there may be a problem in the simulation set-up which could amplify the small differences.

For that reason it would be interesting to have a look at the input files, to search for potential problems. I have seen the input file of Pina (which uses the same initial microstructure) in order to get an idea how your input file could (but not necessarily needs to) look like. I saw that the initial size of the seeds is twice the grid spacing. This can be bad, because it is a "big" grain which initially adopts the concentration of the underlying phases. This could be very high in C, depending on the exact seed position at the bcc/cementite interface. I would recommend to use a nucleation radius which is 0 or at least significantly smaller than the grid spacing. Maybe, if we are lucky, this could already solve the problems under Linux...

Bernd

vmattosferreir
Posts: 11
Joined: Tue May 12, 2020 1:42 pm
anti_bot: 333

Re: Different results LINUX x Windows

Post by vmattosferreir » Fri Nov 25, 2022 11:03 am

Dear Bernd,

thank you for your reply. Indeed our input files are very similar and by changing the grain radius to 0, the nuclei could grow as wanted.
That already solves most of the issues.
Thank you for the suggestions.

Kind regards,
Vitoria.

Post Reply