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

Could someone please help me? I encountered the following error during compilation, and after searching the files in GitHub, I couldn’t find these two header files at all.

/usr/local/calculix-build-pastix/source/pastix4calculix/kernels/lowrank.c:19:10: fatal error: pastix_clrcores.h: No such file or directory
   19 | #include "pastix_clrcores.h"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [kernels/CMakeFiles/pastix_kernels.dir/build.make:76: kernels/CMakeFiles/pastix_kernels.dir/lowrank.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[  4%] Building C object spm/CMakeFiles/spm.dir/src/spm_integers.c.o
/usr/local/calculix-build-pastix/source/pastix4calculix/spm/src/spm.c:22:10: fatal error: c_spm.h: No such file or directory
   22 | #include "c_spm.h"
      |          ^~~~~~~~~
compilation terminated.

I used the files from this link.
GitHub - rsmith-nl/calculix-build-pastix: Scripts and patches to build CalculiX with PaStiX without CUDA

These files are not part of the original sources, but generated during the cmake call. There must have been an error somewhere before. Could you check your terminal output?

Thank you very much. My terminal displays as follows:

patching file CMakeLists.txt
can't find file to patch at input line 3
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|--- spm/src/spm.c.orig 2024-04-22 19:22:44.553161000 +0200
|+++ spm/src/spm.c      2024-04-22 19:23:00.289718000 +0200
--------------------------
File to patch: spm/src/spm.c
patching file spm/src/spm.c
can't find file to patch at input line 3
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|--- bcsc/bcsc_z.h.orig 2021-01-10 11:58:33.000000000 +0100
|+++ bcsc/bcsc_z.h      2024-04-22 19:59:11.828502000 +0200
--------------------------
File to patch: bcsc/bcsc_z.h
patching file bcsc/bcsc_z.h
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- The Fortran compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran - skipped
-- Found PythonInterp: /usr/local/bin/python2.7  
-- Building for target x86_64
-- Found target X86_64
-- Performing Test C_M32or64
-- Performing Test C_M32or64 - Failed
-- Performing Test HAVE_WALL
-- Performing Test HAVE_WALL - Success
-- Performing Test HAVE_WEXTRA
-- Performing Test HAVE_WEXTRA - Success
-- Performing Test HAVE_G3
-- Performing Test HAVE_G3 - Success
-- Performing Test HAVE_ATOMIC_GCC_32_BUILTINS
-- Performing Test HAVE_ATOMIC_GCC_32_BUILTINS - Success
-- Performing Test HAVE_ATOMIC_GCC_64_BUILTINS
-- Performing Test HAVE_ATOMIC_GCC_64_BUILTINS - Success
-- Performing Test HAVE_ATOMIC_GCC_128_BUILTINS
-- Performing Test HAVE_ATOMIC_GCC_128_BUILTINS - Failed
-- Performing Test HAVE_ATOMIC_GCC_128_BUILTINS
-- Performing Test HAVE_ATOMIC_GCC_128_BUILTINS - Success
-- Performing Test HAVE_ATOMIC_XLC_32_BUILTINS
-- Performing Test HAVE_ATOMIC_XLC_32_BUILTINS - Failed
-- Performing Test HAVE_ATOMIC_MIPOSPRO_32_BUILTINS
-- Performing Test HAVE_ATOMIC_MIPOSPRO_32_BUILTINS - Failed
-- Performing Test HAVE_ATOMIC_SUN_32
-- Performing Test HAVE_ATOMIC_SUN_32 - Failed
--       support for 32 bits atomics - found
--       support for 64 bits atomics - found
--       support for 128 bits atomics - found
-- Performing Test HAVE_FALLTHROUGH
-- Performing Test HAVE_FALLTHROUGH - Success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Looking for sched_setaffinity
-- Looking for sched_setaffinity - found
-- Performing Test HAVE_TIMESPEC_TV_NSEC
-- Performing Test HAVE_TIMESPEC_TV_NSEC - Success
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for include file stdarg.h
-- Looking for include file stdarg.h - found
-- Performing Test HAVE_VA_COPY
-- Performing Test HAVE_VA_COPY - Success
-- Looking for asprintf
-- Looking for asprintf - found
-- Looking for vasprintf
-- Looking for vasprintf - found
-- Looking for include file getopt.h
-- Looking for include file getopt.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for getopt_long
-- Looking for getopt_long - found
-- Looking for include file errno.h
-- Looking for include file errno.h - found
-- Looking for include file stddef.h
-- Looking for include file stddef.h - found
-- Looking for include file stdbool.h
-- Looking for include file stdbool.h - found
-- Looking for getrusage
-- Looking for getrusage - found
-- Looking for RUSAGE_THREAD
-- Looking for RUSAGE_THREAD - not found
-- Looking for include file limits.h
-- Looking for include file limits.h - found
-- Looking for include file string.h
-- Looking for include file string.h - found
-- Looking for include file libgen.h
-- Looking for include file libgen.h - found
-- Looking for include file complex.h
-- Looking for include file complex.h - found
-- Looking for include file sys/param.h
-- Looking for include file sys/param.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for include file syslog.h
-- Looking for include file syslog.h - found
-- A cache variable, namely CBLAS_DIR, has been set to specify the install directory of CBLAS
-- A cache variable, namely BLAS_DIR, has been set to specify the install directory of BLAS
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1") 
-- Checking for one of the modules 'mkl-dynamic-lp64-iomp'
-- Checking for one of the modules 'mkl-dynamic-lp64-seq'
-- Checking for one of the modules 'openblas'
-- Looking for BLAS - found using PkgConfig
-- Looking for cblas_dscal
-- Looking for cblas_dscal - found
-- Looking for cblas_zgemm3m
-- Looking for cblas_zgemm3m - found
-- Looking for cblas: test with blas succeeds
-- Looking for cblas_dscal
-- Looking for cblas_dscal - found
-- Found CBLAS: /usr/local/calculix-build-pastix/lib/libopenblas.a  
-- cblas: 
-- A cache variable, namely LAPACK_DIR, has been set to specify the install directory of LAPACK
-- Looking for BLAS - found using PkgConfig
-- Looking for Fortran CHEEV
-- Looking for Fortran CHEEV - found
-- Looking for LAPACK in BLAS: found
-- Checking for one of the modules 'mkl-dynamic-lp64-iomp'
-- Checking for one of the modules 'mkl-dynamic-lp64-seq'
-- Checking for one of the modules 'openblas'
-- Looking for LAPACK - found using PkgConfig
-- A library with LAPACK API found.
-- LAPACK_LIBRARIES /usr/local/calculix-build-pastix/lib/libopenblas.a
-- Looking for LAPACKE_dgeqrf
-- Looking for LAPACKE_dgeqrf - not found
-- Looking for LAPACKE_dlascl_work
-- Looking for LAPACKE_dlascl_work - found
-- Looking for lapacke : test with lapack fails
-- Checking for one of the modules 'lapacke'
-- Looking for LAPACKE - found using PkgConfig
-- Looking for LAPACKE_dgeqrf
-- Looking for LAPACKE_dgeqrf - found
-- Looking for LAPACKE_dlascl_work
-- Looking for LAPACKE_dlascl_work - found
-- Found LAPACKE: /usr/local/calculix-build-pastix/lib/libopenblas.a  
-- lapacke: /usr/include/x86_64-linux-gnu
-- A cache variable, namely HWLOC_DIR, has been set to specify the install directory of HWLOC
-- Checking for one of the modules 'hwloc'
-- Looking for HWLOC - found using PkgConfig
-- Looking for hwloc_topology_init
-- Looking for hwloc_topology_init - found
-- Found HWLOC: /usr/local/calculix-build-pastix/lib/libhwloc.a  
-- Performing Test HAVE_HWLOC_PARENT_MEMBER
-- Performing Test HAVE_HWLOC_PARENT_MEMBER - Success
-- Performing Test HAVE_HWLOC_CACHE_ATTR
-- Performing Test HAVE_HWLOC_CACHE_ATTR - Success
-- Performing Test HAVE_HWLOC_OBJ_PU
-- Performing Test HAVE_HWLOC_OBJ_PU - Success
-- Looking for hwloc_bitmap_free in /usr/local/calculix-build-pastix/lib/libhwloc.a
-- Looking for hwloc_bitmap_free in /usr/local/calculix-build-pastix/lib/libhwloc.a - found
-- A cache variable, namely PARSEC_DIR, has been set to specify the install directory of PARSEC
-- Looking for PARSEC - Try to detect pthread
-- Looking for PARSEC - Try to detect libm
-- Looking for PARSEC - Try to detect librt
-- Looking for PARSEC - Try to detect libdl
-- Looking for HWLOC - found using PkgConfig
-- Looking for hwloc_topology_init
-- Looking for hwloc_topology_init - found
-- Checking for one of the modules 'parsec'
-- Looking for PARSEC - found using PkgConfig
-- Looking for parsec_init
-- Looking for parsec_init - found
-- Found PARSEC: /usr/local/calculix-build-pastix/lib/libparsec.a;/usr/lib/x86_64-linux-gnu/libpciaccess.so;/usr/lib/gcc/x86_64-linux-gnu/13/libatomic.so;/usr/lib/gcc/x86_64-linux-gnu/13/libgfortran.so;/usr/lib/gcc/x86_64-linux-gnu/13/libquadmath.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/libc.so;/usr/lib/gcc/x86_64-linux-gnu/13/libgcc_s.so;/usr/lib/gcc/x86_64-linux-gnu/13/libgcc.a;/usr/local/calculix-build-pastix/lib/libhwloc.a  
-- A cache variable, namely SCOTCH_DIR, has been set to specify the install directory of SCOTCH
-- Looking for SCOTCH_graphInit
-- Looking for SCOTCH_graphInit - found
-- Performing Test SCOTCH_Num_4
-- Performing Test SCOTCH_Num_4 - Failed
-- Performing Test SCOTCH_Num_8
-- Performing Test SCOTCH_Num_8 - Success
-- Found SCOTCH: /usr/local/calculix-build-pastix/lib/libscotch.a;/usr/local/calculix-build-pastix/lib/libscotcherrexit.a;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/librt.a  
-- Scotch inlude dirs: /usr/local/calculix-build-pastix/include
-- Checking for one of the modules 'gtg'
-- Building for target x86_64
-- Found target X86_64
-- Looking for BLAS - found using PkgConfig
-- Looking for cblas_dscal
-- Looking for cblas_dscal - found
-- Looking for cblas: test with blas succeeds
-- Looking for cblas_dscal
-- Looking for cblas_dscal - found
-- Looking for BLAS - found using PkgConfig
-- Looking for Fortran CHEEV
-- Looking for Fortran CHEEV - found
-- Looking for LAPACK in BLAS: found
-- Checking for one of the modules 'mkl-dynamic-lp64-iomp'
-- Checking for one of the modules 'mkl-dynamic-lp64-seq'
-- Checking for one of the modules 'openblas'
-- Looking for LAPACK - found using PkgConfig
-- A library with LAPACK API found.
-- LAPACK_LIBRARIES /usr/local/calculix-build-pastix/lib/libopenblas.a
-- Looking for LAPACKE_dgeqrf
-- Looking for LAPACKE_dgeqrf - not found
-- Looking for LAPACKE_dlascl_work
-- Looking for LAPACKE_dlascl_work - found
-- Looking for lapacke : test with lapack fails
-- Looking for LAPACKE - found using PkgConfig
-- Looking for LAPACKE_dgeqrf
-- Looking for LAPACKE_dgeqrf - found
-- Looking for LAPACKE_dlascl_work
-- Looking for LAPACKE_dlascl_work - found
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/spm
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/spm - Done
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/spm
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/spm - Done
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/spm/tests
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/spm/tests - Done
-- --- Python wrapper is disabled with static libraries
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/kernels
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/kernels - Done
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/kernels
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/kernels - Done
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/refinement
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/refinement - Done
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/sopalin/parsec
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/sopalin/parsec - Done
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/sopalin/parsec
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/sopalin/parsec - Done
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/sopalin/parsec
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix/sopalin/parsec - Done
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix - Done
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix - Done
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix - Done
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix - Done
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix - Done
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix
-- Generate precision dependencies in /usr/local/calculix-build-pastix/source/pastix4calculix - Done
-- --- Python wrapper is disabled with static libraries
-- Configuring done (7.8s)
-- Generating done (0.0s)
-- Build files have been written to: /usr/local/calculix-build-pastix/source/pastix4calculix/build
[  0%] Built target parsec_headers_tgt
[  1%] Built target bcsc_headers_tgt
[  1%] Building C object kernels/CMakeFiles/pastix_kernels.dir/lowrank.c.o
[  1%] Built target sopalin_headers
[  1%] Built target kernels_headers_tgt
[  1%] Built target spm_headers_tgt
[  1%] Built target refinement_headers_tgt
[  2%] Building C object kernels/CMakeFiles/pastix_kernels.dir/kernels_trace.c.o
[  3%] Building C object spm/CMakeFiles/spm.dir/src/spm.c.o
[  3%] Building C object spm/CMakeFiles/spm.dir/src/spm_io.c.o
/usr/local/calculix-build-pastix/source/pastix4calculix/kernels/lowrank.c:19:10: fatal error: pastix_clrcores.h: No such file or directory
   19 | #include "pastix_clrcores.h"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [kernels/CMakeFiles/pastix_kernels.dir/build.make:76: kernels/CMakeFiles/pastix_kernels.dir/lowrank.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/usr/local/calculix-build-pastix/source/pastix4calculix/spm/src/spm.c:22:10: fatal error: c_spm.h: No such file or directory
   22 | #include "c_spm.h"
      |          ^~~~~~~~~
compilation terminated.
[  4%] Building C object spm/CMakeFiles/spm.dir/src/spm_integers.c.o
make[2]: *** [spm/CMakeFiles/spm.dir/build.make:76: spm/CMakeFiles/spm.dir/src/spm.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:575: kernels/CMakeFiles/pastix_kernels.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:335: spm/CMakeFiles/spm.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Looks like there is some issue with the patches at the beginning. Did you check if the prerequisites apply to your setup? See the Readme: https://github.com/rsmith-nl/calculix-build-pastix

Edit: Since you’re trying to compile on Ubuntu, you probably have to apply some minor changes to rsmith’s setup.

Thank you very much for your guidance. I have read the README file and have now reached the step of installing the parsec package.It seems that this package has been modified by the author, and I encountered an error during installation.I tried searching for libpaje with the help of AI, but it does not seem to contain the missing component mentioned in the error.My next step is to try downloading the official parsec package and compiling it manually.Is this approach correct?

/usr/bin/ld: CMakeFiles/dbp2paje.dir/dbp2paje.c.o: in function `parsec_profiling_dump_paje.isra.0':
dbp2paje.c:(.text+0x169b): undefined reference to `pajeGetProcFile'
/usr/bin/ld: dbp2paje.c:(.text+0x16f5): undefined reference to `pajeGetProcFile'
collect2: error: ld returned 1 exit status
gmake[2]: *** [tools/profiling/CMakeFiles/dbp2paje.dir/build.make:115: tools/profiling/dbp2paje] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1533: tools/profiling/CMakeFiles/dbp2paje.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....

I have successfully compiled Parsec, and now I am trying to compile Pastix_kabbone, but encountered the following error(s). I consulted an AI assistant for solutions, yet the proposed fixes did not resolve the issue. Could any professionals help me look into this problem?

-- lapacke: 
-- A cache variable, namely HWLOC_DIR, has been set to specify the install directory of HWLOC
-- Checking for one of the modules 'hwloc'
-- Looking for HWLOC - found using PkgConfig
-- Looking for hwloc_topology_init
-- Looking for hwloc_topology_init - not found
-- Looking for hwloc : test of hwloc_topology_init with hwloc library fails
-- CMAKE_REQUIRED_LIBRARIES: /usr/local/calculix-build-pastix/lib/libhwloc.a
-- CMAKE_REQUIRED_INCLUDES: /usr/local/calculix-build-pastix/include;/usr/include
-- CMAKE_REQUIRED_FLAGS: 
-- Check in CMakeFiles/CMakeError.log to figure out why it fails
-- Could NOT find HWLOC (missing: HWLOC_WORKS) 
-- A cache variable, namely PARSEC_DIR, has been set to specify the install directory of PARSEC
-- Looking for PARSEC - Try to detect pthread
-- Looking for PARSEC - Try to detect libm
-- Looking for PARSEC - Try to detect librt
-- Looking for PARSEC - Try to detect libdl
-- A cache variable, namely HWLOC_DIR, has been set to specify the install directory of HWLOC
-- Checking for one of the modules 'hwloc'
-- Looking for HWLOC - found using PkgConfig
-- Looking for hwloc_topology_init
-- Looking for hwloc_topology_init - not found
-- Looking for hwloc : test of hwloc_topology_init with hwloc library fails
-- CMAKE_REQUIRED_LIBRARIES: /usr/local/calculix-build-pastix/lib/libhwloc.a
-- CMAKE_REQUIRED_INCLUDES: /usr/local/calculix-build-pastix/include;/usr/include
-- CMAKE_REQUIRED_FLAGS: 
-- Check in CMakeFiles/CMakeError.log to figure out why it fails
CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find HWLOC (missing: HWLOC_WORKS)
Call Stack (most recent call first):
  /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  cmake_modules/morse_cmake/modules/find/FindHWLOC.cmake:350 (find_package_handle_standard_args)
  cmake_modules/morse_cmake/modules/find/FindPARSEC.cmake:192 (find_package)
  CMakeLists.txt:365 (find_package)


-- Configuring incomplete, errors occurred!

CMakeError.log

 -
    kind: "try_compile-v1"
    backtrace:
      - "/usr/share/cmake-3.28/Modules/CheckFunctionExists.cmake:86 (try_compile)"
      - "cmake_modules/morse_cmake/modules/find/FindHWLOC.cmake:312 (check_function_exists)"
      - "CMakeLists.txt:224 (find_package)"
    checks:
      - "Looking for hwloc_topology_init"
    directories:
      source: "/usr/local/calculix-build-pastix/source/pastix4calculix/build/CMakeFiles/CMakeScratch/TryCompile-rptFCX"
      binary: "/usr/local/calculix-build-pastix/source/pastix4calculix/build/CMakeFiles/CMakeScratch/TryCompile-rptFCX"
    cmakeVariables:
      CMAKE_C_FLAGS: "-fopenmp -lpciaccess -lm -Wno-unused-parameter  -Wall -Wextra -mcx16 -std=c11 -fopenmp  -D_GNU_SOURCE "
      CMAKE_MODULE_PATH: "/usr/local/calculix-build-pastix/source/pastix4calculix/cmake_modules;/usr/local/calculix-build-pastix/source/pastix4calculix/cmake_modules/morse_cmake/modules;/usr/local/calculix-build-pastix/source/pastix4calculix/cmake_modules/morse_cmake/modules/find"
      CMAKE_WARN_DEPRECATED: "FALSE"
    buildResult:
      variable: "HWLOC_WORKS"
      cached: true
      stdout: |
        Change Dir: '/usr/local/calculix-build-pastix/source/pastix4calculix/build/CMakeFiles/CMakeScratch/TryCompile-rptFCX'
        
        Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_95af8/fast
        /usr/bin/gmake  -f CMakeFiles/cmTC_95af8.dir/build.make CMakeFiles/cmTC_95af8.dir/build
        gmake[1]: Entering directory '/usr/local/calculix-build-pastix/source/pastix4calculix/build/CMakeFiles/CMakeScratch/TryCompile-rptFCX'
        Building C object CMakeFiles/cmTC_95af8.dir/CheckFunctionExists.c.o
        /usr/bin/gcc13  -I/usr/local/calculix-build-pastix/include -fopenmp -lpciaccess -lm -Wno-unused-parameter  -Wall -Wextra -mcx16 -std=c11 -fopenmp  -D_GNU_SOURCE  -DCHECK_FUNCTION_EXISTS=hwloc_topology_init -o CMakeFiles/cmTC_95af8.dir/CheckFunctionExists.c.o -c /usr/local/calculix-build-pastix/source/pastix4calculix/build/CMakeFiles/CMakeScratch/TryCompile-rptFCX/CheckFunctionExists.c
        Linking C executable cmTC_95af8
        /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_95af8.dir/link.txt --verbose=1
        /usr/bin/gcc13 -fopenmp -lpciaccess -lm -Wno-unused-parameter  -Wall -Wextra -mcx16 -std=c11 -fopenmp  -D_GNU_SOURCE  -DCHECK_FUNCTION_EXISTS=hwloc_topology_init -rdynamic CMakeFiles/cmTC_95af8.dir/CheckFunctionExists.c.o -o cmTC_95af8  /usr/local/calculix-build-pastix/lib/libhwloc.a 
        /usr/bin/ld: /usr/local/calculix-build-pastix/lib/libhwloc.a(topology-pci.o): in function `hwloc_pci_get_obj_names':
        /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:96:(.text+0x7a): undefined reference to `pci_get_strings'
        /usr/bin/ld: /usr/local/calculix-build-pastix/lib/libhwloc.a(topology-pci.o): in function `hwloc_look_pci':
        /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:175:(.text+0x1a6): undefined reference to `pci_system_init'
        /usr/bin/ld: /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:184:(.text+0x1bf): undefined reference to `pci_slot_match_iterator_create'
        /usr/bin/ld: /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:187:(.text+0x1cb): undefined reference to `pci_device_next'
        /usr/bin/ld: /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:189:(.text+0x20d): undefined reference to `pci_device_next'
        /usr/bin/ld: /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:217:(.text+0x2c2): undefined reference to `pci_device_probe'
        /usr/bin/ld: /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:218:(.text+0x2d7): undefined reference to `pci_device_cfg_read'
        /usr/bin/ld: /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:376:(.text+0x787): undefined reference to `pci_iterator_destroy'
        /usr/bin/ld: /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:377:(.text+0x78c): undefined reference to `pci_system_cleanup'
        collect2: error: ld returned 1 exit status
        gmake[1]: *** [CMakeFiles/cmTC_95af8.dir/build.make:100: cmTC_95af8] Error 1
        gmake[1]: Leaving directory '/usr/local/calculix-build-pastix/source/pastix4calculix/build/CMakeFiles/CMakeScratch/TryCompile-rptFCX'
        gmake: *** [Makefile:127: cmTC_95af8/fast] Error 2
        
      exitCode: 2
  -
    kind: "try_compile-v1"
    backtrace:
      - "/usr/share/cmake-3.28/Modules/CheckFunctionExists.cmake:86 (try_compile)"
      - "cmake_modules/morse_cmake/modules/find/FindHWLOC.cmake:312 (check_function_exists)"
      - "cmake_modules/morse_cmake/modules/find/FindPARSEC.cmake:192 (find_package)"
      - "CMakeLists.txt:365 (find_package)"
    checks:
      - "Looking for hwloc_topology_init"
    directories:
      source: "/usr/local/calculix-build-pastix/source/pastix4calculix/build/CMakeFiles/CMakeScratch/TryCompile-DIQERt"
      binary: "/usr/local/calculix-build-pastix/source/pastix4calculix/build/CMakeFiles/CMakeScratch/TryCompile-DIQERt"
    cmakeVariables:
      CMAKE_C_FLAGS: "-fopenmp -lpciaccess -lm -Wno-unused-parameter  -Wall -Wextra -mcx16 -std=c11 -fopenmp  -D_GNU_SOURCE "
      CMAKE_MODULE_PATH: "/usr/local/calculix-build-pastix/source/pastix4calculix/cmake_modules;/usr/local/calculix-build-pastix/source/pastix4calculix/cmake_modules/morse_cmake/modules;/usr/local/calculix-build-pastix/source/pastix4calculix/cmake_modules/morse_cmake/modules/find"
      CMAKE_WARN_DEPRECATED: "FALSE"
    buildResult:
      variable: "HWLOC_WORKS"
      cached: true
      stdout: |
        Change Dir: '/usr/local/calculix-build-pastix/source/pastix4calculix/build/CMakeFiles/CMakeScratch/TryCompile-DIQERt'
        
        Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_e9f8b/fast
        /usr/bin/gmake  -f CMakeFiles/cmTC_e9f8b.dir/build.make CMakeFiles/cmTC_e9f8b.dir/build
        gmake[1]: Entering directory '/usr/local/calculix-build-pastix/source/pastix4calculix/build/CMakeFiles/CMakeScratch/TryCompile-DIQERt'
        Building C object CMakeFiles/cmTC_e9f8b.dir/CheckFunctionExists.c.o
        /usr/bin/gcc13  -I/usr/local/calculix-build-pastix/include -fopenmp -lpciaccess -lm -Wno-unused-parameter  -Wall -Wextra -mcx16 -std=c11 -fopenmp  -D_GNU_SOURCE  -DCHECK_FUNCTION_EXISTS=hwloc_topology_init -o CMakeFiles/cmTC_e9f8b.dir/CheckFunctionExists.c.o -c /usr/local/calculix-build-pastix/source/pastix4calculix/build/CMakeFiles/CMakeScratch/TryCompile-DIQERt/CheckFunctionExists.c
        Linking C executable cmTC_e9f8b
        /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e9f8b.dir/link.txt --verbose=1
        /usr/bin/gcc13 -fopenmp -lpciaccess -lm -Wno-unused-parameter  -Wall -Wextra -mcx16 -std=c11 -fopenmp  -D_GNU_SOURCE  -DCHECK_FUNCTION_EXISTS=hwloc_topology_init -rdynamic CMakeFiles/cmTC_e9f8b.dir/CheckFunctionExists.c.o -o cmTC_e9f8b  /usr/local/calculix-build-pastix/lib/libhwloc.a 
        /usr/bin/ld: /usr/local/calculix-build-pastix/lib/libhwloc.a(topology-pci.o): in function `hwloc_pci_get_obj_names':
        /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:96:(.text+0x7a): undefined reference to `pci_get_strings'
        /usr/bin/ld: /usr/local/calculix-build-pastix/lib/libhwloc.a(topology-pci.o): in function `hwloc_look_pci':
        /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:175:(.text+0x1a6): undefined reference to `pci_system_init'
        /usr/bin/ld: /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:184:(.text+0x1bf): undefined reference to `pci_slot_match_iterator_create'
        /usr/bin/ld: /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:187:(.text+0x1cb): undefined reference to `pci_device_next'
        /usr/bin/ld: /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:189:(.text+0x20d): undefined reference to `pci_device_next'
        /usr/bin/ld: /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:217:(.text+0x2c2): undefined reference to `pci_device_probe'
        /usr/bin/ld: /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:218:(.text+0x2d7): undefined reference to `pci_device_cfg_read'
        /usr/bin/ld: /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:376:(.text+0x787): undefined reference to `pci_iterator_destroy'
        /usr/bin/ld: /usr/local/calculix-build-pastix/source/hwloc/hwloc/topology-pci.c:377:(.text+0x78c): undefined reference to `pci_system_cleanup'
        collect2: error: ld returned 1 exit status
        gmake[1]: *** [CMakeFiles/cmTC_e9f8b.dir/build.make:100: cmTC_e9f8b] Error 1
        gmake[1]: Leaving directory '/usr/local/calculix-build-pastix/source/pastix4calculix/build/CMakeFiles/CMakeScratch/TryCompile-DIQERt'
        gmake: *** [Makefile:127: cmTC_e9f8b/fast] Error 2
        
      exitCode: 2
...

Thx! I have successfully compiled using your method, and the calculation results are similar to my previous analysis. However, the contact problem cannot be solved satisfactorily, and I will provide my calculation files.

.cvg use pardiso

SUMMARY OF C0NVERGENCE INFORMATION
  STEP   INC  ATT   ITER     CONT.   RESID.        CORR.      RESID.      CORR.
                              EL.    FORCE         DISP       FLUX        TEMP.
                              (#)     (%)           (%)        (%)         (%)
     1     1     1     1        0  0.9002E+01  0.1000E+03  0.0000E+00  0.0000E+00
     1     1     1     2    56280  0.5085E+04  0.9029E+02  0.0000E+00  0.0000E+00
     1     1     1     3    56280  0.5042E+04  0.3223E+02  0.0000E+00  0.0000E+00
     1     1     1     4    56280  0.5000E+04  0.3314E+02  0.0000E+00  0.0000E+00
     1     1     2     1        0  0.4843E+01  0.1000E+03  0.0000E+00  0.0000E+00
     1     1     2     2    56280  0.3699E+04  0.1735E+02  0.0000E+00  0.0000E+00
     1     1     2     3    56280  0.3673E+04  0.1908E+02  0.0000E+00  0.0000E+00
     1     1     2     4    56280  0.3651E+04  0.1987E+02  0.0000E+00  0.0000E+00
     1     1     2     5    56280  0.3633E+04  0.2070E+02  0.0000E+00  0.0000E+00
     1     1     2     6    56280  0.3618E+04  0.2155E+02  0.0000E+00  0.0000E+00

.cvg use sloopes

SUMMARY OF C0NVERGENCE INFORMATION
  STEP   INC  ATT   ITER     CONT.   RESID.        CORR.      RESID.      CORR.
                              EL.    FORCE         DISP       FLUX        TEMP.
                              (#)     (%)           (%)        (%)         (%)
     1     1     1     1        0  0.4635E+02  0.1000E+03  0.0000E+00  0.0000E+00
     1     1     1     2    56280  0.6147E+03  0.1000E+03  0.0000E+00  0.0000E+00
     1     1     1     3    38440  0.1817E+06  0.6168E-04  0.0000E+00  0.0000E+00
     1     1     1     4    35185  0.7692E+03  0.5430E-04  0.0000E+00  0.0000E+00

@pzu4 in general handling converge problems with contact elements require a little exercise.

You have huge number of contact elements. If you not already have done any contact exercises with simple flat surfaces ex. having max 10-20 contact surfaces, I will recommend you doing this.

From first look I would guess the contact stiffness could be too high, as a thump you set the contact stiffness as described by JuanP74 here https://calculix.discourse.group/t/snap-fit-contact-snagging-problem/2277/17 to low contact stiffness will cause penetration and to high convergence problems.

Another thumb, due to the contact searching routine, slave surfaces should be smaller than master surfaces.

Haha :grinning_face: , thanks for the tip. Since I’m using a face-to-face contact, I simply swapped the master and slave surfaces, and the calculation converged.

I’m simulating a steel pipe resting on a concrete pier. The contact is defined between the lower half of the steel pipe and the concrete pier. Since steel has a relatively high elastic modulus, I used a relatively large spring stiffness. To help with convergence, I also added some weak springs near the symmetry axis of the steel pipe.

Are there any other small tips for this problem? I’d really appreciate your advice.

@pzu4 I don’t have any experience with concrete, so for this you must ask other people in the forum.

If the load is symmetric then you can use equation instead of weak springs to lock the vertical plane. You can find the complete description in the Calculix manual.

Thx!I know this technique. I have used RBE3 in ANSYS to implement embedded beam elements, which automatically generates over-constraint equations for me. You’ve inspired me. Earlier, when I was solving problems with curved contact surfaces, the displacements were sometimes asymmetric left and right. It seems that adding proper constraint equations can fix this issue, and I will give it a try.