QProcess.ProcessError.FailedToStart for Calculix

About the development of the FEM module/workbench.

Moderator: bernd

lemonbug
Posts: 310
Joined: Sun Oct 19, 2014 5:12 pm

Re: QProcess.ProcessError.FailedToStart for Calculix

Post by lemonbug »

chrisb wrote: Sat Sep 29, 2018 5:03 am I'm afraid it has to be compiled for your system, but here is my library stuff, you may give it a try: https://owncloud.gwdg.de/index.php/s/ZL ... T/download
copying those files into the directory did not help. however, i have run through the gfortran install for version 7.3 and i am making progress.

calculix starts now and I get a file error.

/usr/local/cellar/calculix-ccx/2.13/bin$ ccx_2.13 -i calc


CalculiX Version 2.13, Copyright(C) 1998-2017 Guido Dhondt
CalculiX comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to redistribute it under
certain conditions, see gpl.htm

************************************************************

You are using an executable made on Tue Oct 24 01:22:09 BST 2017
*ERROR in readinput: cannot open file BC201.sur
s@JMacBook-Pro:/usr/local/cellar/calculix-ccx/2.13/bin$
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: QProcess.ProcessError.FailedToStart for Calculix

Post by looo »

I am having the same problem with freecad and calculix from conda (osx):

Code: Select all

runCalculix
run CalculiX at:  with: /Users/lo/tmp/FEMMeshNetgen
Error() PySide2.QtCore.QProcess.ProcessError.FailedToStart
But calling it manually from the freecad-console works:

Code: Select all

>>> import subprocess as sub
>>> a = sub.Popen(["ccx", "/Users/lo/tmp/FEMMeshNetgen"], stdout=sub.PIPE, sterr=sub.PIPE)
>>> out, err = a.communicate()
>>> print(out.decode("utf8"))

************************************************************

CalculiX Version 2.15, Copyright(C) 1998-2018 Guido Dhondt
CalculiX comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to redistribute it under
certain conditions, see gpl.htm

************************************************************

You are using an executable made on Tue Dec 18 07:43:44 GMT 2018

  The numbers below are estimated upper bounds

  number of:

   nodes:           26
   elements:           29
   one-dimensional elements:            0
   two-dimensional elements:            0
   integration points per element:            4
   degrees of freedom per node:            3
   layers per element:            1

   distributed facial loads:            0
   distributed volumetric loads:            0
   concentrated loads:            0
   single point constraints:            0
   multiple point constraints:            1
   terms in all multiple point constraints:            1
   tie constraints:            0
   dependent nodes tied by cyclic constraints:            0
   dependent nodes in pre-tension constraints:            0

   sets:            4
   terms in all sets:           67

   materials:            1
   constants per material and temperature:            2
   temperature points per material:            1
   plastic data points per material:            0

   orientations:            0
   amplitudes:            0
   data points in all amplitudes:            0
   print requests:            0
   transformations:            0
   property cards:            0


 STEP            1

 Frequency analysis was selected

 Decascading the MPC's

 Determining the structure of the matrix:
 number of equations
 78
 number of nonzero lower triangular matrix elements
 1563

 Using up to 1 cpu(s) for the stress calculation.

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

 Factoring the system of equations using the symmetric spooles solver
 Using up to 1 cpu(s) for spooles.

 Calculating the eigenvalues and the eigenmodes

 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the stress calculation.

Code: Select all

OS: macOS 10.13
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16207 (Git)
Build type: Release
Branch: master
Hash: 741533941c67da2f721bf1b7c2d55c987fd22a0c
Python version: 3.7.2
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Is there anyone who did a fem-analysis on mac? I wonder if this is a general problem of the method used to call ccx with the subprocess. In theory everything should be setup the right way.
Last edited by looo on Tue Mar 26, 2019 6:39 pm, edited 1 time in total.
lemonbug
Posts: 310
Joined: Sun Oct 19, 2014 5:12 pm

Re: QProcess.ProcessError.FailedToStart for Calculix

Post by lemonbug »

I spent a few days working on this but ended up giving up. I don't have the skills required to fix it.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: QProcess.ProcessError.FailedToStart for Calculix

Post by looo »

ok, the problem is that calculix is not automatically detected allthough it's installed correctly and available. What worked for me was setting the path to calculix manually in the preferences -> fem -> calculix to ccx. I don't know why it's not done by default.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: QProcess.ProcessError.FailedToStart for Calculix

Post by bernd »

looo wrote: Tue Mar 26, 2019 6:53 pm ok, the problem is that calculix is not automatically detected allthough it's installed correctly and available. What worked for me was setting the path to calculix manually in the preferences -> fem -> calculix to ccx. I don't know why it's not done by default.
because I do not own a mac, or not anymore (I had one ten years ago ...) would be cool if you could help here. The code for CalculixCcxTools sover is here. https://github.com/FreeCAD/FreeCAD/blob ... #L529-L568

Did you use the standard CalculixCcxTools solver or the experimental one?
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: QProcess.ProcessError.FailedToStart for Calculix

Post by bernd »

https://github.com/FreeCAD/FreeCAD/blob ... ls.py#L555
before the line above we should include anoter
elif system() == "specifierForOsx" and set the path or try to get it like it is done on linux

may be an else and some hint would be cool too ... Mhh I could do this too, just as you like.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: QProcess.ProcessError.FailedToStart for Calculix

Post by bernd »

Furthermore we need some error if no path is set at all. I will go for this too.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: QProcess.ProcessError.FailedToStart for Calculix

Post by looo »

bernd wrote: Tue Mar 26, 2019 7:37 pm https://github.com/FreeCAD/FreeCAD/blob ... ls.py#L555
before the line above we should include anoter
elif system() == "specifierForOsx" and set the path or try to get it like it is done on linux

may be an else and some hint would be cool too ... Mhh I could do this too, just as you like.
Normally doing the same as for linux should work. Maybe we should try to handle linux and osx the same way before adding additional elif's .
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: QProcess.ProcessError.FailedToStart for Calculix

Post by bernd »

looo wrote: Tue Mar 26, 2019 7:59 pm
bernd wrote: Tue Mar 26, 2019 7:37 pm https://github.com/FreeCAD/FreeCAD/blob ... ls.py#L555
before the line above we should include anoter
elif system() == "specifierForOsx" and set the path or try to get it like it is done on linux

may be an else and some hint would be cool too ... Mhh I could do this too, just as you like.
Normally doing the same as for linux should work. Maybe we should try to handle linux and osx the same way before adding additional elif's .
would you give it a try on your osx? If it works we go for your suggestion.
lemonbug
Posts: 310
Joined: Sun Oct 19, 2014 5:12 pm

Re: QProcess.ProcessError.FailedToStart for Calculix

Post by lemonbug »

looo wrote: Tue Mar 26, 2019 6:53 pm ok, the problem is that calculix is not automatically detected allthough it's installed correctly and available. What worked for me was setting the path to calculix manually in the preferences -> fem -> calculix to ccx. I don't know why it's not done by default.
You got everything working? I know I went into preferences and set the path before and it didn’t help. I believe I had calculix installed properly and was able to run a test from the command line but my memory isn’t foggy.
Post Reply