Issues compiling Calculix with PaStiX

Hello,

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:

inp(1,ifreeinp)=iline

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:


CFLAGS = -Wall -O2 -fopenmp -fpic -I ../SPOOLES.2.2 -I$(PASTIX_INCLUDE) -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE -DPASTIX -DPASTIX_FP32 -DPASTIX_GPU -ggdb 
FFLAGS = -Wall -O2 -fopenmp -fpic -fdefault-integer-8

CC=cc
FC=gfortran

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

include Makefile.inc

SCCXMAIN = ccx_2.21.c

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

DIR=../SPOOLES.2.2
#../PaStiX/hwloc_i8/lib/libhwloc.so
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/libparsec.so \
   -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/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libgomp.so.1

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

ccx_2.21_i8: $(OCCXMAIN) ccx_2.21.a $(LIBS)
	./date.pl; $(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,
Clemens