How to build PaStiX4CalculiX from source on Ubuntu 22.04

Hello everyone, I have recently been compiling CalculiX 2.22 on the Ubuntu 22.04 platform. I have successfully completed the compilation of the versions with SPOOLES 2.22 and PARDISO solvers. When compiling the PARDISO version, I used an AI tool to modify the installation files and adopted oneAPI 2023.0.

Subsequently, when using the versions with SPOOLES and PARDISO solvers, I found that the PARDISO solver performed poorly in solving contact problems. When using surface-to-surface contact with a linear model, the number of contact springs generated did not increase with iterations, but always fluctuated between 0 and the maximum number of contacts, ultimately making it difficult for the calculation to converge.

In contrast, when solving the same problem with SPOOLES, the number of spring elements changed as expected, and the calculation converged successfully. After changing the contact type to tied contact, the number of iterations required by the PARDISO solver was significantly more than that of the SPOOLES solver. Is this phenomenon normal?

I attempted to compile the version with the PaStiX solver. Since I only have a single RTX 4060 graphics card, I tried to disable the CUDA module, but encountered the following errors when compiling PaStiX4CalculiX:

~~~

/usr/include/cublas_api.h:72:10: fatal error: driver_types.h: No such file or directory

72 | #include “driver_types.h”

~~~

Subsequently, I enabled the CUDA module, and the following errors occurred:

~~~

CMake Error at cmake_modules/morse_cmake/modules/find/LibrariesAbsolutePath.cmake:59 (message):

Dependency of CUDA_LIBRARIES ‘Threads::Threads’ NOT FOUND

Call Stack (most recent call first):

cmake_modules/morse_cmake/modules/find/FindPARSEC.cmake:211 (libraries_absolute_path)

CMakeLists.txt:365 (find_package)

~~~

Following the guidance of an AI tool, I installed CUDA 12.5, commented out the lines of code that were throwing errors, and attempted to compile again. The errors that appeared are as follows:

~~~

nvcc fatal : Value ‘sm_35’ is not defined for option ‘gpu-architecture’

CMake Error at pastix_kernels_cuda_generated_SpMVCSR.cu.o.Release.cmake:220 (message):

Error generating

/usr/local/PaStiX/pastix_src/build/kernels/gpus/CMakeFiles/pastix_kernels_cuda.dir/LightSpMV-1.0/src/./pastix_kernels_cuda_generated_SpMVCSR.cu.o

~~~

At this point, I’m feeling quite frustrated. I am not a professional programmer, and I’ve been relying on AI to help me solve some of these issues. However, after I presented the above problems to the AI, the amount of content that needed to be modified was substantial, and I couldn’t fully understand the AI’s outputs. Therefore, I’m not sure if I can keep refining my prompts to get the AI to help me complete the compilation successfully. As such, I would like to ask if anyone has successful experience compiling [PaStiX4CalculiX] on Ubuntu 22.04.

My suggest would be, instead off using AI for installing the Pardiso solver you could also try to use this recipe

Please see this thread: Building CalculiX with PaStiX on FreeBSD without CUDA

Most importantly, for the non-CUDA version, use Kabbone’s version of PaStiX4CalculiX: GitHub - Kabbone/PaStiX4CalculiX