CalculiX and TAUCS solver Windows (rather a curiosity)

I managed to compile TAUCS in the msys2/mingw environments and ccx 2.22 with this solver, but there is a problem with writing the temporary file:

taucs_open: Could not open file /tmp/scratch.0
taucs_create: Could not create metadata file /tmp/scratch.0
taucs_linsolve: ERROR, could neither open nor create file [/tmp/scratch]
taucs_linsolve: an error occured, releasing resources and bailing out

Source code of TAUCS:

taucs_mumps.cInteresting

After modification tau.c to:

The ccx starts but has an unexpected error:

with set CCX_LOG_ALLOC=1:

It worked, but with memory limitations?

Because with div 11 it’s still OK, but with div 12 I get the error mentioned above.

Speed:

1 Like

thanks for sharing your experiences using Taucs as a solver in CalculiX, look amazed how fast is it. Official documentation mentioned and previous Freecad forums also. Probably, more patches needed to improve current limitation, an effort for large benefit.

hello again, i’m interesting to do test and comparison with internal Pardiso and Taucs commercial solver SAPfire about limitation, speed and accuracy. Can you please provide download link, many thanks before.

The runtime version available on the official website has already the Taucs solver (calculix_2.23_4win.zip), it is a version without any modifications (i.e. it has limited memory access).

1 Like

thank you, actually Taucs solver was supported, even have limitation still available for current and next versions of windows executable distributions.

*edited

i receive an error report for test case of simple static and frequency analysis, any hints related?

I haven’t tested for frequency analysis, can you share a sample .inp file?

Here some example input files with frequency and heat transfer analysis using the TAUCS solver. I could not get any of those run under Windows 10 using the 2.23 ccx_static.exe executable:

It looks like the same as I wrote earlier memory limitation.

I modified the example: DiskasShell03_TAUCS, I changed the geometry to parametric to be able to control the number of elements:

**------------------------------------------------------------------------------
**
** Universal file to Abaqus/Calculix Konverter
** D:\software\Calculix\Konverter\Unv-Konverter\unical\unical4.exe
** converted input file DiskasShell02.unv
** Tue Jun 29 14:43:35 2021
**
** Changes vs. DiskasShell02a.inp:
** all 11 frequencies vs. just 1.
**------------------------------------------------------------------------------
*HEADING
DiskasShell02.unv, Tue Jun 29 14:43:35 2021




*INCLUDE,INPUT=S8R.msh
*INCLUDE,INPUT=InnerNodes.nam




** Polycarbonat from CDs/DVDs
** Source: Philips Master Thesis (p. 59)
** Metric system: kg, mm, s
*material, name=Polycarbonat
*elastic
2.5E+06, 0.35
*density
1.218E-06

*shell section, material=Polycarbonat, elset=ES8R
0.6,




*BOUNDARY
NInnerNodes,1,6







*Step,nlgeom
Static,SOLVER=TAUCS
**
** small rotation to start the diagram on the horizontal axis near 0:
dload
** 1. rotations per second → Omega**2 = 4pipi = :
ES8R,centrif,157.91,0.,0.,0.,0.,0.,1.
*el print,elset=ES8R,TOTALS=ONLY
EVOL,EMAS
*Node File
U,
*EL File
S,
*end step




** 40 Eigenfrequencies should be sufficient according to the reference: p. 59, h=1.12 mm
*step, perturbation
*frequency,STORAGE=YES
40,
*el print
*end step




** reference has 20 Eigenfrequencies on reference diagram p. 59 for h=1.12 mm, as non-rotating step should match above settings
*step, perturbation
*complex frequency, CORIOLIS
20,
*end step




*Step,nlgeom
*Static,SOLVER=TAUCS
**
** value after centrif is rotational speed squared (Omega2):
** 10 RPS (Rotations per second)–> Omega2 =  	3.9478E+03
** 20 RPS →  Omega2 =  	1.5791E+04
** 30 RPS →  Omega2 =  	3.5531E+04
** 40 RPS →  Omega2 =  	6.3165E+04
** 50 RPS →  Omega2 =  	9.8696E+04
** 60 RPS →  Omega2 =  	1.4212E+05
** 70 RPS →  Omega2 =  	1.9344E+05
** 80 RPS →  Omega2 =  	2.5266E+05
** 90 RPS →  Omega2 =  	3.1978E+05
** 100 RPS →  Omega2 =  	3.9478E+05




*dload
** 10 rotations per second:
ES8R,centrif,3.9478E+03,0.,0.,0.,0.,0.,1.
*el print,elset=ES8R,TOTALS=ONLY
EVOL,EMAS
*Node File
U,
*EL File
S,
*end step




** 40 Eigenfrequencies should be sufficient according to the reference: p. 59, h=1.12 mm
*step,perturbation
*frequency,STORAGE=YES
40,
*el print
*end step




** reference has 20 Eigenfrequencies on reference diagram p. 59 for h=1.12 mm
*step,perturbation
*complex frequency, CORIOLIS
20,
*end step







*Step,nlgeom
*Static,SOLVER=TAUCS
*dload
** 20 rotations per second:
ES8R,centrif,1.5791E+04,0.,0.,0.,0.,0.,1.
*el print,elset=ES8R,TOTALS=ONLY
EVOL,EMAS
*Node File
U,
*EL File
S,
*end step




** 40 Eigenfrequencies should be sufficient according to the reference: p. 59, h=1.12 mm
*step,perturbation
*frequency,STORAGE=YES
40,
*el print
*end step




** reference has 20 Eigenfrequencies on reference diagram p. 59 for h=1.12 mm
*step,perturbation
*complex frequency, CORIOLIS
20,
*end step







*Step,nlgeom
*Static,SOLVER=TAUCS
*dload
** 30 rotations per second:
ES8R,centrif,3.5531E+04,0.,0.,0.,0.,0.,1.
*el print,elset=ES8R,TOTALS=ONLY
EVOL,EMAS
*Node File
U,
*EL File
S,
*end step




** 40 Eigenfrequencies should be sufficient according to the reference: p. 59, h=1.12 mm
*step,perturbation
*frequency,STORAGE=YES
40,
***el print
*end step




** reference has 20 Eigenfrequencies on reference diagram p. 59 for h=1.12 mm
*step,perturbation
*complex frequency, CORIOLIS
20,
*end step







*Step,nlgeom
*Static,SOLVER=TAUCS
*dload
** 40 rotations per second:
ES8R,centrif,6.3165E+04,0.,0.,0.,0.,0.,1.
*el print,elset=ES8R,TOTALS=ONLY
EVOL,EMAS
*Node File
U,
*EL File
S,
*end step




** 40 Eigenfrequencies should be sufficient according to the reference: p. 59, h=1.12 mm
*step,perturbation
*frequency,STORAGE=YES
40,
*el print
*end step




** reference has 20 Eigenfrequencies on reference diagram p. 59 for h=1.12 mm
*step,perturbation
*complex frequency, CORIOLIS
20,
*end step







*Step,nlgeom
*Static,SOLVER=TAUCS
*dload
** 50 rotations per second:
ES8R,centrif,9.8696E+04,0.,0.,0.,0.,0.,1.
***el print,elset=ES8R,TOTALS=ONLY
**EVOL,EMAS
*Node File
U,
*EL File
S,
*end step




** 40 Eigenfrequencies should be sufficient according to the reference: p. 59, h=1.12 mm
*step,perturbation
*frequency,STORAGE=YES
40,
*el print
*end step




** reference has 20 Eigenfrequencies on reference diagram p. 59 for h=1.12 mm
*step,perturbation
*complex frequency, CORIOLIS
20,
*end step







*Step,nlgeom
*Static,SOLVER=TAUCS
*dload
** 60 rotations per second:
ES8R,centrif,1.4212E+05,0.,0.,0.,0.,0.,1.
*el print,elset=ES8R,TOTALS=ONLY
EVOL,EMAS
*Node File
U,
*EL File
S,
*end step




** 40 Eigenfrequencies should be sufficient according to the reference: p. 59, h=1.12 mm
*step,perturbation
*frequency,STORAGE=YES
40,
*el print
*end step




** reference has 20 Eigenfrequencies on reference diagram p. 59 for h=1.12 mm
*step,perturbation
*complex frequency, CORIOLIS
20,
*end step







*Step,nlgeom
*Static,SOLVER=TAUCS
*dload
** 70 rotations per second:
ES8R,centrif,1.9344E+05,0.,0.,0.,0.,0.,1.
*el print,elset=ES8R,TOTALS=ONLY
EVOL,EMAS
*Node File
U,
*EL File
S,
*end step




** 40 Eigenfrequencies should be sufficient according to the reference: p. 59, h=1.12 mm
*step,perturbation
*frequency,STORAGE=YES
40,
*el print
*end step




** reference has 20 Eigenfrequencies on reference diagram p. 59 for h=1.12 mm
*step,perturbation
*complex frequency, CORIOLIS
20,
*end step







*Step,nlgeom
*Static,SOLVER=TAUCS
*dload
** 80 rotations per second:
ES8R,centrif,2.5266E+05,0.,0.,0.,0.,0.,1.
*el print,elset=ES8R,TOTALS=ONLY
EVOL,EMAS
*Node File
U,
*EL File
S,
*end step




** 40 Eigenfrequencies should be sufficient according to the reference: p. 59, h=1.12 mm
*step,perturbation
*frequency,STORAGE=YES
40,
*el print
*end step




** reference has 20 Eigenfrequencies on reference diagram p. 59 for h=1.12 mm
*step,perturbation
*complex frequency, CORIOLIS
20,
*end step







*Step,nlgeom
*Static,SOLVER=TAUCS
*dload
** 90 rotations per second:
ES8R,centrif,3.1978E+05,0.,0.,0.,0.,0.,1.
*el print,elset=ES8R,TOTALS=ONLY
EVOL,EMAS
*Node File
U,
*EL File
S,
*end step




** 40 Eigenfrequencies should be sufficient according to the reference: p. 59, h=1.12 mm
*step,perturbation
*frequency,STORAGE=YES
40,
*el print
*end step




** reference has 20 Eigenfrequencies on reference diagram p. 59 for h=1.12 mm
*step,perturbation
*complex frequency, CORIOLIS
20,
*end step







*Step,nlgeom
*Static,SOLVER=TAUCS
*dload
** 100 rotations per second:
ES8R,centrif,3.9478E+05,0.,0.,0.,0.,0.,1.
*el print,elset=ES8R,TOTALS=ONLY
EVOL,EMAS
*Node File
U,
*EL File
S,
*end step




** 40 Eigenfrequencies should be sufficient according to the reference: p. 59, h=1.12 mm
*step,perturbation
*frequency,STORAGE=YES
40,
*el print
*end step




** reference has 20 Eigenfrequencies on reference diagram p. 59 for h=1.12 mm
*step,perturbation
*complex frequency, CORIOLIS
20,
*end step

and geometry file (cgx.fbd):

ULIN test
asgn n 3

SETO S8R
SETO S8R0
pnt ps0 0.0 0.0 0.0
pnt ps1 15.0 0.0 0.0
pnt ps2 60.0 0.0 0.0
pnt ps3 0.0 60.0 0.0
pnt ps4 0.0 15.0 0.0

line ls1 ps1 ps2
line ls2 ps2 ps3 ps0
line ls3 ps3 ps4
line ls4 ps4 ps1 ps0

surf As1 ls1 ls2 ls3 ls4
seta fix_f l ls1 ls3
seta master l ls4
seta load l ls2

seta dls1 l ls1 ls3
seta dls2 l ls2 ls4

SETC S8R0

seta InnerNodes l ls4

if 1 == 1
valu count 0
valu inc 1
valu ilosc 3.0
valu name S8R

while count < ilosc
valu count int count
valu In_name & name count
valu count2 + count 1
valu count2 int count2
valu Out_name & name count2
copy In_name Out_name rot z 90.0 a
valu count + count inc
endwhile
endif

SETC S8R

merg p S8R
merg l S8R

div dls1 10
div dls2 22

elty all qu8r
#elty all qu4er
mesh S8R
send S8R abq

comp InnerNodes do
comp InnerNodes do
send InnerNodes abq nam

OK:

div dls1 10
div dls2 22

NOK:

div dls1 10
div dls2 24

I don’t understand where the mentioned memory limitation may be: My test computer has 24 GB RAM, during the run of DiskasShell03_TAUCS.inp the computer consumes total max 8 GB (including all tasks). So I assumed it could not be a RAM limitation of the hardware. I searched for TAUCS related environment variables to be set: But the TAUCS manual (for TAUCS version 2.2 from September 2003, I could not find any newer manual) does not seem to have any detail on environment variables to be set to ensure that the solver gets the needed RAM to solve the set of equations.

In sorce code (tau.c):

image

I’m not sure but it’s probably in bytes (~476MB), this solver is from 2003 and it is also rather slow.

The ccx included TAUCS seems to prefer OOC (out-of-core) computation although in-core routines are available as well. So the solver source code may still reflect the RAM memory cost from 2002. I would expect any modern solver to use OOC routines only if in-core computation is not possible.

Whom it must interest. Hereby a compare between the Taucs and the Pardiso for one of the data set cav_rad12_1E05_TAUCS.inp delivered by @johanngil

In my mindset it will require some work before I would consider it stable and then I personal will not find the effort worthy when I have the stable Pardiso as alternative.

I forgot to add the information, that the CCX_2.22 was compiled without any optimization and additional with debug and profiler information to the code, so I expect the actual runtime for both solvers to be in the high end, but for comparison it probably doesn’t make a big difference.

CCX_2.22, Taucs with Metis, 4 Cores on Debian Trixie

nodes: 728031
elements: 11018

taucs_linsolve: ordering time 7.00e-03 seconds (6.85e-03 seconds CPU time)
taucs_linsolve: starting LLT factorization
taucs_linsolve: pre-factorization permuting of A
taucs_linsolve: starting IC LLT factorization
taucs_linsolve: starting IC LLT MF factorization
Elimination tree depth is 756
Symbolic Analysis of LL^T: 5.99e+05 nonzeros, 2.72e+07 flops, 6.62e+06 bytes in L
Relaxed Analysis of LL^T: 6.62e+05 nonzeros, 3.25e+07 flops, 7.34e+06 bytes in L
Symbolic Analysis = 0.004 seconds (0.004 cpu)
Supernodal Multifrontal LL^T = 0.037 seconds (0.124 cpu)
taucs_linsolve: preparing to solve
taucs_linsolve: pre-solve permuting of A
Return Code from Solving 0

Using up to 4 cpu(s) for the heat flux calculation.

average flux= 1539996.029869
time avg. flux= 1509729.816688
largest residual flux= 0.000099 in node 2439 and dof 0
largest increment of temp= 6.732740e-10
largest correction to temp= 6.732740e-10

convergence; the increment size is increased to 8.001909e+00

the increment size exceeds the remainder of the step and is decreased to 0.000000e+00

Using up to 4 cpu(s) for the heat flux calculation.

Job finished


Total CalculiX Time: 144.708029


CCX_2.22, Pardiso, 4 Cores on Debian Trixie

nodes: 728031
elements: 11018

increment 38 attempt 1
increment size= 5.334606e+00
sum of previous increments=9.466539e+01
actual step time=1.000000e+02
actual total time=1.000000e+02

iteration 1

Using up to 4 cpu(s) for the heat flux calculation.

Using up to 4 cpu(s) for the symmetric stiffness/mass contributions.

Factoring the system of equations using the symmetric pardiso solver
number of threads = 4

Using up to 4 cpu(s) for the heat flux calculation.

average flux= 1539996.029869
time avg. flux= 1509729.816688
largest residual flux= 0.000099 in node 2491 and dof 0
largest increment of temp= 6.732808e-10
largest correction to temp= 6.732808e-10

convergence; the increment size is increased to 8.001909e+00

the increment size exceeds the remainder of the step and is decreased to 0.000000e+00

Using up to 4 cpu(s) for the heat flux calculation.

Job finished


Total CalculiX Time: 149.840346


when Pardiso available does not it means unimportant for PaStiX to be implemented and Taucs introduced here, Pardiso is good and stable but a proprietary of Intel, also it cannot be faster in case large contact and plasticity, processor dependent probably and it may not be optimized for AMD.

My point was just, that TAUCS has some academic very beauty recursive functions, which are heavy resource costly on the OS stack normally limited to 5-8MB and thereby limiting the number of equation, converting these functions either to local generated stacks or iterative function instead of are quite a job, which probably already had been done if it had been easy.

i used Taucs solver for about twenty years and more on the top of commercial software, static & dynamics also linear & nonlinear. Unfortunately, the solver seems to have dual license in the past, so the modified version is closed and unpublished.