Build ccx with arpack-ng

Greetings.

I am trying to build ccx_2.20 on ubuntu 20.04 on docker. The arpack version suggested in the official install guide () is not available anymore. I am trying to install it with the opencollab version of arpack, arpack-ng but I am receiving an error when I try to build ccx.
This is my Dockerfile

FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive 
ENV LANG C.UTF-8

RUN apt-get update && apt-get install -y \
    wget \
    gfortran \
    make \
    git \
    autoconf \
    f2c \
    openmpi-bin openmpi-doc libopenmpi-dev\
    libtool\
    liblapack3 \
    liblapack-dev \
    libexodusii-dev \
    libgl1-mesa-dev \
    libglu1-mesa-dev \
    libxi-dev libxmu-dev

RUN apt install -y libgfortran4

RUN mkdir /usr/local/SPOOLES.2.2
WORKDIR /usr/local/SPOOLES.2.2
RUN wget http://www.netlib.org/linalg/spooles/spooles.2.2.tgz && tar xvf spooles.2.2.tgz
RUN sed -i 's@  CC = /usr/lang-4.0/bin/cc@# CC = /usr/lang-4.0/bin/cc@g' Make.inc
RUN sed -i 's@# CC = gcc@  CC = gcc@g' Make.inc
RUN make lib
WORKDIR /usr/local/SPOOLES.2.2/MT/src/
RUN make

RUN mkdir /tmp/ARPACK
WORKDIR /tmp/ARPACK
ENV OMPI_ALLOW_RUN_AS_ROOT=1
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
RUN git clone https://github.com/opencollab/arpack-ng.git
WORKDIR /tmp/ARPACK/arpack-ng
RUN sh bootstrap
RUN ./configure --enable-mpi
RUN make
RUN make check
RUN make install

WORKDIR /usr/local
RUN wget http://www.dhondt.de/ccx_2.20.src.tar.bz2
RUN tar -xvjf ccx_2.20.src.tar.bz2
WORKDIR /usr/local/CalculiX/ccx_2.20/src
RUN mv Makefile Makefile_ST
RUN mv Makefile_MT Makefile
RUN sed -i 's@ ../../../ARPACK/libarpack_INTEL.a@ /usr/local/lib/libarpack.so@g' Makefile

WORKDIR /root/shared

This is the error I receive


### Errors with LIBS =  /usr/local/lib/libarpack.so
./date.pl; cc -Wall -O2  -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE -DNETWORKOUT -c ccx_2.20.c; gfortran  -Wall -O2 -o ccx_2.20 ccx_2.20.o ccx_2.20.a ../../../SPOOLES.2.2/spooles.a /usr/local/lib/libarpack.so -lpthread -lm -lc -fopenmp
Can't open ccx_2.20step.c: No such file or directory at ./date.pl line 18.
ccx_2.20.c: In function ‘main’:
ccx_2.20.c:1766:18: warning: ‘nkon0’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1766 |       ne=ne0;nkon=nkon0;
      |              ~~~~^~~~~~
In file included from ccx_2.20.c:30:
CalculiX.h:62:29: warning: ‘ne0’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   62 | #define RENEW(a,b,c) a=(b *)u_realloc((b *)(a),(c)*sizeof(b),__FILE__,__LINE__,#a)
      |                             ^~~~~~~~~
ccx_2.20.c:72:39: note: ‘ne0’ was declared here
   72 |     iprestr,kode,isolver,nslavs,nkon_,ne0,nkon0,mortar,
      |                                       ^~~
ccx_2.20.c:63:22: warning: ‘nxstate’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   63 |     *ipoinpc=NULL,mt,nxstate,nload0,iload,*iuel=NULL,*ne2boun=NULL,
      |                      ^~~~~~~
/usr/bin/ld: ccx_2.20.a(dsptrf.o): undefined reference to symbol 'dlaev2_'
/usr/bin/ld: /lib/x86_64-linux-gnu/liblapack.so.3: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:29: ccx_2.20] Error 1

Has anyone build ccx with arpack-ng? Please let me know what is wrong in my build.

the version recommended in the official instructions can be recovered from the wayback machine: ARPACK - Arnoldi Package

3 Likes

It seems like it would be a good idea for CCX to migrate to ARPACK-NG, since it is being supported by volunteers and the original was abandoned. Or ditch ARPACK altogether and use something more modern, if possible.

Anthony

1 Like

That worked. Thanks!!

On FreeBSD, CalculiX is successfully built with arpack-ng.

In this case, the linker is complaining about a missing function dlaev2_, which is part of lapack.

The Makefile in the src directory should contain the following libraries:

LIBS = \
       -lspooles -larpack -lblas -llapack \
       -lpthread -lm
1 Like

Or maybe try this:

-lspooles $(shell pkg-config --libs --static arpack) \

1 Like

github is giving problems accessing arpack-ng.git

Is there any way to set up ccx_2.23? I have encountered repeated problems of software no longer available and following threads from there to proposed replacements encountered only more non-available software.

Charlie

charlie@charlie-desktop:~/Downloads/CalculiX/CalculiX/ARPACK-NG$ git clone https://github
.com/opencollab/arpack-ng.git
Cloning into ‘arpack-ng’…
fatal: unable to access ’ GitHub - opencollab/arpack-ng: Collection of Fortran77 subroutines designed to solve large scale eigenvalue problems. · GitHub ': Could not resolve
host: github.com
charlie@charlie-desktop:~/Downloads/CalculiX/CalculiX/ARPACK-NG$

I just clicked on your given github link for arpack-ng: It worked, please try again!

As a follow up also to the previous posts:

  • The original arpack is available via: https://www.arpack.org/
  • arpack-ng can be used together with CalculiX instead of the original one (@CharlieM I guess you had bad luck trying to access it and I’d put some trust into GitHub that it will be available for some more time)
  • There are not many straightforward alternatives to arpack as far as I’m aware (even scipy uses arpack for sparse eigenvalue problems). There is e.g. Spectra and Anasazi, but both have additional dependencies for their data structures and are not the same in terms of the algorithms they provide.
1 Like

FEAST seems to be a newer alternative vs. ARPACK and is written as well in Fortran which would not add additional complexity to the compilation process of ccx while other packages as Spectra are written in other programming languages like C++. FEAST is used by the COMSOL FEM package where you can choose between FEAST and ARPACK.

1 Like

@Durbul at some point it would be convenient to talk about adding Trilinos’ Anasazi and/or PETSc’s SLEPc capabilities to the core ccx code. Is that something that is planned from a development perspective?

It’s something we’ve been looking into, but not planning at the moment / in the short run, since it would require major changes in the code. A possibility could be to start with a solver interface to one of the libraries to have access to the linear and eigensolver capabilities. In a next step, the linear algebra capabilities and other functionality could be introduced one by one into the code wherever it makes sense.

1 Like

Hello Durbul,

Many thanks for your help. I was initially under the impression that Calculix was dying and no longer supported, from looking at the dates of the forum communications.

I retried the github website:

$ git clone git@github.com:opencollab/arpack-ng.git


and it worked this time. It didn’t before.

I used the autotools to config, build, and install and my computer didn’t blow up.

Is there a way to test that these tools work?

I have been using FreeCAD since this January and only started learning Linux Ubuntu since December 2025. I am not fluent at speaking Linux Ubuntu. It seems that many sites I have visited require that you speak Linux. As a materials engineer, I am more skilled at steel foundry and forging work or sintering ceramic materials. Not Linux.

I have used the Calculix portion of FreeCAD but found that it is unable to handle fracture behaviour. Apparently Elmer doesn’t do fracture mechanics. Hence, I have been chasing down the program Calculix 2. 23.

My next goal today is to work on SPOOLES and configure, build and install.

Many thanks,

Charlie

2 Likes

If you used the instructions on GitHub, you already did that via make check:

$ sh bootstrap
$ ./configure --enable-mpi
$ make
$ make check
$ sudo make install

There is also LIS Solver (arpack alternative): https://www.ssisc.org/lis/

“Lis (Library of Iterative Solvers for linear systems, pronounced [lis]) is a parallel software library to solve discretized linear equations and eigenvalue problems that arise from the numerical solution of partial differential equations using iterative methods.”

Patch for ccx 2.9 by Kodanda Ram Mangipudi, from the yahoo forum days.

Some clues can be taken from the PKGBUILD files for mingw/msys2:

1 Like

Thanks for your help rafal.brzegowy.

I have successfully loaded and compiled SPOOLES without hurting myself or blowing up my computer.