# Compiling ccx 2.17 with pardiso

**URL:** <https://calculix.discourse.group/t/compiling-ccx-2-17-with-pardiso/168>\
**Category:** Uncategorized\
**Created:** [September 7, 2020, 8:42am UTC](https://calculix.discourse.group/t/compiling-ccx-2-17-with-pardiso/168 "2020-09-07T08:42:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://calculix.discourse.group/u/patrick)\
**Post date:** [September 7, 2020, 8:42am UTC](https://calculix.discourse.group/t/compiling-ccx-2-17-with-pardiso/168/1 "2020-09-07T08:42:21Z")

</div>

Hello all,

I have some trouble to compile ccx with pardiso (using ubuntu 20.04). I downloaded the .so pardiso file and stored the licence key in pardiso.lic as recommended, but I’m not sure how to link this at the makefile and I guess I need some additional files. The ccx documentation is quite short at this point.

Has someone here a working makefile for this case or can say me what additional steps are necessary? Would help me a lot…

Best regards  
Patrick

---

<div class="post-metadata">

**Author:** ![jbr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jbr](https://calculix.discourse.group/u/jbr)\
**Post date:** [September 11, 2020, 3:04am UTC](https://calculix.discourse.group/t/compiling-ccx-2-17-with-pardiso/168/2 "2020-09-11T03:04:01Z")

</div>

Hi Patrick,

Below a makefile I used and it worked for 2.16. I’m fairly new to calculix and building from source.

```
CFLAGS = -Wall -g -O2 -fopenmp -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DPARDISO -DARPACK -DMATRIXSTORAGE -DUSE_MT=1 
FFLAGS = -Wall -g -O2 -fopenmp 

CC=cc
FC=gfortran

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

include Makefile.inc

SCCXMAIN = ccx_2.16.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 \
       ../../../ARPACK/libarpack_INTEL.a \
       -L/usr/local/lib/pardiso -lpardiso600-GNU800-X86-64 -lpthread -lm -lblas -llapack -lc

ccx_2.16_MT: $(OCCXMAIN) ccx_2.16_MT.a
	./date.pl; $(CC) $(CFLAGS) -c ccx_2.16.c; $(FC) -fopenmp -Wall -O2 -g -o $@ $(OCCXMAIN) ccx_2.16_MT.a $(LIBS)

ccx_2.16_MT.a: $(OCCXF) $(OCCXC)
	ar vr $@ $?
```

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://calculix.discourse.group/u/patrick)\
**Post date:** [September 11, 2020, 6:29am UTC](https://calculix.discourse.group/t/compiling-ccx-2-17-with-pardiso/168/3 "2020-09-11T06:29:58Z")

</div>

Now it works, I made a simple mistake.

Your reply is one of the best news for me this week! Thanks a lot!

---

<div class="post-metadata">

**Author:** ![manny9808](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/manny9808/32/143_2.png) [@manny9808](https://calculix.discourse.group/u/manny9808)\
**Post date:** [December 29, 2020, 11:39am UTC](https://calculix.discourse.group/t/compiling-ccx-2-17-with-pardiso/168/4 "2020-12-29T11:39:49Z")

</div>

Hello,

I have been getting following error while compiling with Pardiso:  
`*** No rule to make target '-L/home/pc/CalculiX_mod/PARDISO/'`  
The so file is in the location specified after -L.

If anyone could point out what might be the reason, that would be so helpful

---

<div class="post-metadata">

**Author:** ![jbr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jbr](https://calculix.discourse.group/u/jbr)\
**Post date:** [December 31, 2020, 10:41pm UTC](https://calculix.discourse.group/t/compiling-ccx-2-17-with-pardiso/168/5 "2020-12-31T22:41:35Z")

</div>

Hi Manny, could you share your Makefile? This way I can compare and see what is going on… Note that I used the file from the direct [Pardiso Project](https://www.pardiso-project.org/) named: `libpardiso600-GNU800-X86-64.so`.

---

<div class="post-metadata">

**Author:** ![manny9808](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/manny9808/32/143_2.png) [@manny9808](https://calculix.discourse.group/u/manny9808)\
**Post date:** [January 1, 2021, 11:41am UTC](https://calculix.discourse.group/t/compiling-ccx-2-17-with-pardiso/168/6 "2021-01-01T11:41:11Z")

</div>

Hello,  
Thanks for your response. I got it to work with the MKL version. The makefile is in another post here:  
[makefile for intel mkl pardiso with gcc](https://calculix.discourse.group/t/undefined-reference-to-pardiso-with-intel-mkl-oneapi-toolkit/373/3)
