Installing procedure for INTEL oneAPI MKL:

Navigate to the ~/download/fem/CalculiX/dependencies/pardiso folder and download the oneAPI MKL (intel-onemkl-2025.0.0.940_offline.sh) from INTEL website. Select Linux OS and Offline Installer option. The file is approximately 499[MB] size.

Solvers benchmark

Navigate to the pardiso download folder:

bash
cd ~/download/fem/CalculiX/dependencies/pardiso

and type:

bash
sudo sh ./intel-onemkl-2025.0.0.940_offline.sh

Follow the on-screen instructions during the installation process. You will be presented with several options, such as installing to the default directory or specifying a custom one. You will also need to accept the terms and conditions.
After the installation is complete, you may need to set environment variables in your .bashrc file (or .zshrc if you use Zsh).
Add the following line to your .bashrc file and source it:

bash
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bashrc
source ~/.bashrc

then, verify the installation:

bash
ls /lib/x86_64-linux-gnu/libmkl_rt.so
find / -name *mkl*.so

You will find the MKL library in this folder:

bash
/opt/intel/oneapi/mkl/2025.0/lib/libmkl_rt.so

Compiling procedure for CalculiX:

Navigate to the CalculiX source folder:

bash
cd CalculiX/ccx_2.22/src/

Taking the multithreaded SPOOLES Makefile as a starting point, we just need to make some minor changes:

Makefile
CFLAGS = -Wall -O3 -fopenmp -I ../../../SPOOLES.2.2 -I /usr/include/mkl -I /usr/local/lib -DARCH="Linux" -DSPOOLES -DARPACK -DPARDISO -DMATRIXSTORAGE -DNETWORKOUT -DUSE_MT=1 
FFLAGS = -Wall -O3 -fopenmp

CC=cc
FC=gfortran

.c.o :
$(CC) $(CFLAGS) -c $<
.f.o :
$(FC) $(FFLAGS) -c $<

include Makefile.inc

SCCXMAIN = ccx_2.22.c

OCCXF = $(SCCXF:.f=.o)
OCCXC = $(SCCXC:.c=.o)
OCCXMAIN = $(SCCXMAIN:.c=.o)

DIR=../../../SPOOLES.2.2

LIBS = \
$(DIR)/MT/src/spoolesMT.a \
$(DIR)/spooles.a \
/opt/intel/oneapi/mkl/2025.0/lib/libmkl_rt.so \
-lpthread -lm -lc

ccx_2.22_pardiso: $(OCCXMAIN) ccx_2.22.a $(LIBS)
./date.pl; $(CC) $(CFLAGS) -c ccx_2.22.c; $(FC) -fopenmp -Wall -O3 -o $@ $(OCCXMAIN) ccx_2.22.a $(LIBS)

ccx_2.22.a: $(OCCXF) $(OCCXC)
ar vr $@ $?

To start the compilation process, simply type:

bash
make -j 4

After a while the CalculiX ccx_2.22_pardiso executable will be created:

bash
ls -l ccx_2.22*

Clean up the source folder and move the executable to a user-accessible bin folder, such as:

bash
rm *.o *.a
mv ccx_2.22_pardiso /usr/local/bin/
Back to CalculiX compiling procedure