This blog explains how to compile CALCULIX. This is a critical point required for introducing new user subroutines. The blog is not a comprehensive guide; it is only a description step-by-step of the procedure that we have followed, as an example of the process.
- gfortran
- make
- f2c
- liblapack3
- liblapack-dev
- libexodusii-dev
- libgl1-mesa-dev
- libglu1-mesa-dev
- libxi-dev
- libxmu-dev
- gcc
bash sudo apt-get install gfortran make f2c liblapack3 liblapack-dev libexodusii-dev libgl1-mesa-dev libglu1-mesa-dev libxi-dev libxmu-dev
bash wget http://www.netlib.org/linalg/spooles/spooles.2.2.tgz
Move to /usr/local
mkdir SPOOLES.2.2 mv spooles.2.2.tgz SPOOLES.2.2 cd SPOOLES.2.2 tar xvf spooles.2.2.tgz
Edit Make.inc
Change:
shell CC = gcc # CC = /usr/lang-4.0/bin/cc
Make the library
bash sudo make lib cd MT/src/ make
bash wget https://www.caam.rice.edu/software/ARPACK/SRC/arpack96.tar.gz wget https://www.caam.rice.edu/software/ARPACK/SRC/patch.tar.gz
Unpack
bash tar xvf arpack96.tar.gz tar xvf patch.tar.gz
Modify ARPACK/ARmake.inc
Change:
home = $(HOME)/ARPACK to your ARPACK directory PLAT = SUN4 to PLAT = linux FC = f77 to FC = gfortran FFLAGS = -O -cg89 to FFLAGS = -O2 MAKE = /bin/make to MAKE = make SHELL = /bin/sh to SHELL = shell
Modify ARPACK/UTIL/second.f
Change:
EXTERNAL ETIME to *EXTERNAL ETIME
Build the Library
bash make lib
bash cd CalculiX/ccx_2.17/src mv Makefile Makefile_ST mv Makefile_MT Makefile
Update the Makefile
CC=cc to CC=gcc
On line 15:
../../../ARPACK/libarpack_INTEL.a \ to ../../../ARPACK/libarpack_linux.a \
On line 1:
CFLAGS = - Wall -02 -fopenmp -I ../../../SPOOLES.2.2 -DARCH="Linux" - DIR=../../../SPOOLES.2.2
Build Calculix
bash sudo make