In order to improve the operational capabilities of the tools used in analysis we found the task of enabling CalculiX solvers to work with more than one core.
There is no point on buying an expensive computer with 6 cores when only are going to use one.
The documentation for how to do this is already on the Internet for all of you who knows how to get it, the issue is in all these incomprehensible or wrong sources which can waste our time. Older versions, different programs or libraries, different platforms or just poor documentation is normally found.
Fixing all this here is Tutorial of how to do it easily:
Note: To run the default executable downloaded from CalculiX web page in current versions of Ubuntu, just to do a symbolic link like this: "sudo ln-s / usr/lib/x86_64-linux-gnulibgfortran.so.3 / usr/lib/libgfortran.so.2" . Changing "/ usr/lib/x86_64-linux-gnu" for the address where libgfortran.so3 is installed.
1. Start by installing all the necessary tools for our work, as we compile the packages we ensure that we have in our system the following programs.
- gfortran (same G95)
- liblapack3gf ( and all its dependencies)
2. Then Download this files:
3. Now compile SPOOLES, we should make some changes before we use MAKE, the changes are:
- In /usr/local/spooles.2.2/Tree/src/makeGlobalLib change:
- In /usr/local/spooles.2.2/Make.inc change:
- On spooles.2.2 folder make:
$ sudo make lib
$ cd MT/src/
$ sudo make
3. Now compile ARPACK, we should make some changes before we use MAKE, the changes are:
- In /usr/local/ARPACK/ARmake.inc change:
PLAT = SUN4 to PLAT = linux
FC = f77 to FC = gfortran
FFLAGS = -O -cg89 to FFLAGS = -O2
MAKE = /bin/make to MAKE = /usr/bin/make
- In /usr/local/ARPACK/UTIL/second.f change:
EXTERNAL ETIME to *EXTERNAL ETIME
- On ARPAK folder make:
3. Finally compiling CalculiX:.
- In /usr/local/CalculiX/ccx_2.6/src lets make sure that Makefile ist exatly like this:
FFLAGS = -Wall -O3
$(CC) $(CFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
SCCXMAIN = ccx_2.6.c
OCCXF = $(SCCXF:.f=.o)
OCCXC = $(SCCXC:.c=.o)
OCCXMAIN = $(SCCXMAIN:.c=.o)
LIBS = \
ccx_2.6_MT: $(OCCXMAIN) ccx_2.6_MT.a $(LIBS)
./date.pl; $(CC) $(CFLAGS) -c ccx_2.6.c; $(FC) -Wall -O3 -o $@ $(OCCXMAIN) ccx_2.6_MT.a $(LIBS)
ccx_2.6_MT.a: $(OCCXF) $(OCCXC)
ar vr $@ $?
- Finishing with:
4. By this point CalculiX compiling will create an executable named "ccx_2.6_MT" witch is the one we have been looking for, now just put it on your work folder /usr/local/bin for example right next to the "cgx_2.3" executable downloades from CalculiX web page, remember to add run permisions. ( an advise: change the names to just "ccx" and "cgx" for easy use)
$ ccx -i jobname
*Change # for the number of threads you want to use, 1 by default.