PasTix build issue

I am trying to build PasTix in both ubuntu for windows and Docker.

I manage to build the required modules successfully with a little hacking following the install guide.

When I go to build PasTix I get the following error:
sopalin/parsec/CMakeFiles/parsec_headers_tgt.dir/build.make:64: *** missing separator. Stop.

Any idea what could be wrong?

-- Building for target x86_64
-- Found target X86_64
-- 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
-- Looking for BLAS -- mkl.h not found
-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP_Fortran: -fopenmp
-- Looking for MKL BLAS: not found
-- Looking for Goto BLAS: not found
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- Looking for Open BLAS: found
-- A library with BLAS API found.
-- BLAS_LIBRARIES /home/mshamber/git/plane/tmp/calculix/PaStix/OpenBLAS_i8/libopenblas.so
-- 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
-- cblas:
-- A cache variable, namely LAPACKE_DIR, has been set to specify the install directory of LAPACKE
-- A cache variable, namely LAPACK_DIR, has been set to specify the install directory of LAPACK
-- Looking for BLAS -- mkl.h not found
-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP_Fortran: -fopenmp
-- Looking for MKL BLAS: not found
-- Looking for Goto BLAS: not found
-- Looking for Open BLAS: found
-- A library with BLAS API found.
-- BLAS_LIBRARIES /home/mshamber/git/plane/tmp/calculix/PaStix/OpenBLAS_i8/libopenblas.so
-- 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'
-- Checking for one of the modules 'lapack'
-- Looking for LAPACK - not found using PkgConfig.
   Perhaps you should add the directory containing lapack.pc to
   the PKG_CONFIG_PATH environment variable.
-- A library with LAPACK API found.
-- LAPACK_LIBRARIES /home/mshamber/git/plane/tmp/calculix/PaStix/OpenBLAS_i8/libopenblas.so
-- Looking for LAPACKE_dgeqrf
-- Looking for LAPACKE_dgeqrf - found
-- Looking for LAPACKE_dlascl_work
-- Looking for LAPACKE_dlascl_work - found
-- Looking for lapacke: test with lapack succeeds
-- Looking for LAPACKE_dgeqrf
-- Looking for LAPACKE_dgeqrf - found
-- Looking for LAPACKE_dlascl_work
-- Looking for LAPACKE_dlascl_work - found
-- lapacke:
-- A cache variable, namely HWLOC_DIR, has been set to specify the install directory of HWLOC
-- Looking for HWLOC - PkgConfig not used
-- Looking for hwloc_topology_init
-- Looking for hwloc_topology_init - 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 - PkgConfig not used
-- Looking for hwloc_topology_init
-- Looking for hwloc_topology_init - found
-- Looking for parsec -- parsec_config.h not found
-- Looking for parsec -- lib parsec-base not found
-- Looking for parsec -- lib parsec_distribution not found
-- Looking for parsec -- lib parsec_distribution_matrix not found
-- Look for PARSEC - compiler parsec_ptgpp found in /home/mshamber/git/plane/tmp/calculix/PaStix/parsec/bin
-- Looking for parsec_init
-- Looking for parsec_init - found
-- 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
-- Scotch inlude dirs: /home/mshamber/git/plane/tmp/calculix/PaStix/scotch_6.0.8/include
-- Checking for one of the modules 'gtg'
-- Building for target x86_64
-- Found target X86_64
-- Looking for BLAS -- mkl.h not found
-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP_Fortran: -fopenmp
-- Looking for MKL BLAS: not found
-- Looking for Goto BLAS: not found
-- Looking for Open BLAS: found
-- A library with BLAS API found.
-- BLAS_LIBRARIES /home/mshamber/git/plane/tmp/calculix/PaStix/OpenBLAS_i8/libopenblas.so
-- 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 -- mkl.h not found
-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP_Fortran: -fopenmp
-- Looking for MKL BLAS: not found
-- Looking for Goto BLAS: not found
-- Looking for Open BLAS: found
-- A library with BLAS API found.
-- BLAS_LIBRARIES /home/mshamber/git/plane/tmp/calculix/PaStix/OpenBLAS_i8/libopenblas.so
-- 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'
-- Checking for one of the modules 'lapack'
-- Looking for LAPACK - not found using PkgConfig.
   Perhaps you should add the directory containing lapack.pc to
   the PKG_CONFIG_PATH environment variable.
-- A library with LAPACK API found.
-- LAPACK_LIBRARIES /home/mshamber/git/plane/tmp/calculix/PaStix/OpenBLAS_i8/libopenblas.so
-- Looking for LAPACKE_dgeqrf
-- Looking for LAPACKE_dgeqrf - found
-- Looking for LAPACKE_dlascl_work
-- Looking for LAPACKE_dlascl_work - found
-- Looking for lapacke: test with lapack succeeds
-- Looking for LAPACKE_dgeqrf
-- Looking for LAPACKE_dgeqrf - found
-- Looking for LAPACKE_dlascl_work
-- Looking for LAPACKE_dlascl_work - found
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/spm
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/spm - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/spm
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/spm - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/spm/tests
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/spm/tests - Done
-- --- Python wrapper is disabled with static libraries
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/kernels
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/kernels - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/kernels
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/kernels - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/refinement
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/refinement - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/sopalin/parsec
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/sopalin/parsec - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/sopalin/parsec
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/sopalin/parsec - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/sopalin/parsec
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/sopalin/parsec - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/test
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/test - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/test
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/test - Done
-- A cache variable, namely TMG_DIR, has been set to specify the install directory of TMG
-- Looking for BLAS -- mkl.h not found
-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP_Fortran: -fopenmp
-- Looking for MKL BLAS: not found
-- Looking for Goto BLAS: not found
-- Looking for Open BLAS: found
-- A library with BLAS API found.
-- BLAS_LIBRARIES /home/mshamber/git/plane/tmp/calculix/PaStix/OpenBLAS_i8/libopenblas.so
-- 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'
-- Checking for one of the modules 'lapack'
-- Looking for LAPACK - not found using PkgConfig.
   Perhaps you should add the directory containing lapack.pc to
   the PKG_CONFIG_PATH environment variable.
-- A library with LAPACK API found.
-- LAPACK_LIBRARIES /home/mshamber/git/plane/tmp/calculix/PaStix/OpenBLAS_i8/libopenblas.so
-- Looking for Fortran dlarnv
-- Looking for Fortran dlarnv - found
-- Looking for Fortran dlagsy
-- Looking for Fortran dlagsy - found
-- Looking for tmg: test with lapack succeeds
-- Looking for Fortran dlarnv
-- Looking for Fortran dlarnv - found
-- Looking for Fortran dlagsy
-- Looking for Fortran dlagsy - found
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/test
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/test - Done
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/test
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/genDependencies.py:22: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp;
-- Generate precision dependencies in /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/test - Done
-- --- Python wrapper is disabled with static libraries
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/build
sopalin/parsec/CMakeFiles/parsec_headers_tgt.dir/build.make:64: *** missing separator.  Stop.
make[1]: *** [CMakeFiles/Makefile2:1640: sopalin/parsec/CMakeFiles/parsec_headers_tgt.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
sopalin/parsec/CMakeFiles/parsec_headers_tgt.dir/build.make:64: *** missing separator.  Stop.
make[1]: *** [CMakeFiles/Makefile2:1640: sopalin/parsec/CMakeFiles/parsec_headers_tgt.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Even turning parsec off in the build script fails because the pastix tries to import a parsec header.:

[ 17%] Building C object spm/CMakeFiles/spm.dir/src/d_spm_print.c.o
[ 17%] Building C object spm/CMakeFiles/spm.dir/src/z_spm_print.c.o
[ 18%] Building C object spm/CMakeFiles/spm.dir/src/spm.c.o
/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/spm/src/spm.c:27:10: fatal error: parsec.h: No such file or directory
   27 | #include <parsec.h>
      |          ^~~~~~~~~~
compilation terminated.
make[2]: *** [spm/CMakeFiles/spm.dir/build.make:1260: spm/CMakeFiles/spm.dir/src/spm.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1258: spm/CMakeFiles/spm.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Errors come if you try to compile without cuda. I was able to build now on my ubuntu for windows but I really want to get it working in a docker container. I’m getting the Dependency of CUDA_LIBRARIES ‘Threads::Threads’ NOT FOUND error that was seen previously.

I did some message statement in the cmake files and saw this

#47 9.506   lib_list
#47 9.506   /usr/local/cuda/lib64/libcudart_static.a;Threads::Threads;dl;/usr/lib/x86_64-linux-gnu/librt.so

comparing to my working install:

/usr/local/cuda-11.4/lib;/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib;/usr/local/cuda-11.4/lib64

I changed the ERROR for finding Threads to a warning and made it further.

What I finding now is an issue where the generated files have an error. For example:

sopalin/parsec/CMakeFiles/parsec_headers_tgt.dir/build.make (bad)

sopalin/parsec/pastix_cparsec.h: ../sopalin/parsec/Bad\ replacement\ pair\ \ 8\ in\ normal
pastix_zparsec.h
sopalin/parsec/pastix_cparsec.h: ../cmake_modules/morse_cmake/modules/precision_generator/codegen.py
sopalin/parsec/pastix_cparsec.h: ../cmake_modules/morse_cmake/modules/precision_generator/subs.py
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/tmp/pastix_i8/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Generating pastix_cparsec.h"
        cd /tmp/pastix_i8/build/sopalin/parsec && /usr/bin/cmake -E remove -f pastix_cparsec.h && /opt/intel/oneapi/intelpython/latest/bin/python /tmp/pastix_i8/cmake_modules/morse_cmake/modules/precision_generator/codegen.py -f /tmp/pastix_i8/sopalin/parsec/Bad\ replacement\ pair\ \ 8\ in\ normal
pastix_zparsec.h -p c -P ./ && chmod a-w pastix_cparsec.h

sopalin/parsec/CMakeFiles/parsec_headers_tgt.dir/build.make (good)

sopalin/parsec/pastix_cparsec.h: ../sopalin/parsec/pastix_zparsec.h
sopalin/parsec/pastix_cparsec.h: ../cmake_modules/morse_cmake/modules/precision_generator/codegen.py
sopalin/parsec/pastix_cparsec.h: ../cmake_modules/morse_cmake/modules/precision_generator/subs.py
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Generating pastix_cparsec.h"
        cd /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/build/sopalin/parsec && /usr/bin/cmake -E remove -f pastix_cparsec.h && /usr/bin/python2 /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/cmake_modules/morse_cmake/modules/precision_generator/codegen.py -f /home/mshamber/git/plane/tmp/calculix/PaStix/pastix_src/sopalin/parsec/pastix_zparsec.h -p c -P ./ && chmod a-w pastix_cparsec.h

So some issue is preventing the cmake files from generating properly.

Seems related to the version of python that is being used by cmake. After python3.6 there are “bad\ escape\ /s\ at\ position\ 1” exceptions being thrown when the python scripts called by cmake are running. My working version found the /usr/bin/python2.

1 Like

Adding python-minimal into the docker container made the cmake errors go away. It is using python2. Next issue is that compared to my working version some of the header files are not being generated. for example, pastix_ccores.h is not generated and it causes a compile error later on. Worst case I could copy those in from my working version though will attempt to debug it.

I’m hoping to have 4 docker builds with/without pastix and gnu vs intel compilers. Only without pastix with intel compiler is working so far.

Latest link to my docker project:

https://github.com/opme/calculix_docker/

1 Like

Was able to get pastix to build now with the gnu compiler and using the ubuntu system hwloc. Not sure if this is ok. Now need to find minimal dependencies to get it to run and clean it up.

2 Likes