[conda] compile calculix for osx and windows

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
looo
Posts: 3431
Joined: Mon Nov 11, 2013 5:29 pm

[conda] compile calculix for osx and windows

Postby looo » Fri Nov 23, 2018 9:47 am

Has anybody successfully compiled calculix for osx? I am wondering if it makes sense to try this [1]. Also I am trying to compile calculix for windows with the mingw-toolchain. I think @easyw was successful on windows. Maybe we can transfer the instruction into a build-instruction for conda.

I guess in theory it should be possible to support all 3 major platforms, but some help would be nice! [2]
easyw-fc wrote:
[1] https://travis-ci.org/conda-forge/stage ... tification
[2] https://github.com/conda-forge/staged-recipes/pull/6827
User avatar
looo
Posts: 3431
Joined: Mon Nov 11, 2013 5:29 pm

Re: [conda] compile calculix for osx and windows

Postby looo » Fri Nov 23, 2018 10:11 am

For windows it looks like it is a bit more difficult. spooles and arpack are not yet available:

https://github.com/conda-forge/spooles- ... a.yaml#L17
https://github.com/conda-forge/arpack-feedstock/pull/22

So I guess this will need some time until we can compile calculix with flang and clang...
User avatar
bernd
Posts: 10702
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: [conda] compile calculix for osx and windows

Postby bernd » Fri Nov 23, 2018 1:46 pm

peterl94
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: [conda] compile calculix for osx and windows

Postby peterl94 » Sun Nov 25, 2018 12:30 am

I've always just used the homebrew package built using this formula: https://github.com/brewsci/homebrew-sci ... lix-ccx.rb
User avatar
looo
Posts: 3431
Joined: Mon Nov 11, 2013 5:29 pm

Re: [conda] compile calculix for osx and windows

Postby looo » Sun Nov 25, 2018 3:13 pm

Thanks for the instructions. I hope osx won't need too much iterations to get the builds succeed. For Windows arpack is now available build with the mingw-toolchain. So I will try to use the same toolchain for spooles and calculuix too.
UR_
Posts: 1189
Joined: Tue Jan 03, 2017 8:42 pm

Re: [conda] compile calculix for osx and windows

Postby UR_ » Sun Nov 25, 2018 3:39 pm

ccx is a really sensible piece of software, showing it's weak spots only after doing tons of tests.

So let's speak this guy ("kwip" from mecway forum):
I did some research finding other projects having issues with ARPack which is kind of EOL. ocatve, scilab were forking their own implementation. There is some effort of consolidation, namely arpack-ng. I'll try to build CCX against this arpack version. Maybe we are lucky. I'll report back when I've put the required dependencies together.

http://mecway.com/forum/discussion/comm ... mment_2511


Results can be found here:
https://github.com/ddfem/ccx_mingw64/commits/master

Especially if it comes to non static calculations, this build is really appreciated.
User avatar
looo
Posts: 3431
Joined: Mon Nov 11, 2013 5:29 pm

Re: [conda] compile calculix for osx and windows

Postby looo » Sun Nov 25, 2018 6:00 pm

UR_ wrote:
Sun Nov 25, 2018 3:39 pm
There is some effort of consolidation, namely arpack-ng.
actually the arpack-package on conda-forge uses sources from arpack-ng [1]. There is also another arpack (arpackpp [2]). Do you know for which part ccx uses arpack and for which it uses spooles?

[1] https://github.com/conda-forge/arpack-feedstock
[2] https://github.com/conda-forge/arpackpp-feedstock
UR_
Posts: 1189
Joined: Tue Jan 03, 2017 8:42 pm

Re: [conda] compile calculix for osx and windows

Postby UR_ » Sun Nov 25, 2018 6:35 pm

looo wrote:
Sun Nov 25, 2018 6:00 pm
for which part ccx uses arpack and for which it uses spooles?
For an overview please refer to docs

http://www.dhondt.de/ccx_2.14.pdf

see page 570 chapter 9.6:
9.6 Filling and solving the set of equations, storing the results
In this section a distinction is made between the types of analysis and the solver
used:
• for linear static calculations with SPOOLES or the iterative solver the appropriate routine is prespooles.c
• for nonlinear static or dynamic calculations (which implies the use of SPOOLES or the iterative solver) routine nonlingeo.c is called. This includes all thermal calculations.
• for frequency analysis without cyclic symmetry routine arpack.c is called.9.6 Filling and solving the set of equations, storing the results 571
• for a frequency analysis with cyclic symmetry conditions the appropriate routine is arpackcs.c
• for a buckling analysis arpackbu.c is called
• for linear dynamic calculations (i.e. modal dynamic analysis) the routine is dyna.c
• finally, for steady state dynamics calculations the routine is steadystate.c
...
User avatar
Kunda1
Posts: 7992
Joined: Thu Jan 05, 2017 9:03 pm

Re: [conda] compile calculix for osx and windows

Postby Kunda1 » Mon Nov 26, 2018 10:53 am

Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
looo
Posts: 3431
Joined: Mon Nov 11, 2013 5:29 pm

Re: [conda] compile calculix for osx and windows

Postby looo » Thu Nov 29, 2018 8:52 pm

I was able to build spooles for windows on my machine. There is still a problem with recursive copying the header files (appveyor):
https://ci.appveyor.com/project/conda-f ... 8069#L1889

If anyone knows a better way to copy header files, please let me know.