Issues compiling Calculix with PaStiX


I am desperately trying to compile Calculix with PaStiX on an Ubuntu computer with an AMD gpu (thus can’t compile with CUDA). It was difficult and solving a couple of issues I came across a problem I can’t figure out anymore. It compiles and links yieling no serious issues but trying to run with an input file, Calculix crashes with a segmentation fault. I was able to use a debugger and locate the issue. When the input file is read in “readinput.c”, the program continues to run Fortran

FORTRAN(keystart, (&ifreeinp, ipoinp, inp, "REST", nline, &ikey));

where it crashes at this line:


It seems the values of “ifreeinp” and “iline” are rather the pointer adresses (like 81604378625) but the actual values.
I was able before to compile Calculix with PaStiX without issues. How could this happen? I don’t fully understand how Fortran is invoked in the code.

My make file is:

FFLAGS = -Wall -O2 -fopenmp -fpic -fdefault-integer-8


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


SCCXMAIN = ccx_2.21.c

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

PASTIX_INCLUDE = ../PaStiX/pastix_i8/include
PASTIX_LIBS =  ../OpenBLAS_i8/libopenblas.a \
  ../PaStiX/pastix_i8/lib/libpastix.a ../OpenBLAS_i8/libopenblas.a -lpthread -lm ../PaStiX/pastix_i8/lib/libspm.a \
  ../PaStiX/pastix_i8/lib/libpastix_parsec.a ../PaStiX/pastix_i8/lib/libpastix_kernels.a ../OpenBLAS_i8/libopenblas.a -lrt \
    ../PaStiX/parsec_i8/lib/ \
   -lpthread -ldl -lrt \
   -lrt \
  ../PaStiX/scotch_i8/lib/libscotch.a ../PaStiX/scotch_i8/lib/libscotcherrexit.a -lpthread -lz -lm /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/

LIBS = \
     $(DIR)/spooles.a \
     ../ARPACK/libarpack_linux.a \
     $(PASTIX_LIBS) \
     -lpthread -lm -lc -lhwloc

ccx_2.21_i8: $(OCCXMAIN) ccx_2.21.a $(LIBS)
	./; $(CC) $(CFLAGS) -c ccx_2.21.c; $(FC) -Wall -O2 -o $@ \
	$(OCCXMAIN) ccx_2.21.a $(LIBS)

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


I really hope someone can help me. Or does someone know a source to get binaries precompiled for Ubuntu with PaStiX?

Kind regards,