Hello,
Has anyone faced error with MKL Pardiso? What worked for you? I tried the Feacluster makefile too but it didnt help. I have been trying to compile ccx with the Intel MKL Pardiso bt get following error:
ccx_PardisoMKL_gcc.a(pardiso.o): In function `pardiso_factor':
/home/pc/CalculiX_mod/CalculiX/ccx_2.17/src/pardiso.c:296: undefined reference to `pardiso_'
ccx_PardisoMKL_gcc.a(pardiso.o): In function `pardiso_solve':
/home/pc/CalculiX_mod/CalculiX/ccx_2.17/src/pardiso.c:333: undefined reference to `pardiso_'
ccx_PardisoMKL_gcc.a(pardiso.o): In function `pardiso_cleanup':
/home/pc/CalculiX_mod/CalculiX/ccx_2.17/src/pardiso.c:359: undefined reference to `pardiso_'
ccx_PardisoMKL_gcc.a(pardiso.o): In function `pardiso_solve':
/home/pc/CalculiX_mod/CalculiX/ccx_2.17/src/pardiso.c:333: undefined reference to `pardiso_'
ccx_PardisoMKL_gcc.a(pardiso.o): In function `pardiso_cleanup':
/home/pc/CalculiX_mod/CalculiX/ccx_2.17/src/pardiso.c:359: undefined reference to `pardiso_'
ccx_PardisoMKL_gcc.a(pardiso_as.o):/home/pc/CalculiX_mod/CalculiX/ccx_2.17/src/pardiso_as.c:161: more undefined references to `pardiso_' follow
collect2: error: ld returned 1 exit status
Makefile:49: recipe for target 'ccx_PardisoMKL_gcc' failed
make: *** [ccx_PardisoMKL_gcc] Error 1
My makefile is as follows:
OPT = -g -O3
CFLAGS = -Wall (OPT) -fopenmp -DARCH="Linux" -DARPACK -DPARDISO -DMATRIXSTORAGE -DUSE_MT=1 -DMKL_ILP64 -I{MKL_INCLUDE}
FFLAGS = -Wall (OPT) (OPTIONS) -I(MKL_INCLUDE) -fopenmp
#ARPACK
#CFLAGS+= -I ../../../ARPACK -DARPACK
#BLAS and LAPACK
#CFLAGS+= -llpack -lblas
CC=gcc
FC=gfortran
OPTIONS = -w -fno-second-underscore -fcray-pointer -x f77-cpp-input
FPPSTOP= -x none
#INTEL MKL
MKL_LIB = /opt/intel/oneapi/mkl/2021.1.1/lib/intel64
MKL_INCLUDE=/opt/intel/oneapi/mkl/2021.1.1/include
CMPLR_PATH = /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64
.c.o :
$(CC) $(CFLAGS) -c $<
.f.o :
$(FC) $(FFLAGS) -c $<
include Makefile.inc
SCCXMAIN = ccx_2.17.c
OCCXF = $(SCCXF:.f=.o)
OCCXC = $(SCCXC:.c=.o)
OCCXMAIN = $(SCCXMAIN:.c=.o)
LIBS= ../../../ARPACK/libarpack_UBUNTU.a -lpthread -lm -lc
ccx_PardisoMKL_gcc: $(OCCXMAIN) ccx_PardisoMKL_gcc.a $(LIBS)
./date.pl; $(CC) $(CFLAGS) -c ccx_2.17.c; \
$(FC) $(OPT)p $(FFLAGS) -o $@ $(FPPSTOP) $(OCCXMAIN) ccx_PardisoMKL_gcc.a $(LIBS)
-Wl,--start-group \
$(MKL_LIB)/libmkl_intel_ilp64.a \
$(MKL_LIB)/libmkl_intel_thread.a \
$(MKL_LIB)/libmkl_core.a \
$(MKL_LIB)/libmkl_blacs_openmpi_ilp64.a \
-Wl,--end-group \
-L$(CMPLR_PATH) -liomp5 -lpthread -lm -ldl
ccx_PardisoMKL_gcc.a: $(OCCXF) $(OCCXC)
Many thanks.