Debian source package for Calculix

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
cblt2l
Posts: 155
Joined: Sat May 15, 2010 3:59 am

Debian source package for Calculix

Post by cblt2l »

I put together a basic Debian source package for Calculix. It uses the standard packages for spooles and arpack which simplifies things a bit. Tips, suggestions, comments welome.

Packages for Wheezy are available in my repo here.

To build:
Grab the Debian source package for Calculix
then:

Code: Select all

# Extract archive
tar -zxvf ccx_2.7_debian.tar.gz

# Install dependencies
sudo apt-get install libspooles-dev libarpack2-dev gfortran

# Build package
cd ccx-2.7
dpkg-buildpackage -us -uc

# Install package
sudo dpkg -i ../ccx_2.7-1_YOURARCH.deb

# Run Calculix with
ccx

# To use more than 1 thread, set OMP_NUM_THREADS to the desired number
OMP_NUM_THREADS=4 ccx
Edit: 3/2/14
* Run with ccx instead of ccx_2.7
* Added thread info
Last edited by cblt2l on Sun Mar 02, 2014 5:45 pm, edited 1 time in total.
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: Debian source package for Calculix

Post by jriegel »

Great!

Do we need a version number to start Calculix? Would be a symlink to ccx possible?

For FreeCAD we need only the solver, don't bother with packaging the rest....
Stop whining - start coding!
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Debian source package for Calculix

Post by jmaustpc »

Juergen, would we want it compiled with multi thread support or not? I think I read that it can be compile to support OpenMP?

Which also brings up the next question, can FreeCAD be more multi threaded? OCE can use either OpenMP or tbb. I suspect it only uses it for Meshing, I read somewhere on the OCE forum once that OCE already supports these two for Meshing, but I don't know if it only works for meshing or what exactly they meant by Meshing.

I tried an experiment a few days ago, I compiled OCE from their master in three forms,
1) default no multi threading
2) with OpenMP support
3) with tbb support

I could not detect any difference between the three, both in terms of speed and in terms of CPU usage in my system monitor.

Jim
User avatar
cblt2l
Posts: 155
Joined: Sat May 15, 2010 3:59 am

Re: Debian source package for Calculix

Post by cblt2l »

jriegel wrote:Do we need a version number to start Calculix? Would be a symlink to ccx possible?
Added the symlink. Now it starts with "ccx" or "ccx_2.7"
jriegel wrote:For FreeCAD we need only the solver, don't bother with packaging the rest....
Its just the solver.
jmaustpc wrote:Juergen, would we want it compiled with multi thread support or not? I think I read that it can be compile to support OpenMP?
It is compiled for multi threading but you have to set OMP_NUM_THREADS to the max number of threads to use. According to the documentation, Calculix should automatically set the number of threads based on the workload but for every case I run without setting OMP_NUM_THREADS it only uses 1 thread. It probably needs more testing.
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: Debian source package for Calculix

Post by jriegel »

For a solver it makes sure sense to use a multi thread option!
OCC has some limited support for multi thread....

FreeCAD is by design not so easy. We can use multi thread for some algorithms, but in general its not possible...
Stop whining - start coding!
MarcoP
Posts: 2
Joined: Sat Apr 26, 2014 11:52 pm

Re: Debian source package for Calculix

Post by MarcoP »

Hi!
I'm having some trouble installing on ubuntu 12.04. The command

sudo dpkg -i ../ccx_2.7-1_YOURARCH.deb

doesn't work. I tried replacing YOURARCH with x86_64 or amd64 with no success.

Can you please explain how to run this command properly?
thanks for your work!
User avatar
cblt2l
Posts: 155
Joined: Sat May 15, 2010 3:59 am

Re: Debian source package for Calculix

Post by cblt2l »

MarcoP,

What is the result of running dpkg-buildpackage? Did it finish successfully? If all goes well the package name should be listed somewhere at the end of the console output. Also if your not on amd64 your package name will be different. It may be something like "ccx_2.7-1_i386.deb" if your on an i386 system.

Also, if the command line isn't your thing you can use gdebi to install it.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Debian source package for Calculix

Post by NormandC »

I always use GDebi to install deb packages that do not come from the Ubuntu repositories or a PPA.

FYI on Ubuntu it's not installed by default anymore, you need to install it.
MarcoP
Posts: 2
Joined: Sat Apr 26, 2014 11:52 pm

Re: Debian source package for Calculix

Post by MarcoP »

Sorry for the late response.

I found that I can't install the .deb package because it's not found.
The dpkg-buildpackage command ends up with these lines (too many lines to be reported completely)

Code: Select all

...
/usr/lib/liblapack.so.3gf: undefined reference to `ATL_zhpmv'
/usr/lib/liblapack.so.3gf: undefined reference to `ATL_dptsymm'
/usr/lib/liblapack.so.3gf: undefined reference to `ATL_ctbsv'
/usr/lib/liblapack.so.3gf: undefined reference to `ATL_zaxpby'
/usr/lib/liblapack.so.3gf: undefined reference to `ATL_dpttrmm'
collect2: ld returned 1 exit status
make[1]: *** [ccx_2.7] Error 1
make[1]: Leaving directory `/home/marco/CalculiX files/ccx-2.7'
dh_auto_build: make -j1 returned exit code 2
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
I'm have a basic ubuntu 12.04 with no other softwares except octave. Should I install other programs/libraries to support calculix?
thanks
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Debian source package for Calculix

Post by NormandC »

MarcoP wrote:I'm have a basic ubuntu 12.04 with no other softwares except octave.
A basic Ubuntu installation does not have the required packages for compilation. For starters you need to install "build-essential" and possibly other packages.
Post Reply