# Steady state dynamics randomly terminates without error

**URL:** <https://calculix.discourse.group/t/steady-state-dynamics-randomly-terminates-without-error/1279>\
**Category:** Uncategorized\
**Created:** [October 5, 2022, 5:01pm UTC](https://calculix.discourse.group/t/steady-state-dynamics-randomly-terminates-without-error/1279 "2022-10-05T17:01:18Z")\
**Posts on this page:** 8\
**Page:** 3

<div class="post-metadata">

**Author:** ![dhondt](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@dhondt](https://calculix.discourse.group/u/dhondt)\
**Post date:** [April 1, 2023, 4:52pm UTC](https://calculix.discourse.group/t/steady-state-dynamics-randomly-terminates-without-error/1279/41 "2023-04-01T16:52:47Z")

</div>

Hi,

only the frd.c-file has to be replaced.

The GitHub file fits the present development version, not version 2.20 (although  
the difference in this case is quite small).

I will upload file frd.new.c to [http://www.dhondt.de](http://www.dhondt.de), so you get it by  
downloading [http://www.dhondt.de/frd.new.c](http://www.dhondt.de/frd.new.c)

Best,

Guido

---

<div class="post-metadata">

**Author:** ![JuanP74](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@JuanP74](https://calculix.discourse.group/u/JuanP74)\
**Post date:** [April 1, 2023, 6:48pm UTC](https://calculix.discourse.group/t/steady-state-dynamics-randomly-terminates-without-error/1279/42 "2023-04-01T18:48:00Z")

</div>

fixed for macOS 10.13!

Thanks.

PS: spooles solver.

---

<div class="post-metadata">

**Author:** ![rafal.brzegowy](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@rafal.brzegowy](https://calculix.discourse.group/u/rafal.brzegowy)\
**Post date:** [April 1, 2023, 7:39pm UTC](https://calculix.discourse.group/t/steady-state-dynamics-randomly-terminates-without-error/1279/43 "2023-04-01T19:39:52Z")

</div>

Windows version (static, dynamic) with new frd.c compiled in mingw64:

> **[ccx\_2.20\_mingw64.7z](https://www.dropbox.com/s/rktb5ed7z94wlyr/ccx_2.20_mingw64.7z?dl=0)**
>
> Shared with Dropbox

Windows version (static, dynamic) with new frd.c compiled in ucrt64 (for performance comparison):

> **[ccx\_2.20\_ucrt64.7z](https://www.dropbox.com/s/g1tvbi1apbh3nwc/ccx_2.20_ucrt64.7z?dl=0)**
>
> Shared with Dropbox

> **[MSYS2 - News](https://www.msys2.org/news/#2022-10-29-changing-the-default-environment-from-mingw64-to-ucrt64)**
>
> Important events happening.

" 2022-10-29 - Changing the default environment from MINGW64 to UCRT64

About 1.5 years ago we started adding a new variant of the MINGW64 environment called [UCRT64](https://www.msys2.org/docs/environments/), which uses the Universal CRT instead of the old msvcrt.dll. Now that all our packages are available in this new environment and a very large percentage of our users (~97%) are on a system that includes UCRT, we recommend it as the default environment instead of MINGW64.

The MINGW32/64 environments will continue to exist and there are no plans to remove them, but we will focus our attention more on UCRT64 and the other UCRT-using environments such as CLANG64 and CLANGARM64."

---

<div class="post-metadata">

**Author:** ![rafal.brzegowy](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@rafal.brzegowy](https://calculix.discourse.group/u/rafal.brzegowy)\
**Post date:** [April 1, 2023, 8:36pm UTC](https://calculix.discourse.group/t/steady-state-dynamics-randomly-terminates-without-error/1279/44 "2023-04-01T20:36:05Z")

</div>

Results for ucrt version (for mingw OK):

 ![hcpy_1](https://global.discourse-cdn.com/free1/uploads/calculix/original/2X/8/89971c95d3bba290a3db3e14d1dcdb25f6be305b.png)

The only difference in the source code is: `&& !defined(_UCRT)`

```auto
#if defined(_WIN32) && !defined(_UCRT)
_set_output_format(_TWO_DIGIT_EXPONENT);
#endif

```

> <https://github.com/msys2/MINGW-packages/issues/15607>
>
> So far I have compiled the CalculiX by mingw64 version, now I tried it in UCRT64… but I have this error, any ideas?:
> 
> \`\`\`
> -Wl,--no-whole-archive -o static/ccx\_static.exe static/ccx\_2.20.o static/ccx\_2.20\_MT.a -lopenblas -lpastix -lpastix\_kernels -lspm -lhwloc -lspoolesMT -lspooles -lopenblas -lmetis -lscotch -lscotcherrexit -lstdc++ -lltdl -lstarpu-1.3 -lws2\_32 -lssp
> C:/msys64/ucrt64/bin/../lib/gcc/x86\_64-w64-mingw32/12.2.0/../../../../x86\_64-w64-mingw32/bin/l
> d.exe: static/ccx\_2.20.o:ccx\_2.20.c:(.text.startup+0x3a): undefined reference to \`\_\_imp\_\_set\_o
> utput\_format'
> collect2.exe: error: ld returned 1 exit status
> make: \*\*\* \[Makefile\_mingw\_static:44: static/ccx\_static.exe\] Error 1
> \`\`\`

---

<div class="post-metadata">

**Author:** ![Calc\_em](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calc\_em](https://calculix.discourse.group/u/Calc_em)\
**Post date:** [April 1, 2023, 8:46pm UTC](https://calculix.discourse.group/t/steady-state-dynamics-randomly-terminates-without-error/1279/45 "2023-04-01T20:46:08Z")

</div>

Great, apparently the problem is fixed. With the mingw64 version of Rafal’s build, I obtained complete results for all of the few tries that I did.

---

<div class="post-metadata">

**Author:** ![vicmw](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@vicmw](https://calculix.discourse.group/u/vicmw)\
**Post date:** [April 12, 2023, 12:58am UTC](https://calculix.discourse.group/t/steady-state-dynamics-randomly-terminates-without-error/1279/46 "2023-04-12T00:58:32Z")

</div>

Did you keep that code outside the function body? I find that Mingw-w64 won’t compile when it’s there but only if it’s moved inside `CalculiXstep()` and `main()`.

No doubt it works anywhere on UCRT64 because it’s now `#if`’d out.

---

<div class="post-metadata">

**Author:** ![Calc\_em](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calc\_em](https://calculix.discourse.group/u/Calc_em)\
**Post date:** [August 1, 2023, 9:52am UTC](https://calculix.discourse.group/t/steady-state-dynamics-randomly-terminates-without-error/1279/47 "2023-08-01T09:52:29Z")

</div>

I can confirm that this issue is fixed in CalculiX 2.21.

---

<div class="post-metadata">

**Author:** ![rafal.brzegowy](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@rafal.brzegowy](https://calculix.discourse.group/u/rafal.brzegowy)\
**Post date:** [December 20, 2024, 9:27pm UTC](https://calculix.discourse.group/t/steady-state-dynamics-randomly-terminates-without-error/1279/48 "2024-12-20T21:27:56Z")

</div>

Solution for error ccx+ucrt64:

> <https://github.com/msys2/MINGW-packages/pull/22849>
>
> Fixes #22630 
> @3rav could you test artifacts for UCRT64, after It finishes buil…ding.

> <https://github.com/msys2/MINGW-packages/issues/22630>
>
> \### Description / Steps to reproduce the issue
> 
> Run this input, and see input.…frd
> 
> $ ccx -i input
> 
> input.inp:
> \`\`\`
> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> \*NODE, NSET=Nall
> 1,5.000000000000e+01,5.000000000000e+01,0.000000000000e+00
> 2,5.000000000000e+01,0.000000000000e+00,0.000000000000e+00
> 3,5.000000000000e+01,0.000000000000e+00,5.000000000000e+01
> 4,5.000000000000e+01,5.000000000000e+01,5.000000000000e+01
> 5,0.000000000000e+00,5.000000000000e+01,0.000000000000e+00
> 6,0.000000000000e+00,0.000000000000e+00,0.000000000000e+00
> 7,0.000000000000e+00,0.000000000000e+00,5.000000000000e+01
> 8,0.000000000000e+00,5.000000000000e+01,5.000000000000e+01
> \*ELEMENT, TYPE=C3D8, ELSET=Eall
> 1, 1, 2, 3, 4, 5, 6, 7, 8
> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> \*NSET,NSET=Nfix 
> 1, 2, 5, 6, 
> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*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\*NODE FILE
> U, NT
> \*NODE PRINT, NSET=Nfix, TOTALS=ONLY
> U
> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> \*EL FILE
> S, E, PEEQ
> \*END STEP
> \`\`\`
> 
> 
> \### Expected behavior
> 
> Good results (mingw64 and clang 64) from ccx:
> 
> \`\`\`
> 1C
> 1UUSER                                                              
> 1UDATE 23.november.2024                                
> 1UTIME 15:53:33                                        
> 1UHOST                                                              
> 1UPGM CalculiX                                        
> 1UVERSION Version 2.22                             
> 1UCOMPILETIME Mon Aug 5 19:15:25 CEST 2024                    
> 1UDIR                                                               
> 1UDBN                                                               
> 1UMAT 117-4PH\_H1025                                              
> 2C 29791 1
> -1 1 5.00000E+01 5.00000E+01 0.00000E+00
> -1 2 5.00000E+01 4.83333E+01 0.00000E+00
> -1 3 5.00000E+01 4.83333E+01 1.66667E+00
> -1 4 5.00000E+01 5.00000E+01 1.66667E+00
> \`\`\`
> 
> !\[mingw64\](https://github.com/user-attachments/assets/b03f55de-9353-4d4b-b666-b1d616cd8f87)
> 
> 
> \### Actual behavior
> 
> Results (ucrt64) from ccx:
> 
> \`\`\`
> 1C
> 1UUSER                                                              
> 1UDATE 23.november.2024                                
> 1UTIME 15:59:24                                        
> 1UHOST                                                              
> 1UPGM CalculiX                                        
> 1UVERSION Version 2.22                             
> 1UCOMPILETIME Mon Aug 5 19:15:25 CEST 2024                    
> 1UDIR                                                               
> 1UDBN                                                               
> 1UMAT 117-4PH\_H1025                                              
> 2C 29791 1
> -1 1 5,00000E+01 5,00000E+01 0,00000E+00
> -1 2 5,00000E+01 4,83333E+01 0,00000E+00
> -1 3 5,00000E+01 4,83333E+01 1,66667E+00
> -1 4 5,00000E+01 5,00000E+01 1,66667E+00
> -1 5 4,83333E+01 5,00000E+01 0,00000E+00
> \`\`\`
> 
> !\[ucrt64\](https://github.com/user-attachments/assets/602f5889-6c48-4fa3-a444-11048a5d4f80)
> 
> 
> \### Verification
> 
> \- \[X\] I have verified that my MSYS2 is up-to-date before submitting the report (see https://www.msys2.org/docs/updating/)
> 
> \### Windows Version
> 
> MINGW64\_NT-10.0-26100
> 
> \### MINGW environments affected
> 
> \- \[\] MINGW64
> \- \[\] MINGW32
> \- \[X\] UCRT64
> \- \[\] CLANG64
> \- \[\] CLANGARM64
> 
> \### Are you willing to submit a PR?
> 
> no

[Previous page](https://calculix.discourse.group/t/steady-state-dynamics-randomly-terminates-without-error/1279.md?page=2)
